Skip to content

Web Java automation framework, mainly written in Java with extended CI capabilities. See project description for more details.

License

Notifications You must be signed in to change notification settings

zarashima/web-test-framework

Repository files navigation

Codacy Badge Build Status Build Status <zarashima>

Framework Architecture

Framework Architecture

Introduction

A web automation testing framework written in Java. Support Chrome, Firefox

Features

  • Dependencies injection using Guice
  • Ensure mechanism
  • Thread-safe driver instances
  • Support different types of execution against local, pipeline or container
  • ReportPortal integration
  • Docker-ready files for easy CI/CD integration

Technologies

  • Maven
  • TestNG
  • Logback
  • WebDriverManager
  • ExtentReport
  • Docker
  • Guice
  • ReportPortal

Integration

ReportPortal

Usage

The framework export RUNWHERE environment variable for use in different cases. Different RUNWHERE used will change desired capabilities accordingly

RUNWHERE Description
LOCAL Desired capabilities for execution on local machine
PIPELINE Desired capabilities for execution on a automation pipeline
CONTAINER Desired capabilities for execution on Docker

Enable ReportPortal integration

By default, ReportPortal (RP) integration is disabled. Setup your RP properly first and then change RP settings in src/test/resources/reportproperties.properties file

Execution

As told, RUNWHERE will determine the desired capabilities against the browser under test. Example below expose RUNWHERE environment variable as LOCAL Execute maven command and pass in the browser's name. If RP is enabled, it will send results to the server.

RP Integration

Local

export RUNWHERE=LOCAL

# Parallel executions on Chrome and Firefox
mvn clean test

Container

Prerequisites

By default docker-compose file will roll up Selenium Grid automatically, and run the tests in vinh/framework-docker container

vinh/framework-docker is a custom container which is achived by below command

# Build dockerfile using vinh/
docker build -t=vinh/framework-docker .

You cange the tag's name after -t to whatever you want but ensure to change it consistently in docker-compose also

Execution

No need to export RUNWHERE=container. The commands in docker-compose has already done it for you.

Execute docker-compose command docker-compose up -d

Moreover, scale up of Chrome/Firefox nodes is possible using docker-compose command. Refer to Docker guide for more details

About

Web Java automation framework, mainly written in Java with extended CI capabilities. See project description for more details.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published