Alejandro21
12 years agoOccasional Contributor
[Res] reading response length from load test
Hi all,
As part of my test case, I have a groovy script test step in which I read some info about the test case and then store it in a csv file. One of the things I read is the response length to a soap request, using the following
When I execute the test case, I have no problems with this script and can read the response length. However, when create a test load based on this test case, I receive the following error for the groovy script test step
java.lang.NullPointerException: Cannot get property 'length' on null object java.lang.NullPointerException: Cannot get property 'length' on null object
Of course, I previously validated that the response exits, actually I have no problems within the load test to read some parameters from the response, like the following
Does anybody have an idea of why this behavior while accessing the response length inside a load test? I do need to read the response length, so anybody has a suggestion of another way of doing this that might work with the load test?
Another thing I have noticed is that the TearDown script I have for the test case is not being executed during the load test, is that the expected behavior?
Thanks!!!
Alejandro
As part of my test case, I have a groovy script test step in which I read some info about the test case and then store it in a csv file. One of the things I read is the response length to a soap request, using the following
length=testRunner.testCase.testSteps["CheckAvailabilityv2 - Request 1"].testRequest.response.rawResponseData.length
When I execute the test case, I have no problems with this script and can read the response length. However, when create a test load based on this test case, I receive the following error for the groovy script test step
java.lang.NullPointerException: Cannot get property 'length' on null object java.lang.NullPointerException: Cannot get property 'length' on null object
Of course, I previously validated that the response exits, actually I have no problems within the load test to read some parameters from the response, like the following
time=testRunner.testCase.testSteps["CheckAvailabilityv2 - Request 1"].testRequest.response.timeTaken
Does anybody have an idea of why this behavior while accessing the response length inside a load test? I do need to read the response length, so anybody has a suggestion of another way of doing this that might work with the load test?
Another thing I have noticed is that the TearDown script I have for the test case is not being executed during the load test, is that the expected behavior?
Thanks!!!
Alejandro