项目作者: qase-tms

项目描述 :
Qase TMS TestCafe Reporter
高级语言: TypeScript
项目地址: git://github.com/qase-tms/qase-testcafe.git
创建时间: 2021-01-08T08:04:22Z
项目社区:https://github.com/qase-tms/qase-testcafe

开源协议:Apache License 2.0

下载


THIS REPO IS DEPRECATED. IT WAS MOVED HERE


Qase TMS TestCafe Reporter

License

Installation

  1. npm install testcafe-reporter-qase

Usage

In order to use reporter, you should add meta information to your tests. Meta key should be CID.
You should assign list of case IDs to it, e.g.:

  1. test
  2. .meta('CID', [1])
  3. ('Text typing basics', async (t) => {
  4. await t
  5. });
  6. test
  7. .meta({ CID: [2, 3] })
  8. ('Click check boxes and then verify their state', async (t) => {
  9. await t
  10. });

After that you can run your tests by providing custom reporter:

  1. npx testcafe chrome examples/use-page-model -r spec,qase

Configuration

Qase reporter supports passing parameters using two ways:
using .qaserc file and using ENV variables.

.qaserc parameters:

  • enabled - Enable reporter
  • 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 - Pass Run ID
  • runName - Set custom Run name, when new run is created.
    Supports two parameters:
    • %DATE%
    • %AGENTS%
  • runDescription - Set custom Run description, when new run is created
  • logging - Enabled debug logging from reporter or not

Example configuration file:

  1. {
  2. "enabled": true,
  3. "logging": true,
  4. "apiToken": "a786b45e371e1097c4c78a3211e3a1d23018ceb9",
  5. "projectCode": "PROJECTCODE",
  6. "runName": "TestCafe run %DATE% %AGENTS%"
  7. }

Supported ENV variables:

  • QASE_ENABLED - Same as enabled
  • QASE_API_TOKEN - Same as apiToken
  • QASE_PROJECT - Same as projectCode
  • QASE_RUN_ID - Pass Run ID from ENV and override reporter options
  • QASE_RUN_NAME - Same as runName
  • QASE_RUN_DESCRIPTION - Same as runDescription
  • QASE_LOGGING - Same as logging