Squish/Working with Long Test Cases: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
(Un-nominate for deletion: Page is no longer a category)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
this page in: [[:Category:Tools::Squish::Working with long test cases Spanish|Español]]
{{LangSwitch}}


=Working with long test cases=
[[Category:Squish]]


In the situation where you have very long test cases covering e.g. a specific workflow in your application, recording everything in one go could be troublesome as you normally are aiming for refactoring the recorded code into reusable functions. Trying to find specific actions among 500 lines of generated code is bound to be error-prone.
In the situation where you have very long test cases covering e.g. a specific workflow in your application, recording everything in one go could be troublesome as you normally are aiming for refactoring the recorded code into reusable functions. Trying to find specific actions among 500 lines of generated code is bound to be error-prone.
Line 7: Line 7:
One way of working around this problem is to have the application running in the background, record separate pieces of the workflow and refactor each piece after recording it.
One way of working around this problem is to have the application running in the background, record separate pieces of the workflow and refactor each piece after recording it.


The way this is done is initially starting your application from Squish by clicking the ''Launch <span class="caps">AUT</span>'' button in the toolbar. Now, whenever you want to record something, you right-click in the test script where you want the recorded script to end up, and select ''Record snippet'' from the context menu. This will bring you into the application in recording mode.
The way this is done is initially starting your application from Squish by clicking the ''Launch AUT'' button in the toolbar. Now, whenever you want to record something, you right-click in the test script where you want the recorded script to end up, and select ''Record snippet'' from the context menu. This will bring you into the application in recording mode.


When you are done recording, DO <span class="caps">NOT</span> shut down the application, but click ''Stop recording'' in the control bar instead. This will bring you back to the <span class="caps">IDE</span> so you can refactor the recorded code. When you are done refactoring, you can right-click and select ''Record snippet'' again to start recording more interactions.
When you are done recording, DO NOT shut down the application, but click ''Stop recording'' in the control bar instead. This will bring you back to the IDE so you can refactor the recorded code. When you are done refactoring, you can right-click and select ''Record snippet'' again to start recording more interactions.
 
As we are not shutting down the application between recording runs, we can be certain that it is in a state that will allow for recording of the next sequence in the test case.
 
===There is only one article in "Tools -&gt; Squish -&gt; Working_with_long_test_cases":===
 
===T===
* [[:Category:Tools::Squish::Working with long test cases Spanish|Category:Tools -&gt; Squish -&gt; Working_with_long_test_cases_Spanish]]
 
===Categories:===
 
* [[:Category:Tools|Tools]]
** [[:Category:Tools::Squish|Squish]]
* [[:Category:Tools::Squish::Working with long test cases Spanish|Working_with_long_test_cases_Spanish]]

Latest revision as of 08:41, 8 December 2018

En Ar Bg De El Es Fa Fi Fr Hi Hu It Ja Kn Ko Ms Nl Pl Pt Ru Sq Th Tr Uk Zh

In the situation where you have very long test cases covering e.g. a specific workflow in your application, recording everything in one go could be troublesome as you normally are aiming for refactoring the recorded code into reusable functions. Trying to find specific actions among 500 lines of generated code is bound to be error-prone.

One way of working around this problem is to have the application running in the background, record separate pieces of the workflow and refactor each piece after recording it.

The way this is done is initially starting your application from Squish by clicking the Launch AUT button in the toolbar. Now, whenever you want to record something, you right-click in the test script where you want the recorded script to end up, and select Record snippet from the context menu. This will bring you into the application in recording mode.

When you are done recording, DO NOT shut down the application, but click Stop recording in the control bar instead. This will bring you back to the IDE so you can refactor the recorded code. When you are done refactoring, you can right-click and select Record snippet again to start recording more interactions.