specflow

How to run SpecFlow tests in Visual Studio 2010?

落爺英雄遲暮 提交于 2019-11-28 17:04:11
问题 Trying to get SpecFlow running with a fresh VS2010 Professional install. Created a new console application and added references to NUnit and SpecFlow. Created a SpecFlow feature. The .feature with the default template code is created. Now I try to run this test, but I don't understand how. When I right-click the project (at the top-level), there is no "Run test(s)" option in the mouse drop down menu. Didn't the SpecFlow install correctly, am I missing some references or some other tool I need

In SpecFlow how can I share data between steps/features?

旧时模样 提交于 2019-11-28 06:14:56
I have 2 features that use a common 'When' step but have different 'Then' steps in different classes. How do I access, for example, the ActionResult from my MVC controller call in the When step in my two Then steps? jbandi In SpecFlow 1.3 there are three methods: static members ScenarioContext ContextInjection Comments: static members are very pragmatic and in this case not so evil as we as developers might first think (there is no threading or need for mocking/replacing in step-definitions) See answer from @Si Keep in this thread If the constructor of a step definition class needs arguments,

In Specflow can I run one test as a step of another?

扶醉桌前 提交于 2019-11-27 22:55:50
TL;DR; How can I create a specflow test that calls another test as its first step? Given I already have one specflow test And I want to run another test that goes deeper than the first test Then I create a second test that runs the first test as its first step And I add additional steps to test the deeper functionality Sorry, little bit of specflow humor there. eg I have a test that creates a sale already: Given I want to create a sales order And I open the sales order page And I click the add new order button Then a new sales order is created And I want to have another test that tests adding

How can I run Internet Explorer Selenium tests as a specific domain user?

*爱你&永不变心* 提交于 2019-11-27 21:15:23
问题 I have a ASP.NET MVC website that uses Windows Authentication to control access. I would like to have a specflow selenium test that checks the configuration is correct by attempting to visit the site as a non-authorised user. As we're using domain accounts to control access there isn't a username/password login screen. The credentials of the current user are automatically passed to the site by the browser. So for my Selenium test I need to be able to run Internet Explorer as a specific user.

Built tests are not added to the Visual Studio Test Explorer window

北战南征 提交于 2019-11-27 13:00:08
问题 I set up the SpecFlow plug-in for the Visual Studio 2013. I created new Feature Item and build it. Result: built test is not shown in the Test Explorer. Why? I do it according to this video 回答1: in order to configure it to generate MSTest tests you need to add this to your app.config: <specFlow> <unitTestProvider name="MSTest"></unitTestProvider> </specFlow> 回答2: I experience this same problem, but the solution was different. Following the advice on a SpecFlow Github issue, the following

In Specflow can I run one test as a step of another?

最后都变了- 提交于 2019-11-26 23:14:07
问题 TL;DR; How can I create a specflow test that calls another test as its first step? Given I already have one specflow test And I want to run another test that goes deeper than the first test Then I create a second test that runs the first test as its first step And I add additional steps to test the deeper functionality Sorry, little bit of specflow humor there. eg I have a test that creates a sale already: Given I want to create a sales order And I open the sales order page And I click the

SpecFlow and Selenium-Share data between different step definitions or classes

筅森魡賤 提交于 2019-11-26 22:27:02
问题 I just started using SpecFlow along with Selenium & N Unit. I have a basic question, maybe I know the answer to it, but want to get it confirmed. Consider, there are two features - Register and Add new transaction . Two separate features with their respective step definitions. How do I share the IWebDriver element across both the features? I do not want to launch a new browser again and add a transaction. I want to execute both as a flow. My thoughts are this functionality is not allowed

How do you run SpecFlow scenarios from the command line using MSTest?

荒凉一梦 提交于 2019-11-26 14:32:00
问题 I've got Visual Studio 2010, and we have two VS solutions we work with. The first is the web application, and the second is strictly for SpecFlow tests. Having two instances of Visual Studio running at the same time just to run SpecFlow features is eating all the available RAM causing things to slow down. I've done some searching on Google and here on StackOverflow, plus perused the MS documentation on the MSTest command line tool, but I haven't found the answer. The full SpecFlow test suite