This Automation Testing Framework for "Douglas" application.
It's made for the purpose of demonstrating my ability to create testing frameworks.
I used Playwright to interact with browser and run test cases, and Allure for the reporting system.
This framework written with ability to be run on different environments and have several options to run,
including debug mode and parallel mode.
I've written this framework in BDD style using common patterns as Page Object and Screen Play.
test('DTC_008_Should_Set_All_Cookies', async () => {
await user.onMainPage.selectCookies('All');
await user.onMainPage.verifyCookiesIs('All');
});
Before cloning the repository ensure that you have installed Node.JS, Java and JAVA_HOME path is set.
If not, you can install them via next links:
Node.JS - https://nodejs.org/en/download/current
Java - https://www.oracle.com/cis/java/technologies/downloads/
How to set JAVA_HOME - https://www.baeldung.com/java-home-on-windows-7-8-10-mac-os-x-linux
Java is necessary for generating and viewing Allure reports.
When preconditions are met please clone the repository and run "npm install" command in the terminal.
npm install
That's it. You can run the tests.
# runs tests in the single thread mode with default setup.
npm run test
# runs tests in the single thread mode with informational console logging for understanding what's happening in the test.
npm run test:console:info
# runs tests in the single thread mode with extended informational console logging.
npm run test:console:verbose
# runs tests in the single thread mode with console logging displaying only errors.
npm run test:console:error
# runs tests in the single thread mode with verbose console logging for debug test.
npm run test:console:debug
# runs tests in the parallel mode.
npm run test:parallel
# generates Allure report
npm run report
# Deleting reports
npm run delete:report
After installing necessary things, create .env file to store env variables for local running with such variables:
RUN_ENV=https://www.douglas.de./
PASS= # your password to email
LOG_LEVEL=MUTE # INFO, MUTE, VERBOSE, TECHNICAL, ERROR
MODE=PARALLEL # PARALLEL or SINGLE
WORKERS= # number
RETRIES= # number
BROWSERS=chromium # modern, chromium, firefox, webkit, mobile, mobile_chrome, mobile_safari, branded, branded_chrome, branded_edge, all
HEADLESS= # boolean
TEST_TIMEOUT= # number
COOKIE_SET_TIMOUT= # extended waiting "number"
MAX_DIFF_PIX= # difference in pixels for images comparisom "number"