{"id":18494916,"url":"https://github.com/qaware/test-shard-maven-plugin","last_synced_at":"2025-04-08T22:31:40.893Z","repository":{"id":77410324,"uuid":"195035051","full_name":"qaware/test-shard-maven-plugin","owner":"qaware","description":"The test shard maven plugin is a maven plugin to split tests into shards. The main aim is to use these shards for concurrent testing.","archived":false,"fork":false,"pushed_at":"2024-01-20T15:56:55.000Z","size":111,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T19:11:11.205Z","etag":null,"topics":[],"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/qaware.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":"2019-07-03T10:50:10.000Z","updated_at":"2024-06-18T03:47:50.000Z","dependencies_parsed_at":"2024-11-06T13:27:09.397Z","dependency_job_id":"bc47270b-1c41-47e9-8a11-dc556dd5ce69","html_url":"https://github.com/qaware/test-shard-maven-plugin","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/qaware%2Ftest-shard-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaware%2Ftest-shard-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaware%2Ftest-shard-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaware%2Ftest-shard-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qaware","download_url":"https://codeload.github.com/qaware/test-shard-maven-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247940396,"owners_count":21021958,"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":[],"created_at":"2024-11-06T13:22:42.802Z","updated_at":"2025-04-08T22:31:38.095Z","avatar_url":"https://github.com/qaware.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Test Shard Maven Plugin\n\nThe test shard maven plugin is a maven plugin to split tests into test shards (txt files). The main aim is to use these shards for concurrent testing.\n\n## Getting started\n\nTo include this plugin just add the following code snippet to the pom.xml of your project\n```\n\u003cproject\u003e\n\t...\t\n\t\u003cbuild\u003e\n\t\t...\t\t\n        \u003cplugins\u003e\n\t\t\t...\t\n            \u003cplugin\u003e\n                \u003cgroupId\u003ecom.telekom.gis.psa\u003c/groupId\u003e\n                \u003cartifactId\u003etest-shard-maven-plugin\u003c/artifactId\u003e\n                \u003cversion\u003e1.0-SNAPSHOT\u003c/version\u003e\n                \u003cexecutions\u003e\n                    \u003cexecution\u003e\n                        \u003cgoals\u003e\n                            \u003cgoal\u003e[creator_goal]\u003c/goal\u003e\n                        \u003c/goals\u003e\n                    \u003c/execution\u003e\n                \u003c/executions\u003e\n                \u003cconfiguration\u003e\n                    \u003cshardCount\u003e[shard_cound]\u003c/shardCount\u003e\n                \u003c/configuration\u003e\n            \u003c/plugin\u003e\t\t\t\n\t\t\t...\n        \u003c/plugins\u003e\t\t\n\t\t...\n    \u003c/build\u003e\t\n\t...\n\u003c/project\u003e\n```\n\nand replace [creator_goal] with either `create-junit-shards` or `create-cucumber-shards` and [shard_cound] with the\nexpected number of created shard files.\n\n## Goals and plugin options\n\nThe maven shard creator plugin can create shards for basic junit test classes and cucumber feature files.\nMake sure, that your project contains a cucumber junit wrapper class:\n\n```\n@RunWith(value = Cucumber.class)\n@CucumberOptions(\n     ...\n)\npublic class PSACucumberItests {...}\n```\n\nThe class should include all feature files.\n\n### clean-shards\nDefault Phase: NONE\n\nThis goal deletes all test shards in the output directory. It is not necessary to call this goal on maven clean,\nif the output folder is located in the target folder.\n```\nmvn com.telekom.gis.psa:test-shard-maven-plugin:clean-shards\n```\n\n### execute-shard\nDefault Phase: PRE_INTEGRATION_TEST\n\nThis goal executes a given test shard (gets the test shard by the given shardIndex) and includes it into surfire by setting the property surefire.includesFile to the shard name.\nExample command line call:\n```\nmvn com.telekom.gis.psa:test-shard-maven-plugin:execute-shard org.apache.maven.plugins:maven-surefire-plugin:test -Dtests.shardIndex=4\n```\n\nThe shard index does not depend on the type of the test shard. For example, if you have 2 cucumber and 3 junit test shards, the expected outcome\nof the creator goals is:\n```\n- cucumber-shard0.txt\n- cucumber-shard1.txt\n- junit-shard0.txt\n- junit-shard1.txt\n- junit-shard2.txt\n``` \nThe index starts with 0 at `cucumber-shard0.txt`, continues with 2 at `junit-shard0.txt` and so on. So to execute\n`junit-shard1.txt`, you have to execute this goal with shardIndex 3. \n\n\n### create-junit-shards\nDefault Phase: PROCESS_TEST_SOURCES\n\nThis goal reads the test sources, splits them and creates the test shards.\nFor this goal test sources are supposed to be java files with junit tests\nExample command line call:\n```\nmvn com.telekom.gis.psa:test-shard-maven-plugin:create-junit-shards -Dtests.shardCount=5\n```\n\n### create-cucumber-shards\nDefault Phase: PROCESS_TEST_SOURCES\n\nThis goal reads the test sources, splits them and creates the test shards.\nFor this goal test sources are supposed to be cucumber feature files.\nExample command line call:\n```\nmvn com.telekom.gis.psa:test-shard-maven-plugin:create-junit-shards -Dtests.shardCount=5\n```\n\n### clean-cucumber-features\nDefault Phase: POST_INTEGRATION_TEST\n\nThis goal removes the .ignore extension from the feature files. This extension is used to disable feature files.\n\n### Plugin options\n\nIf a parameter has no default value, it is required to set this parameter in the pom.xml of your project.\n\nName | Parameter property | description | goal | default value\n--- | --- | --- | --- | ---\ncucumberWrapperClass | shard.execute.cucumberWrapperClass | The full class name (package and class name) of the wrapper class for cucumber tests | execute-shard | none, but only required if cucumber tests are executed \nshardIndex | shard.execute.shardIndex | The index of the shard to be loaded into surfire (see goal description) | execute-shard | \noutputFolder | shard.outputFolder | The output directory for the test shards | all | `${project.build.directory}/test-shards`\nshardCount | shard.create.shardCount | The amount of shards to be created (by each creator goal) | create-junit-shards, create-cucumber-shards |\nincludes | shard.create.includes | The path pattern for the test files to be included | create-junit-shards, create-cucumber-shards | `{**/*Test.java}` for junit, `{**/*.feature}` for cucumber\nexcludes | shard.create.excludes | The path pattern for the test files to be excluded | create-junit-shards, create-cucumber-shards | []\ntestFolders | shard.create.testFolders | The directories, where to search for the the test files, do not include parts of package names | create-junit-shards, create-cucumber-shards, clean-cucumber-features | `${project.build.testSourceDirectory}`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqaware%2Ftest-shard-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqaware%2Ftest-shard-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqaware%2Ftest-shard-maven-plugin/lists"}