Coder Social home page Coder Social logo

quality-engineering's Introduction

test-automation-quickstart

Include the Highlevel summary about the solutions

Concepts Included

  • Parallel test runs
  • Shared framework across various automation definitions
  • Dependency injection
  • Page Object pattern
  • Common web page interaction methods
  • Common api interaction methods
  • Mavenised performance tests
  • Externalised test configuration
  • Commonly used test utility classes
  • Simple security tests

Tools

  • Maven
  • Cypress
  • Cucumber-JVM
  • JUnit
  • Spring
  • Selenium Webdriver
  • Jackson
  • JMeter
  • OWASP Zed Attack Proxy

Requirements

In order to utilise this project you need to have the following installed locally:

  • Maven 3
  • Chrome and Chromedriver (UI tests use Chrome by default, can be changed in config)
  • Java 1.8
  • ZAP 2.7.0 (Run it in deamon mode using the following command: ./zap.sh -daemon -port 8888 -config api.disablekey=true)

In order for the api tests to pass, you will need to configure your test email. You may need to set up a testing email account (free ones can be made on gmail.com). Then you can either edit it in the API properties file, or supplied as maven parameters. E.g.

mvn install -Papi-acceptance-tests -Dapi.acceptance.test.email.address=MY_EMAIL_ADDRESS -Dapi.acceptance.test.email.password=MY_EMAIL_PASSWORD

Usage

The project is broken into separate modules for API, UI, Performance and Security testing. Each of these modules can be utilised independently of the others using maven profiles.

To run all modules, navigate to test-automation-quickstart directory and run:

mvn clean install

To run UI acceptance tests only, navigate to test-automation-quickstart directory and run:

mvn clean install -Pui-acceptance-tests

To run API acceptance tests only, navigate to test-automation-quickstart directory and run:

mvn clean install -Papi-acceptance-tests

To run performance tests only, navigate to test-automation-quickstart directory and run:

mvn clean install -Pperformance-tests

To run security tests only, navigate to test-automation-quickstart directory and run:

mvn clean install -Psecurity-acceptance-tests

Reporting

Reports for each module are written into their respective /target directories after a successful run.

UI acceptance tests result in a HTML report for each feature in test-automation-quickstart/ui-acceptance-tests/target/cucumber-parallel/. In the case of test failures, a screen-shot of the UI at the point of failure is embedded into the report.

API acceptance tests result in a HTML report for each feature in test-automation-quickstart/api-acceptance-tests/target/cucumber-parallel/.

Performance tests result in a .jtl results file and .png graphs showing response times and transactions per second, generated in test-automation-quickstart/performance-tests/target/jmeter/results.

Security acceptance tests result in a HTML report for each feature in test-automation-quickstart/security-acceptance-tests/target/cucumber-parallel/. They will also generate a security risks HTML report in test-automation-quickstart/security-acceptance-tests/security-reports/security-report.html.

NOTE: As mentioned, cucumber reports are written to a separate file for each feature. This occurs as a result of running tests in parallel, meaning that you do not get a single unified test report. If using CI, these individual reports can be joined using plugins such as the Jenkins Cucumber-JVM-Reports plugin.

quality-engineering's People

Contributors

chiraag-egov avatar gajenc avatar

Watchers

 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.