- a very simple notation (actually, two notations);
- a reasonable benefit for every developer;
- and, later, a culture that extended "mere xunit testing" to various "development philosophies" like TDD, TDD with baby steps, or BDD.
- They define a small language of a few important concepts:
- At the core, only testcases that run in a predefined test harness framework; and—almost unrelated to that framework—assertions;
- for scalability, testfixtures and setup and teardown of test cases and fixtures.
- The building blocks are very small: A single assertion is atomic; a single testcase can also be made atomic (i.e. just test a very tiny segment of the intended behavior).
- There is a simple tool that efficiently does the mundane job of collecting and executing all notated items (test fixtures and test cases).
- The tool can be easily run by any developer at any time.
- The tool can also be easily integrated into existing automated build processes.
- And, finally, the automatic execution can have a drastic feedback on the processes: Tests that do not pass halt the delivery process (by resulting in a "red" build).
Rather, xunit testing helps to solve the problem of "later regression checks" occurring after code changes, when it is necessary to remember and run the simple as well as the tricky test cases that actually allow a developer (or a team) to hold the belief that the modified piece of code still behaves sanely.
The important experience is that that "later" is not only "much later", when a feature upgrade or bug fix requires changing the code, but that it can be right after the next (well or not so well thought out) modification during the initial development of some piece of code. That really helps developers.
Finally, xunit testing is open in multiple ways—how many tests one writes, how much behavior each one ascertains, when they are run in the development cycle, and when in the build cycle, and, last but not least, how writing and executing of xunit tests feeds back into design and code development. Because all this is not enforced by the tooling in any way, a host of "philosophies" could emerge on top of xunit testing, leading to a lively and sometimes heated debate with a huge effect on wide understanding and on "marketing" of xunit testing.
Great.
Could the same be accomplished for some parts of "architecting"?
We should try, at least, shouldn't we?
So, you and I and everyone should start to invent notations and tools for "architecting" along the lines of what made unit testing successful. I'll leave your ideas to you; in the next posting, I'll start to present mine.
No comments:
Post a Comment