Saving form input from JMeter in a JSF app
I'm currently tasked to load test a JSF application using JMeter. For testing purposes, I'm trying to create the test script using localhost.
The scenario I've been trying to make a script of is when a user inputs something in the text field and clicks "save as draft". The value would then be persisted to the database.
I've already been successful getting the viewstate value (using CSS/JQuery Extractor), but when executing the script, Jmeter says it was successful but it wasn't able to save the input to DB. When checking the localhost sever logs, the error is index out of range:
Index out of range picture
This is the generated http request via BlazeMeter Recording with edited VIEWSTATE variable:
HTTP request sample
This is my first time using JMeter and JSF (I'm a developer but currently tasked to do the load testing, and I haven't used JSF before)... have I missed something in the setup? Any help would be highly appreciated, thank you!
java jsf testing jmeter load
add a comment |
I'm currently tasked to load test a JSF application using JMeter. For testing purposes, I'm trying to create the test script using localhost.
The scenario I've been trying to make a script of is when a user inputs something in the text field and clicks "save as draft". The value would then be persisted to the database.
I've already been successful getting the viewstate value (using CSS/JQuery Extractor), but when executing the script, Jmeter says it was successful but it wasn't able to save the input to DB. When checking the localhost sever logs, the error is index out of range:
Index out of range picture
This is the generated http request via BlazeMeter Recording with edited VIEWSTATE variable:
HTTP request sample
This is my first time using JMeter and JSF (I'm a developer but currently tasked to do the load testing, and I haven't used JSF before)... have I missed something in the setup? Any help would be highly appreciated, thank you!
java jsf testing jmeter load
add a comment |
I'm currently tasked to load test a JSF application using JMeter. For testing purposes, I'm trying to create the test script using localhost.
The scenario I've been trying to make a script of is when a user inputs something in the text field and clicks "save as draft". The value would then be persisted to the database.
I've already been successful getting the viewstate value (using CSS/JQuery Extractor), but when executing the script, Jmeter says it was successful but it wasn't able to save the input to DB. When checking the localhost sever logs, the error is index out of range:
Index out of range picture
This is the generated http request via BlazeMeter Recording with edited VIEWSTATE variable:
HTTP request sample
This is my first time using JMeter and JSF (I'm a developer but currently tasked to do the load testing, and I haven't used JSF before)... have I missed something in the setup? Any help would be highly appreciated, thank you!
java jsf testing jmeter load
I'm currently tasked to load test a JSF application using JMeter. For testing purposes, I'm trying to create the test script using localhost.
The scenario I've been trying to make a script of is when a user inputs something in the text field and clicks "save as draft". The value would then be persisted to the database.
I've already been successful getting the viewstate value (using CSS/JQuery Extractor), but when executing the script, Jmeter says it was successful but it wasn't able to save the input to DB. When checking the localhost sever logs, the error is index out of range:
Index out of range picture
This is the generated http request via BlazeMeter Recording with edited VIEWSTATE variable:
HTTP request sample
This is my first time using JMeter and JSF (I'm a developer but currently tasked to do the load testing, and I haven't used JSF before)... have I missed something in the setup? Any help would be highly appreciated, thank you!
java jsf testing jmeter load
java jsf testing jmeter load
asked Nov 13 '18 at 5:22
Noreen Lazo
104
104
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Most probably your ${VIEWSTATE}
variable doesn't match what your server expects, double check its value using Debug Sampler and View Results Tree listener combination.
The javax.facex.ViewState
parameter value must 100% match the value which comes from the previous page so you need to ensure they're the same. You might also need to untick Encode
box for the ViewState as JMeter can substitute non-ASCII characters with URL-Encoded equivalents causing the mismatch.
Thank you! I was able to trace the viewstate value using your suggested link about debugging, and I found out that the form was not getting the viewstate value properly because the previous page doesn't have the input value where CSS/JQuery Extractor is getting the viewstate value from. Instead, I found out that viewstate value is in CDATA content. [I followed this link on how to extract the CDATA content ] (stackoverflow.com/questions/26912892/…) then I stored it in another variable. Thank you very much for your help!
– Noreen Lazo
Nov 13 '18 at 15:12
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2f53274312%2fsaving-form-input-from-jmeter-in-a-jsf-app%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Most probably your ${VIEWSTATE}
variable doesn't match what your server expects, double check its value using Debug Sampler and View Results Tree listener combination.
The javax.facex.ViewState
parameter value must 100% match the value which comes from the previous page so you need to ensure they're the same. You might also need to untick Encode
box for the ViewState as JMeter can substitute non-ASCII characters with URL-Encoded equivalents causing the mismatch.
Thank you! I was able to trace the viewstate value using your suggested link about debugging, and I found out that the form was not getting the viewstate value properly because the previous page doesn't have the input value where CSS/JQuery Extractor is getting the viewstate value from. Instead, I found out that viewstate value is in CDATA content. [I followed this link on how to extract the CDATA content ] (stackoverflow.com/questions/26912892/…) then I stored it in another variable. Thank you very much for your help!
– Noreen Lazo
Nov 13 '18 at 15:12
add a comment |
Most probably your ${VIEWSTATE}
variable doesn't match what your server expects, double check its value using Debug Sampler and View Results Tree listener combination.
The javax.facex.ViewState
parameter value must 100% match the value which comes from the previous page so you need to ensure they're the same. You might also need to untick Encode
box for the ViewState as JMeter can substitute non-ASCII characters with URL-Encoded equivalents causing the mismatch.
Thank you! I was able to trace the viewstate value using your suggested link about debugging, and I found out that the form was not getting the viewstate value properly because the previous page doesn't have the input value where CSS/JQuery Extractor is getting the viewstate value from. Instead, I found out that viewstate value is in CDATA content. [I followed this link on how to extract the CDATA content ] (stackoverflow.com/questions/26912892/…) then I stored it in another variable. Thank you very much for your help!
– Noreen Lazo
Nov 13 '18 at 15:12
add a comment |
Most probably your ${VIEWSTATE}
variable doesn't match what your server expects, double check its value using Debug Sampler and View Results Tree listener combination.
The javax.facex.ViewState
parameter value must 100% match the value which comes from the previous page so you need to ensure they're the same. You might also need to untick Encode
box for the ViewState as JMeter can substitute non-ASCII characters with URL-Encoded equivalents causing the mismatch.
Most probably your ${VIEWSTATE}
variable doesn't match what your server expects, double check its value using Debug Sampler and View Results Tree listener combination.
The javax.facex.ViewState
parameter value must 100% match the value which comes from the previous page so you need to ensure they're the same. You might also need to untick Encode
box for the ViewState as JMeter can substitute non-ASCII characters with URL-Encoded equivalents causing the mismatch.
answered Nov 13 '18 at 9:30
Dmitri T
69.2k33458
69.2k33458
Thank you! I was able to trace the viewstate value using your suggested link about debugging, and I found out that the form was not getting the viewstate value properly because the previous page doesn't have the input value where CSS/JQuery Extractor is getting the viewstate value from. Instead, I found out that viewstate value is in CDATA content. [I followed this link on how to extract the CDATA content ] (stackoverflow.com/questions/26912892/…) then I stored it in another variable. Thank you very much for your help!
– Noreen Lazo
Nov 13 '18 at 15:12
add a comment |
Thank you! I was able to trace the viewstate value using your suggested link about debugging, and I found out that the form was not getting the viewstate value properly because the previous page doesn't have the input value where CSS/JQuery Extractor is getting the viewstate value from. Instead, I found out that viewstate value is in CDATA content. [I followed this link on how to extract the CDATA content ] (stackoverflow.com/questions/26912892/…) then I stored it in another variable. Thank you very much for your help!
– Noreen Lazo
Nov 13 '18 at 15:12
Thank you! I was able to trace the viewstate value using your suggested link about debugging, and I found out that the form was not getting the viewstate value properly because the previous page doesn't have the input value where CSS/JQuery Extractor is getting the viewstate value from. Instead, I found out that viewstate value is in CDATA content. [I followed this link on how to extract the CDATA content ] (stackoverflow.com/questions/26912892/…) then I stored it in another variable. Thank you very much for your help!
– Noreen Lazo
Nov 13 '18 at 15:12
Thank you! I was able to trace the viewstate value using your suggested link about debugging, and I found out that the form was not getting the viewstate value properly because the previous page doesn't have the input value where CSS/JQuery Extractor is getting the viewstate value from. Instead, I found out that viewstate value is in CDATA content. [I followed this link on how to extract the CDATA content ] (stackoverflow.com/questions/26912892/…) then I stored it in another variable. Thank you very much for your help!
– Noreen Lazo
Nov 13 '18 at 15:12
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2f53274312%2fsaving-form-input-from-jmeter-in-a-jsf-app%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