specflow

How to run specflow feature files in parallel?

假如想象 提交于 2019-12-10 22:55:48
问题 I am using specflow with NUnit on Saucelabs. I need to run features files in parallel . But I read somewhere that you cannot run in parallel if you are using ScenarioContext/FeatureContext which I am currently using in almost every test scenario. Is it true ? If true , what alternative can I use for multi threading. Please note that there is no dependency between the features or between the testcases in features. Can anyone provide a code snippet to help me implement parallel execution.

could not find schema information for the element 'specflow' Visual Studio Professional 2013

六眼飞鱼酱① 提交于 2019-12-10 22:26:31
问题 I am compiling my webdriver C# code in Visual Studio professional 2013 I have installed Specflow I get the following error could not find schema information for the element 'specflow' My AppConfig file has the following settings: <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" /> </configSections> <specFlow> <!-- For additional details on SpecFlow

How can I run automated bdd UI tests using NUnit and SpecFlow in particular order driven by categories

懵懂的女人 提交于 2019-12-10 18:46:12
问题 I need help running an automated UI tests by Continuous integration. I have around 200 test cases but they are not written following some good practices and they are depending each other. I am a dev not a QA and I don't know what is happening in details so excuse me if i am not right for something. This is what i can see : 1. The tests are BDD 2. They are written with SpecFlow 3. NUnit is used as test executor The system is a bit complicated and it is hard to write tests without dependencies

Invoking browsers with Baseclass.Contrib.Specflow in C# using Browser.Current

喜欢而已 提交于 2019-12-10 18:05:01
问题 I'm currently trying to use Selenium Grid 2 to run automation tests on multiple browsers. During my research I came across using Baseclass.Contrib.Specflow which enables me to use the browsers as tags in the feature files without having to declare it in my main driver class. The problem I have is that one of the blogs I read had the following as the set up code [SetUp] public void Test_Setup(){ CurrentDriver = Browser.Current;} My app config file looks contains the following: <components> <!-

F# mutable list is null

梦想与她 提交于 2019-12-10 16:55:47
问题 When I try to run the code below, properties is null. Why is that? I assign an empty list to properties, but the first time through the loop, it is null. This causes it to drop the first value that I append to it. I do not understand this either. It seems that a value concatenated with a null should be list of the value. [<TechTalk.SpecFlow.Binding>] module FSharpLeftistHeapStepDefinition open TechTalk.SpecFlow let mutable properties = [0] let [<Given>] ``I have a list with the following

Updating the name of SpecFlow scenario outline variations

做~自己de王妃 提交于 2019-12-10 12:46:47
问题 I have this feature file: Scenario Outline: Example Given I am a user When I enter <x> as an amount Then the result should be <result> Examples: | x | result | | 3 | 3 | | 1 | 1 | My issue is that after it's run, each example is labeled as variant # Is there a way to name what each example line is actually testing, so that in the report, we know better what is tested, not just: Scenario: Example, Variant 0 Scenario: Example, Variant 1 Scenario: Example, Variant 2 I'm trying to help our

Given-When-Then scenarios for Webservice calls

孤人 提交于 2019-12-10 11:42:34
问题 We are using Specflow for automating our regression suite but now we would like to take it to a next level of automating our webservices. Using the Gherkin “Gven-When-Then”, how can I use / write the webservices calls. For e.g : How do I write my given - when - then for the below request? <ns:request> <ns1:ServiceAuthenticationRequest> <ns1:Password>?</ns1:Password> <ns1:Station>?</ns1:Station> <ns1:UserName>?</ns1:UserName> </ns1:ServiceAuthenticationRequest> … </ns:request> 回答1: Unless you

Reuse background definition between two feature files in Specflow

末鹿安然 提交于 2019-12-10 11:28:06
问题 I have several specflow .feature files to test different entities of a web api project. For every entity I have to create a background with all the needed data in my database, but before of all I need to delete all data, and need to delete using web api calls (not by sql query). I'm doing this: Background: Given I make a new request to localhost on port 53364 And the path is api/voipport/deleteAll And the request type is Delete When the request has completed Given I make a new request to

How to navigate to feature file from resharper test session window in Visual Studio 2012?

≡放荡痞女 提交于 2019-12-10 10:02:45
问题 For acceptance testing I use TeckTalk SpecFlow in Visual Studio 2012. When I run all specflow scenarios, resharper unit test session windows is opened I can see all test results. Like on screen shot below. The question is, when I see failed test (scenario) in some feature file, how can I navigate directly to this feature file from resharper session window to edit it??? 回答1: It seems to work perfectly well if run via the new VS2012 Test explorer, which on my machine worked automatically from

Using specflow for WPF in MVVM

旧巷老猫 提交于 2019-12-10 08:29:26
问题 I am trying specflow for the first time for a WPF project with MVVM pattern. So, I have repository, controller, view and view model. Repository makes calls to webservice wich hits the database and gives back the data. View model has methods to validate the input from the user and make calls to repository methods. In my specflow, should I be making a complete call including the repository methods or should I mock those methods using Moq? Does it make sense? 回答1: The short answer: You could