Artificial Intelligence and Machine Learning FeaturesGenerate Test Scripts from Images Using algoQA

Generate Test Scripts from Images Using algoQA

Users can upload screenshots of the application pages either while creating the project or after the project has been created.

Using the uploaded screenshots, an offline model can be created. The offline model consists of nodes, features, and controls associated with the specific page under testing.

Create an Offline Model Using an Image

Follow the steps below to create an offline model and generate test scripts from images.

Create a New Project

  1. Start by creating a new project.
  2. Enter the Project Name.
  3. Select the Automation Type.
  4. Browse and attach the image in the Upload Application Screenshots/Scraper Output

File.

You can upload multiple screenshots at a time.

  1. Click Create.
    Create Project form with Project Name, Automation Type, Application Url fields and two uploaded images

Once the project is created, a node configuration will be generated.

Canvas screen with Login and Dashboard nodes plus Add Node and Generate Testcases buttons

Upload Additional Images

You can upload additional images or replace existing images if required.

  1. Navigate to the canvas.
  2. Click the More dropdown.
  3. Select Upload Application Screenshot.
  4. Upload the additional image.

Select Replace Existing Configuration check box to replace existing configuration.

Rescrape panel with URL field, Launch button, upload drop zone and Upload Now button

A new configuration will be added for the uploaded image.

Canvas view with Dashboard and Login nodes, Add Node and Generate Testcases buttons

Offline Model Creation

After uploading the required images, the offline model will be ready for use.

  1. Go to the Test Design section.
  2. Select the required node.

Values will also be added for the controls, where applicable.

  1. Click on Prompting.
    Configuration Controls table listing Login, Email Address and Password fields with Record Scenario button

Enter Prompt

Enter the prompt based on the uploaded image and the required test scenario.

AI Powered Test Design prompt field with entered scenario text and Generate Test Cases button

Generate Scenarios

  1. Click on Generate Test Cases.
  2. The scenarios will be generated.

Review Generated Scenarios

  1. Click on Redirect to review the generated scenarios.
    Generated scenarios with redirect option to view and review scenario details
    Generated scenarios with redirect option to view and review scenario details
  2. Verify and make changes if required.
    Scenario Steps List showing Given, When, And, Then steps with Scenario Input button

Generate Test Cases and Test Scripts

After reviewing the scenarios, click on Generate Test Cases to generate test cases.

The test cases will be generated.

Test Case Generation dialog showing 1 test case, 5 test steps generated and Generate Script button

To know more on generating test cases and test scripts, refer Generate Test Cases and Test Scripts.

Limitations

  1. User will not receive the XPath directly — it must be added manually.
  2. To reduce noise, not all label elements are being captured.