开发者

Error on asserts coming from the database

开发者 https://www.devze.com 2023-03-22 15:09 出处:网络
When I run the test cases inside soapUI, everything works fine. But when I\'m running the tests inside jenkins, the assertions fail as you can see in th开发者_如何学Cis gist.

When I run the test cases inside soapUI, everything works fine. But when I'm running the tests inside jenkins, the assertions fail as you can see in th开发者_如何学Cis gist.

I am not having issues when connecting to the database. Any tips for those asserts?


I suspect what you have is a timing issue. If your jdbc checks are occurring before the transaction has been committed by your server then you will see the sort of behaviour you have. This is particularly an issue where the web-service does not issue a response before you commence your jdbc checks.

Three possible solutions are:

  1. add a delay step before the assertions to allow the server time to commit the transactions
  2. add a response for your request to indicate when the database checks should occur
  3. Check the max id of the table and wait for a greater record to arrive before performing the checks.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号