{"action":"created","issue":{"url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/665","labels_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/665/labels{/name}","comments_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/665/comments","events_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/665/events","html_url":"https://github.com/nightwatchjs/nightwatch/issues/665","id":109112106,"number":665,"title":"\"--env\" argument won't work properly when \"test_workers\" is true","user":{"login":"Tiagoperes","id":1119029,"avatar_url":"https://avatars.githubusercontent.com/u/1119029?v=3","gravatar_id":"","url":"https://api.github.com/users/Tiagoperes","html_url":"https://github.com/Tiagoperes","followers_url":"https://api.github.com/users/Tiagoperes/followers","following_url":"https://api.github.com/users/Tiagoperes/following{/other_user}","gists_url":"https://api.github.com/users/Tiagoperes/gists{/gist_id}","starred_url":"https://api.github.com/users/Tiagoperes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tiagoperes/subscriptions","organizations_url":"https://api.github.com/users/Tiagoperes/orgs","repos_url":"https://api.github.com/users/Tiagoperes/repos","events_url":"https://api.github.com/users/Tiagoperes/events{/privacy}","received_events_url":"https://api.github.com/users/Tiagoperes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-30T15:08:19Z","updated_at":"2015-10-28T13:15:13Z","closed_at":null,"body":"I have 2 environments set in my configuration file, but when I run nightwatch with \"--env ci\", the default environment runs, not the ci. \r\n\r\nFirst I thought the \"env\" argument was being ignored, but it was not the case since the error \"Invalid testing environment specified: ...\" was being logged when I tried to run a non-existent environment.\r\n\r\nThen I started to tweak my configuration file, what I found is that when I set \"test_workers\" to true, the default environment is always used, no matter what I pass to the --env argument. If I set \"test_workers\" to false, everything works perfectly, the tests are run using the environment specified in the argument \"--env\".\r\n\r\nI' using version 0.8.3 and here's my configuration file:\r\n```javascript\r\n{\r\n  \"src_folders\" : [ \"test/e2e/test-files\" ],\r\n  \"page_objects_path\" : \"test/e2e/page-objects\",\r\n  \"output_folder\"  : \"reports\",\r\n  \"custom_commands_path\" : \"\",\r\n  \"custom_assertions_path\" : \"\",\r\n  \"globals_path\" : \"\",\r\n  \"test_workers\" : true,\r\n\r\n  \"selenium\" : {\r\n    \"start_process\" : true,\r\n    \"server_path\" : \"node_modules/selenium-server-standalone-jar/jar/selenium-server-standalone-2.47.1.jar\",\r\n    \"log_path\" : \"\",\r\n    \"host\" : \"127.0.0.1\",\r\n    \"port\" : 4444,\r\n    \"cli_args\" : {\r\n      \"webdriver.chrome.driver\" : \"node_modules/chromedriver/lib/chromedriver/chromedriver\",\r\n      \"webdriver.ie.driver\" : \"\"\r\n    }\r\n  },\r\n\r\n  \"test_settings\" : {\r\n    \"default\" : {\r\n      \"launch_url\" : \"http://zupme.zup.me:3888/\",\r\n      \"selenium_port\"  : 4444,\r\n      \"selenium_host\"  : \"localhost\",\r\n      \"silent\": true,\r\n      \"desiredCapabilities\": {\r\n        \"browserName\": \"chrome\",\r\n        \"javascriptEnabled\": true,\r\n        \"acceptSslCerts\": true\r\n      }\r\n    },\r\n\r\n    \"ci\" : {\r\n      \"launch_url\" : \"http://www.google.com/\",\r\n      \"selenium_port\"  : 4444,\r\n      \"selenium_host\"  : \"localhost\",\r\n      \"silent\": true,\r\n\r\n      \"desiredCapabilities\": {\r\n        \"browserName\": \"firefox\",\r\n        \"javascriptEnabled\": true,\r\n        \"acceptSslCerts\": true\r\n      }\r\n    }\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/comments/151842083","html_url":"https://github.com/nightwatchjs/nightwatch/issues/665#issuecomment-151842083","issue_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/665","id":151842083,"user":{"login":"Tiagoperes","id":1119029,"avatar_url":"https://avatars.githubusercontent.com/u/1119029?v=3","gravatar_id":"","url":"https://api.github.com/users/Tiagoperes","html_url":"https://github.com/Tiagoperes","followers_url":"https://api.github.com/users/Tiagoperes/followers","following_url":"https://api.github.com/users/Tiagoperes/following{/other_user}","gists_url":"https://api.github.com/users/Tiagoperes/gists{/gist_id}","starred_url":"https://api.github.com/users/Tiagoperes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tiagoperes/subscriptions","organizations_url":"https://api.github.com/users/Tiagoperes/orgs","repos_url":"https://api.github.com/users/Tiagoperes/repos","events_url":"https://api.github.com/users/Tiagoperes/events{/privacy}","received_events_url":"https://api.github.com/users/Tiagoperes/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T13:15:13Z","updated_at":"2015-10-28T13:15:13Z","body":"No, I had to disable parallel running for my tests :worried:"}}