Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/roboticautomata/serenity-bdd-ui-testing-example

UI Test Automation Example with Serenity BDD Page Object Model
https://github.com/roboticautomata/serenity-bdd-ui-testing-example

cucumber java selenium serenity

Last synced: about 1 month ago
JSON representation

UI Test Automation Example with Serenity BDD Page Object Model

Awesome Lists containing this project

README

        

# UI Test Automation with Serenity BDD (Selenium / Cucumber)

An example UI Test Automation using Serenity (Selenium), Cucumber and the Page Object Model.

* [UI Test Automation with Serenity BDD](#ui-test-automation-with-serenity-bdd)
* [Application under Test](#application-under-test)
* [Example Scenario to Automate](#example-scenario-to-automate)
* [Login Page](#login-page)
* [Add User Page](#add-user-page)
* [Contact List](#contact-list)
* [Project Structure](#project-structure)
* [Running the tests under Maven](#running-the-tests-under-maven)
* [Viewing the reports](#viewing-the-reports)
* [Resources](#resources)

## Application under Test

We will be testing the [Thinking Tester Contact List App](https://thinking-tester-contact-list.herokuapp.com/) `CLA` for short.

## Example Scenario to Automate
Our test covers the specific workflow of opening the login page, creating a new user and logging out.

### Login Page
![Login Page](images/LoginPage.png)

### Add User Page
![Add User Page](images/AddUserPage.png)

### Contact List
![Contact List Page](images/ContactListPage.png)

## Project Structure
```
src/test/resources/features
└── registration
└── user_registration.feature
```

```
src/test/java/starter
├── actions
│   ├── AddUserSteps.java
│   ├── ContactListSteps.java
│   └── LoginSteps.java
├── CucumberTestSuite.java
├── pageobjects
│   ├── AddUserPage.java
│   ├── ContactListPage.java
│   └── LoginPage.java
└── steps
├── AddUserStepDefinitions.java
├── ContactListStepDefinitions.java
└── LoginStepDefinitions.java
```
## Running the tests under Maven

To run the tests with Maven, open a command window and run:

```
./mvnw clean verify
```

## Viewing the reports

Serenity test reports are located in the `target/site/serenity` directory.

## Resources

- [Youtube Demo Video](https://youtu.be/PmX_xFgO6Pc?feature=shared)
- [Medium Blog Tutorial](https://medium.com/@RoboticAutomata/ui-test-automation-tutorial-with-serenity-bdd-96187d29fbe7)