Notifications

3 views

Description

Async activities like workflow,  BR's etc triggered by an automated test may not complete within the time frame of the test execution. 

So any step that assert on the result of these async activities may result in the automated test failure.

Cause

The async activities run independently of the automated test and is not bound to complete within the test execution time frame.

 

For example: In the example below the 'Record Query' step failed as the workflow activity that was meant to create a record ran few milliseconds after the test step :


2019-12-01 15:45:57 (078) worker.7 worker.7 txid=3ece7c1813e1 Processing step order: 19 for step config: Record Query

2019-12-01 15:45:57 (095) worker.7 worker.7 txid=3ece7c1813e1 SessionDebug 'log' enabled for user: <user>

2019-12-01 15:45:57 (552) worker.6 worker.6 txid=15ee305813e1 DEBUG: completed <worflow activity name>(5db7a88c133f3300a42330128144b050): event=execute

Resolution

For async updates like updates by workflow, business rules, event processing etc, introduce a wait before the validation or query step. This can be done by using gs.sleep(5000), where the argument is in milliseconds, so 5000 will wait for 5 seconds

 

Article Information

Last Updated:2020-01-13 15:40:54
Published:2019-12-02