Part III: Worked Examples

Seeing techniques presented in isolation, regardless of whether they are supported by examples, only goes part way toward conveying understanding. You need to see the techniques in action and use them to really achieve mastery. I cannot use the techniques for you. That is your responsibility. However, I can show you how they might be used in realistic scenarios through worked examples.

I have chosen two projects in different languages and testing styles to provide variety of guidance. The first example is a new project in Java executed with a test-driven approach. For the second project, I chose an untested, open-source JavaScript UI component to bring under test.

Both of the examples reside in my GitHub account. I performed both projects as a series of micro-commits so that you can see in detail how they unfolded. Because of the public availability of the gory details, I have chosen to save a few trees and use the printed page to provide a narrative for the projects, interspersed with code excerpts. The narrative is further enhanced with references to the GitHub repositories. Annotations in the in the code like [badd0g5] refer to Git commit hashes. You can find the exact commit by appending it to the commit path for the relevant repository. For example, if the above hash were a commit (which it is not) in my nonexistent “greatsoftware” repository, the URL for the diff would be

https://github.com/srvance/greatsoftware/commit/badd0g5

and the URL

https://github.com/srvance/greatsoftware/tree/badd0g5

would show the browsable source tree at that point in the development.

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

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