title: How to create a plugin for Specflow Feature-level Templates
body: <p>The idea of a "Feature Outline" has been a request for at least 10 years
  <a href="https://groups.google.com/forum/#!topic/specflow/6bzgl9LYOFI" rel="nofollow noreferrer">https://groups.google.com/forum/#!topic/specflow/6bzgl9LYOFI</a></p>
  
  <p>With many same or similar requests here in stackoverflow:</p>
  
  <p><a href="https://stackoverflow.com/questions/22644835/specflow-feature-level-templates/22773085#22773085">Specflow Feature-level Templates</a></p>
  
  <p><a href="https://stackoverflow.com/questions/45292636/is-there-a-feature-outline">Is there a Feature Outline?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/48500608/can-i-run-a-feature-multiple-times-in-specflow">Can i run a feature multiple times in SpecFlow?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/33349847/specflow-maintain-one-examples-table-for-many-scenario-outlines?rq=1">Specflow: maintain one Examples table for many Scenario Outlines</a></p>
  
  <p><a href="https://stackoverflow.com/questions/8120779/sharing-a-common-set-of-examples-across-multiple-scenario-outlines-in-specflow?rq=1">Sharing a common set of Examples across multiple Scenario Outlines in Specflow</a></p>
  
  <p><a href="https://stackoverflow.com/questions/59146845/specflow-equivalent-to-parameterized-test-fixture?rq=1">SpecFlow equivalent to parameterized test fixture</a></p>
  
  <p><a href="https://stackoverflow.com/questions/58992647/using-a-background-step-like-an-outline-step">Using a background step like an Outline Step</a></p>
  
  <p>There does not seem to be a solution for it.  I'd like to build such a plugin. How can I create a plugin for Specflow Feature-level Templates? (Can you provide some direction and/or samples?  What type of plugin  <a href="https://github.com/SpecFlowOSS/SpecFlow/wiki/Plugins" rel="nofollow noreferrer">https://github.com/SpecFlowOSS/SpecFlow/wiki/Plugins</a> , or is it multiple plugins?) </p>
  
  <p>The requirement is to have SpecFlow execute the same feature file with different data/parameters.
  The data can be defined as "Feature Examples", and those examples could be specified inline, or source it from an external file or database.  <strong>For each line in the feature examples, execute the entire feature with the parameters from the one line.</strong></p>
  
  <p>To paraphrase from the first link above: "   ... a "Feature Outline" would run all scenarios using a sequence of common parameters. Something like:</p>
  
  <pre><code>Feature Outline:
  
  Background:
      Given I have opened the application using &lt;browser&gt;
  
  # Scenario 1...
  #  the scenario would reference the parameters of one/current feature examples row
  # Scenario 2...
  
  Feature Examples:
  | browser      |
  | firefox      |
  | iexplore     |
  | googlechrome |
  </code></pre>
  
  <p>Or, sourced externally, similar to how the Excel plugin specifies it:</p>
  
  <pre><code>@source:FeatureExamples.xlsx
  Feature Examples:
  | browser      |
  </code></pre>
  
  <p>However, my preference, it would be expressed more succinctly, and follow existing Gherkin language.  I.e. not introduce additional keywords, by just having a @source associated with the "Feature" keyword:</p>
  
  <pre><code>@source:FeatureExamples.xlsx
  Feature: Calculator
  
  Scenario Outline: Add two numbers
      Given I have entered &lt;a&gt; into the calculator 
      And I have entered &lt;b&gt; into the calculator 
      When I press add
      Then the result should be &lt;result&gt; on the screen 
  Examples:
      | case | a | b | result |
  </code></pre>
  
  <p>The Examples 'header row' would be allowed to specify just the columns needed by that scenario (even though the feature row data would have columns needed across all the scenarios). To support 'inline' examples, the @source could also look like:</p>
  
  <pre><code>@source: {
      | case     | a  | b  | result |
      | example1 | 10 | 20 | 30     |
      | example2 | 40 | 50 | 90     |
   }
  </code></pre>
  
  <p>(or csv, or JSON, etc. ;)</p>