How do I know when to use test-based testing or false testing?

What are the scenarios, areas of the application / system, etc. best suited for "classic" state-based testing and mock objects?

+3
source share
6 answers

You must use mocks for dependencies. I do not think it is either; Usually, you create mocks for dependencies, set expectations on them (regardless of whether they are calls or states), and then start the device under test. Then you check his condition and check the expectations for bullying after that.

+3
source

I'm going to tackle this in terms of TDD / BDD, where tests run designs.

, , , , . Mocks Are not Stubs , .

, mockobjects Mock Roles, not Objects. book.

, , "" (, / ), . xUnit Test Patterns .

, / . , , , . MVC, , , , , , (, /), / . , - , / . , , mockobjects , .

, , , , 90% IoC/mocking/DIP - (ICustomerRepository/CustomerRepository), .

+9

mock- , .

+3

, , , , , . .

-, , , , ..

, , -, Model/View/Controller-or-Presenter, Presenter First (Google it), . , /.

+1

. Mockist vs Classic TDDers.
.. , , . Mocks ; , , IO ( , DB, ), .., .

0

TDD'er, , . , , . - , , .

, . , , , .

- , "" unit test , "" unit test. , / , mocks-stub, .

- . " ?", .

0

Source: https://habr.com/ru/post/1696785/


All Articles