PHPackages                             flexperto/behat-testrail-reporter - 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. flexperto/behat-testrail-reporter

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

flexperto/behat-testrail-reporter
=================================

Push behat test execution results to Testrail

1.1.0(8y ago)223.2k31MITPHPPHP ^7.0

Since Oct 19Pushed 8y agoCompare

[ Source](https://github.com/flexperto/behat-testrail-extension)[ Packagist](https://packagist.org/packages/flexperto/behat-testrail-reporter)[ Docs](http://flexperto.com/)[ RSS](/packages/flexperto-behat-testrail-reporter/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (1)

Testrail extension
==================

[](#testrail-extension)

Allows painless integration between [Behat](https://behat.org/) and [Testrail](http://www.gurock.com/testrail/)

When enabled and configured, will send API requests to testrail instance and update given test run with test execution results

System Requirements
-------------------

[](#system-requirements)

- php &gt;= 7.0.1
- composer &gt;= 1.0.0
- behat &gt;= 3.0.0

Usage
-----

[](#usage)

1. Install it:

    ```
    $ composer require flexperto/behat-testrail-reporter
    ```
2. Enable and configure context service extension in your Behat configuration:

    ```
    # behat.yml
    default:
        # ...
        extensions:
            flexperto\BehatTestrailReporter\TestrailReporterExtension:
                  enabled: true
                  baseUrl: https://mycompany.testrail.net/index.php?/api/v2
                  testidPrefix: test_rail_
                  username: erika.mustermann@mycompany.com
                  apiKey: tesrailapikey.generatedforusernameabove
                  runId: 1
                  customFields:
                    custom_environment: '1'
    ```

`enabled` field is true by default. However plugin won't start if any required fields (`baseUrl`, `username`, `apiKey`, `runId` ) are not set.

If `testidPrefix` is not set, the default will be `test_rail_`

`customFields` might be useful, if your testrail instance is configured to add additional info to test result, that is mandatory, there is an ability to set those fields. The key in this case is the testrail system property name (not the display one). As well value might depend on the property type. If this is a drop-down list, than entry id is required as a value

3. Mark your scenarios with annotations that consist of `testidPrefix` and *test case id* from Testrail. You can use one or multiple test case id's:

```
@test_rail_99
Scenario: simple test
  Given user has 3 apples
  When user gives 1 apple to his friend
  Then user has only 2 apples

@test_rail_101
@test_rail_102
Scenario Outline: extended test
  Given user has  apples
  When user gives 1 apple to his friend
  Then user has only  apples

  Examples:
    |was|is |
    | 3 | 2 |
    | 4 | 3 |

```

4. Create a test run in Testrail adding those test cases you want to execute
5. Run your tests.

Technical and other details
---------------------------

[](#technical-and-other-details)

- The comments will be submitted along with the result, containing the test error message
- For the scenario outline there will be only one test result submitted to testrail. The status of the test result will depend on the worst result in the Outline. The comments however will contain the summary of the test result for each example in outline.
- For the testrail cloud installations there is a requests-per-second limitation. To have the balance between 'almost real-time update' and saving the computation resources extension will accumulate a batch of results and push them after a single feature is complete.
- File upload (e.g. screenshot) is not yet supported as soon as Testrail API does not support this feature and developers are not yet planning to support custom solutions

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~166 days

Total

2

Last Release

2960d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92beef6f90363d3d2f8c2fc1833a6bc82bdd88d0e7b2094de30604772f35dc1f?d=identicon)[flexperto](/maintainers/flexperto)

---

Top Contributors

[![MPParsley](https://avatars.githubusercontent.com/u/1823998?v=4)](https://github.com/MPParsley "MPParsley (3 commits)")

---

Tags

Behattestrailflexperto

### Embed Badge

![Health badge](/badges/flexperto-behat-testrail-reporter/health.svg)

```
[![Health](https://phpackages.com/badges/flexperto-behat-testrail-reporter/health.svg)](https://phpackages.com/packages/flexperto-behat-testrail-reporter)
```

###  Alternatives

[sensiolabs/behat-page-object-extension

Page object extension for Behat

1166.5M27](/packages/sensiolabs-behat-page-object-extension)[laracasts/behat-laravel-extension

Laravel extension for Behat

2611.3M12](/packages/laracasts-behat-laravel-extension)[imbo/behat-api-extension

API extension for Behat

1082.5M9](/packages/imbo-behat-api-extension)[dmore/behat-chrome-extension

Behat extension for controlling Chrome without Selenium

3313.2M358](/packages/dmore-behat-chrome-extension)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

593.6M37](/packages/dvdoug-behat-code-coverage)[bex/behat-extension-driver-locator

Driver locator tool for behat extensions

385.2M4](/packages/bex-behat-extension-driver-locator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
