{"action":"created","issue":{"url":"https://api.github.com/repos/getgauge/gauge-java/issues/178","repository_url":"https://api.github.com/repos/getgauge/gauge-java","labels_url":"https://api.github.com/repos/getgauge/gauge-java/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/getgauge/gauge-java/issues/178/comments","events_url":"https://api.github.com/repos/getgauge/gauge-java/issues/178/events","html_url":"https://github.com/getgauge/gauge-java/issues/178","id":355629878,"node_id":"MDU6SXNzdWUzNTU2Mjk4Nzg=","number":178,"title":"pause scenario execution","user":{"login":"patmuk","id":2045440,"node_id":"MDQ6VXNlcjIwNDU0NDA=","avatar_url":"https://avatars3.githubusercontent.com/u/2045440?v=4","gravatar_id":"","url":"https://api.github.com/users/patmuk","html_url":"https://github.com/patmuk","followers_url":"https://api.github.com/users/patmuk/followers","following_url":"https://api.github.com/users/patmuk/following{/other_user}","gists_url":"https://api.github.com/users/patmuk/gists{/gist_id}","starred_url":"https://api.github.com/users/patmuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patmuk/subscriptions","organizations_url":"https://api.github.com/users/patmuk/orgs","repos_url":"https://api.github.com/users/patmuk/repos","events_url":"https://api.github.com/users/patmuk/events{/privacy}","received_events_url":"https://api.github.com/users/patmuk/received_events","type":"User","site_admin":false},"labels":[{"id":363702940,"node_id":"MDU6TGFiZWwzNjM3MDI5NDA=","url":"https://api.github.com/repos/getgauge/gauge-java/labels/ready%20for%20QA","name":"ready for QA","color":"005b00","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-08-30T15:09:35Z","updated_at":"2018-09-03T09:30:37Z","closed_at":null,"author_association":"NONE","body":"### Expected behavior\r\nI would like to pause a scenario execution and wait for the user to press the RETURN key.\r\nThis would help using gauge to script demos. I would need this to convince my colleagues to move from cucumber (as it works there).\r\nHowever, I can not get StdIn :(\r\n\r\nMy could would look like this:\r\n\r\n```\r\n@Step(\"Wait for RETURN key pressed\")\r\npublic void waitForRETURNkey(){\r\n   System.out.println(\"Paused - please press RETURN to continue.\"): //this works\r\n   System.in.read(); //This does not work. Is the StdIn set to dev/null?\r\n}\r\n```\r\n### Actual behavior\r\nMy Step prints `Paused - please press RETURN to continue.` and continues instantly.\r\n### Steps to reproduce\r\n1. gauge init java\r\n2. implement my step code above\r\n3. call the step from a spec file\r\n4. gauge run\r\n\r\n### Gauge version\r\n```\r\nGauge version: 1.0.0\r\n\r\nPlugins\r\n-------\r\nhtml-report (4.0.5)\r\njava (0.6.8)\r\nscreenshot (0.0.1)\r\n```\r\n\r\nIs there a JVM option I could set?\r\nThanks for your help in advance, highly appreciated."},"comment":{"url":"https://api.github.com/repos/getgauge/gauge-java/issues/comments/418057571","html_url":"https://github.com/getgauge/gauge-java/issues/178#issuecomment-418057571","issue_url":"https://api.github.com/repos/getgauge/gauge-java/issues/178","id":418057571,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODA1NzU3MQ==","user":{"login":"ajoecker","id":36064843,"node_id":"MDQ6VXNlcjM2MDY0ODQz","avatar_url":"https://avatars2.githubusercontent.com/u/36064843?v=4","gravatar_id":"","url":"https://api.github.com/users/ajoecker","html_url":"https://github.com/ajoecker","followers_url":"https://api.github.com/users/ajoecker/followers","following_url":"https://api.github.com/users/ajoecker/following{/other_user}","gists_url":"https://api.github.com/users/ajoecker/gists{/gist_id}","starred_url":"https://api.github.com/users/ajoecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajoecker/subscriptions","organizations_url":"https://api.github.com/users/ajoecker/orgs","repos_url":"https://api.github.com/users/ajoecker/repos","events_url":"https://api.github.com/users/ajoecker/events{/privacy}","received_events_url":"https://api.github.com/users/ajoecker/received_events","type":"User","site_admin":false},"created_at":"2018-09-03T09:30:37Z","updated_at":"2018-09-03T09:30:37Z","author_association":"CONTRIBUTOR","body":"> However, adding Gauge.pause() is as well an commitment to support pausing, and might have undesired side effects in CI environments when configured poorly (i.e. stdIn not deactivated). Though an env setting could activate/deactivate it.\r\nPeople can do this now already, without the `pause` method - but I am not sure, whether it is possible to prevent the redirect under a certain environment...\r\nand even if not, this would be discovered immediately and would not have any critical impact besides stalling the CI"}}
{"actor":{"display_login":"ajoecker"}}