4

It depends The point of the Given/When/Then pattern is that it describes test preconditions (Given), actions (When), and expected results (Then) - very similar to the unit test arrange/act/assert pattern. In the example you've given the actions are implied: the user navigates to the website. Depending on what's needed to prove the user's access, that could ...


2

No, the when is the action you are testing. Why not write it as: Scenario: User has to open a website Given Joey (a typical user) that has access to the website When Joey visits the page Then Joey is be able to validate the page content You can technical skip step phases, you can also leave the implementation of a step empty. Sometimes I create ...


2

We have an example https://github.com/techtalk/SpecFlow.Plus.Examples/tree/master/SeleniumWebTest which adds screenshots to the report. Have a look at it. Full disclosure: I am one of the maintainers of SpecFlow and developer on SpecFlow+


1

Your specflow file should look like this: Then the Details page should display the rating zip code And the Details page should display | Parameter | Value | | ID | 5 | | Employee Count | 125 | And your code should look like this: [Then(@"the Details page should display")] public void DetailsPageShouldDisplay(Table ...


1

It all depends on the logic you intend on testing, and when the test fails, how large an area of the application you'll need to investigate. A full end-to-end test verifies data on screen. Doing this in BDD certainly replicates that test, but the behavior is what BDD is about. What behavior are you testing? How many reasons does your test have to fail? If ...


1

In this case , The only need for testing the backend database is when you doubt whether the browser is actually getting the data from the database or is it simple caching it in cache or browser local storage. So, if you want to ensure that's not what is happening, then use driver.quit() and open a new driver instance. This will be a new instance with all ...


1

Feels like the generation of the code behind is not working correctly. Specflow creates .cs file for each .feature file. This .cs file contains the "real" testcode that is found by the test-explorer. Each should be regenerated on each save, rebuild. We had to set the option "specflowsinglefilegenerator" to true. Suggest you try the options in the following ...


1

You seem good to go with some service testing. NUnit -> I want to use parallel test methods execution/calling with Priorities using C# similar to TestNG in Java. //Arrange //Act //Assert or //SetUp //Act //Assert //TearDown Both ideas are actually the same. Arrange is a Setup + Teardown. Specflow -> Gherkin ...


Only top voted, non community-wiki answers of a minimum length are eligible