This is a technology preview, enabling you to experiment with AI Codeless testing.
This topic explains how to run AI-based tests using AI Codeless Testing.
Before you run a test in AI Codeless Testing, you must create a test or open an existing one. For details, see Design tests.
For mobile applications, you also need to connect to UFT Mobile for running the test.
For desktop web applications, your browser must be set up to work with AI Codeless Testing. See Test Web apps for specific browsers.
AI Codeless Testing identifies objects visually, the way a person would, and does not depend on the objects' properties or implementation. Therefore, you can run the same tests on different platforms and different application versions.
For desktop web applications, you can directly open them in a browser or select an environment consisting of a browser and an URL. For mobile applications, you need to select an environment consisting of a device and an application.
See Open an application to add environments for desktop web applications or mobile applications.
Run the test from AI Codeless Testing user interface
After opening your desktop web application in a browser or selecting the environments on which you want to run the test, run the AI-based test you created on your application.
To begin a test run:
- Go to the ENVIRONMENTS tab.
Do one of the following:
To run a test on an open web page:
To run a test in selected environments:
- Select Run on open web page. The environments you added are all disabled.
Click the RUN button. The test runs on the web page you opened.
Note: If multiple browsers are open, AI Codeless Testing may run the test on any one of them.
- To exclude an environment for the current run, clear its check box in the ENVIRONMENTS tab.
- Click the RUN button. The test runs on all of the environments you selected, one by one. A spinner indicates the environment is currently in use.
Click STOP to end the run session, or PAUSE to stop it temporarily.
Note: While a run session is paused you cannot make any change in AI Codeless Testing.
To run AI Codeless Testing tests from a command line, run the CodelessExecuter.bat command, located in the <UFT One or UFT Developer installation folder>\bin folder.
This enables you to run tests as part of an automation pipeline or from a CI/CD server, such as Jenkins.
For mobile applications:
Define the environments in AI Codeless Testing in advance. For details, see Open an application.
For desktop web applications:
Define environments in advance, or use the command options to specify the browser and web page to test.
Note: If you specify options for opening a browser or using an open one, the environments defined in AI Codeless Testing are ignored.
<UFT One or UFT Developer installation folder>\bin\CodelessExecuter.bat <path to test location> [--<option> <option details>]
Command line options (all optional)
The type of browser to launch.
Possible values: Chrome, Chromium Edge, Edge, Firefox, Internet Explorer.
Note: This option is required if you use the webPageURL option.
The URL of the web page to open.
Note: This option is required if you use the browserType option.
Instructs AI Codeless Testing to run the test on an already open browser.
Note: If multiple browsers are open, AI Codeless Testing may use any one of them.
Instructs AI Codeless Testing not to close the application at the end of the test run.
This enables you to run the next text without instructing AI Codeless Testing to open a browser.
Default: False. Unless useOpenBrowser=True.
The location in which to store the test run results.
Default: The same location as the test.
Note: You can use either browserType+webPageURL or useOpenBrowser but not other combinations of these options.
Analyze test results
The test results are provided differently, depending on how you ran the tests.
If you run the test in the AI Codeless Testing user interface:
After the test run ends, the left pane displays the execution result of each step (including conditional steps if there are any) for the open web page or selected environments.
Hover over the test step to show the reason for the failure.
In the right pane, if you run the test in selected environments, the ENVIRONMENTS tab marks the environments with a pass or fail marking.
Click View last report to see a visual HTML report of the steps that ran and their status. This report is similar in format to the UFT One reports.
If you run the test using a command line:
As the test runs, its progress is reported in the console. At the end of the run, the test run results are available in the test folder or in the folder you specified in the command's options.
The report is provided in the following formats:
An HTML report. This report is similar in format to the UFT One reports.
A Junit XML report.