It makes sense to swing classes, so tests can be written early in the development life cycle.
There is a tendency to continue to use mock classes, even when specific implementations become available. There is also a tendency to develop against the false classes (and stubs) needed at the start of the project when some parts of the system were not built.
After a part of the system has been built, it is necessary to test it and continue testing against it (for regression). In this case, starting with mocks is good, but they should be discarded in favor of the implementation as soon as possible. I saw the fight projects because different teams continue to develop against the behavior of the layout, and not the implementation (after its appearance).
When testing for layouts, you assume that the layout is specific to the system. Often this involves guessing what the mocking component will do. If you have a specification of the system you are kidding, you need not guess, but often the as-built system does not meet the original specification due to practical considerations found during construction. Flexible development projects assume this will always happen.
Then you develop code that works with the layout. When it turns out that the layout does not really reflect the behavior of the real embedded system (for example, latency problems that are not observed in problems with layouts, resources and efficiency that are not observed in layouts, concurrency problems, performance problems, etc.), you then have a bunch of useless tantalizing tests that you should now support.
I believe that the use of layouts is valuable at the beginning of development, but these bullying should not contribute to the scope of the project. It is best later if the mockery is removed and the correct integration tests are created to replace them, otherwise your system will not be tested for many conditions that your layout did not imitate (or imitates incorrectly relative to a real system).
So the question is whether to use mocks, whether to use them, and when to remove them.
Moa Oct 27 2018-10-27 22:14
source share