{"id":28545608,"url":"https://github.com/pytest-dev/pytest-nunit","last_synced_at":"2025-10-12T12:42:07.944Z","repository":{"id":35004876,"uuid":"195704909","full_name":"pytest-dev/pytest-nunit","owner":"pytest-dev","description":"An Nunit output plugin for Pytest","archived":false,"fork":false,"pushed_at":"2024-02-25T23:12:10.000Z","size":956,"stargazers_count":10,"open_issues_count":11,"forks_count":24,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-24T04:42:25.076Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/pytest-dev.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-07-07T23:02:00.000Z","updated_at":"2024-05-08T05:22:59.000Z","dependencies_parsed_at":"2024-02-25T23:26:09.319Z","dependency_job_id":"fc44521b-4634-426d-9d32-915de69b319d","html_url":"https://github.com/pytest-dev/pytest-nunit","commit_stats":{"total_commits":204,"total_committers":13,"mean_commits":"15.692307692307692","dds":"0.47549019607843135","last_synced_commit":"0f7831c6314d4fd514995b396fd6a91393fc78a7"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/pytest-dev/pytest-nunit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-nunit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-nunit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-nunit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-nunit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pytest-dev","download_url":"https://codeload.github.com/pytest-dev/pytest-nunit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-nunit/sbom","scorecard":{"id":752077,"data":{"date":"2025-08-11","repo":{"name":"github.com/pytest-dev/pytest-nunit","commit":"3890ee8ed438794e3ab153bd08c8b0c52c4e5dc0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":1,"reason":"Found 2/17 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/pytest-dev/pytest-nunit/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/pytest-dev/pytest-nunit/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/pytest-dev/pytest-nunit/ci.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:43","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:44","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:45","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:56","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T20:39:09.975Z","repository_id":35004876,"created_at":"2025-08-22T20:39:09.975Z","updated_at":"2025-08-22T20:39:09.975Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011293,"owners_count":26084928,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-06-09T23:08:12.684Z","updated_at":"2025-10-12T12:42:07.908Z","avatar_url":"https://github.com/pytest-dev.png","language":"Python","readme":"============\npytest-nunit\n============\n\n.. image:: https://github.com/pytest-dev/pytest-nunit/actions/workflows/ci.yml/badge.svg\n    :target: https://pypi.org/project/pytest-nunit\n    :alt: PyPI version\n    \n.. image:: https://img.shields.io/pypi/v/pytest-nunit.svg\n    :target: https://pypi.org/project/pytest-nunit\n    :alt: PyPI version\n\n.. image:: https://img.shields.io/pypi/pyversions/pytest-nunit.svg\n    :target: https://pypi.org/project/pytest-nunit\n    :alt: Python versions\n\n.. image:: https://img.shields.io/pypi/dm/pytest-nunit.svg\n     :target: https://pypi.python.org/pypi/pytest-nunit/\n     :alt: PyPI download month\n\n\nA pytest plugin for generating NUnit3 test result XML output\n\nRequires:\n- Pytest 5.1.0+\n- Python 3.7+\n\nCommand-line options\n--------------------\n\n``--nunit-xml``\n~~~~~~~~~~~~~~~\n\nA string value to set the file name of the generated XML file.\n\nArgument takes a path to the output file, either relative, or absolute.\n\n``--nunit-prefix``\n~~~~~~~~~~~~~~~~~~\n\nA string value to prefix all test case names the string provided.\n\nDefaults to an empty string.\n\nINI Options\n-----------\n\n``nunit_show_username``\n~~~~~~~~~~~~~~~~~~~~~~~\n\nBoolean value to include the system username in the test run properties.\n\nDefaults to ``false``\n\n``nunit_show_user_domain``\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBoolean value to include the system user domain in the test run properties.\n\nDefaults to ``false``\n\n``nunit_suite_name``\n~~~~~~~~~~~~~~~~~~~~\n\n(Deprecated, value ignored)\n\nString value to set the test suite name.\n\nDefaults to ``'pytest'``\n\n``nunit_attach_on``\n~~~~~~~~~~~~~~~~~~~~\n\nEnumeration to control whether the attachments property is set on all test cases when the ``add_nunit_attachment`` is used.\n\nCan be one of:\n\n- ``any`` - Include test attachments for all outcomes (**Default**)\n- ``pass`` - Include test attachments for only passed test cases\n- ``fail`` - Include test attachments for only failed test cases\n\nFixtures\n--------\n\nThe following fixtures are made available by this plugin.\n\n``record_nunit_property``\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCalling `record_nunit_property(key: str, value: str)` will result in `Property` tags being added to the `test-case` for the related node. \n\n.. code-block:: python\n\n    def test_basic(record_nunit_property):\n        record_nunit_property(\"test\", \"value\")\n        assert 1 == 1\n\n``add_nunit_attachment``\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nAdd an attachment to a node test-case by calling the `add_nunit_attachment(path: str, description: str)` function with the filepath and a description.\n\n.. code-block:: python\n\n    def test_attachment(add_nunit_attachment):\n        pth = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'fixture.gif')\n        add_nunit_attachment(path, \"peanut butter jelly time\")\n        assert 1 == 1\n\nUsage with Azure Pipelines\n--------------------------\n\nAdd the following steps to your build job to publish the results to Azure Pipelines:\n\n.. code-block:: yaml\n\n      - script: \"pip install pytest-nunit\"\n\n      - script: |\n          python -m pytest tests -v --nunit-xml=test-results.xml\n        continueOnError: true\n\n      - task: PublishTestResults@2\n        inputs:\n          testResultsFormat: NUnit\n          testResultsFiles: '**/test-results.xml'\n\nSkipped Tests\n~~~~~~~~~~~~~\n\nSkipped tests will have the ``reason`` attribute (if provided) included in the results.\n\n.. image:: https://github.com/pytest-dev/pytest-nunit/raw/master/docs/source/_static/screen_skips.png\n   :width: 70%\n\n\nAttachments\n~~~~~~~~~~~\n\nUsing the ``add_nunit_attachment`` fixture will render any attachments in the \"attachments\" tab inside the Tests console:\n\n.. image:: https://github.com/pytest-dev/pytest-nunit/raw/master/docs/source/_static/screen_attachments.png\n   :width: 70%\n\nFailures and xfails\n~~~~~~~~~~~~~~~~~~~\n\nAny failed tests, whether as xpass or xfail, will have the error output and comparison, as well as the failing line in the stack trace.\n\n.. image:: https://github.com/pytest-dev/pytest-nunit/raw/master/docs/source/_static/screen_fails.png\n   :width: 70%\n\n\nCompatibility with other plugins\n--------------------------------\n\nx-dist\n~~~~~~\n\nWhen running with `-f`, make sure to add in your pytest config file (setup.cfg etc)\n`looponfailroots = testdir` to exclude xml report files from being watched for changes.\n\nCheck looponfails_\n\n\n.. _looponfails: https://docs.pytest.org/en/3.0.1/xdist.html#running-tests-in-looponfailing-mode\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytest-dev%2Fpytest-nunit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpytest-dev%2Fpytest-nunit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytest-dev%2Fpytest-nunit/lists"}