Test DesigningGenerate Test Cases and Test Scripts

Generate Test Cases and Test Scripts

Generate BDD test cases and automation scripts from recorded scenarios in algoQA, with options for filtering, de-duplication, and script compilation.

Test cases are generated in BDD format using Gherkin syntax (Given-When-Then).

Here is an example of a feature file generated in BDD format:

Given I have access to an application

When I selected a Button in file

And I selected New File in file

Then verify New page is displayed in file

Generated test cases are stored in the Test Cases folder.

How to Generate Test Cases?

To generate a test case, perform the following:

  1. In the Test Design screen after generating scenarios, click on Generate to generate Test Cases. To learn more about Test Design, see Test Design Methods.

  2. A Test Case Generation pop-up will appear, allowing you to monitor the progress. You can stop the generation at any time by clicking Stop Generation. If needed, you may minimize the pop-up by clicking Minimize, and restore it by clicking Maximize.

    Test Case Generation popup at 5 percent progress with Stop Generation button and minimize icon highlighted
    Test Case Generation popup at 5 percent progress with Stop Generation button and minimize icon highlighted
    Test Case Generation dialog showing Test Cases Generated Successfully with Generate Script button
    Test Case Generation dialog showing Test Cases Generated Successfully with Generate Script button
  3. Test cases are generated within a few seconds.

  4. The generated test cases are stored in the Test Cases. This folder includes a spreadsheet with GWT steps in XLSX format, and the feature file in TXT and JSON formats.

    If you select the Scenario ID checkbox under Custom Columns in the Scenario List, the unique ID is also available in the test cases after they are generated.

    Scenario List Custom Columns setting with the Scenario ID checkbox selected
    Scenario List Custom Columns setting with the Scenario ID checkbox selected
  5. Test case generation may fail for the following reasons:

  6. You can download and delete test cases using the respective buttons. Click the More icon (three dots) to access De-duplication and Scenario Quality Analysis. To learn more, see De-duplication and Scenario Quality Analysis.

    Test Cases menu showing download, delete, De-duplication, and Scenario Quality Analysis options
    Test Cases menu showing download, delete, De-duplication, and Scenario Quality Analysis options

Use the filter options to refine results by time range (Today, Last Week, or Custom) and by the user who generated the test cases (Generated By dropdown).

Filters panel with Generated By dropdown showing All Users and Jenish C options
Filters panel with Generated By dropdown showing All Users and Jenish C options

Test data is indexed when different test data is provided for the same controls. Indexing applies in the following scenarios:

  • When the same control is used multiple times within a scenario.
  • When duplicate controls from different features/nodes are used in a scenario.
  • When duplicate alias names are provided in a scenario.

Indexing starts from 0 (e.g., wait, wait1, wait2...).

How to Generate Test Scripts?

After generating test cases, click Generate Test Scripts to generate scripts.

Test Scripts screen with the Generate Test Scripts button
Test Scripts screen with the Generate Test Scripts button

In the script generation screen, all files are selected by default. You can select or unselect files as needed, then click Confirm to generate the scripts.

Script generation screen with files selected for script generation
Script generation screen with files selected for script generation

The .xls file format supports up to 7,000 rows of GWT data. You can modify, save, and download the file without issues.

To generate test scripts, perform the following:

  1. After generating scripts, you can download, view, compile, and execute them.
    Generated test script screen with options to download, view, compile, and execute scripts
    Generated test script screen with options to download, view, compile, and execute scripts
  2. Check How to Automate Web Applications to learn more about compilation and to view scripts.
  3. Click View Scripts and use the filter options to refine results by time range (Today, Last Week, or Custom). You can also filter by language, framework, the user who generated the scripts, and compilation status (Compiled, Not Compiled, Failed, Pending, or Passed).
Filter panel with Language, Framework, Generated By dropdowns and Compilation Status checkboxes
Filter panel with Language, Framework, Generated By dropdowns and Compilation Status checkboxes
  1. See Scripts Execution in algoQA to learn more about execution.
  2. You can rename and download the generated script folder.
  3. Click the More icon (three dots) next to the script, then select Rename.
    More menu beside a generated script with the Rename option highlighted
    More menu beside a generated script with the Rename option highlighted
  4. Edit the name and click the tick icon to save.
    Renamed test script folder with the tick icon available to save the new name
    Renamed test script folder with the tick icon available to save the new name
  5. By default, only one script is available in Test Scripts. When you generate scripts again, the previous script is removed. To keep older scripts, mark them as favorites so they are not removed.

    A project admins test scripts cannot be deleted by other users. Similarly, an admin cannot delete another user's scripts if they are marked as favorites.

    Test Scripts list showing a favorite script that is protected from deletion
    Test Scripts list showing a favorite script that is protected from deletion
  6. A storage warning appears when your usage exceeds 90% of your storage limit. You can clean up data or upgrade your plan. To learn more, see My Subscriptions.