Suite of Tests

Dar Scott dsc at swcp.com
Sat Oct 21 18:04:52 EDT 2006


On Oct 21, 2006, at 3:19 PM, kee nethery wrote:

>>> Rather than callbacks, I'd probably go for things being called  
>>> from the openstack handler with results being written to a text  
>>> file with the same name as the test stack. That way you just  
>>> launch each stack and don't have to worry too much about  
>>> communication.
>>
>> But isn't writing to a file a form of communication?  I would  
>> think that 'return' or 'send' are simpler, however there is always  
>> a chance those are broken, but unlikely at the same time.  Saving  
>> to a file does sound like it could fit into a collection of  
>> communication methods.
>
> The advantage of a file is that you can have the master stack look  
> in all the files sometime after it launches all the tests (and  
> after they really should be finished) to see which tests suites  
> failed and report on those. If a test suite fails, it won't hang  
> all the other tests.

Couldn't a test manager write a file as easily as the test itself?

Presumably a test manager could also take the stack and save it with  
some properties set before executing each test in the the stack.   
That could provide similar information.  Of course, one might assume  
that file I/O is more primitive than a stack save.

Also, I think this ...
*****
on test
    return 2+2=4
end test
*****
...is simpler and more directly tests than...
*****
on test testPath
   open file testPath for write
   write 2+2=4 to file testPath
   close testPath
end test
******
... but the latter is not too bad.


Now about "launches all the tests".  That looks interesting.   
Presumably only one collection is interactive, but maybe others could  
run in the background.  What do you have in mind?

There was once one Revolution bug in which Rev not only crashed but  
logged me out!  So there might be some interaction among processes  
running tests.

Dar




More information about the Use-livecode mailing list