Test order and good TDD

After some research into testing specifically unit/integration tests versus acceptance tests. And the order of execution. According to Jan Van Ryswyck who refers to these two types as solitary tests and socially tests (respectively) it helps to run the unit/integration tests before the acceptance tests for faster feedback. I’m curious the thoughts on this in teens of the ember base test system which up till now run them in alphabetical order giving acceptance tests priority over unit/integration tests.

Because of the different characteristics of both solitary and socially tests, they are also applied differently during the stages the development lifecycle as well as the CI build pipeline. Such a staged process gives developers the confidence they need to efficiently add new features or make changes to the system, to feel productive and have fun.

Therefore, during a CI build, the solitary tests are usually executed first because they are the fastest automated tests in the spectrum of the test pyramid. This way we can get feedback as quickly as possible.

~ Excerpt From “Writing Maintainable Unit Tests” by Jan Van Ryswyck This material may be protected by copyright.

Given that ember doesn’t need to build your app differently for each kind of test, the priority distinction to me is kind of moot–there’s no real time savings. In your CICD pipeline though, you could certainly run them in the order you indicate by building once and then combining the --path and --filter arguments to ember test (or better still, ember-exam).

1 Like