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

Modified on Thu, 22 Aug at 3:00 PM

TABLE OF CONTENTS

1. Prerequisites

2. Executing Selenium Scripts in Command Prompt on Windows Operating System


1. Overview

This article helps you in setting up and executing scripts generated by algoQA.

2. Prerequisites

Before executing the scripts on a Windows operating system to open your preferred application, ensure that you have performed the following. If Java and Maven are already installed on the system, you can skip the prerequisite steps related to their installation and configuration. Proceed with the steps for running the scripts.

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

3. Executing Selenium Scripts in Command Prompt on Windows Operating System

Perform the following:

  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 view the Command Prompt screen.
  3. Run the following command to trigger the script:
    mvn test
    This command will execute the script using Maven, as shown: 
  4. Wait until the Build Success message is displayed, which indicates that scripts have been executed successfully. 
  5. You can view the respective report in the Output folder, as shown: 
  6. Reports will be generated in Spark and PDF formats, as shown: 
  7. The sample PDF report is shown in the attached image. It 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: You can view preceding Information for each test step by clicking the feature name link.
    • Screenshots: Screenshots for each verification step.



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article