1. 2

    Here is my talk about fakes/mocks, dual tests, associated issues and our solution: https://youtu.be/CzpvjkUukAs

    And here is more: https://blog.7mind.io/constructive-test-taxonomy.html

    1. 4

      I wonder how does the categorisation help thinking in the TDD process. It seems to me that such tags, although very precise when looking back at the tests that are already written, would be too much for me to remember and to think about upfront.

      1. 2

        There are manu possible classes but each axis is simple enough to remember. A team may need some time to get used to the idea but once it happens - it helps. So, technically when you write a test you always know that you shouldn’t break encapsulation, should try to concentrate on contracts and should avoid any integrations. When you need something apart of that - you may think a bit how to choose the class with minimal weight which would work for you. The same applies for refactorings - you always have some basic guidelines on how to make a test “better”.

        It’s very hard to explain people thinking in traditional terms why their whitebox-evil tests don’t return invested efforts.

      1. 5

        A more natural metric for “Isolation”: expression, method, class, file, package, library, application, container (or machine/OS/box), cluster (or intranet), internet. A sort of generalization of lexical scope, or global variables. You might also split it up by mutability; testing your application’s installer might need ‘read’ access all the way up to the internet for downloading dependencies, but require write access only up to the container.

        1. 4

          Thanks for the ideas, I’ve added them to the post.

        1. 1

          Actually it’s not a big deal to combine microservice approach with monolithic one. The missing concept is a “Role” - a software component which may be shipped independently but able to run in a process together with other components. OSGi would make a good example. Also you may check my slides here: https://github.com/7mind/slides/blob/master/02-roles/target/roles.pdf (Scala-specific)