title: SpecFlow: Scenario Outline Examples
body: <p>I just starting to work with SpecFlow and really like the tool.  However I am running across some issues in relation to example data inputs into the Scenario Outlines.</p>
  
  <p>Just wondering if what I am facing is normal or whether there is a trick to it.</p>
  
  <p>I am using C# Visual Studio 2013 and writing an MVC App using the underscore style of step definition.  I have also tried the regular expression style but still get similar issues.</p>
  
  <p>So the issue is I am providing username, password etc as parameters and including sample data in my Examples.  It appears that the following occurs: -</p>
  
  <ol>
  <li><p>I have to put "" around the parameters when 1st generating the scenario, otherwise it does not get picked up as a parameter at all.  However when passing data in from the examples I get a "/" at the end of the data passed in.  When I go back to the scenario I then remove the "" around the parameter.  This is a little frustrating but if that is the best way to handle it I can live with that.  Just wondering if anyone has any advice on this point.</p></li>
  <li><p>The next issue is related to the data itself.   It appears if I have any characters such as @ or &amp; etc in my data, then it splits that data at that point and feeds it to the next parameter so I get incorrect data being fed through.</p></li>
  </ol>
  
  <p>I have included my code below - if anyone has any suggestions or resources to look at that would be appreciated.</p>
  
  <p><strong>Feature File</strong>
          Feature: AccountRegistration
          In order to use Mojito services in my organisation
          As a guest user
          I want to create an account with administration privelages</p>
  
  <pre><code>Scenario Outline: Register with valid details
      Given I am on the registration page
          And I have completed the form with &lt;email&gt; &lt;organisation&gt; &lt;password&gt; and &lt;passwordConfirmation&gt;
      When I have clicked on the register button
      Then I will be logged in as &lt;username&gt;
          And my account will be assigned the role of &lt;role&gt;
  
          Examples: 
          | email     | organisation | password  | passwordConfirmation | username  | role  |
          | usernamea | Bytes        | password1 | password1            | usernamea | Admin |
          | usernameb | Bytes        | password2 | password2            | usernameb | Admin |
          | usernamec | Bytes        | password3 | password3            | usernamec | Admin |
          | usernamed | Bytes        | password4 | password4            | usernamed | Admin |
          | usernamee | Bytes        | password5 | password5            | usernamee | Admin |
  
  Scenario Outline: Register with invalid details
      Given I am on the registration page
          And I have completed the form with &lt;email&gt; &lt;organisation&gt; &lt;password&gt; and &lt;passwordConfirmation&gt;
      When I have clicked on the register button
      Then I will get an error message
  
          Examples: 
          | email             | organisation    | password   | passwordConfirmation | 
          | Jonesa@mojito.com | Bytes           | 1LTIuta&amp;Sc | wrongpassword      | 
          | Jonesb@mojito.com | Bytes           | 1LTIuta&amp;Sc | 1LTIuta&amp;Sc         | 
          | Jonesc@mojito.com | No Organisation | 1LTIuta&amp;Sc | 1LTIuta&amp;Sc         | 
  </code></pre>
  
  <p><strong>Steps Generated File</strong></p>
  
  <pre><code>[Binding]
      public class AccountRegistrationSteps
      {
          [Given]
          public void Given_I_am_on_the_registration_page()
          {
              ScenarioContext.Current.Pending();
          }
  
          [Given]
          public void Given_I_have_completed_the_form_with_usernamea_Bytes_password_P0_and_password_P1(int p0, int p1)
          {
              ScenarioContext.Current.Pending();
          }
  
          [Given]
          public void Given_I_have_completed_the_form_with_Jonesa_mojito_com_Bytes_P0_LTIuta_Sc_and_wrongpassword(int p0)
          {
              ScenarioContext.Current.Pending();
          }
  
          [When]
          public void When_I_have_clicked_on_the_register_button()
          {
              ScenarioContext.Current.Pending();
          }
  
          [Then]
          public void Then_I_will_be_logged_in_as_usernamea()
          {
              ScenarioContext.Current.Pending();
          }
  
          [Then]
          public void Then_my_account_will_be_assigned_the_role_of_Admin()
          {
              ScenarioContext.Current.Pending();
          }
  
          [Then]
          public void Then_I_will_get_an_error_message()
          {
              ScenarioContext.Current.Pending();
          }
      }
  </code></pre>