c# - When using BDD specifications in a .NET project, why would one use both SpecFlow *and* MSpec? -


i repeatedly hear bdd enthusiasts advocate using both specflow , mspec in same project.

  • apparently specflow more suitable outside-in/ui tests. (for example, web tests simulate mouse-clicks, etc, using watin or similar.)

  • apparently mspec more suitable unit-tests.

now question - why use 2 frameworks incredibly similar , virtually same thing?

why not instead:

  • choose 1 bdd framework , stick it. use outside-in/ui tests, intended,
  • write unit-tests normally, established unit-testing framework (such nunit, mstest, etc)?

i thought reason adopt bdd can test behaviours, driven externally, means of integration tests.

i don't see how/why applies unit tests.

i agree darren. think partly cultural/learning thing.

if want have business actively collaborating on executable specification do, need business readability. need bdd tool, specflow.

for unit testing, "business" or other developers in team, constraint have write unit tests in way other developers can understand (e.g. it's not totally obscure code).

so whether use nunit, mspec or specflow unit testing should decided based on team feels comfortable , efficient. hard give concrete advise outside. if team fluent nunit , learning bdd/specflow, keep unit testing nunit. if team addicted given-when-then, makes sense try few unit-level bdd tool , see team likes best.

personally careful using plain-text-based (external dsl) tool (e.g. specflow) unit testing, rather go tools use fluent interfaces (internal dsl), mspec. know teams use specflow unit testing successfully.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -