JMeter - Decoding Unicode response code

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JMeter - Decoding Unicode response code

Akhilekhya Avantsa-2
Hi Team,

I am working with a scenario where the recorded response code is getting captured as Unicode encoded  but in HTTP request it is passed as Java Entity and due to this differences, I am unable to handle this value for correlation using regular expressions as this a very lengthy value.
I have tried writing java code in beanshell  to decode this Unicode value  but it did not help.

Is there any option to disable this encoding at response code level ?

Please suggest some java code to convert this (or) any other option to resolve this issue.

Captured in Recorded Response code in View Results tree as below -(Unicode encoded ):

es_securityContext":"\u003Cidentities id\u003D\"aXF4amE2NA\u003D\u003D\"\u003E\u003CssoToken\u003EDP9SCRnS9kFO90m5Cnf3exz8G44wxk1qAY8OYRMfutQ\/i6QNYSAAHTP6N3fs20XHK4LnUoySAlMbJrlMsDJ7ykbjzISy8fLANRo4fmNIUs2aGahKjJeAcOHa86UXLOET6uahVfxmOFZnM20Z45tBdqheGHViQmjh3BiWiPeUcv7\u002BnFEPUxCyMOokfiLWYAU\u002BFZojOoD\u002BIs1zm9qjKax3wJUuCF9CD06izoiFkZaEl4QoezmPkNhxfdqsh2cGPcVNFP8uHwzZQ9HHHJCzUkmRuwfWZWovfjZTSRKdCfbkvK8d1YMjz\/5ZSmFSZrZC7Cj2XqktLPujJLIn7LSflOOrz2LXjTpEcyF0jKWWsl1F4Zi6embaRYRDDs\/MH1Sf2GmWsqIB7P1\/ffnHaAvJx9kkNOj8w\u002BI\u002BD2\/Wi3fj6GwtRZ7dHv6C1f4321SwX0Wp2rvjc51VAZV0JeMIBxS4UBwUipJrm\/heWkS5xelrg9lCikfXquUnAOi\u002Bpy47NhqjZUN1eZYpwVdJI1C0EjXaxjCzSxTDKqfCmdo\/3bVEOY6tioo9\/OLFFngJtaR0oOGhR3NP9duQwHbopbpoTTI\u002BWxeThOBTY8B9BQv3lmPLnpAumoOAPTziGpRyk9f3PGN7Kj3bnpB5NcAH\/Fto1IHigagnXVxKN8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u003C\/cookie\u003E\u003Ccookie name\u003D\"SlNFU1NJT05JRA\u003D\u003D\"\u003EMDAwMXJUN3dlcnJGc0lLYkV2a010SWgwRVVBOjFkbTNua3QwMQ\u003D\u003D\u003C\/cookie\u003E\u003C\/cookies\u003E\u003Cidentity id\u003D\"RmlsZU5ldFA4ISFmaWxlbmV0cDghIVdTSQ\u003D\u003D\"\u003E\u003Cusername\u003Enull\u003C\/username\u003E\u003Ctype\u003Efilenetp8\u003C\/type\u003E\u003Cpassword encrypt\u003D\"no\"\u003Enull\u003C\/password\u003E\u003Cgroups\u003E\u003Cgroup

Captured in HTTP Request as below- (Java enity/ Decoded Unicode):

@SecurityContext::'<identities id="aXF4amE2NA=="><ssoToken>DP9SCRnS9kFO90m5Cnf3exz8G44wxk1qAY8OYRMfutQ/i6QNYSAAHTP6N3fs20XHK4LnUoySAlMbJrlMsDJ7ykbjzISy8fLANRo4fmNIUs2aGahKjJeAcOHa86UXLOET6uahVfxmOFZnM20Z45tBdqheGHViQmjh3BiWiPeUcv7+nFEPUxCyMOokfiLWYAU+FZojOoD+Is1zm9qjKax3wJUuCF9CD06izoiFkZaEl4QoezmPkNhxfdqsh2cGPcVNFP8uHwzZQ9HHHJCzUkmRuwfWZWovfjZTSRKdCfbkvK8d1YMjz/5ZSmFSZrZC7Cj2XqktLPujJLIn7LSflOOrz2LXjTpEcyF0jKWWsl1F4Zi6embaRYRDDs/MH1Sf2GmWsqIB7P1/ffnHaAvJx9kkNOj8w+I+D2/Wi3fj6GwtRZ7dHv6C1f4321SwX0Wp2rvjc51VAZV0JeMIBxS4UBwUipJrm/heWkS5xelrg9lCikfXquUnAOi+py47NhqjZUN1eZYpwVdJI1C0EjXaxjCzSxTDKqfCmdo/3bVEOY6tioo9/OLFFngJtaR0oOGhR3NP9duQwHbopbpoTTI+WxeThOBTY8B9BQv3lmPLnpAumoOAPTziGpRyk9f3PGN7Kj3bnpB5NcAH/Fto1IHigagnXVxKN8n8f8i4G9rzuE9R5N06cwQ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Nua3QwMQ==</cookie></cookies><identity id="RmlsZU5ldFA4ISFmaWxlbmV0cDghIVdTSQ=="><username>null</username><type>filenetp8</type><password encrypt="no">null</password>

Regards,
Akhilekhya Avantsa,
Test Analyst,
Infosys Ltd.
Reply | Threaded
Open this post in threaded view
|

Re: JMeter - Decoding Unicode response code

Felix Schumacher
Hi Akhilekhya,

I have to admin, that I did not understand, what you are doing, or what
you are trying to achieve. Could you explain it in a bit more detail?
Maybe a minimal test plan and a site, where we could test your scenario
against, would help.

