You can implement a custom generator class (deriving from the MsTest
generator:
TechTalk.SpecFlow.Generator.UnitTestProvider.MsTestGeneratorProvider)
that you can configure in the app.config:
<unitTestProvider name="MsTest" generatorProvider="your-class-name,
your-assembly" />
the code should be something like (not tested):
public class MySpecialGenerator: MsTestGeneratorProvider
{
public override void SetTest(CodeMemberMethod memberMethod,
string title)
{
base.SetTest(memberMethod, title);
memberMethod.CustomAttributes.Add(
new CodeAttributeDeclaration(
new
CodeTypeReference("Microsoft.VisualStudio.TestTools.UnitTesting.HostTypeAttribute"),
new CodeAttributeArgument(new
CodePrimitiveExpression("VS IDE"))));
}
}
Br,
Gaspar