Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can BDD testing with Lettuce replace all other forms of testing in a project?

I like Lettuce, and the feel of testing with it. Could I replace all the tests ( doctests/unit tests ) in a project with Lettuce features?

like image 807
Geo Avatar asked Oct 24 '11 14:10

Geo


1 Answers

In short, no.

I haven't used Lettuce, but your question applies equally to other BDD frameworks such as Cucumber.

This approach is considered bad practice since integration tests are slower to run and more work to maintain than unit tests.

Also, a big advantage of Gherkin syntax is that it's readable by non-technical stakeholders and it can focus on business rules, whereas unit tests generally deal with detailed implementation specifics at the class/function level not of particular interest to business-focused stakeholders.

There's sometimes an overlap between unit tests and integration/acceptance tests but in general you should aim to find an appropriate balance.

like image 87
Andy Waite Avatar answered Oct 05 '22 09:10

Andy Waite