How to add assertion in Load Test
Hi every body.
I added a "Browser Validation Tool" and I "parameterized" it, when I run test it in "SOATest" it return failure (it is OK) but when I run it in load test it doesn't work and all of test passed.
I think that "Assertion" don't work in load test.
Please see following images.
Comments
-
When your run a web functional test in SOAtest, the test scenario runs in an actual browser and any validation tools attached to "Browser Contents" are run on the contents of the page as they are rendered in the browser. When you run the same test in Load Test, the test scenario does not run in a browser; instead, the requests that were made by the browser are captured and replayed in a "headless" mode where the HTTP requests are simply sent to the server. Because of this, any tools attached to the Browser Contents output will not run.
You need to do some additional configuration to configure web scenarios properly for load testing. Please see https://docs.parasoft.com/display/SOA9105/Preparing+Web+Functional+Tests+for+Load+Testing for instructions about how to do this. That topic discusses the Load Test perspective, which allows you to see an configure the HTTP requests that will be sent to the server. In addition, you will see that the Browser Contents output will be gone. In order to configure a validation on one of the HTTP responses, you will need to right-click on the appropriate test (when in the Load Test perspective) and choose to add some kind of validation tool (JSON assertor, XML assertor, Search tool, etc.) to the appropriate HTTP request/response based on the format of the response payload.
0 -
Dear jakubiak,
Thank you for your reply, I can't use search tools because it can not be parameterized and also I can't use XLM and JSON Assertion because my response is html format so I have to use Extension tools.
0 -
You could first use the HTML Cleanup tool in the mode that converts to XHTML, and then add an XML Assertor to that.
1 -
Thank you so much
0