Getting Started Desktop

The following describes how to create, generate, run and analyze tests.

MyITest4U uses Test Blocks and Tests. A Test contains one or more Test Blocks.
In this document the word test can also stand for a Test Block.

Screencast

The screencast covers all points mentioned in this getting starting guide. Clicking on the video icon in the section title will start the screencast for this section.

Starting the Editor for the Generation of Desktop Tests

Screencast

Start MyITest4U.
Create a new user by clicking on New User or login.
Enter user name and password and click OK.
On the login screen use the entered credentials and click OK.
Select Desktop as AUT type and click OK.
Select Desktop Test Generation as Do type and click OK → The editor for the creation of Desktop tests opens.

Set Preferences

Screencast

Select File / Preferences from the menu.
Enter a path to a text editor (used to view log files).
Enter a path to a Excel like program (used to view and edit comma separated files).
Enter a path to WinMerge or a similar program (used to compare two files).
Click OK.

Creation of a new AUT

Screencast

Select New AUT from the AUT drop down list.
Select AUT / New AUT from the menu.
Enter an AUT name.
Enter the window title of the first window which will be opened (Student Logger Application for the supplied test application).
Click on New Profile button.
Enter a Profile name and the AUT exe (<pathToMyITest4u>\MyITest4U\TestApplications\WindowsApplication.exe for the supplied test application). Leave the default for the Test runner exe.
Select Default and click OK.
Click OK again.

Creation of a New AUT Release

Screencast

Select New AUT Release from the AUT Release drop down list.
Select AUT / New AUT Release from the menu.
Enter an AUT Release Name and click OK.

Collect GUI Elements

Screencast

The supplied test application (WindowsApplication.exe) needs the Student configuration.
Select Config / Spider / Summary from the menu.
Leave all the defaults and enter Student into the field Config name.
Click Save and close the Spider Configuration Summary dialog.
Select Run / Run Spider from the menu.
Select MenuItem from the Control type for Spider drop down list.
Select Student from the Spider configuration name drop down list.
Click Spider.
Save the spider configuration if asked by MyITest4U.

The collection of the GUI elements will start. It can take several minutes for the Spider to collect all GUI elements. After the Spider finished you are ready to create your first test.

Creation of a Test Block

Screencast

Select the Test Block tab of the editor.
Use CTRL Space to get possible values for Window Title, Control Type, Element Name and Action.
An entered value can be changed by selecting and deleting the current value followed by CTRL Space.
Tab can be used to jump to the next cell.
A new test step is added when Tab is done in the last cell of the last test step.
After entering all data for your first test enter a Test Block name and click on the Save icon in the tool bar.
Click on the Run icon in the tool bar to run the test.
After the test finished Test Analysis will run automatically.
The Log Window shows a summary of the Test Result.
Failed steps will be marked by an ! in the editor table.
Pointing the mouse into the Window Title cell of the failed step will show the Error Details.
Selecting Analyze / Show Current Test Log from the menu will show the log file.

Creation of a Test

Screencast

Click on the + icon in the tool bar.
Enter 1 in the position field.
Click OK.
Switch to the Test tab.
Enter a name for the test.
Click on the Save icon in the tool bar.
The test block is now part of the test.
Further test blocks can be added by repeating the above steps.
A Test can be executed and analyzed as a Test Block.

Configuration of Test Generation

Screencast

GUI elements which should not be used by the test generation can be set in the Test Generation Configuration.
The current Test Generation Configuration can be viewed by selecting Config / Test Generation / Summery from the menu.
Select Config / Test Generation / Set Default Excludes from the menu.
The Test Generation Configuration can be fine tuned for every window by selecting the appropriate window from the Config menu e.g. Config / Test Generation / Test Generation Window / <Window>.
A window can be excluded from the Test Generation by selecting Config / Test Generation / Test Generation GUI Elements / Window to Exclude. Excluded windows are not shown under the menu Test Generation Window.

Test Generation

Screencast

