title: Cucumber: Multiple Feature Backgrounds Or Equivalent Solution
body: <p>I have multiple environments on which I need to perform some tests.</p>
  
  <p>Each environment has its own set of urls and credentials to log in.</p>
  
  <p>Ideally I needed a tagged Background to log in to the environment under test before each scenario. </p>
  
  <p>E.g.: <br> 
  @reconnect @dev <br> 
  &nbsp;&nbsp;&nbsp;&nbsp;Background: login with username and password<br> 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Given user logs on "DEV" homepage with user "XW" and pass "PO"<br> 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Then user is displayed home page    <br> </p>
  
  <p>@reconnect @prd <br> 
  &nbsp;&nbsp;&nbsp;&nbsp;Background: login with username and password<br> 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Given user logs on "PRD" homepage with user "XY" and pass "PR"<br> 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Then user is displayed home page    <br></p>
  
  <p>Since this option is not available, I tried to use tagged hooks and scenarios, but all matching tags on the scenarios trigger multiple log-ins before each scenario. Example:</p>
  
  <p>@reconnect @dev @prd <br>
  Scenario: aaa <br></p>
  
  <p>Will run log-ins for both DEV and PRD environments.</p>
  
  <p>Is there any simple and neat way to achieve such an objective without 'SRY'?</p>