Giter Site home page Giter Site logo

cgov-digital-platform-qa's Introduction

CancerGov Digital Platform QA Framework

This is the QA automation framework for the CancerGov Digital Communications Platform

Prerequisites:

Command line execution:

To run the default test suite (all tests), execute the command

mvn test

Specifying the environment

Hostnames are specified in the config.properties file, as environment.hostname.<NAME> (where <NAME> is the human-friendly name of the environment.) Each environment.hostname entry is a fully qualified hostname (e.g. environment.hostname.prod=www.cancer.gov).

The default runtime environment is specified as the value of the environment.active property. (e.g. environment.active=qa)

Specifying a test suite.

The entire set of tests is executed by default.

To execute a specific test suite, execute the command

mvn test -Dsurefire.suiteXmlFiles=<testfile>

Where <testfile> is the test suite file and path. e.g.

mvn test -Dsurefire.suiteXmlFiles=suites/cross-cutting.xml

Multiple test suites may be specified by separating them with commas.

Configuration

Most configuration appears in configuration/config.properties. Values in the configuration file may be overridden locally via configuration/config.override.properties (the override file is excluded from source control). Select configuration data may be overridden via command line parameters. The order of precedence is:

  1. Look for a value from the command line.
  2. Fallback to a value from config.override.properties.
  3. Fallback to the value in config.properties.

Folder Structure

  • configuration - Main configuration files
  • resources/drivers - Driver files for different browsers on differnt platforms.
  • src - The source code for this suite.
    • src/main/java/gov/cancer/framework - utility classes used by page objects.
    • src/main/java/gov/cancer/pageobject - the page object classes used for testing.
    • src/test/java/gov/cancer/tests - the test classes.
  • suites - TestNG test suite files.
  • target - Generated files. (Not version controlled.)
  • test-data - Like it says on the label.
  • test-output - Reports and the like. (Not version controlled.)

Architecture

Tests in this framework follow the PageObject pattern.

The testing system makes use of the Selenium WebDriver browser automation project to control a web browser and read/modify page values.

All browser interactions are controlled using classes in the gov.cancer namespace in {proj_root}/src/main/java/gov/cancer/. High-level page objects are in the gov.cancer.pageobject namespace, with additional helper classes in gov.cancer.framework.

All test classes reside under the gov.cancer.tests namespace in {proj_root}/src/test/java/gov/cancer/tests. Test classes work with methods from the PageObjects. They do not import anything from the org.openqa.selenium namespace.

Tests are run using the TestNG framework.

cgov-digital-platform-qa's People

Contributors

alinai avatar blairlearn avatar blairl-nih avatar popkhadzeg avatar kate-mashkina avatar supriyasaxena0605 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.