PHPackages                             allure-framework/allure-codeception - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. allure-framework/allure-codeception

ActiveLibrary[Testing &amp; Quality](/categories/testing)

allure-framework/allure-codeception
===================================

Allure Codeception integration

v2.4.0(1y ago)5212.1M—2.1%44[1 issues](https://github.com/allure-framework/allure-codeception/issues)[3 PRs](https://github.com/allure-framework/allure-codeception/pulls)7Apache-2.0PHPPHP ^8

Since Jun 11Pushed 1y ago11 watchersCompare

[ Source](https://github.com/allure-framework/allure-codeception)[ Packagist](https://packagist.org/packages/allure-framework/allure-codeception)[ Docs](https://allurereport.org/)[ RSS](/packages/allure-framework-allure-codeception/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (33)Used By (7)

Allure Codeception Adapter
==========================

[](#allure-codeception-adapter)

[![Latest Stable Version](https://camo.githubusercontent.com/a60bf4e2964bb08ba5cdaa1c2c82101a0143b20714037eeb3fa48c393db8afa2/687474703a2f2f706f7365722e707567782e6f72672f616c6c7572652d6672616d65776f726b2f616c6c7572652d636f646563657074696f6e2f76)](https://packagist.org/packages/allure-framework/allure-codeception)[![Build](https://github.com/allure-framework/allure-codeception/actions/workflows/build.yml/badge.svg)](https://github.com/allure-framework/allure-codeception/actions/workflows/build.yml)[![Type Coverage](https://camo.githubusercontent.com/cbd60a429a93a9de08a650a7de8244968c28adc9495c7cf4c1381b77997adcaa/68747470733a2f2f73686570686572642e6465762f6769746875622f616c6c7572652d6672616d65776f726b2f616c6c7572652d636f646563657074696f6e2f636f7665726167652e737667)](https://shepherd.dev/github/allure-framework/allure-codeception)[![Psalm Level](https://camo.githubusercontent.com/ade420310fe7209694862335a07ab7f4ec6637a6e7fc1c8d63301d06e97d14e4/68747470733a2f2f73686570686572642e6465762f6769746875622f616c6c7572652d6672616d65776f726b2f616c6c7572652d636f646563657074696f6e2f6c6576656c2e737667)](https://shepherd.dev/github/allure-framework/allure-codeception)[![Total Downloads](https://camo.githubusercontent.com/e85e35793c257a03faf6e737bf1a836029277168033b1e4d46d5eb2715007d06/687474703a2f2f706f7365722e707567782e6f72672f616c6c7572652d6672616d65776f726b2f616c6c7572652d636f646563657074696f6e2f646f776e6c6f616473)](https://packagist.org/packages/allure-framework/allure-codeception)[![License](https://camo.githubusercontent.com/367f9853a287039ac3f83c1869f386183781531fd8f72a0de2d60c2b3402bce9/687474703a2f2f706f7365722e707567782e6f72672f616c6c7572652d6672616d65776f726b2f616c6c7572652d636f646563657074696f6e2f6c6963656e7365)](https://packagist.org/packages/allure-framework/allure-codeception)

This is an official [Codeception](http://codeception.com) adapter for Allure Framework.

What is this for?
-----------------

[](#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](https://github.com/allure-framework/allure-core/wiki#generating-report) on how to generate report.

Example project
---------------

[](#example-project)

Example project is located at:

Installation and Usage
----------------------

[](#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:

```
