{"id":25487977,"url":"https://github.com/testmonitor/junit-xml-parser","last_synced_at":"2026-03-06T21:31:33.048Z","repository":{"id":278045631,"uuid":"934299329","full_name":"testmonitor/junit-xml-parser","owner":"testmonitor","description":"This package provides a very basic, convenient parser for JUnit XML reports.","archived":false,"fork":false,"pushed_at":"2025-10-24T13:29:57.000Z","size":95,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-28T02:32:52.271Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/testmonitor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-17T15:46:01.000Z","updated_at":"2025-09-25T11:10:25.000Z","dependencies_parsed_at":"2025-02-17T18:29:40.759Z","dependency_job_id":"f6b6a7bb-53fd-4410-910f-f044557378a6","html_url":"https://github.com/testmonitor/junit-xml-parser","commit_stats":null,"previous_names":["testmonitor/junit-xml-parser"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/testmonitor/junit-xml-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fjunit-xml-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fjunit-xml-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fjunit-xml-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fjunit-xml-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testmonitor","download_url":"https://codeload.github.com/testmonitor/junit-xml-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fjunit-xml-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30198661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-18T20:38:20.742Z","updated_at":"2026-03-06T21:31:33.007Z","avatar_url":"https://github.com/testmonitor.png","language":"PHP","readme":"# TestMonitor JUnit Parser\n\n[![Latest Stable Version](https://poser.pugx.org/testmonitor/junit-xml-parser/v/stable)](https://packagist.org/packages/testmonitor/junit-xml-parser)\n[![CircleCI](https://img.shields.io/circleci/project/github/testmonitor/junit-xml-parser.svg)](https://circleci.com/gh/testmonitor/junit-xml-parser)\n[![StyleCI](https://styleci.io/repos/934299329/shield)](https://styleci.io/repos/934299329)\n[![codecov](https://codecov.io/gh/testmonitor/junit-xml-parser/graph/badge.svg?token=OX609Y0IJY)](https://codecov.io/gh/testmonitor/junit-xml-parser)\n[![License](https://poser.pugx.org/testmonitor/junit-xml-parser/license)](https://packagist.org/packages/testmonitor/junit-xml-parser)\n\nThis package provides a very basic, convenient parser for JUnit XML reports.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Tests](#tests)\n- [Changelog](#changelog)\n- [Contributing](#contributing)\n- [Credits](#credits)\n- [License](#license)\n\n## Installation\n\nTo install the client you need to require the package using composer:\n\n\t$ composer require testmonitor/junit-xml-parser\n\nUse composer's autoload:\n\n```php\nrequire __DIR__.'/../vendor/autoload.php';\n```\n\nYou're all set up now!\n\n## Usage\n\nInclude the parser in your project:\n\n```php\nuse TestMonitor\\JUnitXmlParser\\JUnitXmlParser;\n\n$parser = new JUnitXmlParser();\n$testSuites = $parser-\u003eparse('path/to/junit.xml');\n```\n\n## Examples\n\nBelow are some examples demonstrating how to use the JUnit XML Parser to extract and process test results.\n\n### Parsing a JUnit XML file\n\nThis example shows how to parse a JUnit XML report and retrieve test suite and test case information.\n\n```php\nuse TestMonitor\\JUnitXmlParser\\JUnitXmlParser;\n\n$parser = new JUnitXmlParser();\n$testSuites = $parser-\u003eparse('tests/results.xml');\n\nforeach ($testSuites as $suite) {\n    echo \"Suite: \" . $suite-\u003egetName() . \"\\n\";\n\n    foreach ($suite-\u003egetTestCases() as $testCase) {\n        echo \"  Test: \" . $testCase-\u003egetName() . \" - Status: \" . $testCase-\u003egetStatus()-\u003ename . \"\\n\";\n    }\n}\n```\n\n### Processing Failures and Skipped Tests\n\nThis example demonstrates how to identify and handle failed and skipped test cases.\n\n```php\nuse TestMonitor\\JUnitXmlParser\\JUnitXmlParser;\n\n$parser = new JUnitXmlParser();\n$testSuites = $parser-\u003eparse('tests/results.xml');\n\nforeach ($testSuites as $suite) {\n    foreach ($suite-\u003egetTestCases() as $testCase) {\n        if ($testCase-\u003egetStatus() === TestStatus::FAILED) {\n            echo \"Test \" . $testCase-\u003egetName() . \" failed: \" . $testCase-\u003egetFailureMessage() . \"\\n\";\n        } elseif ($testCase-\u003egetStatus() === TestStatus::SKIPPED) {\n            echo \"Test \" . $testCase-\u003egetName() . \" was skipped.\\n\";\n        }\n    }\n}\n```\n\n### Extracting Execution Time and Timestamp\n\nJUnit XML reports include execution times and timestamps, which can be accessed as shown below.\n\n```php\nuse TestMonitor\\JUnitXmlParser\\JUnitXmlParser;\n\n$parser = new JUnitXmlParser();\n$testSuites = $parser-\u003eparse('tests/results.xml');\n\nforeach ($testSuites as $suite) {\n    echo \"Suite: \" . $suite-\u003egetName() . \" executed in \" . $suite-\u003egetDuration() . \" seconds on \" . $suite-\u003egetTimestamp() . \"\\n\";\n}\n```\n\n## Tests\n\nThe package contains integration tests. You can run them using PHPUnit.\n\n    $ vendor/bin/phpunit\n\n## Changelog\n\nRefer to [CHANGELOG](CHANGELOG.md) for more information.\n\n## Contributing\n\nRefer to [CONTRIBUTING](CONTRIBUTING.md) for contributing details.\n\n## Credits\n\n* **Thijs Kok** - *Lead developer* - [ThijsKok](https://github.com/thijskok)\n* **Stephan Grootveld** - *Developer* - [Stefanius](https://github.com/stefanius)\n* **Frank Keulen** - *Developer* - [FrankIsGek](https://github.com/frankisgek)\n\n## License\n\nThe MIT License (MIT). Refer to the [License](LICENSE.md) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestmonitor%2Fjunit-xml-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestmonitor%2Fjunit-xml-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestmonitor%2Fjunit-xml-parser/lists"}