定制 qase/codeception-reporter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

qase/codeception-reporter

最新稳定版本:2.1.3

Composer 安装命令:

composer require qase/codeception-reporter

包简介

Qase TMS Codeception reporter.

README 文档

README

Publish test results easily and efficiently.

Installation

To install the latest version, run:

composer require qase/codeception-reporter 

Add the following lines to the codeception.yml file:

...
extensions:
        enabled:
        - Codeception\Extension\RunFailed
        - Qase\Codeception\Reporter

Getting Started

The Codeception reporter can auto-generate test cases and suites based on your test data. Test results of subsequent test runs will match the same test cases as long as their names and file paths don’t change.

You can also annotate tests with the IDs of existing test cases from Qase.io before executing them. This is a more reliable way to bind automated tests to test cases, ensuring they persist when you rename, move, or parameterize your tests.

For more information, see the Usage Guide.

For example:

<?php

namespace Tests\Unit;

use Qase\Codeception\Attributes\Field;
use Qase\Codeception\Attributes\QaseId;
use Qase\Codeception\Attributes\Suite;
use Tests\Support\UnitTester;

class FirstTest extends \Codeception\Test\Unit
{
    protected UnitTester $tester;

    protected function _before()
    {
    }

    #[QaseId(1)]
    #[Field('description', 'My description')]
    public function testSomeFeature()
    {
        $this->assertTrue(true);
    }

    #[Suite("My suite")]
    public function testSomeFeatureFailed()
    {
        $this->assertTrue(false);
    }
}

To execute Codeception tests and report them to Qase.io, run the command:

QASE_MODE=testops ./vendor/bin/codecept run

or, if configured in a script:

composer test

A test run will be created and accessible at:

https://app.qase.io/run/QASE_PROJECT_CODE

Configuration

Qase Codeception Reporter can be configured using:

  1. A separate configuration file qase.config.json.
  2. Environment variables (which override the values in the configuration file).

For a full list of configuration options, refer to the Configuration Reference.

Example qase.config.json

{
  "mode": "testops",
  "debug": true,
  "testops": {
    "api": {
      "token": "api_key"
    },
    "project": "project_code",
    "run": {
      "complete": true
    }
  }
}

Requirements

We maintain the reporter on LTS versions of PHP.

  • php >= 8.1
  • codeception >= 5.2

统计信息

  • 总下载量: 2.48k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 4
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2022-05-11