{"id":22325495,"url":"https://github.com/jamf/testrail-reporting","last_synced_at":"2025-07-29T16:33:05.876Z","repository":{"id":40414379,"uuid":"177091657","full_name":"jamf/testrail-reporting","owner":"jamf","description":"Easily send results of your tests to Test Rail.","archived":false,"fork":false,"pushed_at":"2022-11-30T09:00:53.000Z","size":190,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-05-02T02:55:39.181Z","etag":null,"topics":["jamf","java","junit","spock","testng","testrail","testrail-reporting"],"latest_commit_sha":null,"homepage":"","language":"Groovy","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/jamf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-22T07:23:51.000Z","updated_at":"2023-09-14T18:49:13.000Z","dependencies_parsed_at":"2022-08-09T19:40:55.105Z","dependency_job_id":null,"html_url":"https://github.com/jamf/testrail-reporting","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamf%2Ftestrail-reporting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamf%2Ftestrail-reporting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamf%2Ftestrail-reporting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamf%2Ftestrail-reporting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamf","download_url":"https://codeload.github.com/jamf/testrail-reporting/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228030028,"owners_count":17858432,"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":["jamf","java","junit","spock","testng","testrail","testrail-reporting"],"created_at":"2024-12-04T02:12:15.018Z","updated_at":"2024-12-04T02:12:15.718Z","avatar_url":"https://github.com/jamf.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\nTestrail-reporting is a library that provides a common and simplified way of sending results to [TestRail](https://www.gurock.com/testrail).\n\nThe library \"attaches\" itself on post-test actions and gathers results from tests. At the end of suite results are sent to TestRail.  \nTests are matched with test cases by name, both tests and sections will be created if don't already exist.\n\nTest case format includes FQCN as well as method name and also parameter if needed. Case names can look like:\n\n- `com.jamf.reporting.VerifySpockListener[success]`\n- `com.jamf.reporting.VerifySpockListener[parameterised (1 ?? 1)]`\n- `VerifyTestNGListener[parameterised:param1]`\n- `VerifyJUnitListener[parameterised:[1] param 1]`\n\nGeneral pattern is: `FQCN[methodName:parameter]`, there are two exceptions:\n\n- Spock parameterised test method name already provides params, so we actually can't use colon as a delimiter\n- JUnit parameterised test does not deliver \"user friendly\" information about parameters, so we have to use `[paramIndex] parameter` format instead\n\n# Contributing\n\nIn order to contribute to this project, please read carefully [CONTRIBUTING.md](./CONTRIBUTING.md) first.\n\n# Checkstyle\n\nTo scan main sources:\n\n```bash\n./gradlew checkstyleMain\n```\n\nTo scan test sources:\n\n```bash\n./gradlew checkstyleTest\n```\n\n# Building\n\n```bash\n./gradlew build\n```\n\n# Deploying to local .m2\n\n```bash\n./gradlew publishToMavenLocal\n```\n\nor, if you'd like to publish it with custom version\n\n```bash\n./gradlew clean build -PcurrentVersion=XXX publishToMavenLocal\n```\n\n# Testing\n\n```bash\n./gradlew test\n```\n\n# Using\n\n## Setup\n\n- add repository from which library should be pulled ([MORE INFO](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry#using-a-published-package))\n\n```groovy\nrepositories {\n    maven {\n        url = uri(\"https://maven.pkg.github.com/jamf/testrail-reporting\")\n        credentials {\n            username = XXX #github username\n            password = YYY #github token with ability to pull packages\n        }\n    }\n}\n```\n\n- add gradle dependency, targeting test runner you use\n\n```groovy\ntestCompile('com.jamf.reporting:junit:1.0.0')\n```\n\n- add `@ReportResults` annotation\n\n```java\n# Spock example\n\n@ReportSpockResults\nclass BaseATSpec extends Specification { ...\n}\n\n# JUnit5 example\n\n@ReportJUnitResults\npublic class BaseAT { ...\n}\n\n# TestNG example\n\n@Listeners(value = {TestNGTestRunListener.class, TestNGTestSuiteListener.class})\npublic class BaseAT { ...\n}\n```\n\n## configuration\n\n## testRail.properties\n\nYou can use dedicated properties file to configure where test results should be reported.  \nPut `testRail.properties` in `test/resources`, and specify below configuration.\n\n```properties\ntestrail.url=#url to testrail REST api ex: https://sometestrailserver.com/testrail\ntestrail.username=#username used to report results\ntestrail.password=#password used to report results\ntestrail.projectId=#under which results will be saved\ntestrail.sectionId=#where tests will be created (used interchangeably with testrail.section_name)\ntestrail.section_name=#where tests will be created (used interchangeably with testrail.sectionId)\ntestrail.suiteId=suiteId in case your testrail project uses multiple suites setup (used interchangeably with testrail.suite_name)\ntestrail.suite_name=suiteId in case your testrail project uses multiple suites setup (used interchangeably with testrail.suiteID)\ntestrail.send=#should results be sent or not\ntestrail.run_name=#what should the test run be named, this parameter is required if testrail.send is true\ntestrail.run_description=#optional description that should be added to test run\n```\n\nAll above properties can be set as system properties instead.\n\n# Known limitations\n\nNot all features ara available for all test frameworks.\n\n- TestNG does not allow for wrapping it's `@Listeners` annotation with custom one, that's why native one has to be used\n- JUnit 5 does not invoke any callbacks for `@Disabled` (skipped) tests, which means, results for such tests won't be gathered and published\n    - In order to workaround this issue use custom [`@Disabled`](./src/main/java/com/jamf/reporting/junit/Disabled.java) annotation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamf%2Ftestrail-reporting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamf%2Ftestrail-reporting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamf%2Ftestrail-reporting/lists"}