This repository contains several examples of Automation testing frameworks and projects using different programming languages Kotlin and TypeScript/JavaScript and tools. You can use these examples as a starting point for your own automation projects or as a reference for best practices in Automation testing.
You can find examples of GitHub Actions workflows for running tests in the .github/workflows folder.
- kotlin-retrofit - Kotlin | Retrofit | Selenide | JDBC | Exposed | JUnit 6 | Allure
- kotlin-playwright - Kotlin | Playwright | JUnit 5 | Allure
- kotlin-appium - Kotlin | Appium with Selenide | JUnit5 | Allure | Allure EE | TestRail
- kotlin-testng-rest-assured - Kotlin | Rest-Assured | Selenide | TestNG | Allure
- ts-playwright - TypeScript | Playwright | Axios | Allure
- js-mocha-chai - JS | Mocha | Chai | Allure
Kotlin - modern programming language that makes developers happier. It is fully interoperable with Java and is officially supported for Android development.
JUnit5 - one of the most popular testing frameworks for Java/Kotlin projects. You can also try TestNG if you prefer it more.
JUnit6 - the next generation of JUnit. It aims to provide a more modern and flexible testing framework for Java/Kotlin projects.
Selenide - powerful framework for UI testing. It is built on top of Selenium WebDriver and provides a simple and concise API for writing stable and maintainable UI tests.
Playwright - modern framework for UI testing that supports multiple browsers and platforms. Selenide is more stable and comfortable, but Playwright is more modern and faster.
Appium - open-source framework for mobile application testing. It supports both Android and iOS platforms and allows you to write tests using various programming languages, including Kotlin.
Retrofit - type-safe HTTP client for Android and Java/Kotlin. It makes it easy to consume RESTful web services. It's much faster and easier than Rest-Assured. Also, you can try Feign.
Rest-Assured - popular Java/Kotlin library for testing RESTful web services. It provides a simple and intuitive API for making HTTP requests and validating responses. Retrofit is a better choice and more modern.
Axios - promise-based HTTP client for the browser and Node.js. It provides an easy-to-use API for making HTTP requests and handling responses. It's much more modern and better than Playwright API requests.
Kotest - powerful testing framework for Kotlin with a lot of useful features and integrations. You can use it as an alternative to AssertJ.
Allure - flexible lightweight multi-language test report tool with the possibility to integrate with many popular CI services such as Jenkins, TeamCity, GitHub Actions, and others.
Almost all tests have TAGS annotation that allows you to run specific groups of tests. You can find more information about it in the User Guide.
Recommended to use Docker and Docker-Compose to run Selenoid and Selenoid-UI for UI tests.
- Selenoid and Selenoid-UI installation guide
To view the Allure report after test execution you need to run the following command in the project root folder:
$ allure serve build/allure-resultsor
$ allure serve build/allure-results --host localhost --port 9999To generate the Allure report without starting a local server use:
$ allure generate build/allure-resultsThen open the generated report from the build/allure-report folder and click index.html.
You can integrate Allure with Grafana in order to have a dashboard with historical test results.
- 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