Skip to content

There are basic projects for automation frameworks based on Kotlin/Java and TypeScript for the backend, frontend, and mobile.

Notifications You must be signed in to change notification settings

romsper/qa-automation-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 

Repository files navigation

Automation project

Description

The repository contains basic projects for automation testing on Kotlin/Java and TypeScript with examples for backend, frontend, and mobile.

GitHub Actions

This branch kotlin-junit5-retrofit is integrated into GHA -> It passes test results to this branch allure-pages and hosts them using GitHub Pages

Branches

Frameworks

Kotlin - programming language based on JVM and fully compatible with Java! It's much easier than Java don't worry ;)

JUnit5 - highly recommend reading about DataProviders aka Sources

Selenide - framework is a kind of wrapper based on Selenium WebDriver and is developed especially for testing purposes.

Selenoid - powerful Golang implementation of the original Selenium Grid farm. One configuration for the localhost and remote runs and easy to update and manage through Docker and VNC (free). Also, they provide paid Kubernetes (free for 4 pods) solution Moon

Retrofit - this is an API framework. It's much faster and easier than Rest-Assured. Also, you can try Feign

Kotest - highly recommend using this framework as the main assertion framework for your project. This one AssertJ is good if you prefer Java.

Report

Allure - THE BEST test report framework ever! This framework supports the most popular languages and test runners. It's easy to integrate into almost any CI.

The most popular annotation:

@Step - combine all steps (annotated methods) and generate a readable test report where you will see all the steps as text. Also, it adds variables with values to the step into the report.

@DisplayName - just JUnit 5 annotation which means a test name

@Issue - add a link to Jira (or any other system) to your report for the test

@TmsLink - add a link to TestRail (or any other system) to your report for the test

@Severity - add a marker as BLOCKER or CRITICAL into your report for the test

@Flaky - add a marker to the test as flaky in the report system

@Epic -> @Feature -> @Story - combine your tests into a tree and split them by epic | feature | story

Allure EE - this is like Allure + TestRail + CI. Documentation with features and etc.

The main features:

Live documentation - Allure EE keeps your test documentation updated based on test runs.

TMS - Allure EE supports both Manual and Automated testing. Unified test documentation allows you to manage and review all your product tests from a single view. Also, it has a lot of filters and you can create custom fields and filters.

Integrations - Allure EE is based on Allure and has the same integrations and many more with Jira and other systems.

Metrics - Allure EE supports many more metrics than Allure and you can integrate the system with Grafana and add custom metrics etc.

Migration - Allure EE supports test-cases transfer from any TMS like TestRail etc.

How to run

Before start

You need to install Selenoid and Selenoid-UI and Allure

Notes

  1. Those tests were split by TAG (annotation above test classes) and you need to check this before if you want to run only one group.
  2. If you want to run a few test classes please be sure you have free nodes for UI because all tests work in PARALLEL mode by class

Start

Run only one test group/tag:

$ mvn clean test -D TAG=<tag name>

or

$ ./gradlew clean test -D TAG=<tag name>

Run all tests (UI and BACK):

$ mvn clean test

or

$ ./gradlew clean test

or

$ mvn clean test -D TAG=regress

[ONLY FOR UI] If you want to run the tests on the remote computer you need to transfer HUB_URL variable to the env:

$ mvn clean test -D TAG=<tag name> -D HUB_URL=<ip or host>

After tests

If you want to see the test report locally:

$ allure serve target/allure-results

or

$ allure serve target/allure-results --host localhost --port 9999

If you want just generate the test report without web service run:

$ allure generate target/allure-results

Go to src/allure-report folder and click index.html

CI

If you use Jenkins or TeamCity and etc. the report will be generated automatically after a run and connected with this job. You will need just click on the Allure logo!

Allure + Grafana

Allure generates a report specially for Grafana and Prometheus

How to use it for Grafana:

  • Generate allure-report by $ allure generate allure-results
  • Install InfluxDB (use Docker)
  • Get a file for InfluxDB in /allure-report/export/influxDbData.txt
  • Install Grafana (use Docker)
  • Integrate InfluxDB to Grafana
  • Send the report to InfluxDB by
  • $ curl -XPOST 'http://<host>/write?db=<db name>' --data-binary @allure-report/export/influxDbData.txt
  • Check Grafana
  • PROFIT