0
votes

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!

1

1 Answers

0
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.

enter image description here