specflow

I cannot get specflow's code behind files to regenerate

那年仲夏 提交于 2019-12-08 08:50:40
问题 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

Loading NUnit project file (example.nunit) during Specflow feature execution

[亡魂溺海] 提交于 2019-12-08 06:01:55
问题 To enable environment configuration, I included an NUnit project as part of the SpecFlow BDD framework (as per Pass parameters via command line to NUnit ). But when I try to load it from the command prompt, I am getting the error message .\nunit-console-x86.exe : Unable to locate fixture. Command trying to run: nunit-console-x86.exe example.nunit /config:CI /run:"xxxx.Features.abcdFeature" $dll_dir /result=$result_dir The framework is as per SpecFlow and Selenium-Share data between different

Specflow - How to use combination of multiple tables in scenario

半城伤御伤魂 提交于 2019-12-08 05:59:31
问题 I am using Specflow to perform BDD tests. I am trying to test my navigation menu on multiple browsers. Particularly making sure that buttons are showing up accross browsers. I do not want to create a bunch of tests for each menu item specifically on each browser and I do not want to create a large table that goes over every browser/menu item combination. Is there any way to specify 2 tables and then create a single scenario that performs the combinations of both? For example: Menu Items Table

Preparing data for a SpecFlow scenario [closed]

别等时光非礼了梦想. 提交于 2019-12-08 04:26:12
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . I'm going to test a complex scenario which expects several other steps to have performed prior to it. For example , it can be equivalent to have proper data in a warehouse before goods are taken our from it. So in order for fetching to happen, it must first be made sure that

SpecFlow + VSTS/TFS 2015

[亡魂溺海] 提交于 2019-12-08 03:26:24
问题 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

Execute Test using updated .feature file without compilation

有些话、适合烂在心里 提交于 2019-12-08 03:18:37
问题 I want to be able to change my feature file from outside visual studio and have the updated feature file picked up, for subsequent test execution, without compilation of my test project. Is it possible to do this? Can someone help to specify the exact steps needed to do this? I am using MsTest. Here are the steps I followed, but I get the message "No tests to execute." every time: Change Test Project file (.csproj) as mentioned here Build the Test DLL from Visual Studio Kept the feature file

Make SpecFlow / Cuke4VS understand non-English .feature files

家住魔仙堡 提交于 2019-12-08 02:37:29
I'm trying to use SpecFlow in our (Visual Studio 2008) project to define executable acceptance tests. It was a decision made by the dev team to use our native German as the language for the feature files - so we added this little snippet of config to our test project: <configuration> <configSections> <section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow"/> </configSections> <specFlow> <language feature="de-DE" tool="" /> </specFlow> </configuration> Trouble is: neither the syntax highlighting with Cuke4VS in Visual Studio 2008 works, nor

Access TestContext in SpecFlow Step Binding class

点点圈 提交于 2019-12-07 13:48:39
问题 Is it possible to access the MSTest TestContext from within a SpecFlow (1.7.1) step binding class? In the generated code of a feature file there is a method FeatureSetup which takes the TestContext as an argument but apparently doesn't do anything with it. 回答1: I found a way to pass parameters to TestContext and then access them from SpecFlow. By adding a [TestClass] which has a TestContext property and marking its AssemblyInit() method as [AssemblyInitialize] so it gets initialized early

Performing keyboard strokes “Ctrl + A” “Ctrl + C” and “Ctrl + V” on text field with selenium C#

北战南征 提交于 2019-12-07 12:22:47
问题 How to simply want to input a value in a text box , select the complete text from the text box using "Ctrl+a" , then copy it using "Ctrl + c" and then Paste it in the same box with "Ctrl + v" using Selenium + C#. 回答1: [FindsBy(How = How.Id, Using = "search-criteria")] public IWebElement txtProductSearch1 = null public void copypaste(string strCopy) { txtProductSearch1.Click(); txtProductSearch1.Clear(); txtProductSearch1.SendKeys(strCopy); txtProductSearch1.SendKeys(Keys.Control + "a"); //a

Multiple Match bindings found on line with two different parameters

拥有回忆 提交于 2019-12-07 09:55:23
问题 I have written two lines(When's) in my same feature file When user $action1$ $key1$ with $value1$ for $atttributeType_Value$ in $Filename1_SectionId1$ Then abc When user $action2$ $key2$ with $value2$ in $Filename2_SectionId2$ Then def and corresponding step definition in step definition file as [When(@"user (.*) (.*) with (.*) for (.*) in (.*)")] public void abc() { //operation } [When(@"user (.*) (.*) with (.*) in (.*)")] public void def() { //operation } But, its showing up an error as