specflow

Disable the TestResults folder

穿精又带淫゛_ 提交于 2019-12-11 07:26:17
问题 How can I configure SpecFlow to stop writing logs to the TestResults folder? I have spent the last few hours reading the documentation and I have also looked here: http://specflow.org/documentation/Configuration/ However, I am unable to find an answer. I assume there must be an app.config setting? Here is my app.config: <specFlow> <!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config --> <!-- For additional details on SpecFlow configuration

Console Application to launch Specflow features by code not using ncode runner

眉间皱痕 提交于 2019-12-11 06:19:19
问题 I have programmed an console application with c# for ranorex automation. Within the exe i have build i would like to kick off the specflow feature files manually. I believe I need to create a TestRunnerManager and trigger the run. Can anyone help? 回答1: Although not familiar with nunit, I guess like with mstest, attributes are used to mark methods in an assembly as tests. You could use reflection to find these methods in the assembly and invoke them 回答2: This question is similar in spirit to

Multiple Multi-Line Examples in SpecFlow Feature File

我们两清 提交于 2019-12-11 06:18:41
问题 This seems like one of those questions that, if you know the answer, it's obvious, and if you don't, it's impossible... How do I include a table of multi-line examples in a SpecFlow feature file? My example would be: Given there is some invalid input: | input | | """ Multi-line example 1 because there are multiple lines """ | | """Multi-line example 2 with even more lines than the previous example """" | When something interesting happens Then the error is shown Thanks in advance. 回答1: you

How to set up a URL variable to be used in NUnit/SpecFlow framework

本秂侑毒 提交于 2019-12-11 06:12:17
问题 I'd like to extend the Test Harness I have written in SpecFlow to be a bit more extensible, so what I would like to do is in the setup create a base URL variable that I can set depending on a flag I use on the Nunit runner. So if I send in Test as a Tag I want some URL value to be set to "http://test/" or for Development to set URL to "http://dev/". I know Global variables are not useful in NUnit, most of my previous scripting was in Perl where even then I used it on rare occasions. I'm not

Generating SpecFlow Reports with the CakeBuild Specflow plugin possible?

南楼画角 提交于 2019-12-11 04:50:13
问题 Is it possible to generate SpecFlow Reports with the CakeBuild Specflow plugin (CakeBuild SpecFlow) ? 回答1: Yes it's possible to create Test Execution report with Cake build. Here's a quick example using NUnit3 as test runner (other supported runners are MSTest, XUnit and NUnit2). #tool "nuget:?package=NUnit.ConsoleRunner" #tool "nuget:?package=SpecFlow" var target = Argument("target", "Default"); Task("Default") .Does(() => { SpecFlowTestExecutionReport(tool => { tool.NUnit3("/path/to/your

SpecFlow Teardown Opens and Closes Multiple Blank Browsers

岁酱吖の 提交于 2019-12-11 02:30:05
问题 I am in the process of converting a bunch of selenium test cases over to SpecFlow. Everything is working well but what is driving me crazy is that I am using an after scenario to do a driver.quit. When that executes, I have roughly 4-6 browsers opening and closing. In looking at the task manager, it is killing all of the chromedriver.exe (a second one is opened somewhere) and chrome.exe processes successfully which is great. If I run the same test in selenium, I just have one browser and it

Can I use tags in SpecFlow to determine the right environment to use?

偶尔善良 提交于 2019-12-11 02:08:14
问题 I have been working to get a SpecFlow framework in place for my Test environment, now I'd like to extend the ability to use this for multiple environments. I was wondering if I could do this with BeforeFeature so that I can use Tags to say which environment I want to run, and which tests I'd like to be able to do on any/each environment. Part of the problem I have in figuring this out is one of the Feature Scenarios I have to run contains an example table that will have different values for

Specflow stability

醉酒当歌 提交于 2019-12-11 01:41:33
问题 As the project I'm working on is growing, the number of tests is also growing. But, in my case, when the number of scenario's being tested increases, the stability of Specflow seems to be decreasing. Let me try to clearify: When I'm running, for instance, some test lists (with 5 to 10 scenario's) in Visual Studio 2010 separately, all the scenario's are passing. However, when I'm running all the test lists at once (something like 70 scenario's total), some scenario's fail, that in the

Having Tables in Example Table in SpecFlow

此生再无相见时 提交于 2019-12-11 01:21:17
问题 I am using SpecFlow with VisualStudio 2013 to test a particular web form which has the following layout ******************** Start: Form ****************** Name:________________ Age:_________________ Experience: Work place | Number of years | ___________ | _________________ | ___________ | _________________ | ___________ | _________________ | ___________ | _________________ | ******************** End: Form ****************** How do I write it so that I can feed from Example? Given ... When

pass variables as array specflow c#

左心房为你撑大大i 提交于 2019-12-10 23:09:20
问题 I am attempting to use Specflow to automate web tests using Selenium. So far, things are going mostly fine, but I am now running into a problem. One of my steps allow for a user to input a variable, the step looks like this: Given I click the (VARIABLE) Menu And the code behind it is fairly simple, just clicking on a link based on the text that is passed: driver.FindElement(By.XPath("Xpath to get to the variable")).Click(); However, there is a later step that must use this information. That