specflow

How to run multiple specflow projects through cmd?

回眸只為那壹抹淺笑 提交于 2021-02-08 11:44:37
问题 I have numerous .Net Framework class library projects, all with specflow and specrun.specflow nuget packages installed. I'm able to run all these projects in the Test explorer of Visual Studio 2019 but I want to know if this can be run using cmd prompt. I'm planning to automate by creating a batch file to run all the projects through cmd without having to go test explorer in VS 2019 and run them manually Does anybody have any idea if this can be achieved? If possible, can you please share the

Sharing a common set of Examples across multiple Scenario Outlines in Specflow

故事扮演 提交于 2021-02-07 11:31:49
问题 Is is possible to share a common set of examples across multiple scenario outlines in Specflow without duplicating the set of examples for each outline? e.g. excuse the noddy example, but here the Examples are repeated for each Scenario Outline and I want to know if it's possible to declare those Examples once and use them for each Scenario Outline ? Feature: Just an example about animals Scenario Outline: Given an <animal> When something happens Then this should be the outcome Examples: |

specflow gives error after adding more string parameters

微笑、不失礼 提交于 2021-01-29 11:10:42
问题 Spec flow was working fine. I added some more string parameters in one of the Given statement and suddenly I start getting this error Class Initialization method AutomatedRediTests.RediFeature.FeatureSetup threw exception. BoDi.ObjectContainerException: BoDi.ObjectContainerException: Primitive types or structs cannot be resolved: System.String. at BoDi.ObjectContainer.ResolveObject(RegistrationKey keyToResolve, ResolutionList resolutionPath) in W:\SpecFlow\BoDi\BoDi\BoDi.cs:line 772 at BoDi

SpecFlow stop feature in case a scenario fails

和自甴很熟 提交于 2021-01-29 06:59:50
问题 I've started using SpecFlow rather recently in a WPF C# application, for UI testing. I have a feature that runs a series of chained scenarios, and I'd like to know if there is a way of stopping the execution of the feature if one scenario fails. I'm aware that the execution can be stopped if debugging, but I'm wondering if I can stop it while running. I've been thinking of trying to stop it in the [AfterScenario()] method. Can this be done? [AfterScenario()] public static void After() { if

Use of Scenario outline in passing the scenario name as example

社会主义新天地 提交于 2021-01-29 03:52:00
问题 Can I use scenario outline concept in scenario name in Specflow so that I pass the scenario name in Example. For example if I want to run my scenario in three browsers IE, FF and chrome, I'll pass three examples. I have tried it in Cucumber and it works, can I do it with Specflow in VS ? Like Scenario outline : <Scenario name> steps 1 step 2 Examples: |Scenario name| |scenario 1 | |scenario 2 | |scenario 3 | can I implement that ? 来源: https://stackoverflow.com/questions/36917437/use-of

SpecFlow equivalent to parameterized test fixture

别来无恙 提交于 2021-01-28 10:34:04
问题 I’m using SpecFlow to write a set of tests, and I’d like to run each test multiple times, with different input data. I could do this with scenario outlines, but I want to run every scenario in the feature file with the same test cases. I know I can use the Background to share the setup for one case, but I’m looking for something like a cross between Background and Scenario Outline, where I can supply a table of data to the Background and run the entire feature file once per row. In NUnit, I’d

SpecFlow equivalent to parameterized test fixture

陌路散爱 提交于 2021-01-28 10:32:09
问题 I’m using SpecFlow to write a set of tests, and I’d like to run each test multiple times, with different input data. I could do this with scenario outlines, but I want to run every scenario in the feature file with the same test cases. I know I can use the Background to share the setup for one case, but I’m looking for something like a cross between Background and Scenario Outline, where I can supply a table of data to the Background and run the entire feature file once per row. In NUnit, I’d

SpecFlow equivalent to parameterized test fixture

荒凉一梦 提交于 2021-01-28 10:22:26
问题 I’m using SpecFlow to write a set of tests, and I’d like to run each test multiple times, with different input data. I could do this with scenario outlines, but I want to run every scenario in the feature file with the same test cases. I know I can use the Background to share the setup for one case, but I’m looking for something like a cross between Background and Scenario Outline, where I can supply a table of data to the Background and run the entire feature file once per row. In NUnit, I’d

SpecFlow equivalent to parameterized test fixture

断了今生、忘了曾经 提交于 2021-01-28 10:21:47
问题 I’m using SpecFlow to write a set of tests, and I’d like to run each test multiple times, with different input data. I could do this with scenario outlines, but I want to run every scenario in the feature file with the same test cases. I know I can use the Background to share the setup for one case, but I’m looking for something like a cross between Background and Scenario Outline, where I can supply a table of data to the Background and run the entire feature file once per row. In NUnit, I’d

SpecFlow equivalent to parameterized test fixture

纵然是瞬间 提交于 2021-01-28 10:21:29
问题 I’m using SpecFlow to write a set of tests, and I’d like to run each test multiple times, with different input data. I could do this with scenario outlines, but I want to run every scenario in the feature file with the same test cases. I know I can use the Background to share the setup for one case, but I’m looking for something like a cross between Background and Scenario Outline, where I can supply a table of data to the Background and run the entire feature file once per row. In NUnit, I’d