ndrake0027 / drupal-junit-parser
JUnit parser for Drupal behat and PHPUnit output to a simple html table.
Installs: 13 311
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 2
Open Issues: 0
Type:project
Requires
- symfony/dom-crawler: ^3 | ^4
- symfony/property-access: ^5.4
- symfony/serializer: ^3.0 | ^4
README
Parsers for PHPUnit and Behat junit output for drupal 8 test
Installing
composer require ndrake0027/drupaljunitparser
Adding directly in composer.json
"require": {
"ndrake0027/drupaljunitparser" : "dev-master"
},
Example usage:
<?php /******** * Main * *******/ require __DIR__ . '/vendor/autoload.php'; use DrupalJUnit\Parser\Parser; $dir = $argv[1]; $pattern = isset($argv[3]) ? $argv[3] : ''; $type = isset($argv[2]) ? $argv[2] : ''; $parser = new Parser(); $parser->parse($dir, $pattern, $type);
Example output
Behat output
Run resultsTotal tests | Total failures | Total errors |
---|---|---|
442 | 33 | 0 |
Aggregated suite results
Suite name | Total tests | Total failures | Total errors |
---|---|---|---|
access | 71 | 0 | 0 |
Failing Suite | Failing Class | Failing Test | Failure message |
---|---|---|---|
Test Suite
|
Test Class name
|
Test name
|
Some exception i.e.: (Behat\Mink\Exception\ElementNotFoundException)
|
PHPUnit output
Run resultsTotal tests | Total failures | Total errors | Total time |
---|---|---|---|
575 | 24 | 0 | 9167.635773 |
Type | Total test | Total time | Total failures | Total errors |
---|---|---|---|---|
functionalJavascript | 20 | 2480.456045 | 0 | 0 |
Suite Type | Class name | Tests | Failures | Errors | Time | Assertions |
---|---|---|---|---|---|---|
functionalJavascript | Drupal\Tests\Path\FunctionalJavascript\TestClass | 1 | 0 | 0 | 117.336066 | 12 |
Failing Suite | Failing Class | Failing Test | Failure message |
---|---|---|---|
Test Suite
|
Test Class name
|
Test name
|
Some exception and stacktrace i.e.: RuntimeException: Could not fetch version information from https://dummy_server:port/test/cli. Please check if Chrome is running. Please see docs/troubleshooting.md if Chrome crashed unexpected.
|