Executing Web Automation scriptsSetting Up and Executing Web Test Automation Scripts in Command Prompt with Maven

Setting Up and Executing Web Test Automation Scripts in Command Prompt with Maven

Download, execute, and review reports for web automation scripts generated by algoQA using Maven from the Windows Command Prompt.

Execute generated web automation scripts locally on a Windows machine using Maven, then review the output reports.

Prerequisites

Before executing scripts, ensure that Java and Maven are installed and configured on your system. If they are already installed, you can skip the installation steps and proceed directly to running the scripts.

To configure Java and Maven, refer to the article Installation steps for Java Selenium Framework.

Executing Selenium Scripts in Command Prompt on Windows Operating System

  1. Download and extract the script to your local folder. Navigate to the same folder.
  2. In the folder navigation bar, type cmd and press Enter to open the Command Prompt.
  3. Run the following command to execute the script:
    mvn test
    
    This command executes the script using Maven.
    Terminal window with mvn test command highlighted and Maven build output
  4. Wait until the Build Success message appears, which indicates that the scripts have executed successfully.
    Terminal output showing Tests run 1, Failures 0 and BUILD SUCCESS message
  5. You can view the corresponding report in the Output folder.
    File explorer listing project files with the output folder highlighted
  6. Reports are generated in Spark and PDF formats.
    File explorer showing PdfReport and SparkReport folders created today
  7. The sample PDF report includes the following details:
    • Test Results: Number of test cases that passed and failed.
    • Execution Time: Total duration taken to execute features, scenarios, and steps.
    • Step Details: View preceding information for each test step by clicking the feature name link.
    • Screenshots: Screenshots for each verification step.
    Cucumber Report showing Features, Scenarios and Steps pass counts in green donut charts