{"id":14978874,"url":"https://github.com/testmonitor/testng-listener","last_synced_at":"2026-03-04T13:30:54.902Z","repository":{"id":44555029,"uuid":"433794732","full_name":"testmonitor/testng-listener","owner":"testmonitor","description":"This TestNG listener can be used to report the results for your test cases in TestMonitor.","archived":false,"fork":false,"pushed_at":"2024-12-09T07:41:01.000Z","size":45,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-27T07:03:22.993Z","etag":null,"topics":["java","selenium","testmonitor","testng"],"latest_commit_sha":null,"homepage":"","language":"Java","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":null,"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}},"created_at":"2021-12-01T11:13:02.000Z","updated_at":"2024-12-09T07:41:06.000Z","dependencies_parsed_at":"2024-09-28T02:04:43.416Z","dependency_job_id":"647e41c6-0d32-472b-a837-a2a975901a5d","html_url":"https://github.com/testmonitor/testng-listener","commit_stats":{"total_commits":24,"total_committers":3,"mean_commits":8.0,"dds":0.5,"last_synced_commit":"c9a6b900976302dbb2613855af1bf6e6ae0abc1f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/testmonitor/testng-listener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Ftestng-listener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Ftestng-listener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Ftestng-listener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Ftestng-listener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testmonitor","download_url":"https://codeload.github.com/testmonitor/testng-listener/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Ftestng-listener/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30081402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T13:22:36.021Z","status":"ssl_error","status_checked_at":"2026-03-04T13:20:45.750Z","response_time":59,"last_error":"SSL_read: 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":["java","selenium","testmonitor","testng"],"created_at":"2024-09-24T13:58:33.931Z","updated_at":"2026-03-04T13:30:54.878Z","avatar_url":"https://github.com/testmonitor.png","language":"Java","readme":"# TestMonitor TestNG Listener\n\nThis TestNG listener can be used to report the results for your test cases in [TestMonitor](https://www.testmonitor.com). Additionally, \nby implementing the `HasWebdriver` interface, Selenium test results will be annotated with a screenshot when test cases fail.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Changelog](#changelog)\n- [Contributing](#contributing)\n- [Credits](#credits)\n- [License](#license)\n\n## Installation\n\nBefore you start, make sure you have a [recent Java SDK](https://www.oracle.com/java/technologies/downloads/) installed.\n\n### Maven Installation\n\nWe recommend installing the TestNG listener in your Java project using Maven. Add it as a dependency to your Maven configuration:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.testmonitor\u003c/groupId\u003e\n    \u003cartifactId\u003etestng-listener\u003c/artifactId\u003e\n    \u003cversion\u003e1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Manual Installation\n\nIf you prefer a standalone JAR library, checkout this repository and run Maven to compile the sources and generate a JAR file:\n\n```sh\n$ git checkout https://github.com/testmonitor/testng-listener.git\n$ cd testng-listener\n$ mvn package\n```\n\nYour JAR file will be available in the `target` directory.\n\n## Usage\n\nStart with adding the listener to listeners section in your test suite XML:\n\n```xml\n\u003csuite name=\"Tests\"\u003e\n    \u003c!-- ... --\u003e\n    \u003clisteners\u003e\n        \u003clistener class-name=\"com.testmonitor.listener.TestMonitorListener\" /\u003e\n    \u003c/listeners\u003e\n\u003c/suite\u003e\n```\n\nNext, create a `testmonitor.properties` file in your project directory and add this configuration (change the values according to your preferences):\n\n```properties\nTESTMONITOR_DOMAIN=mydomain.testmonitor.com\nTESTMONITOR_TOKEN=itsatoken\nTESTMONITOR_PROJECT_ID=1\nTESTMONITOR_MILESTONE_ID=1\nTESTMONITOR_TEST_RUN_PREFIX=AT \n```\n\nIn case you are using the Selenium framework, you can optionally implement the `HasWebdriver` in your test cases. This exposes the web driver to the listener, allowing it to take a screenshot if your test case has failed. \n\nHere is an example:\n\n```java\npublic class MyTestCase implements HasWebdriver {\n    protected WebDriver driver;\n\n    @BeforeMethod(alwaysRun = true)\n    private void setUp() {\n        System.setProperty(\"webdriver.chrome.driver\", \"/usr/local/bin/chromedriver\");\n        this.driver = new ChromeDriver();\n    }\n\n    @Test\n    public void myTest() {\n        this.driver.get(\"https://www.testmonitor.com/\");\n    }\n\n    public WebDriver getDriver() {\n        return this.driver;\n    }\n}\n```\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* **Muriel Nooder** - *Developer* - [ThaNoodle](https://github.com/thanoodle)\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%2Ftestng-listener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestmonitor%2Ftestng-listener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestmonitor%2Ftestng-listener/lists"}