Skip to content

✨Web UI tests project with Selenium and Selenide modules

Notifications You must be signed in to change notification settings

pavelicii/java-web-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Web Test Automation

Description

I use this repository as a base for a web test automation project or just as a part of my programming portfolio.

It consists of 2 modules with the same tests but different test automation frameworks: Selenium and Selenide.

Selenide module

Usually, you want a framework witch provides concise fluent API for tests and Selenide is one of the available choices.

Tools

*First you need to install Selenoid. To use it, replace default Selenide WebDriver with your own Remote WebDriver.

Test Design Pattern

Page Object with the addition of Sections (a.k.a. Fragments or Widgets).

Test reporting

To generate and show the Allure report:

  1. mvn clean test -pl selenide
  2. mvn allure:serve
  3. http://localhost:8080 will be automatically opened in the browser

Lint checks

Some basic Checkstyle checks adapted for UI testing (checkstyle.xml).

To run: mvn checkstyle:checkstyle

Selenium module

Nowadays I don't expect to work directly with Selenium, but it's important to have experience with it since the majority of test frameworks are based on Selenium.

Tools

Test Design Pattern

Fluent Page Object, described in Selenium Wiki, with the addition of Sections (a.k.a. Fragments or Widgets).

This version of Page Object requires every step to return some page, so we can chain all the steps.

I don't prefer this version because in the test it makes it hard to track where we currently are on the website since all transitions between pages end up being hidden in the method chaining.

It also becomes hard to maintain when you want to implement reusable Sections instead of just vanilla Page Objects. In this project, I've used generics to map Section to an appropriate Page.

About

✨Web UI tests project with Selenium and Selenide modules

Topics

Resources

Stars

Watchers

Forks

Languages