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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I have to disagree with Andy.
I do agree that the appropriate testing should be done at the appropriate time, and that unit tests (i.e. ones that do not interact with anything outside their unit) do not replace all other forms of testing.
But that doesn’t necessarily mean that with the proper separation you cannot use a BDD framework (I too haven’t used Lettuce) as the runner for your tests.
I too really like the fact that Gherkin syntax can be pushed back towards business experts, testers and sponsors as a means of capturing the process to follow, so I see no reason why one set of specifications can’t be aimed at the Unit level, but another could be aimed at the system and regression levels.
Consider this (contrived and obviously nowhere near enough granular) example
regressionTestPack1
I am also not saying that this is appropriate in ever case. You should evaluate what benefit you get from this approach over leaving all your tests in different test running systems. In particular consider what the experience base is of the people performing the testing.
So if you are writing a small technical project, as the only the developer and you prefer this syntax, theres no reason not too. Just be very careful you still isolate your unit tests from your system tests from your regression tests.
If however you are part of a large team of devs, testers, business analysts, then your case will need to much stronger and is unlikely to actually be valid.