webinar.ru
Test automation project for📄 Сontents
- Description
- Tools and technologies
- Test cases
- How to run
- Test results report in Allure Report
- Allure TestOps integration
- Jira integration
- BrowserStack App Automate
- Telegram notifications
- Sample test run in Selenoid and BrowserStack
📎 Description
The project implements web and mobile (android) tests for website and mobile app.
It has the following features:
- Parametrized build
- Parametrized tests
- Allure TestOps and Jira integration
- Autotests as test documentation
- Page Object design pattern
- Using Java Faker for generating test data
- Different configs using Owner library for test running
🛠️ Tools and technologies
✅ Test cases
UI tests:
- Click on logo reopens main page
- Click on participant button opens registration sidebar
- Check promo title of main page
- Successful opening of Blog page
- Click Try button opens Sign Up page
- Blog page menu items are enabled, visible and clickable (parametrized)
- Successful opening of Tariffs page
- Webinar tariff type contains expected tariff options (parametrized)
Mobile app tests:
- Successful user login
- Successful user logout
- Successful user data update
- Check Forgot password button functionality
▶️ How to run
Gradle build
There are two types of tasks for tests
:
- web_test
- mobile_test
To run web tests locally:
$ gradle clean web_test -Denv='local'
Additional parameters: -Dbrowser=
DbrowserVersion=
DbrowserSize=
- set parameters for the browser
To run mobile tests locally:
$ gradle clean mobile_test -DenvMobile='mobile-local'
Valid combinations of gradle command:
graph LR
A[tests tasks] --> B[web_test]
A --> C[mobile_test]
B --> D[-Denv=remote]
B --> E[-Denv=local]
C --> F[-DenvMobile=mobile-local]
C --> G[-DenvMobile=mobile-remote]
Jenkins
Running tests inMain page of the build:
The build of the project is parameterized, so before starting it, you need to choose parameters.
To run all types of tests, you must select the following options:
- REMOTE_URL:
https://selenoid.autotests.cloud/wd/hub
- ENV:
remote
- MOBILE_ENV:
mobile-remote
- TASK:
test
To run web tests only:
- REMOTE_URL:
https://selenoid.autotests.cloud/wd/hub
- ENV:
remote
- TASK:
web_test
To run mobile tests only:
- REMOTE_URL:
http://hub.browserstack.com/wd/hub
- MOBILE_ENV:
mobile-remote
- TASK:
mobile_test
Test results report in Allure Report
Overview page
Overview page of Allure report contains the following parts:
- ALLURE REPORT displays date and time of the test, overall number of launched tests and chart showing the percentage and number of successful, fallen and broken tests
- SUITES displays groups of tests that share a common context such as a specific test environment or a particular test category
- FEATURES displays groups of tests according to Epic, Feature tags
- TREND displays trend of running tests for all runs
- CATEGORIES displays distribution of unsuccessful tests by defect types
- EXECUTORS displays information on test executors that were used to run the tests
Graphs page
Graphs allow to see different statistics collected from the test data: statuses breakdown or severity and duration diagrams.
Suites page
On the SUITES tab a standard structural representation of the executed tests, grouped by suites and classes can be found.
Each test case have information such as severity
, description
, duration
, test data
and execution steps
.
Also additional test artifacts are available:
- Last Screenshot
- Page Source
- Browser console logs
- Video
Allure TestOps integration
Dashboards
Test cases
Jira integration
BrowserStack App Automate
BrowserStack Dashboard with an example of a mobile test result:
Telegram notifications
Telegram bot sends a report to a specified telegram chat by results of each project build.