specflow

SpecFlow equivalent to parameterized test fixture

点点圈 提交于 2021-01-28 10:20:42
问题 I’m using SpecFlow to write a set of tests, and I’d like to run each test multiple times, with different input data. I could do this with scenario outlines, but I want to run every scenario in the feature file with the same test cases. I know I can use the Background to share the setup for one case, but I’m looking for something like a cross between Background and Scenario Outline, where I can supply a table of data to the Background and run the entire feature file once per row. In NUnit, I’d

Specflow Feature-level Templates

左心房为你撑大大i 提交于 2021-01-27 21:03:31
问题 I'm trying to execute an entire SpecFlow Feature using three different UserID/Password combinations. I'm struggling to find a way to do this in the .feature file without having to introduce any loops in the MSTest. On the Scenario level I'm doing this: Scenario Template: Verify the addition functionality Given the value <x> And the value <y> When I add the values together Then the result should be <z> Examples: |x|y|z| |1|2|3| |2|2|4| |2|3|5| Is there a way to do a similar table at the

Rerun failed tests using Specflow.Retry

江枫思渺然 提交于 2021-01-24 09:36:04
问题 I'm trying to rerun failed tests in specflow using specflow.retry plugin https://github.com/DamirAinullin/specflow-retry Here is my App.config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> <unitTestProvider name="nUnit" /> <plugins> <add name="SpecFlow.Retry.Generator" path="..\packages\SpecFlow.Retry.2.4.0\lib\net45" type="Generator" /> </plugins> </configuration> I'd appreciate any help if someone gives a hint what's wrong from my side Here is a few warning that i get on

Rerun failed tests using Specflow.Retry

时间秒杀一切 提交于 2021-01-24 09:35:31
问题 I'm trying to rerun failed tests in specflow using specflow.retry plugin https://github.com/DamirAinullin/specflow-retry Here is my App.config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> <unitTestProvider name="nUnit" /> <plugins> <add name="SpecFlow.Retry.Generator" path="..\packages\SpecFlow.Retry.2.4.0\lib\net45" type="Generator" /> </plugins> </configuration> I'd appreciate any help if someone gives a hint what's wrong from my side Here is a few warning that i get on

'System.Dynamic.ExpandoObject' does not contain a definition for 'UserName' in Specflow C#

时光毁灭记忆、已成空白 提交于 2021-01-07 02:35:27
问题 I am getting an error that says: 'System.Dynamic.ExpandoObject' does not contain a definition for 'UserName' Here is my code also it Specflow, Selenium, and Visual Studio Scenario Feature: OasisLogin Login to Oasis application Scenario: Perform Login to Oasis application site Given I launch the application #And I click login link And I enter the following details | UserID | Password | | admin | password | And I click login button Then I should see Dashboard details link Step Definition

SpecFlow - Retry failed tests

杀马特。学长 韩版系。学妹 提交于 2020-12-29 12:48:49
问题 Is there a way to implement an AfterScenario hook to re-run the current test in case of Fail? Something like this: [AfterScenario("retry")] public void Retry() { if (ScenarioContext.Current.TestError != null) { // ? } } Note : The tests in my project are combined in Ordered tests and executed via MsTest . 回答1: The purpose of Specflow scenarios is to assert that a system is behaving as expected. If some temporal issue causes the test to fail, then getting the test to re-run and "hoping for the

Can you tag individual examples in a scenario outline in SpecFlow?

萝らか妹 提交于 2020-12-26 14:19:51
问题 Scenario outlines are very handy for creating data driven tests, but the number of scenarios increases with the number of examples. I've gotten in the habit of tagging scenarios to make it easier to filter on major features of our application. I would like to set up a "smoke test" that hits all the major use cases. Some of these use cases are captured in scenario outlines that perform boundary testing on dates or numbers, but I just want to hit that one prototypical case within the examples.

Can you tag individual examples in a scenario outline in SpecFlow?

匆匆过客 提交于 2020-12-26 13:53:15
问题 Scenario outlines are very handy for creating data driven tests, but the number of scenarios increases with the number of examples. I've gotten in the habit of tagging scenarios to make it easier to filter on major features of our application. I would like to set up a "smoke test" that hits all the major use cases. Some of these use cases are captured in scenario outlines that perform boundary testing on dates or numbers, but I just want to hit that one prototypical case within the examples.

Can you tag individual examples in a scenario outline in SpecFlow?

不羁的心 提交于 2020-12-26 13:51:43
问题 Scenario outlines are very handy for creating data driven tests, but the number of scenarios increases with the number of examples. I've gotten in the habit of tagging scenarios to make it easier to filter on major features of our application. I would like to set up a "smoke test" that hits all the major use cases. Some of these use cases are captured in scenario outlines that perform boundary testing on dates or numbers, but I just want to hit that one prototypical case within the examples.

Can you tag individual examples in a scenario outline in SpecFlow?

匆匆过客 提交于 2020-12-26 13:50:49
问题 Scenario outlines are very handy for creating data driven tests, but the number of scenarios increases with the number of examples. I've gotten in the habit of tagging scenarios to make it easier to filter on major features of our application. I would like to set up a "smoke test" that hits all the major use cases. Some of these use cases are captured in scenario outlines that perform boundary testing on dates or numbers, but I just want to hit that one prototypical case within the examples.