Getting inverted commas appended in request while reading from csv in Jmeter?
up vote
0
down vote
favorite
I was trying to read csv file using csvdata config element in jmeter so as to test multiple logins but when I try to read the value from csv file then I get inverted commas appended with respect to result. Please tell me how to get rid of these commas being passed in the request parameters
Please find my csv data config and excel file and request parameter screenshot in attachments
jmeter jmeter-plugins jmeter-4.0
add a comment |
up vote
0
down vote
favorite
I was trying to read csv file using csvdata config element in jmeter so as to test multiple logins but when I try to read the value from csv file then I get inverted commas appended with respect to result. Please tell me how to get rid of these commas being passed in the request parameters
Please find my csv data config and excel file and request parameter screenshot in attachments
jmeter jmeter-plugins jmeter-4.0
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I was trying to read csv file using csvdata config element in jmeter so as to test multiple logins but when I try to read the value from csv file then I get inverted commas appended with respect to result. Please tell me how to get rid of these commas being passed in the request parameters
Please find my csv data config and excel file and request parameter screenshot in attachments
jmeter jmeter-plugins jmeter-4.0
I was trying to read csv file using csvdata config element in jmeter so as to test multiple logins but when I try to read the value from csv file then I get inverted commas appended with respect to result. Please tell me how to get rid of these commas being passed in the request parameters
Please find my csv data config and excel file and request parameter screenshot in attachments
jmeter jmeter-plugins jmeter-4.0
jmeter jmeter-plugins jmeter-4.0
asked Nov 19 at 13:16
keshav dwivedi
184
184
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
JMeter normally doesn't add anything to the variables, most probably you have the quotation marks in the generated CSV file, open it with normal text editor like Notepad and use find-and-replace feature to remove the quotation marks from there.
If you cannot efficiently control the CSV data you can use __strReplace() function in order to remove the quotation marks from the variables originating from the CSV Data Set Config on the fly like:
${__strReplace(${Username},",,)}
Demo:
You can install __strReplace()
function as well as other Custom JMeter Functions using JMeter Plugins Manager
I opened it using notepad and commas were there so I removed them and ran the csv again using csv datconfig but still I am getting error and login is not happening
– keshav dwivedi
Nov 20 at 5:18
I opened it using notepad and commas were there so I removed them and ran the csv again using csv datconfig but still I am getting error and login is not happening please refer links for screenshots of request image and response image which I got. Request image link:- pasteboard.co/HNZGBH1.png and response image link:- pasteboard.co/HNZH9G6.png
– keshav dwivedi
Nov 20 at 5:27
I see you have the same_csrf_token
value in all requests. It should not happen, this parameter needs to be dynamic, i.e. you need to extract it from the previous response using suitable JMeter Post-Processor, convert it into a JMeter Variable and replace the recorded value with the variable. Check out How to Load Test CSRF-Protected Web Sites article for more details.
– Dmitri T
Nov 20 at 6:16
I tried by using Post processor in homepage request which executes just before login HTTP request gave regular expression for csrf token and converted csrf token into variable but still it is giving error "Csrf token failed" , please refer image for Regular expression post processor :-pasteboard.co/HO9WP3D.png and parameterization done in HTTP request :- pasteboard.co/HO9Xcnu.png and the request which is sent :- pasteboard.co/HO9XDaZ.png and the Response received which contains "Cssrf token authentication failed" message :- pasteboard.co/HO9Y6X8.png
– keshav dwivedi
Nov 21 at 7:35
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
JMeter normally doesn't add anything to the variables, most probably you have the quotation marks in the generated CSV file, open it with normal text editor like Notepad and use find-and-replace feature to remove the quotation marks from there.
If you cannot efficiently control the CSV data you can use __strReplace() function in order to remove the quotation marks from the variables originating from the CSV Data Set Config on the fly like:
${__strReplace(${Username},",,)}
Demo:
You can install __strReplace()
function as well as other Custom JMeter Functions using JMeter Plugins Manager
I opened it using notepad and commas were there so I removed them and ran the csv again using csv datconfig but still I am getting error and login is not happening
– keshav dwivedi
Nov 20 at 5:18
I opened it using notepad and commas were there so I removed them and ran the csv again using csv datconfig but still I am getting error and login is not happening please refer links for screenshots of request image and response image which I got. Request image link:- pasteboard.co/HNZGBH1.png and response image link:- pasteboard.co/HNZH9G6.png
– keshav dwivedi
Nov 20 at 5:27
I see you have the same_csrf_token
value in all requests. It should not happen, this parameter needs to be dynamic, i.e. you need to extract it from the previous response using suitable JMeter Post-Processor, convert it into a JMeter Variable and replace the recorded value with the variable. Check out How to Load Test CSRF-Protected Web Sites article for more details.
– Dmitri T
Nov 20 at 6:16
I tried by using Post processor in homepage request which executes just before login HTTP request gave regular expression for csrf token and converted csrf token into variable but still it is giving error "Csrf token failed" , please refer image for Regular expression post processor :-pasteboard.co/HO9WP3D.png and parameterization done in HTTP request :- pasteboard.co/HO9Xcnu.png and the request which is sent :- pasteboard.co/HO9XDaZ.png and the Response received which contains "Cssrf token authentication failed" message :- pasteboard.co/HO9Y6X8.png
– keshav dwivedi
Nov 21 at 7:35
add a comment |
up vote
0
down vote
accepted
JMeter normally doesn't add anything to the variables, most probably you have the quotation marks in the generated CSV file, open it with normal text editor like Notepad and use find-and-replace feature to remove the quotation marks from there.
If you cannot efficiently control the CSV data you can use __strReplace() function in order to remove the quotation marks from the variables originating from the CSV Data Set Config on the fly like:
${__strReplace(${Username},",,)}
Demo:
You can install __strReplace()
function as well as other Custom JMeter Functions using JMeter Plugins Manager
I opened it using notepad and commas were there so I removed them and ran the csv again using csv datconfig but still I am getting error and login is not happening
– keshav dwivedi
Nov 20 at 5:18
I opened it using notepad and commas were there so I removed them and ran the csv again using csv datconfig but still I am getting error and login is not happening please refer links for screenshots of request image and response image which I got. Request image link:- pasteboard.co/HNZGBH1.png and response image link:- pasteboard.co/HNZH9G6.png
– keshav dwivedi
Nov 20 at 5:27
I see you have the same_csrf_token
value in all requests. It should not happen, this parameter needs to be dynamic, i.e. you need to extract it from the previous response using suitable JMeter Post-Processor, convert it into a JMeter Variable and replace the recorded value with the variable. Check out How to Load Test CSRF-Protected Web Sites article for more details.
– Dmitri T
Nov 20 at 6:16
I tried by using Post processor in homepage request which executes just before login HTTP request gave regular expression for csrf token and converted csrf token into variable but still it is giving error "Csrf token failed" , please refer image for Regular expression post processor :-pasteboard.co/HO9WP3D.png and parameterization done in HTTP request :- pasteboard.co/HO9Xcnu.png and the request which is sent :- pasteboard.co/HO9XDaZ.png and the Response received which contains "Cssrf token authentication failed" message :- pasteboard.co/HO9Y6X8.png
– keshav dwivedi
Nov 21 at 7:35
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
JMeter normally doesn't add anything to the variables, most probably you have the quotation marks in the generated CSV file, open it with normal text editor like Notepad and use find-and-replace feature to remove the quotation marks from there.
If you cannot efficiently control the CSV data you can use __strReplace() function in order to remove the quotation marks from the variables originating from the CSV Data Set Config on the fly like:
${__strReplace(${Username},",,)}
Demo:
You can install __strReplace()
function as well as other Custom JMeter Functions using JMeter Plugins Manager
JMeter normally doesn't add anything to the variables, most probably you have the quotation marks in the generated CSV file, open it with normal text editor like Notepad and use find-and-replace feature to remove the quotation marks from there.
If you cannot efficiently control the CSV data you can use __strReplace() function in order to remove the quotation marks from the variables originating from the CSV Data Set Config on the fly like:
${__strReplace(${Username},",,)}
Demo:
You can install __strReplace()
function as well as other Custom JMeter Functions using JMeter Plugins Manager
answered Nov 19 at 13:32
Dmitri T
66.6k33257
66.6k33257
I opened it using notepad and commas were there so I removed them and ran the csv again using csv datconfig but still I am getting error and login is not happening
– keshav dwivedi
Nov 20 at 5:18
I opened it using notepad and commas were there so I removed them and ran the csv again using csv datconfig but still I am getting error and login is not happening please refer links for screenshots of request image and response image which I got. Request image link:- pasteboard.co/HNZGBH1.png and response image link:- pasteboard.co/HNZH9G6.png
– keshav dwivedi
Nov 20 at 5:27
I see you have the same_csrf_token
value in all requests. It should not happen, this parameter needs to be dynamic, i.e. you need to extract it from the previous response using suitable JMeter Post-Processor, convert it into a JMeter Variable and replace the recorded value with the variable. Check out How to Load Test CSRF-Protected Web Sites article for more details.
– Dmitri T
Nov 20 at 6:16
I tried by using Post processor in homepage request which executes just before login HTTP request gave regular expression for csrf token and converted csrf token into variable but still it is giving error "Csrf token failed" , please refer image for Regular expression post processor :-pasteboard.co/HO9WP3D.png and parameterization done in HTTP request :- pasteboard.co/HO9Xcnu.png and the request which is sent :- pasteboard.co/HO9XDaZ.png and the Response received which contains "Cssrf token authentication failed" message :- pasteboard.co/HO9Y6X8.png
– keshav dwivedi
Nov 21 at 7:35
add a comment |
I opened it using notepad and commas were there so I removed them and ran the csv again using csv datconfig but still I am getting error and login is not happening
– keshav dwivedi
Nov 20 at 5:18
I opened it using notepad and commas were there so I removed them and ran the csv again using csv datconfig but still I am getting error and login is not happening please refer links for screenshots of request image and response image which I got. Request image link:- pasteboard.co/HNZGBH1.png and response image link:- pasteboard.co/HNZH9G6.png
– keshav dwivedi
Nov 20 at 5:27
I see you have the same_csrf_token
value in all requests. It should not happen, this parameter needs to be dynamic, i.e. you need to extract it from the previous response using suitable JMeter Post-Processor, convert it into a JMeter Variable and replace the recorded value with the variable. Check out How to Load Test CSRF-Protected Web Sites article for more details.
– Dmitri T
Nov 20 at 6:16
I tried by using Post processor in homepage request which executes just before login HTTP request gave regular expression for csrf token and converted csrf token into variable but still it is giving error "Csrf token failed" , please refer image for Regular expression post processor :-pasteboard.co/HO9WP3D.png and parameterization done in HTTP request :- pasteboard.co/HO9Xcnu.png and the request which is sent :- pasteboard.co/HO9XDaZ.png and the Response received which contains "Cssrf token authentication failed" message :- pasteboard.co/HO9Y6X8.png
– keshav dwivedi
Nov 21 at 7:35
I opened it using notepad and commas were there so I removed them and ran the csv again using csv datconfig but still I am getting error and login is not happening
– keshav dwivedi
Nov 20 at 5:18
I opened it using notepad and commas were there so I removed them and ran the csv again using csv datconfig but still I am getting error and login is not happening
– keshav dwivedi
Nov 20 at 5:18
I opened it using notepad and commas were there so I removed them and ran the csv again using csv datconfig but still I am getting error and login is not happening please refer links for screenshots of request image and response image which I got. Request image link:- pasteboard.co/HNZGBH1.png and response image link:- pasteboard.co/HNZH9G6.png
– keshav dwivedi
Nov 20 at 5:27
I opened it using notepad and commas were there so I removed them and ran the csv again using csv datconfig but still I am getting error and login is not happening please refer links for screenshots of request image and response image which I got. Request image link:- pasteboard.co/HNZGBH1.png and response image link:- pasteboard.co/HNZH9G6.png
– keshav dwivedi
Nov 20 at 5:27
I see you have the same
_csrf_token
value in all requests. It should not happen, this parameter needs to be dynamic, i.e. you need to extract it from the previous response using suitable JMeter Post-Processor, convert it into a JMeter Variable and replace the recorded value with the variable. Check out How to Load Test CSRF-Protected Web Sites article for more details.– Dmitri T
Nov 20 at 6:16
I see you have the same
_csrf_token
value in all requests. It should not happen, this parameter needs to be dynamic, i.e. you need to extract it from the previous response using suitable JMeter Post-Processor, convert it into a JMeter Variable and replace the recorded value with the variable. Check out How to Load Test CSRF-Protected Web Sites article for more details.– Dmitri T
Nov 20 at 6:16
I tried by using Post processor in homepage request which executes just before login HTTP request gave regular expression for csrf token and converted csrf token into variable but still it is giving error "Csrf token failed" , please refer image for Regular expression post processor :-pasteboard.co/HO9WP3D.png and parameterization done in HTTP request :- pasteboard.co/HO9Xcnu.png and the request which is sent :- pasteboard.co/HO9XDaZ.png and the Response received which contains "Cssrf token authentication failed" message :- pasteboard.co/HO9Y6X8.png
– keshav dwivedi
Nov 21 at 7:35
I tried by using Post processor in homepage request which executes just before login HTTP request gave regular expression for csrf token and converted csrf token into variable but still it is giving error "Csrf token failed" , please refer image for Regular expression post processor :-pasteboard.co/HO9WP3D.png and parameterization done in HTTP request :- pasteboard.co/HO9Xcnu.png and the request which is sent :- pasteboard.co/HO9XDaZ.png and the Response received which contains "Cssrf token authentication failed" message :- pasteboard.co/HO9Y6X8.png
– keshav dwivedi
Nov 21 at 7:35
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53375478%2fgetting-inverted-commas-appended-in-request-while-reading-from-csv-in-jmeter%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown