payload: {"action":"created","comment":{"url":"https://api.github.com/repos/cucumber/docs.cucumber.io/pulls/comments/291814934","pull_request_review_id":247376781,"id":291814934,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5MTgxNDkzNA==","diff_hunk":"@@ -0,0 +1,380 @@\n+---\r\n+title: Parallel Execution\r\n+subtitle: Using multiple threads to reduce test times\r\n+polyglot:\r\n+ - java\r\n+ - kotlin\r\n+ \r\n+weight: 1800\r\n+---\r\n+{{% block \"java,kotlin\" %}}\r\n+Cucumber-JVM allows [parallel execution](https://cucumber.io/blog/announcing-cucumber-jvm-4-0-0/) across multiple threads since version 4.0.0. There are several options to incorporate this built-in feature in a Cucumber project.\r\n+\r\n+- [JUnit](/docs/guides/parallel-execution/#junit)\r\n+- [TestNG](/docs/guides/parallel-execution/#testng)\r\n+- [CLI](/docs/guides/parallel-execution/#cli)\r\n+\r\n+For each of these options, this tutorial will look at the project setup, configuration settings and execution commands.\r\n+{{% /block %}}\r\n+\r\n+# JUnit\r\n+\r\n+{{% block \"java,kotlin\" %}}\r\n+Cucumber can be executed in parallel using **JUnit and Maven test execution plugins**. In JUnit the **feature files are run in parallel rather than scenarios**, which means **all the scenarios in a feature file will be executed by the same thread**. You can use either Maven Surefire or Failsafe plugin to execute the runners.\r\n+\r\n+- Create a Maven project in your favorite IDE using the [cucumber-archetype](/docs/guides/10-minute-tutorial/#create-an-empty-cucumber-project) or adding Cucumber dependencies to the POM as detailed [here](https://cucumber.io/docs/installation/java/#maven) and Junit dependencies [here](/docs/cucumber/checking-assertions/#junit).\r\n+\r\n+- Create a **parallel** folder (or any other name) in `src/test/resources` path and add the two feature files (`scenarios.feature` and `scenario-outlines.feature`) inside it.\r\n+\r\n+```gherkin\r\n+Feature: Scenarios feature file\r\n+\r\n+  Scenario: Scenario Number One\r\n+    Given Step from 'Scenario 1' in 'scenarios' feature file\r\n+\r\n+  Scenario: Scenario Number Two\r\n+    Given Step from 'Scenario 2' in 'scenarios' feature file\r\n+```\r\n+\r\n+```gherkin\r\n+Feature: Scenario Outlines feature file\r\n+\r\n+  Scenario Outline: <scen_out_row_num>\r\n+    Given Step from '<scen_out_row_num>' in 'scenario-outlines' feature file\r\n+\r\n+    Examples: \r\n+      | scen_out_row_num       |\r\n+      | Scenario Outline Row 1 |\r\n+      | Scenario Outline Row 2 |\r\n+```\r\n+\r\n+- Add the **step definition class** to the `parallel` package (same name as folder above for automatic pickup by runner) in `src/test/java` folder.\r\n+{{% /block %}}\r\n+\r\n+{{% block \"java\" %}}\r\n+\r\n+```java\r\n+package parallel;\r\n+\r\n+import cucumber.api.java.BeforeStep;\r\n+import cucumber.api.java.en.Given;\r\n+\r\n+public class Stepdefs {\r\n+\r\n+\t@Given(\"Step from {string} in {string} feature file\")\r\n+\tpublic void step(String scenario, String file) {\r\n+\t\tSystem.out.format(\"Thread ID - %2d - %s from %s feature file.\\n\", Thread.currentThread().getId(), scenario,file);\r","path":"content/docs/guides/parallel-execution.md","position":null,"original_position":66,"commit_id":"832c1ed4dbd9691285e13bd498083865698c354b","original_commit_id":"bc218327d7c7211a37fcb636f7a62797e6aef2f0","user":{"login":"grasshopper7","id":10829355,"node_id":"MDQ6VXNlcjEwODI5MzU1","avatar_url":"https://avatars0.githubusercontent.com/u/10829355?v=4","gravatar_id":"","url":"https://api.github.com/users/grasshopper7","html_url":"https://github.com/grasshopper7","followers_url":"https://api.github.com/users/grasshopper7/followers","following_url":"https://api.github.com/users/grasshopper7/following{/other_user}","gists_url":"https://api.github.com/users/grasshopper7/gists{/gist_id}","starred_url":"https://api.github.com/users/grasshopper7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grasshopper7/subscriptions","organizations_url":"https://api.github.com/users/grasshopper7/orgs","repos_url":"https://api.github.com/users/grasshopper7/repos","events_url":"https://api.github.com/users/grasshopper7/events{/privacy}","received_events_url":"https://api.github.com/users/grasshopper7/received_events","type":"User","site_admin":false},"body":"Added to batch commit","created_at":"2019-06-08T18:09:04Z","updated_at":"2019-06-08T18:09:05Z","html_url":"https://github.com/cucumber/docs.cucumber.io/pull/347#discussion_r291814934","pull_request_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/pulls/347","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/cucumber/docs.cucumber.io/pulls/comments/291814934"},"html":{"href":"https://github.com/cucumber/docs.cucumber.io/pull/347#discussion_r291814934"},"pull_request":{"href":"https://api.github.com/repos/cucumber/docs.cucumber.io/pulls/347"}},"in_reply_to_id":291798068},"pull_request":{"url":"https://api.github.com/repos/cucumber/docs.cucumber.io/pulls/347","id":275320629,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc1MzIwNjI5","html_url":"https://github.com/cucumber/docs.cucumber.io/pull/347","diff_url":"https://github.com/cucumber/docs.cucumber.io/pull/347.diff","patch_url":"https://github.com/cucumber/docs.cucumber.io/pull/347.patch","issue_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/issues/347","number":347,"state":"open","locked":false,"title":"Parallel execution docs","user":{"login":"grasshopper7","id":10829355,"node_id":"MDQ6VXNlcjEwODI5MzU1","avatar_url":"https://avatars0.githubusercontent.com/u/10829355?v=4","gravatar_id":"","url":"https://api.github.com/users/grasshopper7","html_url":"https://github.com/grasshopper7","followers_url":"https://api.github.com/users/grasshopper7/followers","following_url":"https://api.github.com/users/grasshopper7/following{/other_user}","gists_url":"https://api.github.com/users/grasshopper7/gists{/gist_id}","starred_url":"https://api.github.com/users/grasshopper7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grasshopper7/subscriptions","organizations_url":"https://api.github.com/users/grasshopper7/orgs","repos_url":"https://api.github.com/users/grasshopper7/repos","events_url":"https://api.github.com/users/grasshopper7/events{/privacy}","received_events_url":"https://api.github.com/users/grasshopper7/received_events","type":"User","site_admin":false},"body":"Added for [Document how to run tests in parallel](https://github.com/cucumber/docs.cucumber.io/issues/298) issue. Added two new files - parallel-execution.md and parallel-timeline-report.png.\r\n\r\nFor java only but I think with some changes could be adapted for kotlin. Have used Maven only for dependencies and execution.  For Grade need to figure it out.\r\n\r\nMaybe need a repository to store the source code files. Though it is pretty bare bones basic stuff.\r\n","created_at":"2019-05-02T11:12:27Z","updated_at":"2019-06-08T18:09:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b9087388500466e7770eee031c2a539f80aa781","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/pulls/347/commits","review_comments_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/pulls/347/comments","review_comment_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/issues/347/comments","statuses_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/statuses/832c1ed4dbd9691285e13bd498083865698c354b","head":{"label":"grasshopper7:parallel-execution-docs","ref":"parallel-execution-docs","sha":"832c1ed4dbd9691285e13bd498083865698c354b","user":{"login":"grasshopper7","id":10829355,"node_id":"MDQ6VXNlcjEwODI5MzU1","avatar_url":"https://avatars0.githubusercontent.com/u/10829355?v=4","gravatar_id":"","url":"https://api.github.com/users/grasshopper7","html_url":"https://github.com/grasshopper7","followers_url":"https://api.github.com/users/grasshopper7/followers","following_url":"https://api.github.com/users/grasshopper7/following{/other_user}","gists_url":"https://api.github.com/users/grasshopper7/gists{/gist_id}","starred_url":"https://api.github.com/users/grasshopper7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grasshopper7/subscriptions","organizations_url":"https://api.github.com/users/grasshopper7/orgs","repos_url":"https://api.github.com/users/grasshopper7/repos","events_url":"https://api.github.com/users/grasshopper7/events{/privacy}","received_events_url":"https://api.github.com/users/grasshopper7/received_events","type":"User","site_admin":false},"repo":{"id":184563162,"node_id":"MDEwOlJlcG9zaXRvcnkxODQ1NjMxNjI=","name":"docs.cucumber.io","full_name":"grasshopper7/docs.cucumber.io","private":false,"owner":{"login":"grasshopper7","id":10829355,"node_id":"MDQ6VXNlcjEwODI5MzU1","avatar_url":"https://avatars0.githubusercontent.com/u/10829355?v=4","gravatar_id":"","url":"https://api.github.com/users/grasshopper7","html_url":"https://github.com/grasshopper7","followers_url":"https://api.github.com/users/grasshopper7/followers","following_url":"https://api.github.com/users/grasshopper7/following{/other_user}","gists_url":"https://api.github.com/users/grasshopper7/gists{/gist_id}","starred_url":"https://api.github.com/users/grasshopper7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grasshopper7/subscriptions","organizations_url":"https://api.github.com/users/grasshopper7/orgs","repos_url":"https://api.github.com/users/grasshopper7/repos","events_url":"https://api.github.com/users/grasshopper7/events{/privacy}","received_events_url":"https://api.github.com/users/grasshopper7/received_events","type":"User","site_admin":false},"html_url":"https://github.com/grasshopper7/docs.cucumber.io","description":"Cucumber Documentation","fork":true,"url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io","forks_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/forks","keys_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/teams","hooks_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/hooks","issue_events_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/issues/events{/number}","events_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/events","assignees_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/assignees{/user}","branches_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/branches{/branch}","tags_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/tags","blobs_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/statuses/{sha}","languages_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/languages","stargazers_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/stargazers","contributors_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/contributors","subscribers_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/subscribers","subscription_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/subscription","commits_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/contents/{+path}","compare_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/merges","archive_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/downloads","issues_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/issues{/number}","pulls_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/pulls{/number}","milestones_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/milestones{/number}","notifications_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/labels{/name}","releases_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/releases{/id}","deployments_url":"https://api.github.com/repos/grasshopper7/docs.cucumber.io/deployments","created_at":"2019-05-02T10:40:22Z","updated_at":"2019-05-31T00:33:19Z","pushed_at":"2019-06-08T17:48:41Z","git_url":"git://github.com/grasshopper7/docs.cucumber.io.git","ssh_url":"git@github.com:grasshopper7/docs.cucumber.io.git","clone_url":"https://github.com/grasshopper7/docs.cucumber.io.git","svn_url":"https://github.com/grasshopper7/docs.cucumber.io","homepage":null,"size":4513,"stargazers_count":1,"watchers_count":1,"language":"CSS","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"cucumber:master","ref":"master","sha":"326aebf0aa829d8df996ab0d37e3750c25c4233e","user":{"login":"cucumber","id":320565,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMDU2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/320565?v=4","gravatar_id":"","url":"https://api.github.com/users/cucumber","html_url":"https://github.com/cucumber","followers_url":"https://api.github.com/users/cucumber/followers","following_url":"https://api.github.com/users/cucumber/following{/other_user}","gists_url":"https://api.github.com/users/cucumber/gists{/gist_id}","starred_url":"https://api.github.com/users/cucumber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cucumber/subscriptions","organizations_url":"https://api.github.com/users/cucumber/orgs","repos_url":"https://api.github.com/users/cucumber/repos","events_url":"https://api.github.com/users/cucumber/events{/privacy}","received_events_url":"https://api.github.com/users/cucumber/received_events","type":"Organization","site_admin":false},"repo":{"id":91135423,"node_id":"MDEwOlJlcG9zaXRvcnk5MTEzNTQyMw==","name":"docs.cucumber.io","full_name":"cucumber/docs.cucumber.io","private":false,"owner":{"login":"cucumber","id":320565,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMDU2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/320565?v=4","gravatar_id":"","url":"https://api.github.com/users/cucumber","html_url":"https://github.com/cucumber","followers_url":"https://api.github.com/users/cucumber/followers","following_url":"https://api.github.com/users/cucumber/following{/other_user}","gists_url":"https://api.github.com/users/cucumber/gists{/gist_id}","starred_url":"https://api.github.com/users/cucumber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cucumber/subscriptions","organizations_url":"https://api.github.com/users/cucumber/orgs","repos_url":"https://api.github.com/users/cucumber/repos","events_url":"https://api.github.com/users/cucumber/events{/privacy}","received_events_url":"https://api.github.com/users/cucumber/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cucumber/docs.cucumber.io","description":"Cucumber Documentation","fork":false,"url":"https://api.github.com/repos/cucumber/docs.cucumber.io","forks_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/forks","keys_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/teams","hooks_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/hooks","issue_events_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/issues/events{/number}","events_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/events","assignees_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/assignees{/user}","branches_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/branches{/branch}","tags_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/tags","blobs_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/statuses/{sha}","languages_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/languages","stargazers_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/stargazers","contributors_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/contributors","subscribers_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/subscribers","subscription_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/subscription","commits_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/contents/{+path}","compare_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/merges","archive_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/downloads","issues_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/issues{/number}","pulls_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/pulls{/number}","milestones_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/milestones{/number}","notifications_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/labels{/name}","releases_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/releases{/id}","deployments_url":"https://api.github.com/repos/cucumber/docs.cucumber.io/deployments","created_at":"2017-05-12T22:57:25Z","updated_at":"2019-05-21T07:58:30Z","pushed_at":"2019-06-08T17:48:42Z","git_url":"git://github.com/cucumber/docs.cucumber.io.git","ssh_url":"git@github.com:cucumber/docs.cucumber.io.git","clone_url":"https://github.com/cucumber/docs.cucumber.io.git","svn_url":"https://github.com/cucumber/docs.cucumber.io","homepage":null,"size":4427,"stargazers_count":34,"watchers_count":34,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":178,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":25,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":178,"open_issues":25,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cucumber/docs.cucumber.io/pulls/347"},"html":{"href":"https://github.com/cucumber/docs.cucumber.io/pull/347"},"issue":{"href":"https://api.github.com/repos/cucumber/docs.cucumber.io/issues/347"},"comments":{"href":"https://api.github.com/repos/cucumber/docs.cucumber.io/issues/347/comments"},"review_comments":{"href":"https://api.github.com/repos/cucumber/docs.cucumber.io/pulls/347/comments"},"review_comment":{"href":"https://api.github.com/repos/cucumber/docs.cucumber.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cucumber/docs.cucumber.io/pulls/347/commits"},"statuses":{"href":"https://api.github.com/repos/cucumber/docs.cucumber.io/statuses/832c1ed4dbd9691285e13bd498083865698c354b"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"grasshopper7"}}