Other than that, it might be a good idea to tell us, what you tried
(even if it didn't work, i.e. the beanshell code). Maybe we can do a
better guess, at what you are trying, when we see those examples.

Felix

Am 09.12.20 um 12:08 schrieb Akhilekhya Avantsa:

> Hi Team,
>
> I am working with a scenario where the recorded response code is getting captured as Unicode encoded  but in HTTP request it is passed as Java Entity and due to this differences, I am unable to handle this value for correlation using regular expressions as this a very lengthy value.
> I have tried writing java code in beanshell  to decode this Unicode value  but it did not help.
>
> Is there any option to disable this encoding at response code level ?
>
> Please suggest some java code to convert this (or) any other option to resolve this issue.
>
> Captured in Recorded Response code in View Results tree as below -(Unicode encoded ):
>
> es_securityContext":"\u003Cidentities id\u003D\"aXF4amE2NA\u003D\u003D\"\u003E\u003CssoToken\u003EDP9SCRnS9kFO90m5Cnf3exz8G44wxk1qAY8OYRMfutQ\/i6QNYSAAHTP6N3fs20XHK4LnUoySAlMbJrlMsDJ7ykbjzISy8fLANRo4fmNIUs2aGahKjJeAcOHa86UXLOET6uahVfxmOFZnM20Z45tBdqheGHViQmjh3BiWiPeUcv7\u002BnFEPUxCyMOokfiLWYAU\u002BFZojOoD\u002BIs1zm9qjKax3wJUuCF9CD06izoiFkZaEl4QoezmPkNhxfdqsh2cGPcVNFP8uHwzZQ9HHHJCzUkmRuwfWZWovfjZTSRKdCfbkvK8d1YMjz\/5ZSmFSZrZC7Cj2XqktLPujJLIn7LSflOOrz2LXjTpEcyF0jKWWsl1F4Zi6embaRYRDDs\/MH1Sf2GmWsqIB7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ZYcXVVbkFPaStweTQ3TmhxalpVTjFlWllwd1ZkSkkxQzBFalhheGpDelN4VERLcWZDbWRvLzNiVkVPWTZ0aW9vOS9PTEZGbmdKdGFSMG9PR2hSM05QOWR1UXdIYm9wYnBvVFRJK1d4ZVRoT0JUWThCOUJRdjNsbVBMbnBBdW1vT0FQVHppR3BSeWs5ZjNQR043S2ozYm5wQjVOY0FIL0Z0bzFJSGlnYWduWFZ4S044bjhmOGk0RzlyenVFOVI1TjA2Y3dRQ3BNRmorZU9aNk1aOFhYVGE\u003D\u003C\/cookie\u003E\u003Ccookie name\u003D\"SlNFU1NJT05JRA\u003D\u003D\"\u003EMDAwMXJUN3dlcnJGc0lLYkV2a010SWgwRVVBOjFkbTNua3QwMQ\u003D\u003D\u003C\/cookie\u003E\u003C\/cookies\u003E\u003Cidentity id\u003D\"RmlsZU5ldFA4ISFmaWxlbmV0cDghIVdTSQ\u003D\u003D\"\u003E\u003Cusername\u003Enull\u003C\/username\u003E\u003Ctype\u003Efilenetp8\u003C\/type\u003E\u003Cpassword encrypt\u003D\"no\"\u003Enull\u003C\/password\u003E\u003Cgroups\u003E\u003Cgroup
>
> Captured in HTTP Request as below- (Java enity/ Decoded Unicode):
>
> @SecurityContext::'<identities id="aXF4amE2NA=="><ssoToken>DP9SCRnS9kFO90m5Cnf3exz8G44wxk1qAY8OYRMfutQ/i6QNYSAAHTP6N3fs20XHK4LnUoySAlMbJrlMsDJ7ykbjzISy8fLANRo4fmNIUs2aGahKjJeAcOHa86UXLOET6uahVfxmOFZnM20Z45tBdqheGHViQmjh3BiWiPeUcv7+nFEPUxCyMOokfiLWYAU+FZojOoD+Is1zm9qjKax3wJUuCF9CD06izoiFkZaEl4QoezmPkNhxfdqsh2cGPcVNFP8uHwzZQ9HHHJCzUkmRuwfWZWovfjZTSRKdCfbkvK8d1YMjz/5ZSmFSZrZC7Cj2XqktLPujJLIn7LSflOOrz2LXjTpEcyF0jKWWsl1F4Zi6embaRYRDDs/MH1Sf2Gm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ERLcWZDbWRvLzNiVkVPWTZ0aW9vOS9PTEZGbmdKdGFSMG9PR2hSM05QOWR1UXdIYm9wYnBvVFRJK1d4ZVRoT0JUWThCOUJRdjNsbVBMbnBBdW1vT0FQVHppR3BSeWs5ZjNQR043S2ozYm5wQjVOY0FIL0Z0bzFJSGlnYWduWFZ4S044bjhmOGk0RzlyenVFOVI1TjA2Y3dRQ3BNRmorZU9aNk1aOFhYVGE=</cookie><cookie name="SlNFU1NJT05JRA==">MDAwMXJUN3dlcnJGc0lLYkV2a010SWgwRVVBOjFkbTNua3QwMQ==</cookie></cookies><identity id="RmlsZU5ldFA4ISFmaWxlbmV0cDghIVdTSQ=="><username>null</username><type>filenetp8</type><password encrypt="no">null</password>
>
> Regards,
> Akhilekhya Avantsa,
> Test Analyst,
> Infosys Ltd.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]