allure-framework/allure-codeception 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

allure-framework/allure-codeception

Composer 安装命令:

composer require --dev allure-framework/allure-codeception

包简介

Allure Codeception integration

README 文档

README

Latest Stable Version Build Type Coverage Psalm Level Total Downloads License

This is an official Codeception adapter for Allure Framework.

What is this for?

The main purpose of this adapter is to accumulate information about your tests and write it out to a set of XML files: one for each test class. This adapter only generates XML files containing information about tests. See wiki section on how to generate report.

Example project

Example project is located at: https://github.com/allure-examples/allure-codeception-example

Installation and Usage

In order to use this adapter you need to add a new dependency to your composer.json file:

{
    "require": {
	    "php": "^8",
	    "allure-framework/allure-codeception": "^2"
    }
}

To enable this adapter in Codeception tests simply put it in "enabled" extensions section of codeception.yml:

extensions:
    enabled:
        - Qameta\Allure\Codeception\AllureCodeception
    config:
        Qameta\Allure\Codeception\AllureCodeception:
            outputDirectory: allure-results
            linkTemplates:
                issue: https://example.org/issues/%s
            setupHook: My\SetupHook

outputDirectory is used to store Allure results and will be calculated relatively to Codeception output directory (also known as paths: log in codeception.yml) unless you specify an absolute path. You can traverse up using .. as usual. outputDirectory defaults to allure-results.

linkTemplates is used to process links and generate URLs for them. You can put here an sprintf()-like template or a name of class to be constructed; such class must implement Qameta\Allure\Setup\LinkTemplateInterface.

setupHook allows to execute some bootstrapping code during initialization. You can put here a name of the class that implements magic __invoke() method - and that method will be called. For example, it can be used to ignore unnecessary docblock annotations:

<?php

namespace My;

use Doctrine\Common\Annotations\AnnotationReader;

class SetupHook
{
    public function __invoke(): void
    {
        AnnotationReader::addGlobalIgnoredName('annotationToIgnore');
    }
}

To generate report from your favourite terminal, install allure-cli and run following command (assuming you're in project root and using default configuration):

allure generate -o ./build/allure-report ./build/allure-results

Report will be generated in build/allure-report.

Main features

See respective PHPUnit section.

allure-framework/allure-codeception 适用场景与选型建议

allure-framework/allure-codeception 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12.61M 次下载、GitHub Stars 达 52, 最近一次更新时间为 2014 年 06 月 11 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「testing」 「codeception」 「report」 「steps」 「attachments」 「cases」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 allure-framework/allure-codeception 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 allure-framework/allure-codeception 我们能提供哪些服务?
定制开发 / 二次开发

基于 allure-framework/allure-codeception 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 12.61M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 54
  • 点击次数: 28
  • 依赖项目数: 8
  • 推荐数: 0

GitHub 信息

  • Stars: 52
  • Watchers: 11
  • Forks: 44
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2014-06-11