How to decide when and when not to create an integration test

Is there a final process for deciding that you should create integration test suites in your codebase? I say ... "This part of my code meets criteria A, so tests should be created. This part of my code meets criteria B, so tests should not be created."

As my Rails application grows significantly in size, I add small features (compared to the overall structure), such as a field in the account Userthat determines whether a Usermeeting is allowed for he or she or he or she requires the parent to do this (I I understand that the consequences of this incorrect MAY be significant, but I'm just trying to figure out the subtleties of the implementation of this function).

Should integration tests be field-based - as in the case above? Or should they be more comprehensive and integrated? I believe that the transparent process is for yes or no to create integration tests. He exists?

+4
source share
2

, , , . , . , , , , , , : .

: " ", , , Rails , . , Rails.

. , . (BDD) , . , , - .

- , , / (, ), , .

(.. ), . , - , . , , .

, , , , - , , . - ( )

When I visit the new appointment page
And I create a new public appointment
And I visit my calendar
Then I see the public appointment

:

When there is an unrestricted user "Dad"
And there is a restricted user "Billy" supervised by "Dad"
And there is a user "Stalker"
When "Billy" visits the new appointment page
And "Billy" creates a new appointment
And "Billy" visits his calendar
Then "Billy" sees a pending appointment

When "Stalker" visits "Billy" calendar
Then "Stalker" does not see an appointment

When "Dad" visits "Billy" calendar
And "Dad" approves the pending appointment
Then "Dad" sees an appointment

When "Billy" visits his calendar
Then "Billy" sees an appointment

When "Stalker" visits "Billy" calendar
Then "Stalker" does not see an appointment

, , , (, , ). , .

+2

, , . , 2 3 , , - ( ), .
, , , , , . , ( ), , .

+1

All Articles