ChrisRaynerSG / AutomatedWebTestingProject

A project to look at the functionality of https://automationexercise.com/ derive user stories, and create test cases for those users stories.
0 stars 2 forks source link

AutomatedWebTestingProject

This is a test automation framework for examining the functionality of the Automation Excercise webpage

User stories

To build a comprehensive test automation framework for examing the webpage, user stories were created in an initial planning session.


project board

These were then used to develop acceptance criteria using Gherkin Syntax, so that test cases could be developed.


acceptance criteria

Project setup

To setup this project please follow the below instructions:

  1. Clone this project repository onto your local system

  2. Download Chrome web driver from here

  3. Unzip the folder to access its contents

  4. Add Chrome web driver.exe and LICENCE.chromedriver to your project within your Test resources folder like below:

    chrome driver location
  5. Place the following dependencies within the pom.xml of the project. These are required for the test automation framework to function.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.sparta.cr</groupId>
    <artifactId>JavaTestUpskillingProject</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>5.10.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <version>2.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>7.13.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>7.13.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>4.23.1</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>2.0.7</version>
        </dependency>
    </dependencies>

</project>
  1. get testing!

Tests

This test automation framework provides comprehensive end to end testing for the following features on the webpage:

This framework includes the ability to generate a cucumber to provide detailed information on test coverage, to run this report navigate to the TestRunner class

@RunWith(Cucumber.class)
@CucumberOptions(
        features = {"src/test/resources/features"},
        plugin = {"pretty", "html:target/testReport.html", "json:target/jsonReport.json"},
        publish = true
)
public class TestRunner {

}

And run public class TestRunner


For any further enquiries please contact a member of the development team.