{"id":24081466,"url":"https://github.com/cmccarthyIrl/playwright-java-testng-test-harness","last_synced_at":"2025-09-16T14:31:12.202Z","repository":{"id":271473175,"uuid":"913023192","full_name":"cmccarthyIrl/playwright-java-testng-test-harness","owner":"cmccarthyIrl","description":"This project uses Java and Playwright to provide a basic test harness. UI and API test examples provided","archived":false,"fork":false,"pushed_at":"2025-07-13T08:52:51.000Z","size":73,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-13T10:26:57.295Z","etag":null,"topics":["api","github-actions","java","java-17","multimodule","playwright","testng","ui"],"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/cmccarthyIrl.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-06T21:53:42.000Z","updated_at":"2025-06-04T14:05:49.000Z","dependencies_parsed_at":"2025-01-10T05:31:17.967Z","dependency_job_id":null,"html_url":"https://github.com/cmccarthyIrl/playwright-java-testng-test-harness","commit_stats":null,"previous_names":["cmccarthyirl/playwright-java-test-harness","cmccarthyirl/playwright-java-testng-test-harness"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cmccarthyIrl/playwright-java-testng-test-harness","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fplaywright-java-testng-test-harness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fplaywright-java-testng-test-harness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fplaywright-java-testng-test-harness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fplaywright-java-testng-test-harness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmccarthyIrl","download_url":"https://codeload.github.com/cmccarthyIrl/playwright-java-testng-test-harness/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fplaywright-java-testng-test-harness/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275432880,"owners_count":25463824,"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-09-16T02:00:10.229Z","response_time":65,"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":["api","github-actions","java","java-17","multimodule","playwright","testng","ui"],"created_at":"2025-01-09T23:12:18.282Z","updated_at":"2025-09-16T14:31:11.853Z","avatar_url":"https://github.com/cmccarthyIrl.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Playwright Automated Testing Framework\n\n[![Playwright Automated Testing Framework](https://github.com/cmccarthyIrl/playwright-java-test-harness/actions/workflows/run.yml/badge.svg)](https://github.com/cmccarthyIrl/playwright-java-test-harness/actions/workflows/run.yml)\n\n# Index\n\u003ctable\u003e \n\u003ctr\u003e\n  \u003cth\u003eStart\u003c/th\u003e\n  \u003ctd\u003e\n    | \u003ca href=\"#maven\"\u003eMaven\u003c/a\u003e \n    | \u003ca href=\"#quickstart\"\u003eQuickstart\u003c/a\u003e | \n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003cth\u003eRun\u003c/th\u003e\n  \u003ctd\u003e\n     | \u003ca href=\"#command-line\"\u003eCommand Line\u003c/a\u003e\n    | \u003ca href=\"#ide-support\"\u003eIDE Support\u003c/a\u003e    \n    | \u003ca href=\"#java-jdk\"\u003eJava JDK\u003c/a\u003e    \n    | \u003ca href=\"#troubleshooting\"\u003eTroubleshooting\u003c/a\u003e    |\n    | \u003ca href=\"#environment-switching\"\u003eEnvironment Switching\u003c/a\u003e    \n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003cth\u003eReport\u003c/th\u003e \n  \u003ctd\u003e\n     | \u003ca href=\"#configuration\"\u003eConfiguration\u003c/a\u003e\n    | \u003ca href=\"#logging\"\u003eLogging\u003c/a\u003e |\n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003cth\u003eAdvanced\u003c/th\u003e\n  \u003ctd\u003e\n    | \u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e |\n    \u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n# Playwright Java Test Harness\n\nThis project is a test harness for using Playwright with Java for both UI and API testing. It is set up as a multi-module Maven project with two modules: `ui` for UI-based tests and `api` for API-based tests.\n\n# Maven\n\nThe Framework uses [Playwright](https://spring.io/guides/gs/testing-web/) and [TestNG](https://testng.org/) client implementations.\n\n```xml\n      \u003cdependency\u003e\n            \u003cgroupId\u003ecom.microsoft.playwright\u003c/groupId\u003e\n            \u003cartifactId\u003eplaywright\u003c/artifactId\u003e\n            \u003cversion\u003e1.49.0\u003c/version\u003e\n        \u003c/dependency\u003e\n\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.testng\u003c/groupId\u003e\n            \u003cartifactId\u003etestng\u003c/artifactId\u003e\n            \u003cversion\u003e7.10.2\u003c/version\u003e\n        \u003c/dependency\u003e\n```\n\n# Quickstart\n\n- [Intellij IDE](https://www.jetbrains.com/idea/) - `Recommended`\n- [Java JDK 17](https://jdk.java.net/java-se-ri/11)\n- [Apache Maven](https://maven.apache.org/docs/3.6.3/release-notes.html)\n\n# Command Line\n\nNormally you will use your IDE to run a test via the `*Test.java` class. With the `Test` class,\nwe can run tests from the command-line as well.\n\nNote that the `mvn test` command only runs test classes that follow the `*Test.java` naming convention.\n\nYou can run a single test or a suite or tests like so :\n\n```\nmvn test -Dtest=UITest\n```\n\nNote that the `mvn clean install` command runs all test Classes that follow the `*Test.java` naming convention\n\n```\nmvn clean install\n```\n\n# IDE Support\n\nTo minimize the discrepancies between IDE versions and Locales the `\u003csourceEncoding\u003e` is set to `UTF-8`\n\n```xml\n\n\u003cproperties\u003e\n    ...\n    \u003cproject.build.sourceEncoding\u003eUTF-8\u003c/project.build.sourceEncoding\u003e\n    \u003cproject.reporting.outputEncoding\u003eUTF-8\u003c/project.reporting.outputEncoding\u003e\n    ...\n\u003c/properties\u003e\n```\n\n# Environment Switching\n\nYou can specify the profile to use when running Maven from the command line like so:\n\n```\nmvn clean test -Ptest\n```\n\nExample of a maven profile\n```xml\n\n\u003cprofiles\u003e\n    ...\n    \u003cprofile\u003e\n      \u003cid\u003etest\u003c/id\u003e\n      \u003cproperties\u003e\n        \u003cconfig.file\u003econfig-test.properties\u003c/config.file\u003e\n      \u003c/properties\u003e\n    \u003c/profile\u003e\n    ...\n\u003c/profiles\u003e\n```\n\n\n\n# Java JDK\n\nThe Java version to use is defined in the `maven-compiler-plugin`\n\n```xml\n\n\u003cbuild\u003e\n    ...\n    \u003cpluginManagement\u003e\n        \u003cplugins\u003e\n            ...\n            \u003cplugin\u003e\n                \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n                \u003cartifactId\u003emaven-compiler-plugin\u003c/artifactId\u003e\n                \u003cconfiguration\u003e\n                    \u003csource\u003e17\u003c/source\u003e\n                    \u003ctarget\u003e17\u003c/target\u003e\n                \u003c/configuration\u003e\n            \u003c/plugin\u003e\n            ...\n        \u003c/plugins\u003e\n    \u003c/pluginManagement\u003e\n    ...\n\u003c/build\u003e\n```\n\n# Logging\n\nThe Framework uses [SLF4J](https://www.slf4j.org/) You can instantiate the logging service in any Class\nlike so\n\n```java\nprivate static final LogManager log = new LogManager(UITest.class);\n```\n\nyou can then use the logger like so :\n\n```java\nlogger.info(\"This is a info message\");\nlogger.warn(\"This is a warning message\");\nlogger.debug(\"This is a info message\");\nlogger.error(\"This is a error message\");\n```\n\n\n# Extent Reports\n\nThe Framework uses [Extent Reports Framework](https://extentreports.com/) to generate the HTML Test Reports\n\nThe example below is a report generated automatically by Extent Reports open-source library.\n\n\u003cimg src=\"https://github.com/cmccarthyIrl/playwright-java-test-harness/blob/main/common/src/main/java/com/cmccarthyirl/common/demo/playwright-extent-report.png\" height=\"400px\"/\u003e\n\n\n# License\nThis project is open source and available under the [MIT License](https://github.com/cmccarthyIrl/playwright-java-test-harness/blob/main/LICENSE).\n\n# Troubleshooting\n\n- Execute the following commands to resolve any dependency issues\n    1. `cd ~/install directory path/playwright-java-test-harness`\n    2. `mvn clean install -DskipTests`\n\n# Contributing\n\nSpotted a mistake? Questions? Suggestions?\n\n[Open an Issue](https://github.com/cmccarthyIrl/playwright-java-test-harness/issues)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FcmccarthyIrl%2Fplaywright-java-testng-test-harness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FcmccarthyIrl%2Fplaywright-java-testng-test-harness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FcmccarthyIrl%2Fplaywright-java-testng-test-harness/lists"}