{"id":24915623,"url":"https://github.com/bachp/junit-report-rs","last_synced_at":"2025-06-17T17:39:37.286Z","repository":{"id":33014469,"uuid":"149821581","full_name":"bachp/junit-report-rs","owner":"bachp","description":"JUnit compatible XML reports in Rust","archived":false,"fork":false,"pushed_at":"2025-04-28T04:23:50.000Z","size":171,"stargazers_count":25,"open_issues_count":5,"forks_count":20,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-20T05:03:56.228Z","etag":null,"topics":["junit","report","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/bachp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2018-09-21T21:46:18.000Z","updated_at":"2025-03-31T08:13:09.000Z","dependencies_parsed_at":"2023-12-07T15:30:05.296Z","dependency_job_id":"a99e61ce-d2db-40a4-817d-60d31a166f8d","html_url":"https://github.com/bachp/junit-report-rs","commit_stats":{"total_commits":70,"total_committers":14,"mean_commits":5.0,"dds":0.5,"last_synced_commit":"aaceea10860eb2b2d1e3d3923a102c143b9b3547"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/bachp/junit-report-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachp%2Fjunit-report-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachp%2Fjunit-report-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachp%2Fjunit-report-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachp%2Fjunit-report-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bachp","download_url":"https://codeload.github.com/bachp/junit-report-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachp%2Fjunit-report-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260409880,"owners_count":23004759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["junit","report","rust"],"created_at":"2025-02-02T07:18:43.510Z","updated_at":"2025-06-17T17:39:32.246Z","avatar_url":"https://github.com/bachp.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nCopyright (c) 2018 Pascal Bach\nCopyright (c) 2021 Siemens Mobility GmbH\n\nSPDX-License-Identifier:     MIT\n--\u003e\n\n# JUnit Report in Rust\n\nGenerate JUnit compatible XML reports in Rust.\n\n## Example\n\n```rust\n\n    use junit_report::{datetime, Duration, ReportBuilder, TestCase, TestCaseBuilder, TestSuite, TestSuiteBuilder};\n    use std::fs::File;\n\n    // Create a successful test case\n    let test_success = TestCaseBuilder::success(\"good test\", Duration::seconds(15))\n        .set_classname(\"MyClass\")\n        .set_filepath(\"MyFilePath\")\n        .build();\n\n    // Create a test case that encountered an unexpected error condition\n    let test_error = TestCase::error(\n        \"error test\",\n        Duration::seconds(5),\n        \"git error\",\n        \"unable to fetch\",\n    );\n\n    // Create a test case that failed because of a test failure\n    let test_failure = TestCase::failure(\n        \"failure test\",\n        Duration::seconds(10),\n        \"assert_eq\",\n        \"not equal\",\n    );\n\n    // Next we create a test suite named \"ts1\" with not test cases associated\n    let ts1 = TestSuite::new(\"ts1\");\n\n    // Then we create a second test suite called \"ts2\" and set an explicit time stamp\n    // then we add all the test cases from above\n    let timestamp = datetime!(1970-01-01 00:01:01 UTC);\n    let ts2 = TestSuiteBuilder::new(\"ts2\")\n        .set_timestamp(timestamp)\n        .add_testcase(test_success)\n        .add_testcase(test_error)\n        .add_testcase(test_failure)\n        .build();\n\n    // Last we create a report and add all test suites to it\n    let r = ReportBuilder::new()\n        .add_testsuite(ts1)\n        .add_testsuite(ts2)\n        .build();\n\n    // The report can than be written in XML format to any writer\n    let mut file = File::create(\"my-junit.xml\").unwrap();\n    r.write_xml(\u0026mut file).unwrap();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbachp%2Fjunit-report-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbachp%2Fjunit-report-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbachp%2Fjunit-report-rs/lists"}