Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for BDD tests (.feature) #1034

Merged
merged 2 commits into from Feb 6, 2020
Merged

Add support for BDD tests (.feature) #1034

merged 2 commits into from Feb 6, 2020

Conversation

edno
Copy link
Contributor

@edno edno commented Feb 6, 2020

This PR:

This PR allows running infection with test framework codeception with Gherkin (BDD) style testsuite where JUnit file reference .feature tests instead of classes.

Example of junit.xml:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
  <testsuite name="acceptance" tests="4" assertions="11" errors="0" failures="0" skipped="0" time="0.604773">
    <testcase file="/codeception/tests/bdd/FeatureA.feature" name="Feature A: Scenario A1" assertions="6" time="0.039365"/>
    <testcase file="/codeception/tests/bdd/FeatureB.feature" name="Feature B: Scenario B2" assertions="2" time="0.022857"/>
    <testcase file="/codeception/tests/bdd/FeatureA.feature" name="Feature A: Scenario A2" assertions="1" time="0.029354"/>
    <testcase file="/codeception/tests/bdd/FeatureA.feature" name="Feature A: Scenario A3" assertions="2" time="0.025091"/>
  </testsuite>
</testsuites>

This is a new PR based on the discussion in PR #1033

Copy link
Member

@maks-rafalko maks-rafalko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would be more than happy if you backport this one to master.

Thank you @edno

@maks-rafalko maks-rafalko merged commit 96c6a3f into infection:0.15 Feb 6, 2020
@maks-rafalko
Copy link
Member

Released https://github.com/infection/infection/releases/tag/0.15.1

maks-rafalko added a commit that referenced this pull request Feb 12, 2020
* Add support for BDD tests (.feature)

* Fix boolean expression syntax

* Coding style fixes from pretty

* Fix new PHPStan issues and move preg_replace to `if` statement

Co-authored-by: Grégory Heitz <edno@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants