Here's an annoyance: my test may look like
TEST END: test1
TEST START: test2
TEST CHECK OKAY: test2 check1
TEST END: test2
Oftentimes I like to announce "TEST STARTED" and "TEST ENDED". (I just had to extend my scripts to handle both START and STARTED. This is useful in case the test crashes in the middle, and you never get to the test end.
However, occasionally the test infrastructure does not allow this. Occasionally I just say, once, at the end "I ran this test, and it passed". That's what I mean above by the "TEST END: test1" without the corresponding TEST START.
In XML, this would be simple:
<test name="test1"/>
<test name="test2">
<test-check result="ok" test_name="test1" check_name="check1"/>
</test name="test2">
Note:
- I added an attribute to the closing, </test name="test2">. Although not part of standard XML, occasionally this has helped me. I call this, therefore, pseudo-XML
- Note that test is available in both
and ... form
Because the pseudo-XML is not so human friendly, I often prefer to print messages such as
TEST END: test1
TEST START: test2
TEST CHECK OKAY: test2 check1
TEST END: test2
But here I run into terminology: I don't have a natural way of having a
First: I am reasonably happy with brackets {BEGIN,START}/{END,FINISH},
and {STARTED}/{ENDED,FINISHED}. English grammar, how inconsistent.
I want to tolerate all of these, since I have used all from time to time,
and regularly find a test suite falsely broken if I assume that I have consistently used START and not STARTED.
(I'm going to arbitrarily reject TEST COMPLETED. Too verbose. Especially the dual TEST INITIATED. At least, I'll eject until it seems I encounter it a lot.)
But a TEST END without a TEST START is too confusing. I need an English phrase that doesn't need a corresponding start. Let's try a few:
- TEST PASSED: test name.
- with the corresponding
- TEST FAILED: test name
However, there might be some confusion because I definitely want to use TEST PASSED/FAILED withing TEST START/END. See below. - TEST RESULT: test name
- Similarly, there might be some confusion because I might want to use TEST RESULT within TEST START/END.
- TEST RUN: test name
- Nice because of the possible dual TEST NOT RUN
I think that I am arriving at the conclusion that any of the above, outside a TEST START/END, make sense, and should be considered equivalent to <test .../>
I am not currently checking for the proper nesting of tests, but I could be.
I think that it would be good to have a count of top level tests, either TEST START/END brackets or TEST outside such brackets, but ignoring stuff within the brackets.
Giving me
TEST RUN: test1
TEST START: test2
TEST CHECK OKAY: test2 check1
TEST END: test2
No comments:
Post a Comment