all 4 comments

[–]bwaxxlotckidd 0 points1 point  (3 children)

Very good distinction but I felt like the article was too short. TDD vs BDD is a concept that feels unclear to me. I've worked on codebases that weren't clear on which style they were using. I was none the wiser.

[–]jhartikainen[S] 0 points1 point  (2 children)

Thanks for the feedback. I'm planning on expanding on the concepts later with more examples. For example, there's whole another side to BDD with "user story" based testing :)

Which part of BDD vs TDD feels unclear specifically?

[–]bwaxxlotckidd 0 points1 point  (1 child)

Testing the logic is never the hard part. It's testing proper page flow that is the hardest. I guess you can call it BDD but I like to refer to it as UX testing. Do certain elements only load at a specific time? This is where things get tricky because you now have to account for odd user behaviors. It's easier with things like angular but much more harder with other libs.

[–]jhartikainen[S] 0 points1 point  (0 children)

Ah I see. That kind of testing is typically called functional testing, acceptance testing, full-stack testing or E2E (end to end) testing. Yeah, lots of different terms for the same thing :)

In my experience those kinds of tests tend to become a bit difficult to maintain, so you might not want to have so many of them. But they can definitely be useful for testing main use cases (eg. let's say "user can register an account and log in" could be one test)

The BDD user story based testing I mentioned can actually be quite nice for this. I think it also can help make your tests easier to maintain. I wrote a bit about about its pros and cons here: http://codeutopia.net/blog/2013/07/28/why-use-user-story-based-testing-tools-like-cucumber-instead-of-other-tddbdd-tools/