Getting Started Web

The following describes how to create, generate, run and analyze tests using Chrome browser.
You should be able to use other browsers. You might have to do some configuration of your system to do so i.e. see https://www.selenium.dev/documentation/ie_driver_server/ for the use of Internet Explorer.

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

ChromeDriver

WebDriverManager is used to handle web drivers (see https://bonigarcia.dev/webdrivermanager/ for more details about the handling of web drivers).

Manual Driver Management

The version of your Chrome browser and the version of the ChromeDriver to be used need to match.
The ChromeDriver used by MyITest4U is found in the following folder: ..\MyITest4U\TestEngine\Java\Api
esources\chrome
.
Open a command prompt and using chromedriver.exe -v will show the version of ChromeDriver.
The version of your Chrome browser is shown on the following page: chrome://settings/help.
In case the two versions do not match you can download the matching ChromeDriver from the following page: https://chromedriver.chromium.org/downloads and replace the current chromedriver.exe with the downloaded one.

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 Web Tests

Screencast

Start MyITest4U.
Create a new user by clicking New User or login.
Enter user name and password and click OK.
On the login screen use the entered credentials and click OK.
Select Web as AUT type and click OK.
Select Web Test Generation as Do type and click OK → The editor for the creation of Web 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.
Click on New Profile button.
Enter a Profile name, the Root URL and the Page URL for example:

Root URL: https://myitest4u.com/testpages/
Page URL: https://myitest4u.com/testpages/testApp.php

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

Select New AUT from the AUT drop down list.
Select AUT / New AUT from the menu.
Enter an AUT name.
Click on New Profile button.
Enter a Profile name, the Root URL and the Page URL for example:

Select Run / Run Spider from the menu.
Use the defaults already set and 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 URL, Tag, Element 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 URL 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.

Test Generation

Screencast

Select Generator / Make All Forms from the menu.
Check Add steps to first GUI element and click OK.
The list of the generated tests will appear in the Log Window.
Copy a name of the generated test blocks from the Log Window (_BFTtestAppphp1). Select the Test Block tab and paste the copied name into the search field. Click on Search.
Click 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.
Steps after which a screenshot was taken are marked with S.
Pointing the mouse into the URL cell of the marked step will allow you to open the screenshot.

Execute all Tests

Screencast

Select the Test Block tab.
Select Run / Generate All Run Scripts from the menu.
Check all the tests you want to execute.
Click on Run Tests.
Clicking on Generate Scripts will generate all Execution Scripts for the selected tests.
Once the execution finished the Log Window shows all executed tests.
Clicking on a test name will show the test in the editor table.

Generate a Test Execution

Screencast

Select the Test Block tab.
Select Run / Generate All Run Scripts from the menu.
Check all the tests you want to execute.
Click on Run Tests.
Clicking on Generate Scripts will generate all Execution Scripts for the selected tests.
Once the execution finished the Log Window shows all executed tests.
Clicking on a test name will show the test in the editor table.

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 Visible Text against a Reference

Screencast

MyITest4U allows you to compare the visible text on every page 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 and select Save HTML source or Save text only.

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, such as current time or dates.

Run your test against the reference.

The third and subsequent test runs perform a comparison against the reference.
This is done by making a line-by-line comparison. Each time there is a difference, an error will be shown.
Using Visible Text (Save text only) in the comparison will usually work fine and will only show real changes.
Using HTML source in the comparison will be very sensitive as even a small change in the formatting of the source will produce an error.