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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With