apache / jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
https://jmeter.apache.org/
Apache License 2.0
8.36k stars 2.1k forks source link

JMeter is sending the cookie is being sent as a string in POST instead JSON #5589

Open asfimport opened 2 years ago

asfimport commented 2 years ago

syanda (Bug 65664): During the reply of JMeter script Cookie value is being sent as a sting instead of sending in JSON format:

Below is the response headers and request body that was captured during recording the script. In both response header and request body USER_DETAILS cookie sent is JSON format:

Responder headers:

HTTP/1.1 200 OK Date: Thu, 28 Oct 2021 01:58:54 GMT X-Frame-Options: SAMEORIGIN X-OneAgent-JS-Injection: true X-FRAME-OPTIONS: SAMEORIGIN X-Content-Type-Options: nosniff Cache-Control: private, no-cache, no-store, must-revalidate Pragma: No-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT X-FRAME-OPTIONS: SAMEORIGIN Set-Cookie: SYSTEM_MODE=FEEBASED; Path=/; HttpOnly Set-Cookie: USER_DETAILS={"userType":"CSR"#"systemMode":"FEEBASED"#"userExperience":null#"tin":null#"tinStatus":null#"tinPaymentMethod":null#"tinAccessLvl":null#"loggedInUserID":"vashok3"#"activeRecord":null#"pendingRecord":null#"productRate":"0.5% of Payment"}; Path=/; HttpOnly Set-Cookie: providerTIN=411967313; Path=/; HttpOnly Set-Cookie: payerId=00000; Path=/; HttpOnly Set-Cookie: csrRole=efsppssup; Path=/; HttpOnly Set-Cookie: paymentDate=""; Path=/; HttpOnly Set-Cookie: userId=vashok3; Path=/; HttpOnly Set-Cookie: CSRNachaFlg=Y_efsppssup; Path=/; HttpOnly Server-Timing: dtSInfo;desc="0", dtRpid;desc="-278248185" Connection: close Transfer-Encoding: chunked Content-Type: text/html Content-Language: en-US Set-Cookie: BIGipServerppsp-stage-e-csr.optumhealthfinancial.com_8080=1631999498.36895.0000; expires=Thu, 28-Oct-2021 04:58:54 GMT; path=/; Httponly; Secure Strict-Transport-Security: max-age=300; includeSubDomains

Request Body:

Same USER_Details cookie from above response is sent in the request body below:

GET https://ppsp-stage-e-csr.optumhealthfinancial.com/viewPaymentCSR.do?flowType=CSR

GET data:

Cookie Data: BIGipServerppsp-stage-e-csr.optumhealthfinancial.com_8080=1631999498.36895.0000; JSESSIONID=0000ylQzPULycaZ4k6PHIzndGz1:1a9laq64b; SYSTEM_MODE=FEEBASED; USER_DETAILS={"userType":"CSR"#"systemMode":"FEEBASED"#"userExperience":null#"tin":null#"tinStatus":null#"tinPaymentMethod":null#"tinAccessLvl":null#"loggedInUserID":"vashok3"#"activeRecord":null#"pendingRecord":null#"productRate":"0.5% of Payment"}; providerTIN=411967313; payerId=00000; csrRole=efsppssup; paymentDate=""; userId=vashok3; CSRNachaFlg=Y_efsppssup; dtCookie=v_4_srv_60_sn_50B4C8450D57E683E9DE929A7E4DF9C5_perc_100000_ol_0_mul_1_app-3Aea7c4b59f27d43eb_1

Below the response header and request body after script reply:

Replay Response Headers:

HTTP/1.1 200 OK Date: Thu, 28 Oct 2021 16:21:50 GMT X-Frame-Options: SAMEORIGIN X-OneAgent-JS-Injection: true X-FRAME-OPTIONS: SAMEORIGIN X-Content-Type-Options: nosniff Cache-Control: private, no-cache, no-store, must-revalidate Pragma: No-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT X-FRAME-OPTIONS: SAMEORIGIN Set-Cookie: SYSTEM_MODE=FEEBASED; Path=/; HttpOnly Set-Cookie: USER_DETAILS={"userType":"CSR"#"systemMode":"FEEBASED"#"userExperience":null#"tin":null#"tinStatus":null#"tinPaymentMethod":null#"tinAccessLvl":null#"loggedInUserID":"vashok3"#"activeRecord":null#"pendingRecord":null#"productRate":"0.5% of Payment"}; Path=/; HttpOnly Set-Cookie: providerTIN=411967313; Path=/; HttpOnly Set-Cookie: payerId=00000; Path=/; HttpOnly Set-Cookie: csrRole=efsppssup; Path=/; HttpOnly Set-Cookie: paymentDate=""; Path=/; HttpOnly Set-Cookie: userId=vashok3; Path=/; HttpOnly Set-Cookie: CSRNachaFlg=Y_efsppssup; Path=/; HttpOnly Server-Timing: dtSInfo;desc="0", dtRpid;desc="481686321" Keep-Alive: timeout=30, max=199 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html Content-Language: en-US Set-Cookie: BIGipServerppsp-stage-e-csr.optumhealthfinancial.com_8080=1631999498.36895.0000; expires=Thu, 28-Oct-2021 19:21:50 GMT; path=/; Httponly; Secure Strict-Transport-Security: max-age=300; includeSubDomains

Replay Request Body:

Here the USER_DETAILS cookie is passed as a string instead of JSON

GET https://ppsp-stage-e-csr.optumhealthfinancial.com/viewPaymentCSR.do?flowType=CSR

GET data:

Cookie Data: JSESSIONID=0000HxIgEBpSUB3nu2gWvDHkauE:1e5int9un; dtCookie=v_4_srv_58_sn_852598A31A0F66B52B10C7C2C81C5058_perc_100000_ol_0_mul_1_app-3Aea7c4b59f27d43eb_1; SYSTEM_MODE=FEEBASED; USER_DETAILS="{userType:CSR#systemMode:FEEBASED#userExperience:null#tin:null#tinStatus:null#tinPaymentMethod:null#tinAccessLvl:null#loggedInUserID:vashok3#activeRecord:null#pendingRecord:null#productRate:0.5% of Payment}"; providerTIN=411967313; payerId=00000; csrRole=efsppssup; userId=vashok3; CSRNachaFlg=Y_efsppssup; BIGipServerppsp-stage-e-csr.optumhealthfinancial.com_8080=1631999498.36895.0000

Severity: normal OS: All

Duplicates:

asfimport commented 2 years ago

syanda (migrated from Bugzilla): (In reply to syanda from comment 0)

During the reply of JMeter script Cookie value is being sent as a sting instead of sending in JSON format:

Below is the response headers and request body that was captured during recording the script. In both response header and request body USER_DETAILS cookie sent is JSON format:

Responder headers:

HTTP/1.1 200 OK Date: Thu, 28 Oct 2021 01:58:54 GMT X-Frame-Options: SAMEORIGIN X-OneAgent-JS-Injection: true X-FRAME-OPTIONS: SAMEORIGIN X-Content-Type-Options: nosniff Cache-Control: private, no-cache, no-store, must-revalidate Pragma: No-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT X-FRAME-OPTIONS: SAMEORIGIN Set-Cookie: SYSTEM_MODE=FEEBASED; Path=/; HttpOnly Set-Cookie: USER_DETAILS={"userType":"CSR"#"systemMode":"FEEBASED"#"userExperience": null#"tin":null#"tinStatus":null#"tinPaymentMethod":null#"tinAccessLvl": null#"loggedInUserID":"vashok3"#"activeRecord":null#"pendingRecord": null#"productRate":"0.5% of Payment"}; Path=/; HttpOnly Set-Cookie: providerTIN=411967313; Path=/; HttpOnly Set-Cookie: payerId=00000; Path=/; HttpOnly Set-Cookie: csrRole=efsppssup; Path=/; HttpOnly Set-Cookie: paymentDate=""; Path=/; HttpOnly Set-Cookie: userId=vashok3; Path=/; HttpOnly Set-Cookie: CSRNachaFlg=Y_efsppssup; Path=/; HttpOnly Server-Timing: dtSInfo;desc="0", dtRpid;desc="-278248185" Connection: close Transfer-Encoding: chunked Content-Type: text/html Content-Language: en-US Set-Cookie: BIGipServerppsp-stage-e-csr.optumhealthfinancial.com_8080=1631999498.36895. 0000; expires=Thu, 28-Oct-2021 04:58:54 GMT; path=/; Httponly; Secure Strict-Transport-Security: max-age=300; includeSubDomains

Request Body:

Same USER_Details cookie from above response is sent in the request body below:

GET https://ppsp-stage-e-csr.optumhealthfinancial.com/viewPaymentCSR. do?flowType=CSR

GET data:

Cookie Data: BIGipServerppsp-stage-e-csr.optumhealthfinancial.com_8080=1631999498.36895. 0000; JSESSIONID=0000ylQzPULycaZ4k6PHIzndGz1:1a9laq64b; SYSTEM_MODE=FEEBASED; USER_DETAILS={"userType":"CSR"#"systemMode":"FEEBASED"#"userExperience": null#"tin":null#"tinStatus":null#"tinPaymentMethod":null#"tinAccessLvl": null#"loggedInUserID":"vashok3"#"activeRecord":null#"pendingRecord": null#"productRate":"0.5% of Payment"}; providerTIN=411967313; payerId=00000; csrRole=efsppssup; paymentDate=""; userId=vashok3; CSRNachaFlg=Y_efsppssup; dtCookie=v_4_srv_60_sn_50B4C8450D57E683E9DE929A7E4DF9C5_perc_100000_ol_0mul 1_app-3Aea7c4b59f27d43eb_1

Below the response header and request body after script reply:

Replay Response Headers:

HTTP/1.1 200 OK Date: Thu, 28 Oct 2021 16:21:50 GMT X-Frame-Options: SAMEORIGIN X-OneAgent-JS-Injection: true X-FRAME-OPTIONS: SAMEORIGIN X-Content-Type-Options: nosniff Cache-Control: private, no-cache, no-store, must-revalidate Pragma: No-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT X-FRAME-OPTIONS: SAMEORIGIN Set-Cookie: SYSTEM_MODE=FEEBASED; Path=/; HttpOnly Set-Cookie: USER_DETAILS={"userType":"CSR"#"systemMode":"FEEBASED"#"userExperience": null#"tin":null#"tinStatus":null#"tinPaymentMethod":null#"tinAccessLvl": null#"loggedInUserID":"vashok3"#"activeRecord":null#"pendingRecord": null#"productRate":"0.5% of Payment"}; Path=/; HttpOnly Set-Cookie: providerTIN=411967313; Path=/; HttpOnly Set-Cookie: payerId=00000; Path=/; HttpOnly Set-Cookie: csrRole=efsppssup; Path=/; HttpOnly Set-Cookie: paymentDate=""; Path=/; HttpOnly Set-Cookie: userId=vashok3; Path=/; HttpOnly Set-Cookie: CSRNachaFlg=Y_efsppssup; Path=/; HttpOnly Server-Timing: dtSInfo;desc="0", dtRpid;desc="481686321" Keep-Alive: timeout=30, max=199 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html Content-Language: en-US Set-Cookie: BIGipServerppsp-stage-e-csr.optumhealthfinancial.com_8080=1631999498.36895. 0000; expires=Thu, 28-Oct-2021 19:21:50 GMT; path=/; Httponly; Secure Strict-Transport-Security: max-age=300; includeSubDomains

Replay Request Body:

Here the USER_DETAILS cookie is passed as a string instead of JSON

GET https://ppsp-stage-e-csr.optumhealthfinancial.com/viewPaymentCSR. do?flowType=CSR

GET data:

Cookie Data: JSESSIONID=0000HxIgEBpSUB3nu2gWvDHkauE:1e5int9un; dtCookie=v_4_srv_58_sn_852598A31A0F66B52B10C7C2C81C5058_perc_100000_ol_0mul 1_app-3Aea7c4b59f27d43eb_1; SYSTEM_MODE=FEEBASED; USER_DETAILS="{userType:CSR#systemMode:FEEBASED#userExperience:null#tin: null#tinStatus:null#tinPaymentMethod:null#tinAccessLvl:null#loggedInUserID: vashok3#activeRecord:null#pendingRecord:null#productRate:0.5% of Payment}"; providerTIN=411967313; payerId=00000; csrRole=efsppssup; userId=vashok3; CSRNachaFlg=Y_efsppssup; BIGipServerppsp-stage-e-csr.optumhealthfinancial.com_8080=1631999498.36895. 0000

Can anyone have a solution for this issue?