{"id":22281241,"url":"https://github.com/jenkinsci/testng-plugin-plugin","last_synced_at":"2025-07-28T20:30:32.201Z","repository":{"id":544754,"uuid":"1163788","full_name":"jenkinsci/testng-plugin-plugin","owner":"jenkinsci","description":"Show TestNG reports in jobs","archived":false,"fork":false,"pushed_at":"2024-04-15T13:42:23.000Z","size":1305,"stargazers_count":60,"open_issues_count":0,"forks_count":103,"subscribers_count":103,"default_branch":"master","last_synced_at":"2024-04-16T08:00:47.039Z","etag":null,"topics":["jenkins-analysis","jenkins-post-build","jenkins-report","jenkins-security-scan-enabled","jenkins-test","reporting","testing"],"latest_commit_sha":null,"homepage":"https://plugins.jenkins.io/testng-plugin/","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenkinsci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2010-12-13T05:56:38.000Z","updated_at":"2024-04-19T20:29:54.041Z","dependencies_parsed_at":"2023-02-18T12:45:55.577Z","dependency_job_id":"e2e46b1d-b5a4-4155-9114-42f314ef1c53","html_url":"https://github.com/jenkinsci/testng-plugin-plugin","commit_stats":null,"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Ftestng-plugin-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Ftestng-plugin-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Ftestng-plugin-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Ftestng-plugin-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenkinsci","download_url":"https://codeload.github.com/jenkinsci/testng-plugin-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227952058,"owners_count":17846351,"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":["jenkins-analysis","jenkins-post-build","jenkins-report","jenkins-security-scan-enabled","jenkins-test","reporting","testing"],"created_at":"2024-12-03T16:16:25.136Z","updated_at":"2025-07-28T20:30:32.179Z","avatar_url":"https://github.com/jenkinsci.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TestNG Plugin\n\nThis plugin allows you to publish [TestNG](https://testng.org/#_testng_documentation) test results generated\nusing `org.testng.reporters.XMLReporter`. TestNG result xml file contains\nmore information than the junit report xml file . This plugin exposes\nthe extra information in graph and table reports.\n\nThis plugin makes it possible to import TestNG XML reports from each\nbuild into Jenkins.\n\nThe data is parsed using the output generated using\n`org.testng.reporters.XMLReporter`. The results are displayed with a\ntrend graph and all details about which tests that failed are also\npresented.\n\n## Plugin tutorial\n\n[![User tutorial by Darin Pope](images/plugin-tutorial-video.png)](https://www.youtube.com/watch?v=Mr0mohlaQEY)\n\n## Features\n\nThe page layouts are intentionally designed to look very similar to\nthe JUnit plugin.\n\n-   In the project/build page you can see a summary of passed/fail tests\n    as well as passed/fail configuration methods. It also lists the\n    failed test cases with a direct link to view the test failure.\n\n![](docs/images/test-summary.png)\n\n-   In the Class result summary page test methods are separated from\n    configuration methods\n\n![](docs/images/test-result.png)\n\n-   In the Package result summary you can see the order which test\n    methods were ran during the regression run.\n\n![](docs/images/execution-order.png)\n\n-   Different graphs will show you the pass/failed trend of job's\n    previous results.\n\n![](docs/images/test-graph.png)\n\n-   Able to hide/expand tables that display package and class results\n\n## Usage\n\nOnce you have configured your build to run TestNG based test cases and\nalso generate the TestNG specific result XML, using this plugin is very\nsimple. In **Post-Build Actions**, simply enable **Publish TestNG\nResults**. This option allows you to configure the following properties:\n\n-   **TestNG XML report pattern**: This is a file name pattern that can\n    be used to locate the TestNG XML report files (for example\n    **\\***/target/testng-results.xml\\*). The path is an Ant-style\n    pattern (e.g. fileset) or a list of files and folders separated by\n    the characters '***;:,***'. TestNG must be configured to generate\n    XML reports using \\_org.testng.reporters.XMLReporter \\_for this\n    plug-in to function.\n-   **Escape Test Description string?**: If checked, the plug-in escapes\n    the description string associated with the test method while\n    displaying test method details. Unchecking this allows you to use\n    HTML tags to format the description. (*enabled by default*).\n-   **Escape exception messages?**: If checked, the plug-in escapes the\n    test method's exception messages. Unchecking this allows you to use\n    HTML tags to format the exception message e.g. embed links in the\n    text. (*enabled by default*)\n-   **Show Failed Builds?**: If checked, the plug-in includes results\n    from failed builds in the trend graph. (Disabled by default).\n    -   If this is a maven build, it is better to configure the build\n        step with `-Dmaven.test.failure.ignore=true` option. This\n        results in build with test failures being marked as Unstable,\n        thus distinguishing it from build that failed because of non\n        test related issues\n    -   Even when this option is selected, failed builds with no results\n        and aborted builds will not be displayed in graphs\n-   **Mark build as unstable on Skipped config/test methods?**: Marks\n    the build unstable of skipped configuration or test methods are\n    found in results. If build result is worse that UNSTABLE, this\n    option has no effect\n-   **Mark build as failure on failed configuration?**: Marks the build\n    as failed if there are any configuration method failures\n-   **Thresholds for marking the build as Unstable/Failed**: User can\n    configure a Threshold Mode as number of tests or percentage of tests\n    and then configure these values separately as well. This allows for\n    scenarios where we want the builds to be marked successful even when\n    there are some test failures or mark the build as failed even if\n    there is a single test method failure.\n\n### Pipeline in Jenkinsfile\n\nThe [Pipeline Syntax Snippet Generator](https://www.jenkins.io/redirect/pipeline-snippet-generator) guides the user to select TestNG report options.\nAdd the `testNG` step to declarative Pipeline in a `post` section.\n\n```\n  post {\n    always {\n      testNG()\n    }\n  }\n```\n\nAdditional options can be included in the testNG declarative Pipeline step like this:\n\n```\n  post {\n    always {\n      testNG(showFailedBuilds: true,\n             unstableFails: 5, unstableSkips: 25,\n             failedFails:  10, failedSkips:   50)\n    }\n  }\n```\n\nThe `testNG` Pipeline step can be used in a scripted Pipeline like this:\n\n```\nnode {\n  // Add steps that run TestNG tests\n  // Publish TestNG report with the `testNG()` step\n  testNG(reportFilenamePattern: '**/testng-many-results.xml')\n}\n```\n\n### Properties\n\nSome TestNG plugin properties can only be controlled by command line properties set at Jenkins startup.\n\n#### Allow unescaped HTML\n\n[SECURITY-2788](https://www.jenkins.io/security/advisory/2022-06-30/#SECURITY-2788) notes that test description and test exception messages allow unescaped HTML, leading to a cross-site scripting vulnerability.\nCurrent releases of the TestNG plugin always escape test description and test exception messages.\nIf test description or test exceptions messages must not be escaped and administrators accept the risk of disabling this security safeguard, set the Java property\n`hudson.plugins.testng.Publisher.allowUnescapedHTML=true`\nfrom the command line that starts the Jenkins controller.\n\n## Release Notes\n\n* For recent versions, see [GitHub Releases](https://github.com/jenkinsci/testng-plugin-plugin/releases)\n* For versions 1.15 and older, see the [changelog archive](https://github.com/jenkinsci/testng-plugin-plugin/blob/552.va20eb2369116/CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Ftestng-plugin-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenkinsci%2Ftestng-plugin-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Ftestng-plugin-plugin/lists"}