title: Running cucumber features over different environments
body: <p>I have a bunch of Cucumber features that are executing with Selenium in Java and JUnit. So far this code isnt version controlled and only runs on my DEV environment. But now we need to start bringing things up a level and versioning the automation code and running it in different environments.</p>
  
  <p>I have various points in my code where it specifically mentions my environment. This will be things such as go to my DEV environment URL and do some Selenium stuff or connect to my DEV database. So I realise that I need to tidy up these methods so that the environment specific stuff gets passed in. </p>
  
  <p>My question here is what decides what environment I'm wanting to run the checks in so I can then pass that environment specific stuff into these methods that need to know, such as URL names and DB connection stuff? I've seen mentions of using Maven properties for this and also seen a mention about writing a separate runner class using CucumberOptions. I'm wondering if there is a common approach to this that people use as it is no doubt a common task.</p>
  
  <p>Hopefully this is the right forum for this question.</p>