Can you pause an ATF(Automated Test Framework)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2019 03:31 PM
Hello Guys,
I was wondering if anyone knows how to pause an ATF between 2 steps.
I don't know if there is an OOB functionality that allows that or needs to be customized through a Server Side Validation Script.
Any idea would help.
Thanks!
- Labels:
-
Automated Test Framework

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2019 05:20 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2019 12:13 AM
By incorporating the above mentioned code in the Run Server Side Script there are few problems that I faced.
Firstly, if we add only the above mentioned 3 lines of code in the script in between 2 ATF test steps, the Server Side script is running properly, but the next step is giving an error stating "g_form is not defined" as the instance is made to sleep the test step is rolling back(which is a functionality of ATF).
Secondly, if we take up the previous sys_id of the test and include it in the Server side script, then the whole test step is showing an error stating the "sys_id id not undefined". This is again because of the fact that we are making the instance sleep as a result the results are rolling back and hence the sys_id cannot be fetched.
The only probable solution to make the ATF pause is to increase the "TIMEOUT" which will make that particular test step run for the specified amount of time.
Note: The field TIMEOUT is hidden on the form layout, but it can be modified from the list layout.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2023 03:21 PM
because i came here from google - i should note this isn't completely correct.
use `sn_atf.AutomatedTestingFramework.waitOneSecond()` instead of gs.sleep. If you need to wait more than a second, as such:
var waitSeconds = 10;
for(var i = 0; i < waitSeconds; i++) {
sn_atf.AutomatedTestingFramework.waitOneSecond()
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2019 12:13 AM
By incorporating the above mentioned code in the Run Server Side Script there are few problems that I faced.
Firstly, if we add only the above mentioned 3 lines of code in the script in between 2 ATF test steps, the Server Side script is running properly, but the next step is giving an error stating "g_form is not defined" as the instance is made to sleep the test step is rolling back(which is a functionality of ATF).
Secondly, if we take up the previous sys_id of the test and include it in the Server side script, then the whole test step is showing an error stating the "sys_id id not undefined". This is again because of the fact that we are making the instance sleep as a result the results are rolling back and hence the sys_id cannot be fetched.
The only probable solution to make the ATF pause is to increase the "TIMEOUT" which will make that particular test step run for the specified amount of time.
Note: The field TIMEOUT is hidden on the form layout, but it can be modified from the list layout.