Appendix 2
Test Life Cycle

Once you get familiar with ExUnit as the tool you use to write Elixir tests, you’ll probably want to have a deeper understanding of the exact life cycle of a test and of your whole test suite. In this appendix, we’ll look at how ExUnit executes your test suite, including setup, running tests, and teardown. We’ll also learn about how tests, setup callbacks, and teardown callbacks relate to processes, that is, what the “process architecture” of an ExUnit test suite is.

This knowledge isn’t only useful to improve your understanding of ExUnit as a tool. At some point, you’ll likely need to come up with unconventional strategies in order to test particular pieces of code (for a number of possible reasons). In those cases, it’s important to know which process your test code is running on, which steps in the testing suite are blocking and which are asynchronous, and which test processes are linked between each other.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.140.186.201