BasicTest In ReadyAPI! Works "Sometimes" In SoapUI (v5.5.0) free
Hi,
I have a ReadyAPI! project that doesn't use any of the 'Pro' functionality. I am trying to get my ReadyAPI! project working in a CI/CD environment, and because we're waiting for purchasing (which will take 2 months) to buy a ReadyAPI! license for the CI/CD environment I've installed SoapUI v5.5.0 (free version) so we can use this until the company I work for pays for a ReadyAPI! license for the CI/CD environment.
HOWEVER - the tests which work perfectly when I run the tests in ReadyAPI! fail SOME OF THE TIME in SoapUI for 3 different reasons. The testcase doesn't use any of ReadyAPI! paid for functionality and I am pulling my hair out!
The testcase hierarchy is as follows:
POST (payload includes a unique templateid and a status attribute) - response gives a blank payload Delay (10 seconds) GET (query parm is a $filter which uses the unique templateid of the POST)
The payload of the POST is as follows:
{ "templateid" : "${#TestCase#templateid}", "ehcstatus" : 814250002 }
${#TestCase#templateid} -->> '${=java.util.UUID.randomUUID()' (which generates a unique GUID)
The GET includes a $filter parameter which is used to retrieve the record created via the POST - e.g. the GET URI is
/api/data/v9.1/defraexp_ehctemplates?$select=status,template&$filter=templateid eq 4d8f664a-b51c-4ef5-ad27-e2e8b1af5cb1
The GET includes 2 assertions - ensuring status and templateid is correct relative to the record created by the POST:
TemplateId assertion expected result is as follows:
${POST#RawRequest#$['templateid']}
Status assertion expected result is as follows:
${POST#RawRequest#$['status']}
Within SoapUI, the GET fails for 1 of 3 reasons:
1. either no record is returned
2. fails to assert a correct templateid
3. fails to assert a correct status
HOWEVER - in SoapUI I get different results each time I execute the tests - sometimes I get no records returned, othertimes if the record is returned in the templateid assertion fails, othertimes if the status assertion fails. It's not flaky code - cos if I execute the tests in ReadyAPI! - they execute successfully everytime.
Sometimes when executing the test, the GET will fail - but if I re-execute the GET again it sometimes works successfully (the assertions pass).
I can run the testcase 3 tiimes in a row and I get different failures (out of the 3 listed above) each time!
Ive spent 8 hours playing with 4 individual tests that return different execution results each time they're executed (but work fine in ReadyAPI!). I don't have any idea how to proceed now. ive tried fiddler - no luck
Has anyone got any ideas (other than dont use SoapUI free)?
Thanks - sorry for the long post,
rich