InaniELHoussain's avatar

What is the difference between Integration Test & BDD

Actually I've watched videos about BDD, and it seems for me its like integration test .... I'm confused now about the difference between both of them. I'm new to that domain

0 likes
6 replies
bobbybouwmann's avatar

BDD is just a way on how to approach developing your application. BDD is emerged from TDD. This means you still write the test first and then you implement the code. However BDD focuses more on a domain driven development(DDD) and object-oriented (OO) code.

You can use integration tests for BDD, but they are certainly not the same. You can also do integration tests without doing BDD. Like writing the tests after you have created the code.

InaniELHoussain's avatar

here I'm, Actually I have the code and it works, now I want to test it ( as I think I have to chose between integration test and BDD ) ? because when I've watched Jeff's videos about behat, I've noticed that its using the same methods such as visit and filling inputs (to some extent)

bobbybouwmann's avatar

You don't have to chose between integration tests and BDD. Integration tests are there to help you to work on a BDD way.

Integration tests: Integration testing is the phase in software testing in which individual software modules are combined and tested as a group.

This means that you can tests your forms, validation and controllers and underlying code at once without writing difficult unit tests that tests only one class at the time

BDD: BDD (Behaviour Driven Development) is a synthesis and refinement of practices stemming from TDD (Test Driven Development)

Source: http://guide.agilealliance.org/guide/bdd.html

InaniELHoussain's avatar

@bobbybouwmann thank you, I Guess I just realised that my real question is : between Acceptance tests & integration test ... when you write the feature and the scenario .... they seem the same for me

bobbybouwmann's avatar

Acceptance testing is for how it should work for the user. So let's say user press button X and the menu slides out. When you want to test this you call this acceptance tests. Integration tests are a bit lower than that, but they are higher than unit tests. So you can test for example a route in your application. If I visit route X I get X amount of posts in return and so on.

1 like

Please or to participate in this conversation.