简体   繁体   中英

Run Specflow Feature file with Nunit Console from 3.4 and above

I need to run my Speflow feature file with Nunit 3.6 console. Just need to know how can i run specific feature? As fixure is not supported anymore so just need to know what else can be used? Tried --test = but no luck.

I've tried below command line

%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe "C:\jenkins\workspace\Nunit_ME_Test\Automation\Automation.csproj"


C:\nunit\nunit3.7.0\nunit3-console.exe C:\jenkins\workspace\Nunit_ME_Test\Automation\bin\Debug\Automation.dll --test=ME_NTJ_Include

I have used -test=ME_NTJ_Include where "ME_NTJ_Include" is the feature file .I'm sure something is not right , can any one please help to resolve this .

Thanks

To learn exactly how SpecFlow is naming your tests at different levels, simply run all of them and examine the XML result file. The name you find there for FullName is what you would have to use with the --test option. Most likely, you are simply issing the namespace in which the fixture is defined.

For more flexibility, use the --where option. That would allow you to write, for example --where test=~ME_NTJ_INCLUDE for a partial match of the name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM