[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proosal: removing test-result objects



Donovan Kolbly wrote: > So I'd probably go the other way and make test results (or, more likely,
test cases) first class, something like so:

  (test-case [runner])  ->  current or most recent test case, or #f if none

  (test-case-kind tcase) -> one of (pass xpass ...) [*]
  (test-case-passed? tcase) ; same as (memq (test-case-kind tcase) '(pass xpass))
  (test-case-property tcase 'property [value])   ; property setter/getter
(test-case-name tcase) -> test name [* although 'kind' is looking like a strange name here; maybe "disposition"?]

I think you're being inprecise wrt test-case vs test-result.
A test-case is something you execute and the result is a
test-result (or a test-case-result).  I might re-run the asme
test-case multiple times, in a different environment.  It's then
a single test-case, but multiple results.  Though perhaps you
could argue if it's run with a different environment, it's really
a different test-case.  Still, I don't think using test-case to
mean a result is a good name.

So the question: Is it useful to make test results first-class?
Perhaps.  I can see some use cases: a testrunner that just saves
every result.  Then perhaps you can have an interactive GUI,
where you can click on a result to see details, for example.
--
	--Per Bothner
per@xxxxxxxxxxx   http://per.bothner.com/