specflow

How to Configure Specflow 3.0.199 with NUnit 3.11?

蓝咒 提交于 2020-01-11 13:57:45
问题 I have done this a couple of times before, but it's not working today. Am I missing something? I want to configure Specflow from the scract, using NUnit and to execute inside Visual Studio. I've seen many tutorials but they are not working to me :P. I'm trying to use the latest versions. These are the steps I'm doing on Visual Studio 2017: Create a test project (.NET Framework) Install Specflow plugin for Visual Studio (Tools > Extensions and Updates) Delete reference of MSTests from the

How to use ScenarioStepContext in hook?

瘦欲@ 提交于 2020-01-06 06:13:27
问题 I am using SpecFlow with NUnit3 and am trying to access the step context within a hook. I am running the tests in parallel so not using any static instance contexts, but using the parameter resolving feature of SpecFlow. With a hook like below, the ScenarioContext instance resolves fine, but the ScenarioStepContext causes the binding to throw error: Primitive types or structs cannot be resolved: TechTalk.SpecFlow.Bindings.StepDefinitionType (resolution path: TechTalk.SpecFlow

How to use ScenarioStepContext in hook?

与世无争的帅哥 提交于 2020-01-06 06:11:41
问题 I am using SpecFlow with NUnit3 and am trying to access the step context within a hook. I am running the tests in parallel so not using any static instance contexts, but using the parameter resolving feature of SpecFlow. With a hook like below, the ScenarioContext instance resolves fine, but the ScenarioStepContext causes the binding to throw error: Primitive types or structs cannot be resolved: TechTalk.SpecFlow.Bindings.StepDefinitionType (resolution path: TechTalk.SpecFlow

Specflow - How to pass parameter in Scenario outline description

99封情书 提交于 2020-01-06 03:14:26
问题 Please can you help me in providing an solution on how to pass parameter in Scenario outline description of Spec Flow? Please see below for an example: Scenario Outline : Testing **<Application>** Given I navigate to <Application> Then I should see Home page Examples: | Application | | Test | | Test1 | I know this is possible in Cucumber but don't know the way to do it in Specflow. Appreciate your response. Thanks in advance. 回答1: There is no benefit in doing this. Just write a generic

How to run feature files in parallel when using specflow/specrun?

痴心易碎 提交于 2020-01-04 19:10:16
问题 I am implementing a project for the proof of concept and here is what i am using: VS 2013,MSTest/Test Explorer, Specflow and specrun I have created 3 specflow feature files, each having it's own sets of different scenarios. When I run these tests from test explorer i can successfully see all the scenarios in each feature file running one by one and that's absolutely fine. Next, I want to run all the 3 feature files in parallel. Is there a way to do this? All my feature files are completely

Why should we use coded ui when we have Specflow?

こ雲淡風輕ζ 提交于 2020-01-02 01:55:13
问题 We have utilized Specflow and WatIn for acceptance tests at my current project. The customer wants us to use Microsoft coded-ui instead. I have never tested coded ui, but from what I've seen so far it looks cumbersome. I want to specify my acceptance tests up front, before I have a ui, not as a result of some record/playback stuff. Anyway, can someone please tell me why we should throw away the Specflow/watin combo and replace it with coded ui? I've also read that you can combine specflow

Global [BeforeScenario], [AfterScenario] steps in SpecFlow

只愿长相守 提交于 2020-01-01 09:32:45
问题 We're trying to implement global hooks on our specflow tests and are not entirely sure how [BeforeScenario] and [AfterScenario] attributed methods work. The way I've seen it done, those attributes are always defined in a class containing specific steps used in a few scenarios. Can they go somewhere so they apply to all scenarios? Or does attributing the methods with [BeforeScenario] and [AfterScenario] cause them to be run for all scenarios, regardless of where they're actually placed? 回答1:

Global [BeforeScenario], [AfterScenario] steps in SpecFlow

非 Y 不嫁゛ 提交于 2020-01-01 09:31:43
问题 We're trying to implement global hooks on our specflow tests and are not entirely sure how [BeforeScenario] and [AfterScenario] attributed methods work. The way I've seen it done, those attributes are always defined in a class containing specific steps used in a few scenarios. Can they go somewhere so they apply to all scenarios? Or does attributing the methods with [BeforeScenario] and [AfterScenario] cause them to be run for all scenarios, regardless of where they're actually placed? 回答1:

How do I do unit & integration testing in a BDD style in ASP.NET MVC?

[亡魂溺海] 提交于 2020-01-01 02:28:10
问题 I am learning Behavior Driven Development with ASP.NET MVC and, based on a post from Steve Sanderson, understand that BDD can mean, at least, the following test types: individual units of code & UI interactions. Something similar is mentioned in this post. Do I need two different test frameworks if I want both unit and integration testing? Unit testing repositories, controllers, & services using a context/specification framework, like MSpec. The results of testing with this will be useful to

Cuke4Nuke or SpecFlow?

拥有回忆 提交于 2019-12-29 11:48:11
问题 I am trying to decide if I should use Cuke4Nuke or SpecFlow. What are the pro/cons of each? Opinions on which is better and why. Thanks! 回答1: (I might be biased because I am involved with SpecFlow, but here my thoughts...) Cuke4Nuke is very close to Cucumber. This promises a lot of advantages: Compatibility Getting new features from Cucumber when Cucumber evolves (at least in theory, but language support is an example for this) Being a real part of the Cucumber community and the Cucumber