Code Monkey home page Code Monkey logo

qase-cypress's Introduction

THIS REPO IS DEPRECATED. IT WAS MOVED HERE


Qase TMS Cypress Reporter

License

Installation

npm install cypress-qase-reporter

Configuration

Reporter options (* - required):

  • *apiToken - Token for API access, you can find more information here
  • *projectCode - Code of your project (can be extracted from main page of your project: https://app.qase.io/project/DEMOTR - DEMOTR is project code here)
  • runId - Run ID from Qase TMS (also can be got from run URL)
  • logging [true/false] - Enabled debug logging from reporter or not

Example cypress.json config:

{
    "reporter": "cypress-qase-reporter",
    "reporterOptions": {
        "apiToken": "578e3b73a34f06e84eafea103cd44dc24253b2c5",
        "projectCode": "PRJCODE",
        "runId": 45,
        "logging": true
    }
}

You can check example configuration with multiple reporters in demo project

Supported ENV variables:

  • QASE_REPORT - You should pass this ENV if you want to use qase reporter
  • QASE_RUN_ID - Pass Run ID from ENV and override reporter options
  • QASE_RUN_NAME - Set custom Run name, when new run is created
  • QASE_RUN_DESCRIPTION - Set custom Run description, when new run is created

Using Reporter

If you want to decorate come test with Qase Case ID you could use qase function:

import { qase } from 'cypress-qase-reporter/dist/mocha';

describe('My First Test', () => {
    qase([1,2],
        it('Several ids', () => {
            expect(true).to.equal(true);
        })
    );
    qase(3,
        it('Correct test', () => {
            expect(true).to.equal(true);
        })
    );
    qase(4,
        it.skip('Skipped test', () => {
            expect(true).to.equal(true);
        })
    );
    qase(5,
        it('Failed test', () => {
            expect(true).to.equal(false);
        })
    );
});

Running Qase Reporter

To start cypress run with qase reporter run it like this:

QASE_REPORT=1 npx cypress run

Reporter in console

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.