fwseb
4 years agoNew Contributor
More correct assertion of testcase
I use a groovy script to cancel (or abort) the test execution (if some precondition is satisfied):
// test step "SendSellOrderVerifyRequest" is a setup/precondition of the testcase.
def rspHeader = context.testCase.testSteps["SendSellOrderVerifyRequest"].testRequest.response.responseHeaders
if (! rspHeader["#status#"].contains("HTTP/1.1 200 OK")) {
context.testRunner.cancel("TestCase cancelled, because ...... ")
}
This gives the test case "Cancelled" result in ReadyAPI, as well as in the test log:
2021-03-23T13:51:45.4138758Z 14:51:45,399 INFO [SoapUIProTestCaseRunner] Finished running TestCase [xxxxxx], time taken: 1259ms, status: CANCELED
But, in Azure pipeline, this test case is counted as "Passed", probably because "Canceled" is not a supported outcome of test result in Azure:
> There are 15 possible outcomes for a test result: Aborted, Blocked, Error, Failed, Inconclusive, In progress, None, Not applicable, Not executed, Not impacted, Passed, Paused, Timeout, Unspecified, and Warning.
My question is:
How many test result outcomes are ReadyAPI supporting, besides Passed, Failed and Canceled? is there any way to set the test assertion to "Aborted" or "Inconclusive" etc that Azure supports, to align with Azure? If not can you add the feature of having more assertion outcomes such as "Aborted"?