Giter VIP home page Giter VIP logo

demoqa-1's Introduction

Test automation project for DemoQA

Toolsqa

DemoQA is a demo site for QA engineers, learning selenium.
Made by Tools QA.
Consists of website with training forms and example of bookshop with open API.

The test project consists of Web and API tests.
A brief list of interesting facts about the project:

  • Page Object with steps using Chain of Invocations
  • Fake data generating with Faker library
  • Parametrized tests
  • Parametrized build
  • Different configuration files for test running depending on build parameters
  • Config with Owner library
  • Use Lombok for models in API tests
  • Objects serialization/deserialization for API requests/responses using Jackson
  • Using request/response specifications for API tests
  • Custom Allure listener for beautiful API requests/responses logging
  • Allure TestOps integration
  • Autotests as test documentation
  • Parallel execution
  • Failing tests retries

The autotests in this project are written in Java using Selenide framework.
Gradle - is used as a build automation tool.
JUnit5 - to execute tests.
REST Assured - for easy API testing of REST services.
Jenkins - CI/CD for running tests remotely.
Selenoid - to remote launching browsers in Docker containers.
Allure Report - for test results visualisation.
Telegram Bot - for test results notifications.
Allure TestOps - as Test Management System.

Back to the table of contents ⬆

To run locally the following command can be is used:

gradle clean test

Additional parameters:

-Dthreads=<number_of_threads> can be added for parallel tests execution
-Denv=remote can be added for remote tests execution when remote url is set in remote.properties

-Dtag=<tag> - tests with this tag will be executed:

  • api
  • ui

Additional properties are retrieved from the corresponding properties files:

./resources/config/${value}.properties

Back to the table of contents ⬆

Possible properties in a ${env}.properties file, local or remote:

browserName=
browserVersion=
browserSize=
baseURL=
isRemote=
remoteURL=
  • browserName - browser for Web tests, chrome and firefox supported
  • browserVersion - version of browser for Web tests
  • browserSize - size of browser for Web tests
  • baseUrl - base URL for Web tests
  • isRemote - defines local or remote environments
  • remoteURL - URL for remote WebDriver

Possible properties in a user.properties file:

username=
password=
  • username - for authorization by old user that has a Git Pocket Guide book added in profile
  • password - used for all users in tests

Back to the table of contents ⬆

Main page of the build:

JenkinsBuildMainPage

A parametrized Jenkins job can be launched with needed parameters:

JenkinsBuildParameters

Sensitive config files are created in build workspace on build start.
Relatively safe information transferred to the build by gradle arguments (see Gradle command section, 'Additional parameters').

After the build is done the test results are available in:

  • Allure Report
  • Allure TestOps - results are uploaded there and the automated test-cases can be automatically updated accordingly to the recent changes in the code.

JenkinsFinishedBuild

Back to the table of contents ⬆

Telegram bot sends a brief report to a specified telegram chat by results of each build.

TelegramNotification

Back to the table of contents ⬆

Main page

Main page of Allure report contains the following blocks:

  • ALLURE REPORT - displays date and time of the test, overall number of launched tests, and a diagram with percent and number of passed, failed or broken tests
  • TREND - displays trend of running tests for all runs
  • SUITES - displays distribution of tests by suites
  • CATEGORIES - displays distribution of unsuccessful tests by defect types

AllureReportMain

List of tests with steps and test artefacts

On the page the list of the tests grouped by suites with status shown for each test.
Full info about each test can be shown: tags, severity, duration, detailed steps.

Also additional test artifacts are available:

  • Screenshot
  • Page Source
  • Browser console log
  • Video

AllureReportSuites

AllureReportBehaviors

Back to the table of contents ⬆

Allure TestOps integration

Test-cases in the project are imported and constantly updated from the code, so there is no need in complex process of synchronization manual test-cases and autotests.
It is enough to create and update an autotest in the code and the test-case in TMS always will be in actual state.
Manual test-cases also can be added in TMS in case of need (via web interface or via code).

AllureTestOpsTests

Any person not related to autotest creation can select a set of tests, environment parameters and start a run.
Allure TestOps run will be created, Jenkins job triggered with correct parameters. And results of the job will be seamlessly integrated into Allure TestOps.

AllureTestOpsSelectionOfTests

As soon as the Jenkins job is done, corresponding tests get their statuses. A tester can finish manual tests (if any) and click "Close launch".

AllureTestOpsLaunches

After that all these test-cases(names, steps, tags etc.) will be updated according to the recent code changes.

Back to the table of contents ⬆

Automation trends charts, distribution tests by some different parameters etc.:

AllureTestOpsDashboard

Back to the table of contents ⬆

Knows defects are automatically recognized by defined patterns for test fails in further launches.

AllureTestOpsDefects

Back to the table of contents ⬆

VideoForm

VideoSearch

Back to the table of contents ⬆

demoqa-1's People

Contributors

werechess avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.