Qa Automation Base Save

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

Project README

Automation project

Description

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

GitHub Actions

This branch kotlin-junit5-retrofit is integrated with GHA -> I pass test results to this branch allure-pages and host 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 for test automation powered by Selenium WebDriver.

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 the framework for work with API. It's much faster and easier than Rest-Assured. Also, it provides a better code style.

Kotest - highly recommend using this framework as a main assertion framework for your projects. If you prefer java - AssertJ

Report

Allure - the best test report framework ever! This framework supports the most popular languages and test runners, easy to integrate to the almost any CI. Also, we can integrate our reports with Grafana and show some graphics like Duration | Passed | Failed and etc.

@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 witch means a test name

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

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

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

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

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

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

The main fetures:

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 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 and etc.

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

How to run

Before start

You need to install Selenoid and Selenoid-UI and Allure

Notes

  1. Those tests was splitted 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 varaible 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
Open Source Agenda is not affiliated with "Qa Automation Base" Project. README Source: romsper/qa-automation-base

Open Source Agenda Badge

Open Source Agenda Rating