{"id":24360595,"url":"https://github.com/cmccarthyirl/spring-cucumber-junit-parallel-test-harness","last_synced_at":"2025-07-27T02:09:30.034Z","repository":{"id":44936788,"uuid":"298370054","full_name":"cmccarthyIrl/spring-cucumber-junit-parallel-test-harness","owner":"cmccarthyIrl","description":"Spring, Cucumber, Java 17, JUnit 5, Logback and Extent Spark Reports basic test harness. Rest Assured and Selenium test examples provided","archived":false,"fork":false,"pushed_at":"2024-10-03T17:01:00.000Z","size":230,"stargazers_count":9,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-10T09:48:27.142Z","etag":null,"topics":["allure-report","cucumber","extent-reports","jdk17","junit-platform","junit5","parallel","rest-assured","selenium","spark-reports","spring","test-automation","test-harness"],"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":null,"funding":null,"license":"MIT-LICENSE.txt","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":"2020-09-24T18:59:04.000Z","updated_at":"2024-08-29T02:45:10.000Z","dependencies_parsed_at":"2025-01-18T21:41:58.691Z","dependency_job_id":null,"html_url":"https://github.com/cmccarthyIrl/spring-cucumber-junit-parallel-test-harness","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cmccarthyIrl/spring-cucumber-junit-parallel-test-harness","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fspring-cucumber-junit-parallel-test-harness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fspring-cucumber-junit-parallel-test-harness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fspring-cucumber-junit-parallel-test-harness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fspring-cucumber-junit-parallel-test-harness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmccarthyIrl","download_url":"https://codeload.github.com/cmccarthyIrl/spring-cucumber-junit-parallel-test-harness/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fspring-cucumber-junit-parallel-test-harness/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267285740,"owners_count":24064218,"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-07-27T02:00:11.917Z","response_time":82,"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":["allure-report","cucumber","extent-reports","jdk17","junit-platform","junit5","parallel","rest-assured","selenium","spark-reports","spring","test-automation","test-harness"],"created_at":"2025-01-18T21:31:51.264Z","updated_at":"2025-07-27T02:09:30.007Z","avatar_url":"https://github.com/cmccarthyIrl.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Cucumber JUnit Parallel Test Harness\n\n[![test](https://github.com/cmccarthyIrl/spring-cucumber-junit-parallel-test-harness/actions/workflows/test.yml/badge.svg)](https://github.com/cmccarthyIrl/spring-cucumber-junit-parallel-test-harness/actions/workflows/test.yml)\n# Index\n\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=\"#junit\"\u003eJUnit\u003c/a\u003e\n     | \u003ca href=\"#junit-suites\"\u003eJUnit Suites\u003c/a\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  \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=\"#environment-switching\"\u003eEnvironment Switching\u003c/a\u003e\n    | \u003ca href=\"#extent-reports\"\u003eExtent HTML Reports\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=\"#hooks\"\u003eBefore / After Hooks\u003c/a\u003e\n    | \u003ca href=\"#json-transforms\"\u003eJSON Transforms\u003c/a\u003e\n    | \u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e |\n    \u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n# Maven\n\nThe Framework uses [Spring Boot Test](https://spring.io/guides/gs/testing-web/)\n, [Cucumber](https://cucumber.io/)\n, [Rest Assured](https://rest-assured.io/) and [Selenium](https://www.selenium.dev/) client implementations.\n\nSpring `\u003cdependencies\u003e`:\n\n```xml\n\n\u003cdependecies\u003e\n    ...\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.springframework.amqp\u003c/groupId\u003e\n        \u003cartifactId\u003espring-rabbit\u003c/artifactId\u003e\n        \u003cversion\u003e${spring-rabbit.version}\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n        \u003cartifactId\u003espring-boot-starter-test\u003c/artifactId\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.springframework\u003c/groupId\u003e\n        \u003cartifactId\u003espring-test\u003c/artifactId\u003e\n    \u003c/dependency\u003e\n    ...\n\u003c/dependecies\u003e\n```\n\nCucumber \u0026 Rest Assured `\u003cdependencies\u003e`:\n\n```xml\n\n\u003cdependecies\u003e\n    ...\n  \u003c!--  Cucumber dependencies--\u003e\n  \u003cdependency\u003e\n    \u003cartifactId\u003erest-assured\u003c/artifactId\u003e\n    \u003cgroupId\u003eio.rest-assured\u003c/groupId\u003e\n    \u003cversion\u003e${restassured.version}\u003c/version\u003e\n  \u003c/dependency\u003e\n  \u003cdependency\u003e\n    \u003cartifactId\u003ecucumber-java\u003c/artifactId\u003e\n    \u003cgroupId\u003eio.cucumber\u003c/groupId\u003e\n  \u003c/dependency\u003e\n  \u003cdependency\u003e\n    \u003cartifactId\u003ecucumber-spring\u003c/artifactId\u003e\n    \u003cgroupId\u003eio.cucumber\u003c/groupId\u003e\n  \u003c/dependency\u003e\n  \u003cdependency\u003e\n    \u003cartifactId\u003ecucumber-junit-platform-engine\u003c/artifactId\u003e\n    \u003cgroupId\u003eio.cucumber\u003c/groupId\u003e\n  \u003c/dependency\u003e\n    ...\n\u003c/dependecies\u003e\n```\n\nSelenium `\u003cdependencies\u003e`:\n\n```xml\n\n\u003cdependecies\u003e\n    ...\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.seleniumhq.selenium\u003c/groupId\u003e\n        \u003cartifactId\u003eselenium-java\u003c/artifactId\u003e\n        \u003cversion\u003e${selenium-version}\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.seleniumhq.selenium\u003c/groupId\u003e\n        \u003cartifactId\u003eselenium-server\u003c/artifactId\u003e\n        \u003cversion\u003e${selenium-version}\u003c/version\u003e\n    \u003c/dependency\u003e\n    ...\n\u003c/dependecies\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# JUnit 5\n\nBy using the [JUnit](https://junit.org/junit5/docs/current/user-guide/) and\nthe [Cucumber JVM](https://cucumber.io/docs/installation/java/) `@Cucumber` Annotation Type we can specify our Cucumber\nOptions like so :\n\n```properties\ncucumber.execution.parallel.enabled=true\ncucumber.execution.parallel.config.strategy=fixed\ncucumber.execution.parallel.config.fixed.parallelism=5\ncucumber.plugin=io.qameta.allure.cucumber6jvm.AllureCucumber6Jvm,com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:,pretty,json:target/cucumber/report.json,\n```\n\nRight click the `WeatherRunnerTest` or class and select `Run`\n\n```java\n@Cucumber\npublic class WeatherRunnerTest {\n}\n```\n\n# Command Line\n\nNormally you will use your IDE to run a `*.feature` file directly or 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=WeatherRunnerTest\n```\n\n```\nmvn test -Dtest=JunitSuiteTest\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# 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\u003e11\u003c/source\u003e\n                    \u003ctarget\u003e11\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# Configuration\n\nThe `AbstractTestDefinition` class is responsible for specifying each Step class as `@SpringBootTest` and\nits `@ContextConfiguration`\n\n\u003e All the `Step Classes` in the Framework should `extend` the `AbstractTestDefinition` class\n\n```java\n\n@ContextConfiguration(classes = {FrameworkContextConfiguration.class})\n@SpringBootTest\npublic class AbstractTestDefinition {\n}\n```\n\nThe `FrameworkContextConfiguration` class is responsible for specifying the Spring `@Configuration`, modules to scan,\nproperties to use etc\n\n```java\n\n@EnableRetry\n@Configuration\n@ComponentScan({\n        \"com.cmccarthy.ui\",\"com.cmccarthy.common\"\n})\n@PropertySource(\"application.properties\")\npublic class FrameworkContextConfiguration {\n}\n```\n\n# Environment Switching\n\nThere is only one thing you need to do to switch the environment - which is to set `\u003cactiveByDefault\u003e` property in the\nMaster POM.\n\n\u003e By default, the value of `spring.profiles.active` is defined in the `application.properties` file which inherits its\n\u003e value from the Master POM property `\u003cactiveByDefault\u003e`\n\n```xml\n\n\u003cprofiles\u003e\n    ...\n    \u003cprofile\u003e\n        \u003cid\u003eprod\u003c/id\u003e\n        \u003cactivation\u003e\n            \u003cactiveByDefault\u003etrue\u003c/activeByDefault\u003e\n        \u003c/activation\u003e\n        \u003cproperties\u003e\n            \u003cactivatedProperties\u003eprod\u003c/activatedProperties\u003e\n        \u003c/properties\u003e\n    \u003c/profile\u003e\n    ...\n\u003c/profiles\u003e\n```\n\nYou can then specify the profile to use when running Maven from the command line like so:\n\n```\nmvn clean install -P dev\n```\n\nBelow is an example of the `application.properties` file.\n\n```properties\nspring.profiles.active=@activatedProperties@\n```\n\n# Extent Spark Reports\n\nThe Framework uses [Spark Reports Framework](http://www.extentreports.com/docs/versions/4/java/spark-reporter.html) to\ngenerate the HTML Test Reports\n\nThe example below is a report generated by Extent Reports open-source library.\n\n\u003cimg src=\"https://github.com/cmccarthyIrl/spring-cucumber-junit-test-harness/blob/master/common/src/main/resources/demo/demo.png\" height=\"400px\"/\u003e\n\n# Allure Reports\n\nThe Framework uses [Allure Reports](https://docs.qameta.io/allure/) to generate the HTML Test Reports\n\nThe example below is a report generated by Allure Reports open-source library.\n\n\u003cimg src=\"https://github.com/cmccarthyIrl/spring-cucumber-junit-test-harness/blob/master/common/src/main/resources/demo/allure-report.png\" height=\"400px\"/\u003e\n\nTo generate the above report navigate to the root directory of the module under test and execute the following command\n\n`mvn allure:serve`  or `mvn allure:generate` (for an offline report)\n\n# Logging\n\nThe Framework uses [Logback](https://logback.qos.ch/) You can instantiate the logging service in any Class\nlike so\n\n```java\nprivate final Logger logger=LoggerFactory.getLogger(WikipediaPageSteps.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# Before / After Hooks\n\nThe [Log4j2](https://logging.apache.org/log4j/2.x/) logging service is initialized from the `Hooks.class`\n\n```java\npublic class Hooks {\n\n    @Autowired\n    private HookUtils hookUtil;\n\n    @After\n    public void afterScenario(Scenario scenario) {\n        hookUtil.endOfTest(scenario);\n    }\n}\n```\n\n# JSON Transforms\n\n[Rest Assured IO](https://rest-assured.io/) is used to map the `Response` Objects to their respective `POJO` Classes\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.rest-assured\u003c/groupId\u003e\n    \u003cartifactId\u003erest-assured\u003c/artifactId\u003e\n    \u003cversion\u003e3.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n# Troubleshooting\n\n- Execute the following commands to resolve any dependency issues\n    1. `cd ~/install directory path/spring-cucumber-junit-parallel-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/spring-cucumber-junit-parallel-test-harness/issues)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmccarthyirl%2Fspring-cucumber-junit-parallel-test-harness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmccarthyirl%2Fspring-cucumber-junit-parallel-test-harness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmccarthyirl%2Fspring-cucumber-junit-parallel-test-harness/lists"}