specflow

Run SpecFlow tests without Visual Studio

戏子无情 提交于 2019-12-10 02:30:43
问题 I would like out QA team to be able to run SpecFlow tests. I would like them to be able to change values and append more scenarios. These appended scenarios will have matching step definitions, so they only need to modify the features. The QA team does not have access to Visual Studio. Is it possible to achieve this without using Visual Studio? We are currently using MS Test but we are willing to use NUnit if that will help. 回答1: Yes - there is a 'simple' way. Since SpecFlow merely generates

Specflow test step inheritance causes “Ambiguous step definitions”

…衆ロ難τιáo~ 提交于 2019-12-10 01:23:48
问题 I want to have the following test step class structure: [Binding] public class BaseStep { [Given(@"there is a customer")] public void GivenThereIsACustomer(Table table) { HandleCustomer(table); } protected virtual void HandleCustomer(Table table) { } } [Binding] public class FeatureOneStep : BaseStep { protected override void HandleCustomer(Table table) { // feature one action } [Given(@"feature one specific step")] public void GivenFeatureOneSpecificAction(Table table) { // do something } }

Specflow Feature files with same steps causing multiple browser instances to launch

穿精又带淫゛_ 提交于 2019-12-09 05:46:15
问题 I have at least 3 .feature files in my C# Specflow tests project in which I have the step, for instance: Given I am at the Home Page When I first wrote the step in the file Feateure1.feature and created the step method, I placed it in a step file, let's say, Steps1.cs , which inherits from a base class that initializes a FirefoxDriver . All my StepsXXXX.cs classes inherit from this base class. Then, I wrote Feature2.feature , which also has a step Given I am at the Home Page . And the step

SpecFlow and complex objects

断了今生、忘了曾经 提交于 2019-12-09 04:07:02
问题 I'm evaluating SpecFlow and I'm a bit stuck. All samples I have found are basically with simple objects. Project I'm working on heavily relies on a complex object. A close sample could be this object: public class MyObject { public int Id { get; set; } public DateTime StartDate { get; set; } public DateTime EndDate { get; set; } public IList<ChildObject> Children { get; set; } } public class ChildObject { public int Id { get; set; } public string Name { get; set; } public int Length { get;

SpecFlow + VSTS/TFS 2015

末鹿安然 提交于 2019-12-09 03:42:27
Using the new build system in TFS2015/VSTS, my SpecFlow tests aren't getting picked up. Within the same project, classes and methods decorated with [TestClass] and [TestMethod] , respectively, are picked up and tested by TFS. What are the basic requirements for TFS2015/VSTS to run a SpecFlow 2.0 test? EDIT: Adding packages.config contents. As you can see, I have SpecRun installed, and from within Visual Studio, I'm able to run SpecFlow tests as I'd expect (i.e. they all appear in Test Explorer) <?xml version="1.0" encoding="utf-8"?> <packages> <package id="NUnit" version="3.0.1"

specflow disabled, SpecflowPackagePackage didnt load correctly

柔情痞子 提交于 2019-12-08 20:25:54
问题 I am having an issue with Specflow remaining disabled in Visual Studio extensions. When I start VS I get an error SpecflowPackagePackage didn't load correctly. I tried to uninstall and reinstall specflow but it seems weird. When I uninstall it says uninstall successful and asks to restart VS. When I restart Specflow is still there but disabled. Using Visual Studio 2015, Update 3, 64bit. Windows 10. Specflow Version 2017.1.6 回答1: I had a similar problem. However, it's happened for me on Visual

Techtalk.Specflow error: Could not load assembly file or assembly

北城余情 提交于 2019-12-08 19:14:18
问题 I have seen this question before but I believe it was not resolved. Basically my set up is this: VS 2015 Specflow ver 1.9.0 (I downgraded to this from 2.1.0 based on other question which didn't help) When I try to build my project, it comes with the follwoing error: #error Generation error: Could not load file or assembly 'TechTalk.SpecFlow, Version=1.9.0.77, Culture=neutral, PublicKeyToken=0778194805d6db41' or one of its dependencies. The system cannot find the file specified. 回答1: Check

How to get VS2010 to recognize my mstests generated by SpecFlow?

荒凉一梦 提交于 2019-12-08 17:36:24
问题 I have configured Specflow to target the MsTest framework (instead of NUnit) by specifying it like this in the app.config of my 'specs' class library: <configSections> <section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow"/> </configSections> <specFlow> <unitTestProvider name="MsTest.2010" /> </specFlow> So once it's in place, I can see that my test fixtures are produced correctly by the Specflow custom tool, with correct

SpecFlow wrongly using NUnit

牧云@^-^@ 提交于 2019-12-08 14:54:07
问题 I've just (today) tried SpecFlow for the first time. I'm playing about by creating a new class library in VS2010 Pro and adding a SpecFlow Feature Definition file. Thing is, the integration doesn't appear to be working properly, with a variety of different errors. I've selected MsTest as the test runner, because I can't be bothered with invoking NUnit (I'd like to use NUnit in the long term but at the moment I just want to get some BDD code working). The generated code files however continue

I cannot get specflow's code behind files to regenerate

独自空忆成欢 提交于 2019-12-08 13:09:24
When I edit a specflow feature file test, it doesn't update the code-behind file. When I try to manually regenerate the code-behind files by right-clicking the project and choosing 'Regenerate Feature Files' I get an error: Error: cannot find custom tool 'specflowsinglefilegenerator' on this system I've discovered that this usually means I don't have Specflow Extention installed. However, when I look in Extensions and Update in Visual studio I can see that 'Specflow for Visual Studio 2017' is installed. If anyone knows what I can do that would be very helpful. This started when I re-cloned the