Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

PhpUnit XML reporter #53

Merged
merged 1 commit into from
Dec 31, 2018
Merged

PhpUnit XML reporter #53

merged 1 commit into from
Dec 31, 2018

Conversation

Naktibalda
Copy link
Member

Like Junit, but generates testsuite for each test file.

Fixes Codeception/Codeception#5004
Replaces #52

Example of report :

<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
  <testsuite name="dummy" tests="6" assertions="3" errors="0" failures="0" skipped="0" time="0.328235">
    <testsuite file="/c/Projects/phpunit-wrapper/vendor/codeception/codeception/tests/data/claypit/tests/dummy/FileExistsCept.php" tests="1" assertions="1" errors="0" failures="0" skipped="0" time="0.119059">
      <testcase name="FileExists" file="/c/Projects/phpunit-wrapper/vendor/codeception/codeception/tests/data/claypit/tests/dummy/FileExistsCept.php" assertions="1" time="0.119059"/>
    </testsuite>
    <testsuite file="/c/Projects/phpunit-wrapper/vendor/codeception/codeception/tests/data/claypit/tests/dummy/AnotherCest.php" tests="2" assertions="0" errors="0" failures="0" skipped="0" time="0.078635">
      <testcase file="/c/Projects/phpunit-wrapper/vendor/codeception/codeception/tests/data/claypit/tests/dummy/AnotherCest.php" name="optimistic" class="AnotherCest" assertions="0" time="0.058278"/>
      <testcase file="/c/Projects/phpunit-wrapper/vendor/codeception/codeception/tests/data/claypit/tests/dummy/AnotherCest.php" name="pessimistic" class="AnotherCest" assertions="0" time="0.020357"/>
    </testsuite>
    <testsuite file="/c/Projects/phpunit-wrapper/vendor/codeception/codeception/tests/data/claypit/tests/dummy/GroupEventsCest.php" tests="1" assertions="0" errors="0" failures="0" skipped="0" time="0.000562">
      <testcase file="/c/Projects/phpunit-wrapper/vendor/codeception/codeception/tests/data/claypit/tests/dummy/GroupEventsCest.php" name="countGroupEvents" class="GroupEventsCest" assertions="0" time="0.000562"/>
    </testsuite>
    <testsuite file="/c/Projects/phpunit-wrapper/vendor/codeception/codeception/tests/data/claypit/tests/dummy/AnotherTest.php" tests="2" assertions="2" errors="0" failures="0" skipped="0" time="0.129979">
      <testcase name="testFirst" class="AnotherTest" classname="AnotherTest" file="/c/Projects/phpunit-wrapper/vendor/codeception/codeception/tests/data/claypit/tests/dummy/AnotherTest.php" line="4" assertions="1" time="0.126584"/>
      <testcase name="testSecond" class="AnotherTest" classname="AnotherTest" file="/c/Projects/phpunit-wrapper/vendor/codeception/codeception/tests/data/claypit/tests/dummy/AnotherTest.php" line="8" assertions="1" time="0.003395"/>
    </testsuite>
  </testsuite>
</testsuites>

New command line parameter --phpunit-xml will be added to Codeception.

Like Junit, but generates testsuite for each test file
@Naktibalda Naktibalda force-pushed the 7.1-phpunit-xml-reporter branch from aa76c09 to ebc9c63 Compare December 28, 2018 09:27
@Naktibalda Naktibalda requested a review from DavertMik December 28, 2018 10:26
@Naktibalda Naktibalda merged commit 7c95e20 into 7.1 Dec 31, 2018
@Naktibalda Naktibalda deleted the 7.1-phpunit-xml-reporter branch December 31, 2018 10:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants