1

Here is the situation I am facing.

I have created on JMX script, in which I gave the CSV data config which has defined Username & Password data for 2 Rows.

Thread Group : I Have given 2 Users 1 Iteration

Assertion : Main Sample only/Text Response /Contains Current Thread Group/Current Thread

Without Assertion /With the Assertion for Username : When I looked at the Response body taking the right Username & Password

Response Code: 200 and OK. I have checked the following calls response code is fine and script ran successfully till Logout call.

Question : With the Assertion even though taking the Right values,fails on the Assertion. Response Assertion : Test failed: text expected to contain /tt_perf1/

Please advise me!

Thanks, Rajani

0

Does response body always contain tt_perf1 or it varies basing on CSV Data Set Config? If so, you need to put the variable into the assertion.

Assertions have their scope. It can be applied to individual sampler, sampler group or all samplers. If you expecting just one sampler to have this "tt_perf1" value - add assertion as a child of that sampler.

Assertion field to check also matters. By default it applies to main sample only and looks up in text response. If your "tt_perf1" is in the URL - assertion will fail unless you configure it to look into URL field.

For more information on JMeter assertions see How to Use JMeter Assertions in 3 Easy Steps guide.

  • Dmitri, Yes, in TT3 script always 2nd user is tt_perf1. In TT6 script has 7 users ,takes 2nd user to 7th user I.e tt_perf1 to tt_perf7. As I mentioned above i didn't select URL Sampled.I have tried all options except Jmeter variable for the Response field to TestCould you please elaborate assertion variable,I would like to try that way. Thanks,Raj – rpagadala Apr 4 '15 at 21:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.