Created to demonstrate mobile test automation skills by checking the functionality and appearance of the Google Translate Android application. It operates on the WebdriverIO automation framework and includes functional and non-functional autotest examples for verifying appearance through screenshot comparisons (UI Regression Tests).
Note
There was no goal to cover all functionality and views of Google Translate
FEATURES | STRUCTURE | SETUP | BUILD WITH | LICENSE
- Executing of autotests separatly by suite names
main scree 8000 n
,select language screen
andall tests
- UI Comparison autotests that allows to compare current view with predefined scrennshot. Differences between screenshots are highlighted in red
- Allure reports with screenshot and links to issue that which are created in the description if test contains label
[ISSUE => ]
. Also there is custom allure decodator@step()
for convinient usage
- Dividion of wdio.conf settings, which allows to setup pipelines in different places without conflicts
- Static code analysis.
ESLint
andCodeQL
analysis on push and pull requests - Managed log levels, silent by default. This makes logs readable and tests easy to debug, just indicate the desired log level in
.env
file, likeLOG_LVL=debug
- Advanced and easy to use imports. Instead of importing several screens, just import
ApplicationScreens
via@screens
import
import { ApplicationScreens } from '@screens/ApplicationScreens';
await screens.mainScreen.function();
await screens.searchLanguageScreen.function();
await screens.your_screen.function();
.github
folder - static code analysis pipelines setupconfig
folder - webdriver and reporter configurationsdemo
folder - screenshots forREADME.md
docs
folder - for different instructions and rulesgoogle-translate-autotests
folder - divided into functional and non-functional autotestsscreens
folder - selectors and screen functionssupport
folder - different utils and data for tests- in
package.json
you can find scripts and dependencies - in
tsconfig.json
you can find imports setup
- Install typescript from the official website if need
- Downloaded Node.js and NPM
- Install node modules by run command from project root:
npm install
- Install latest release appium server from the official repo, follow instructions
- Check instructions for Appium Inspector setup
- Install Android Studio and create desired device, then write capabilities of created device to
.env
file, that should be located in project root. Example of file:
PLATFORM_NAME=Android
DEVICE_NAME=Pixel 6 API 30
PLATFORM_VERSION=11
RETRIES=1 #optional retries on fail number, 0 by default
MAX_INSTANCES=1 #optional parallel runs number, 1 by default
LOG_LVL=silent #optional log level, available 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent'
- Open android studio and click on play button for created device
- Create
app
forlder in project root and add the.apk
file to it - Run decired suite from
pakage.json
, for examplerun-functional-autotests
. Or by using command from project root:
npm run run-functional-autotests
- TypeScript language - Used to write automation test cases.
- NPM - For managing project's dependencies, including WebdriverIO and any other libraries required for the automation.
- WebdriverIO - Serves as the core automation framework for the project, enabling the simulation of user interactions and testing scenarios on the web application.
- Mocha framework - A JavaScript testing framework that provides flexible and powerful tools for writing and running tests with a convenient interface and extensive customization options.
- Appium - An open-source framework for automating mobile app testing across different platforms, allowing tests to be run on iOS, Android, and Windows devices using a unified API.
- Pixelmatch library - is utilized for visual regression testing. It allows to compare screenshots of your app UI, detecting any unexpected visual differences.
- Allure Report - used for generating detailed test reports.
MIT License
Copyright (c) 2024 Yevhenii Marchenko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.