Giter Club home page Giter Club logo

cypress-demo-app's Introduction

itallent-test-automation

Test automation project for the I-Tallent session using Cypress.

Overview

  • Basic info
  • How to Configure
  • How to run

Basic info

before starting on the project you'll need to run the 'npm install' command to install all needed dependencies. Once you have done that it is possible to use the predefined scripts in package.json. The 'local' script profile is used for local debugging not for actually running the tests, since we would like to do that headless.

How to Configure project

In the project we are using specs, and pre-configured scripts (examples, project). These scripts use a folder, and it runs all tests within that folder.

How to run

in the package.json you will be able to find the run scripts under the script tag. Once there you'll notice that different profiles will result in a different result. Chaining scripts is also possible by using 'npm otherScriptName'.

{
  "scripts": {
    "cypress-open": "npx cypress open --config-file cypress.json",
    "cypress-run-project": "npm run clean-data && npm run run-project",
    "cypress-run-examples": "npm run clean-data && npm run run-examples",
    "run-project": "npx cypress run --config-file cypress.json --spec \"cypress/integration/project/*.js\"",
    "run-examples": "npx cypress run --config-file cypress.json --spec \"cypress/integration/examples/*.js\"",
    "clean-data": "npm run clean-report && npm run clean-videos && npm run clean-screenshots",
    "clean-report": "rm -rf ./cypress/reports",
    "clean-videos": "rm -rf ./cypress/videos",
    "clean-screenshots": "rm -rf ./cypress/screenshots"
  }
}

Environment Param config

The most important is the usage of environment parameters which allows you to set certain environmental values. These environment parameters can be chained by comma separation.

The way we use them in this project is to:

  1. choose which tests to run (project, examples)
  2. choose which config to run (dev, acc, prod)

cypress-demo-app's People

Contributors

nvandyck 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.