Hooking up MSTest to Specflow

#specflow #bdd #testing

Posted by admin on September 01, 2019

Open up the App.config file in your Test project and add

<unitTestProvider name="MsTest" />

to the specFlow Element. The resulting XML should look like this...

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow"/>
  </configSections>

  <specFlow>
    <unitTestProvider name="MsTest" />
  </specFlow>
</configuration>

Next step is to regenerate your specflow features to use the new MSTest stuff... and Job Done!