{"id":21561681,"url":"https://github.com/testmonitor/selenium-demo","last_synced_at":"2026-02-16T09:32:41.455Z","repository":{"id":44554731,"uuid":"416325496","full_name":"testmonitor/selenium-demo","owner":"testmonitor","description":"This demo repository showcases how to integrate the TestMonitor TestNG Reporter into your Selenium WebDriver test suite.","archived":false,"fork":false,"pushed_at":"2025-10-14T21:58:13.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-15T00:14:09.976Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/testmonitor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-10-12T12:19:29.000Z","updated_at":"2025-10-14T21:58:43.000Z","dependencies_parsed_at":"2025-01-06T21:24:08.921Z","dependency_job_id":"45c1f507-1723-4638-bfe6-790ccf91a81b","html_url":"https://github.com/testmonitor/selenium-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/testmonitor/selenium-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fselenium-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fselenium-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fselenium-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fselenium-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testmonitor","download_url":"https://codeload.github.com/testmonitor/selenium-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fselenium-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29504752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"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-11-24T09:27:35.911Z","updated_at":"2026-02-16T09:32:41.446Z","avatar_url":"https://github.com/testmonitor.png","language":"Java","readme":"# TestMonitor Selenium Demo\n\nThis demo repository showcases how to integrate the [TestMonitor TestNG Reporter](https://mvnrepository.com/artifact/com.testmonitor/testng-reporter) into your Selenium WebDriver test suite. It contains example tests that demonstrate automated test reporting to TestMonitor.\n\n## Table of Contents\n\n- [About](#about)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Running the Tests](#running-the-tests)\n- [License](#license)\n\n## About\n\nThis repository provides a working example of:\n\n- Setting up Selenium WebDriver with TestNG and the TestMonitor reporter\n- Configuring the reporter in `pom.xml` and `testng.xml`\n- Sample test cases using the Page Object Model pattern\n- Automatic screenshot capture on test failures\n- Tests that run on Windows, Linux, and macOS\n\n## Installation\n\nBefore you start, make sure you have the following installed:\n\n- [Java 11](https://www.java.com/) or higher\n- [Maven 3.6](https://maven.apache.org/download.cgi) or higher\n- [Chrome browser](https://www.google.com/chrome/)\n\nClone this repository and install the dependencies:\n\n```bash\ngit clone https://github.com/testmonitor/selenium-demo.git\ncd selenium-demo\nmvn clean install -DskipTests\n```\n\nThe project uses Selenium Manager (built into Selenium 4.6+), which automatically downloads and manages the ChromeDriver for your operating system.\n\n## Configuration\n\nThe reporter is already configured in [pom.xml](pom.xml) and [testng.xml](testng.xml).\n\nFirst, add the TestMonitor TestNG reporter dependency to your Maven project:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.testmonitor\u003c/groupId\u003e\n  \u003cartifactId\u003etestng-reporter\u003c/artifactId\u003e\n  \u003cversion\u003e[1.0.0,)\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nNext, add the reporter to the listeners section in your test suite XML:\n\n```xml\n\u003csuite name=\"Tests\"\u003e\n  \u003clisteners\u003e\n    \u003clistener class-name=\"com.testmonitor.testng.TestNGReporter\"/\u003e\n  \u003c/listeners\u003e\n  \u003c!-- test definitions --\u003e\n\u003c/suite\u003e\n```\n\nConfigure your TestMonitor credentials using environment variables or system properties. For this demo, we recommend using `-D` parameters with Maven:\n\n**Configuration options:**\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `TESTMONITOR_DOMAIN` | Yes | Your TestMonitor instance domain (e.g., mydomain.testmonitor.com) |\n| `TESTMONITOR_TOKEN` | Yes | Your TestMonitor integration token |\n| `TESTMONITOR_MILESTONE_ID` | No | ID of an existing milestone to link test results to |\n| `TESTMONITOR_MILESTONE_NAME` | No | Name of a milestone (will be created if it doesn't exist or matched if it does) |\n| `TESTMONITOR_ATTACHMENT_ON_FAILURE` | No | Attach screenshots on failure (default: true) |\n\nTo get started, you'll need a token from your TestNG integration. You can find it on the TestNG integration page of your TestMonitor project settings.\n\n## Running the Tests\n\nRun the demo tests using Maven with your TestMonitor credentials:\n\n```bash\nmvn test \\\n  -DTESTMONITOR_DOMAIN=mydomain.testmonitor.com \\\n  -DTESTMONITOR_TOKEN=your-token-here\n```\n\nAlternatively, you can set environment variables:\n\n```bash\nexport TESTMONITOR_DOMAIN=mydomain.testmonitor.com\nexport TESTMONITOR_TOKEN=your-token-here\nmvn test\n```\n\nThe reporter will automatically:\n\n- Create a test run in TestMonitor\n- Submit test results (pass/fail status)\n- Include screenshots for failed tests\n- Report test execution times\n\n### View results\n\nAfter running the tests, check your TestMonitor instance to see the reported results.\n\n## License\n\nCopyright (c) TestMonitor | we are Cerios B.V. All rights reserved.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestmonitor%2Fselenium-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestmonitor%2Fselenium-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestmonitor%2Fselenium-demo/lists"}