8000 GitHub - cmuench/junit-xml: Generates JUnit XML files
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cmuench/junit-xml

Repository files navigation

JUnit XML Document Generator Library

image

Install component with composer.

composer require --dev n98/junit-xml

Example

require_once __DIR__ . '/../vendor/autoload.php';

$document = new \N98\JUnitXml\Document();

$suite = $this->document->addTestSuite();
$timeStamp = new \DateTime();
$suite->setName('My Test Suite');
$suite->setTimestamp($timeStamp);
$suite->setTime(0.344244);

$testCase = $suite->addTestCase();
$testCase->addError('My error 1', 'Exception');
$testCase->addError('My error 2', 'Exception');
$testCase->addError('My error 3', 'Exception');
$testCase->addError('My error 4', 'Exception');
$testCase->addFailure('My failure 1', 'Exception');
$testCase->addFailure('My failure 2', 'Exception');

$document->save('results.xml');

About

Generates JUnit XML files

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

0