7 votes
Accepted

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

The term "BDD" was coined by some TDD practitioners to solve a specific problem: when teaching TDD, the most important hurdle to overcome, is to understand that TDD is not about testing. Dan North ...
Jörg W Mittag's user avatar
6 votes

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

The first thing to know is the the person that coined the BDD term (Dan North) doesn't use such tools. He uses standard unit test tools. The supposed advantage is the easiness to transform structured ...
Miyamoto Akira's user avatar
4 votes
Accepted

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

I don't know if I agree with your premise. And I think you are kind of conflating a bunch of ideas and terms. functional testing is any testing that tests the functions of your system. this may be ...
Fran's user avatar
  • 859
3 votes
Accepted

Behavior Driven Development - How to test "notification" step

If the user of your system can choose what mechanism gets used for sending notifications to them, then I would add an additional notification mechanism "Inform test runner" that is set as ...
Bart van Ingen Schenau's user avatar
3 votes
Accepted

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

Normally when people talk about declarative versus imperative, it's done to avoid overly detailed elements in scenarios which would become hard to maintain. So for instance, this would definitely be ...
Lunivore's user avatar
  • 4,242
3 votes

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

To answer your question, you have to ask who expects to see the results of the test. We use it as a form of acceptance testing. BDD is intended to provide a bridge between what your customer asks ...
Berin Loritsch's user avatar
2 votes

Should a test scenario prepare all of its required data?

You shouldn't have to have a production working database in order to run your tests. Also, querying and altering a production database when doing tests is generally a pretty bad idea. You want your ...
Steve Chamaillard's user avatar
2 votes

Should a test scenario prepare all of its required data?

The best practice is a third option. You create a separate test database with known contents and you write your tests against that. In between test cases, or in the set-up a test case, you make sure ...
Bart van Ingen Schenau's user avatar
2 votes

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

The preferred situation is that you mock the external system and then create two tests: one to verify the behavior when there are questions to be shown and another to verify the behavior when there ...
Bart van Ingen Schenau's user avatar
2 votes

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

It will be hard to get an answer that will satisfy you, because everyone who is answering is biased in some way (including myself of course). I think (or at least I hope) that the hype is not about ...
Gaspar Nagy's user avatar
2 votes

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

What I've often done for large objects like this (which should be avoided if possible, but can't always be avoided) is to dump the object into a JSON file (you could of course use any handy/useful ...
Michael's user avatar
  • 6,457
1 vote

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

Your points One thing you may have glossed over, which can change your outlook on things, is that const values are inherently static. While they each serve a different purpose, there is some ...
Flater's user avatar
  • 49.8k
1 vote

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

The point that the article is making relates to the idea that user stories should deal with what the feature is, not how it should be implemented. Thus a story that talks in terms of "and the user ...
David Arno's user avatar
  • 39.3k
1 vote

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

That constructor has behaviour, so testing it might be sensible. In particular: why is this code being written if not to make a test pass? A test that just checks that an object was created is an ...
amon's user avatar
  • 134k
1 vote
Accepted

Should I pass an ID number from the feature file?

I may be misunderstanding what a "domain object" is, but I'm assuming it's some sort of entity, ie its part of your application's model that is persisted to eg a database. Assuming that's correct, ...
David Arno's user avatar
  • 39.3k
1 vote

Should I pass an ID number from the feature file?

I believe that, as a rule, you want to keep the logical separation between incidental implementation details and those bits of signal that are relevant to your test scenarios. In your case, name and ...
VoiceOfUnreason's user avatar
1 vote

SpecFlow scenarios - covering different websites

I would put it in the app.config file, so you define which website to test for all your tests in one place. You could combine this then with a config file transformation to get more flexibility. One ...
Andreas Willich's user avatar

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