项目作者: qase-tms

项目描述 :
Qase TMS Cypress Reporter
高级语言: TypeScript
项目地址: git://github.com/qase-tms/qase-cypress.git
创建时间: 2020-06-14T09:18:51Z
项目社区:https://github.com/qase-tms/qase-cypress

开源协议:Apache License 2.0

下载


THIS REPO IS DEPRECATED. IT WAS MOVED HERE


Qase TMS Cypress Reporter

License

Installation

  1. 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:

  1. {
  2. "reporter": "cypress-qase-reporter",
  3. "reporterOptions": {
  4. "apiToken": "578e3b73a34f06e84eafea103cd44dc24253b2c5",
  5. "projectCode": "PRJCODE",
  6. "runId": 45,
  7. "logging": true
  8. }
  9. }

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:

  1. import { qase } from 'cypress-qase-reporter/dist/mocha';
  2. describe('My First Test', () => {
  3. qase([1,2],
  4. it('Several ids', () => {
  5. expect(true).to.equal(true);
  6. })
  7. );
  8. qase(3,
  9. it('Correct test', () => {
  10. expect(true).to.equal(true);
  11. })
  12. );
  13. qase(4,
  14. it.skip('Skipped test', () => {
  15. expect(true).to.equal(true);
  16. })
  17. );
  18. qase(5,
  19. it('Failed test', () => {
  20. expect(true).to.equal(false);
  21. })
  22. );
  23. });

Running Qase Reporter

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

  1. QASE_REPORT=1 npx cypress run

Reporter in console