cancel
Showing results for 
Search instead for 
Did you mean: 

Any way to make assertion script wait until AfterRequest script finish?

New Contributor

Any way to make assertion script wait until AfterRequest script finish?

In my mock service, I add AfterRequest script to allow save my rest request and response to SQLite db.

 

Some of my test case assertion script need read the request/response saved by AfterRequest script, but occasionally it fails due to the fact that assertion won't wait AfterRequest script. The log shows they're started execution at the same time.

 

I know I can manually put Thread.sleep in my assertion script, but it looks ugly. Anyone have a better solution?

 

Thanks

Jason

New Here?
Join us and watch the welcome video:
6 / 7 API Testing Mistakes Video
Top Kudoed Authors