Select Generator / Generate Window Template from the menu.
Select Add steps to the first GUI element and click on OK.
The list of the generated tests will appear in the Log Window.
Copy the name of a generated test block from the Log Window (_BlockTemplateAddStudentDialog). Select the Test Block tab and paste the copied name into the search field. Click on Search.
Change the test block name to a valid name e.g. remove the _ in front of the name.
Select Ignore for all but one of the button test steps.
Click on the Save icon in the tool bar.
Click on the Run icon in the tool bar to run the test.
After the test finished Test Analysis will run automatically.
The Log Window shows a summary of the Test Result.
Failed steps will be marked by an ! in the editor table.
Pointing the mouse into the URL cell of the failed step will show the Error Details.
Under Config / Test Generation you can fine tune the test generation by excluding / including GUI elements form the Test Generation.

Generate a Test Execution

Screencast

Select Run / Test Execution from the menu.
The Test Execution dialog can be used to create a complex test execution.
Add will use the test scripts generated by MyITest4U.
The Test Execution dialog gives an overview of all the run arguments used by the tests.
Update All will set the same run arguments for all tests.
The same test can be used with different test parameters by setting Start Loop and Number of Loops accordingly.
Create will create the run script for this execution. The script can be executed as normal Windows Batch Script. The log file will be parsed and the test results are stored in the database as last step of the Test Execution.
All log files and test results should be deleted before executing the script (see Test Analysis).
The log files can be deleted by selecting Run / Clean Log Dir from the menu.
All test results can be removed from the database by selecting Analyze / Clean Test Results for Tests and Test Blocks from the menu. Select all tests shown by the Clean Test Results dialog. Enter 0 for How many results do you want to keep. Doing so makes sure that there is no confusion with older test results.

Test Analysis

Screencast

Parse Test Log and Write to DB (Analyze / Parse Test Log and Write to DB) will parse all log files (MyITest4U stores all log files in the same directory). The test results found can be stored in the database for later analysis. The last 100 test results found are shown in the Log Window. All the other test results can only be shown when they are stored in the database.
Show Test Results will show the test results stored in the database. The summary of the test results shown in the Log Window and in the Test Results dialog can be different as the Log Window will show the summary of all test results. Test results of not started and deleted tests are not stored in the database. It is best practice to delete all the log files and clean the test results before running a major test execution.
The log files can be deleted by selecting Run / Clean Log Dir from the menu.
All test results can be removed from the database by selecting Analyze / Clean Test Results for Tests and Test Blocks from the menu. Select all tests shown by the Clean Test Results dialog. Enter 0 for How many results do you want to keep.
Test results are stored user independently.
Double clicking a test result will show the test with results in the editor.

The error messages of current test results can be shown by clicking Show Error Messages.

The tests can be filtered by error message. Therefore NS needs to be checked in the Error Message Table. All tests having only the selected error messages will be removed from the test results overview after a refresh is done.

Test Parameter Variation

Screencast

The test parameter file can be opened by clicking on the ; in the toolbar of the test generation editor.

The parameter file has the following basic structure:

Step 1;Step 2;.…;Step N

Each parameter has a section for values, index, Find, NotToFind and AP (additional parameters).

Step 1;Index;Find;NotToFind;AP;Step 2;Index;Find;NotToFind;AP;....

The Step i column contains the parameter values.

Every line below the header contains the test parameters for a test loop.
Copy the first parameter line and paste it below the first line to get a second test loop.
Change the parameter value.
Further test loops can be added creating more parameter lines.
Save the parameter file.
In the test generation editor a certain test loop can be shown by selecting the appropriate loop from the Loop drop down list.
Changing the parameter value using the editor will also change the parameter value in the parameter file.

The parameter file is a CSV file (comma separated file) and can be edited using any program. Once you finished editing you have to open the parameter file using the build in CSV editor and save it (Save is only active it the file contains a change).

Global Find / Global NotToFind Check Point

Screencast

MyITest4U allows you to search for a certain string in the HTML source after every click. The string to be found (Global Find) and / or not to be found (Global NotToFind) can be set in the AUT dialog (AUT / New / Update AUT).
An example where this Check Point can be useful could be the search for missing language strings.

Comparison of All GUI Elements on a Window against a Reference

Screencast

MyITest4U allows you to compare all the GUI elements on every window against a reference.
The setup of this check point is done in the following way:
Open the Run Configuration (Run / Run Configuration).
Check Do Analysis.

Create the reference

Run your test the first time to create the reference.
Run your test a second time to create filters for always changing text like current time or dates.

Run test against the reference.

A comparison against the reference is done in the third and following test runs.
The comparison is done by doing a line by line comparison (one line contains all the properties of a GUI element). Each time there is a difference an error will be shown.