You should run shell commands with the nightwatch test in each
For example:
nightwatch --test tests/product/itineraryCreate.js --testcase "itinerary_new" --env integration
But the most important thing is a well defined environment in the nightwatch.json
"integration" : {
"persist_globals" : true,
"launch_url" : "https://test.url",
"globals" : {
"foo" : "var"
},
"desiredCapabilities" : {
"browserName" : "firefox",
"acceptInsecureCerts" : true,
"alwaysMatch" : {
"acceptInsecureCerts" : true,
"moz:firefoxOptions" : {
"args" : [ "-headless" ]
}
}
}
},
Make sure headless mode is set