Questions tagged [specflow]

Behavior Driven Development for the .NET framework

SpecFlow can be used to make tests more readable for the business side of projects. This way the business side can get a quick and clear overview of what is being tested and roughly how it is being tested, without being troubled with technical details they don't have any knowledge about.

18 questions
7
votes
2 answers

Gherkin: What is a reasonable number of scenarios per feature?

I'm keen to get thoughts on a reasonable number of scenarios per feature in Gherkin. At what point do you start to thing about re-organising the feature to keep the number of scenarios at a manageable level?
David Osborne
  • 405
  • 4
  • 8
7
votes
3 answers

BDD in .NET - Chicken or Egg or..?

Predicate: I'm brand new to BDD / TDD, but I've done my homework. I'm trying to put everything I've read / learned into practice with VS2010, SpecFlow and NUnit. Things are working, but it's quickly becoming a chicken / egg scenario within a blur of…
Tom Tom
  • 173
  • 4
5
votes
3 answers

What advantages are there to using a BDD test tool like SpecFlow over simple unit test tools like MSTest?

I'm looking at BDD test tools, like SpecFlow, MSpec or NSpec, and I can't see from the examples what advantages they offer over simple unit test tools like MSTest. As far as I can see, when creating a BDD test I would write a test method similar to…
Simon Elms
  • 427
  • 4
  • 11
5
votes
2 answers

How abstract should you get with BDD

I was writing some tests in Gherkin (using Cucumber/Specflow). I was wondering how abstract should I get with my tests. In order to not make this open-ended, which of the following statements is better for BDD: Given I am logged in with email…
Newton
  • 151
  • 4
4
votes
2 answers

At which architecture level are you running BDD tests (e.g. Cucumber)

I have in the last year gotten quite fond of using SpecFlow (which is a .NET port of Cucumber) I have used it both to test a ASP.NET MVC application at the web layer, i.e. using browser automation, but also at the controller layer. The first gives…
Pete
  • 8,916
  • 3
  • 41
  • 53
4
votes
2 answers

Should SpecFlow be used with BDD as a solo developer?

I am a long time fan of TDD and after reading the RSpec book, would like to transistion to a BDD process. I like the idea of driving from the outside in, as it is presented in the book. What I am having a hard time getting a handle on is how to…
Erik L
  • 143
  • 5
2
votes
3 answers

How can I get the business analysts more involved in BDD?

I am a proponent of Behavior Driven Development, mainly with Cucumber and RSpec, and at my current gig (a Microsoft shop) I am introducing SpecFlow as a tool to help with testing. I'd like to get the business analysts on my team involved in writing…
Robert S.
  • 340
  • 1
  • 9
2
votes
1 answer

Side-by-side Functional and Acceptance Testing (SpecFlow)

Edit: I have found a closely related question: StackOverflow This question is not about the differences between functional and acceptance tests! Almost all the info I could find on the web just explains the difference between them. I know that…
2
votes
2 answers

Which style to use for features that are not directly driven by humans when using BDD Gherkin language?

Should they be written same way as human workflows, first person "I have entered..." style language etc.? Is the user effectively a gender-less "AI"?
Den
  • 4,827
  • 2
  • 32
  • 48
1
vote
1 answer

Behavior Driven Development - How to test "notification" step

I'm implementing the steps of a feature with Specflow and I have a problem with one of the steps. Here is the Scenario : Scenario: Cancel a yearly running subscription after legal retractation Given I'm logged as "patrickTho" And a…
OrcusZ
  • 129
  • 4
1
vote
3 answers

Should an imperative style be used if the parameters drive the outcome?

I have done a lot of BDD reading since the beginning of the weekend. At the moment I am reading about the imperative style v the declarative style. The imperative style is often described as an anti pattern like here:…
w0051977
  • 7,031
  • 6
  • 59
  • 87
0
votes
3 answers

How to arrange expected result model for test in a cleaner,readable way when the model contains many properties

In one of my projects I saw wrapping the expected results as a static variable in non static class. The reason for doing so is to make the code more readable, so that the massive expected result model wont clutter the code. From my point of view…
Anjo
  • 215
  • 1
  • 6
0
votes
2 answers

Testing a class that only has one field only that is an ID number

I am trying to incorporate BDD into the teams working practices to make interactions with Business Analysts more effective. I recently asked this question: Should I pass an ID number from the feature file? Please see the code below: public class…
w0051977
  • 7,031
  • 6
  • 59
  • 87
0
votes
3 answers

Should I pass an ID number from the feature file?

Say I have a domain object like this: public class Customer { private Guid _id; private string _name; private Address _address; public Customer (Guid id, string name, Address address) { if (id == Guid.Empty) …
w0051977
  • 7,031
  • 6
  • 59
  • 87
0
votes
2 answers

How to identify test result as "ignore" (not successful or unsuccessful) in process of execution?

We use Selenium webdriver + SpecFlow for testing our Web application. For some functionality, everything is clear. But imagine the situation: some questions arrive to Web user from external system he may answer. The test should "test" if the user…
Alexander
  • 101
  • 3
1
2