Forum Discussion
Nagravision_SA__1
12 years agoContributor
Hello,
I looked at the handler, but I cannot see how this would help in our case.
The LoopUntilTimeOutOrAssert is an utility TestCase. It is generic for any kind of SOAP or REST call.
It is then called by many Test case, for which we physically create the GET request and add assertion to it. This GET Request is disabled in the test case, but passed to the LoopUntilTimeOutOrAssert script.
The script is in charge of running the specified GET request, and check its assertion results.
If I move the script in an event handler:
- each new GET response it should apply to must be added to the filter, or use the same naming convention -> DoAble
- How does I get the assertion in the afterRequest handler ? I have the request available at this level, but getAssertionStatus() is available on the RestTestRequestStep...
- I guess if i managed to get the assertion I would then need to set a property with the status to test it in the LoopUntilTimeOutOrAssert script?
In any case... I still fail to understand why the getAssertionStatus() is not correct in my loop. Is this a known bug of the API, if not can it be entered as a bug and dealt with accordingly?
I looked at the handler, but I cannot see how this would help in our case.
The LoopUntilTimeOutOrAssert is an utility TestCase. It is generic for any kind of SOAP or REST call.
It is then called by many Test case, for which we physically create the GET request and add assertion to it. This GET Request is disabled in the test case, but passed to the LoopUntilTimeOutOrAssert script.
The script is in charge of running the specified GET request, and check its assertion results.
If I move the script in an event handler:
- each new GET response it should apply to must be added to the filter, or use the same naming convention -> DoAble
- How does I get the assertion in the afterRequest handler ? I have the request available at this level, but getAssertionStatus() is available on the RestTestRequestStep...
- I guess if i managed to get the assertion I would then need to set a property with the status to test it in the LoopUntilTimeOutOrAssert script?
In any case... I still fail to understand why the getAssertionStatus() is not correct in my loop. Is this a known bug of the API, if not can it be entered as a bug and dealt with accordingly?