Difference between revisions of "VARIABLE DELAYS"

From Test Automation Patterns
Jump to navigation Jump to search
(Created page with "<div id="content_view" class="wiki" style="display: block"><span style="font-size: 14px">.........................................................................................")
 
m (Topic titles in capital letters)
Line 1: Line 1:
 
<div id="content_view" class="wiki" style="display: block"><span style="font-size: 14px">.................................................................................................................[[Main Page]] / Back to [[Execution Patterns]] / Back to [[Test Automation Patterns]]</span>
 
<div id="content_view" class="wiki" style="display: block"><span style="font-size: 14px">.................................................................................................................[[Main Page]] / Back to [[Execution Patterns]] / Back to [[Test Automation Patterns]]</span>
=<span style="font-size: 16px">Pattern summary</span>=
+
=<span style="font-size: 16px">'''Pattern summary'''</span>=
 
<span style="font-size: 16px">Use variable delays based on events, not fixed delays based on elapsed time</span>
 
<span style="font-size: 16px">Use variable delays based on events, not fixed delays based on elapsed time</span>
=<span style="font-size: 16px">Category</span>=
+
=<span style="font-size: 16px">'''Category'''</span>=
 
<span style="font-size: 16px">Execution</span>
 
<span style="font-size: 16px">Execution</span>
=<span style="font-size: 16px">Context</span>=
+
=<span style="font-size: 16px">'''Context'''</span>=
 
<span style="font-size: 16px">Use this pattern to make your test run as fast and as efficiently as possible</span>
 
<span style="font-size: 16px">Use this pattern to make your test run as fast and as efficiently as possible</span>
=<span style="font-size: 16px">Description</span>=
+
=<span style="font-size: 16px">'''Description'''</span>=
 
<span style="font-size: 16px">When SUT execution is slow it may be necessary to add delays to the automation script. Fixed length delays should be avoided, because in order to account for different test environments, traffic situations and so on you have to use the longest possible pause. New generation tools offer the possibility to wait only until an event happens. The tool will wait the given maximum wait-time only if the event doesn’t occur at all. </span>
 
<span style="font-size: 16px">When SUT execution is slow it may be necessary to add delays to the automation script. Fixed length delays should be avoided, because in order to account for different test environments, traffic situations and so on you have to use the longest possible pause. New generation tools offer the possibility to wait only until an event happens. The tool will wait the given maximum wait-time only if the event doesn’t occur at all. </span>
=<span style="font-size: 16px">Implementation </span>=
+
=<span style="font-size: 16px">'''Implementation'''</span>=
 
<span style="font-size: 16px">The actual implementation depends not only on the tool you are using, but also on how the System under Test (SUT) has been developed. Some suggestions when developing variable delays: </span><br /> <br /> <span style="font-size: 16px">If the SUT shows when an action has been terminated, check it and delay execution until it switches auf true: </span><br />  
 
<span style="font-size: 16px">The actual implementation depends not only on the tool you are using, but also on how the System under Test (SUT) has been developed. Some suggestions when developing variable delays: </span><br /> <br /> <span style="font-size: 16px">If the SUT shows when an action has been terminated, check it and delay execution until it switches auf true: </span><br />  
 
 
* <span style="font-size: 16px"> a window disappears or appears</span>
 
* <span style="font-size: 16px"> a window disappears or appears</span>
 
* <span style="font-size: 16px">a GUI-Component is enabled or disabled</span>
 
* <span style="font-size: 16px">a GUI-Component is enabled or disabled</span>
 
* <span style="font-size: 16px"> a database field is updated</span>
 
* <span style="font-size: 16px"> a database field is updated</span>
 
<br /> <span style="font-size: 16px">With files, folders or databases there are usually parameters that tell the system to wait until the action is done</span>
 
<br /> <span style="font-size: 16px">With files, folders or databases there are usually parameters that tell the system to wait until the action is done</span>
=<span style="font-size: 16px">Issues addressed by this pattern</span>=
+
=<span style="font-size: 16px">'''Issues addressed by this pattern'''</span>=
 
''<span style="font-size: 16px">[[FLAKY TESTS]]</span>''<br /> ''<span style="font-size: 16px">[[ HARD-TO-AUTOMATE]]</span>''<br /> ''<span style="font-size: 16px">[[INEFFICIENT EXECUTION]]</span>''<br /> ''<span style="font-size: 16px">[[MANUAL INTERVENTIONS]]</span>''
 
''<span style="font-size: 16px">[[FLAKY TESTS]]</span>''<br /> ''<span style="font-size: 16px">[[ HARD-TO-AUTOMATE]]</span>''<br /> ''<span style="font-size: 16px">[[INEFFICIENT EXECUTION]]</span>''<br /> ''<span style="font-size: 16px">[[MANUAL INTERVENTIONS]]</span>''
=<span style="font-size: 16px">Experiences</span>=
+
=<span style="font-size: 16px">'''Experiences'''</span>=
 
<span style="font-size: 16px">If you have used this pattern, please add your name and a brief story of how you used this pattern: your context, what you did, and how well it worked - or how it didn't work!</span><br /> <br /> <span style="font-size: 14px">.................................................................................................................[[Main Page]] / Back to [[Execution Patterns]] / Back to [[Test Automation Patterns]]</span></div>
 
<span style="font-size: 16px">If you have used this pattern, please add your name and a brief story of how you used this pattern: your context, what you did, and how well it worked - or how it didn't work!</span><br /> <br /> <span style="font-size: 14px">.................................................................................................................[[Main Page]] / Back to [[Execution Patterns]] / Back to [[Test Automation Patterns]]</span></div>

Revision as of 18:39, 29 April 2018

.................................................................................................................Main Page / Back to Execution Patterns / Back to Test Automation Patterns

Pattern summary

Use variable delays based on events, not fixed delays based on elapsed time

Category

Execution

Context

Use this pattern to make your test run as fast and as efficiently as possible

Description

When SUT execution is slow it may be necessary to add delays to the automation script. Fixed length delays should be avoided, because in order to account for different test environments, traffic situations and so on you have to use the longest possible pause. New generation tools offer the possibility to wait only until an event happens. The tool will wait the given maximum wait-time only if the event doesn’t occur at all.

Implementation

The actual implementation depends not only on the tool you are using, but also on how the System under Test (SUT) has been developed. Some suggestions when developing variable delays:

If the SUT shows when an action has been terminated, check it and delay execution until it switches auf true:

  • a window disappears or appears
  • a GUI-Component is enabled or disabled
  • a database field is updated


With files, folders or databases there are usually parameters that tell the system to wait until the action is done

Issues addressed by this pattern

FLAKY TESTS
HARD-TO-AUTOMATE
INEFFICIENT EXECUTION
MANUAL INTERVENTIONS

Experiences

If you have used this pattern, please add your name and a brief story of how you used this pattern: your context, what you did, and how well it worked - or how it didn't work!

.................................................................................................................Main Page / Back to Execution Patterns / Back to Test Automation Patterns