Skip to main content

What is 'Interval Time' and 'Sleep Time"?

Interval Time --- Pacing time of each iteration. This includes the execution time of the test case and the sleep time.

Sleep Time -- Pacing time between the execution. This is amount of time, the scenario waits from the end of one execution, to the beginning of next execution.

Consider the following example to understand the Interval Time and Sleep Time better.
Suppose the user defines a test scenario which has 2 Test-Cases, testcase1 and testcase2.
Interval Time provided is 5 minutes and Sleep Time provided is 1 minute.


Example 1: Assume test case 1 takes 2 minute to complete execution.
In the above case sleep time would be 3(Time span leftover in interval time)+1(sleep time)=4 minutes(total sleep time).
Interval Time provided is 5 minutes and Sleep Time provided is 1 minute.


Example 2: Assume test case 1 takes 3 minute to complete execution.
In the above case sleep time would be 2(Time span leftover in interval time)+1(sleep time)=3 minute(total sleep time).
Interval Time provided is 5 minutes and Sleep Time provided is 1 minute.


Example 3: Assume test case 1 takes 6 minute to complete execution.
In the above case sleep time would be 1 minute since there is no time span left from the interval time.
Interval Time and Sleep time are also available at the Global options (Options panel of the Scenario Builder), Think time and Sleep time at the Test-case level will be considered and taken into account when user provides this option at both Test-Case and Global level.
==================================================
Adding more details and example:


Example 2
1 user is taking 15 seconds to execute the script that was designed.
Interval time is the time between every execution, it also takes execution time into consideration.
Suppose you run the same test case with 1 user for 5 mins (300 seconds).
Interval time provided is 100 seconds.


For every 100 seconds you should see one execution, so expected is 3 executions in total. Please find below screen-shot (IntervalTimeTest1).


Sleep Time:
As per definition it should be like the below
57 seconds + 100 seconds + 57 seconds + 100 seconds
Expected is 2 executions. Attached is the screen-shot for reference (SleepTimeTest1).


Run-2

Interval time.Same test was run for 10 minutes and the expected executions was 6. Attached is the screen-shot for reference (IntervalTimeTest2).


Sleep time.Same test was run for 10 minutes and the expected executions was 4. Attached is the screen-shot for reference (SleepTimeTest2).





Last updated: June 26, 2023

If you have any feedback on this topic, please contact us at documentation@appvance.ai