Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on rails difference between Integration and Functional testing

I am wondering, if I use Integration testing, is functional testing necessary? And what about Acceptance testing? I am struggling to understand, if I can stick to Integration testing and then just forget about Functional testing?

like image 912
Mads Avatar asked Apr 08 '12 10:04

Mads


2 Answers

From the official Rails guide:

In Rails, testing the various actions of a controller is a form of writing functional tests.

http://guides.rubyonrails.org/testing.html#functional-tests-for-your-controllers

Integration tests are used to test how various parts of our application interact.

http://guides.rubyonrails.org/testing.html#integration-testing

like image 190
David Morales Avatar answered Oct 19 '22 23:10

David Morales


Quick answer: integration testing is essentially a subset of functional testing, and acceptance testing is a form of functional testing.

I recommend reading the wikipedia articles on the subject. Keep in mind that the definitions of the various kinds of testing can be taken with a grain of salt.

like image 21
Michael Slade Avatar answered Oct 20 '22 01:10

Michael Slade