[Rt-devel] [TESTS][BUG] Wrote some API tests

Ruslan U. Zakirov Ruslan.Zakirov at acronis.com
Fri Dec 10 14:26:42 EST 2004


Jesse Vincent wrote:
>>So _please_ show me how my test file can be rewriten to be independant 
>>from other tests/DB data and check all the cases that it checks now.
> 
> 
> The only assumption you were making that was harmful was that there
> would be no global custom fields. So all I did was add a couple lines to
> ensure thatif they're there, they get deleted.
With this code you clean up DB to some known state, don't you? So with 
which idea you disagree? Do you want to write cleanup code for each test 
file before it can be safely run independant from other tests? Idea that 
"you don't know state of the system" impel to make errors in tests.

It's not complete test file. It should be ~x3 larger to cover all 
things. Would it be enough to delete global CFs to make shure that all 
works fine as you expect?

> 
> I've not found it at all hard to test my assumptions about the database
> state before running my tests as I write a test script.  
Do you want to think about this at all?

Ufff. I just don't understand the reason? I don't want to write cleanup 
code in the beginning of the test files. I even don't want to init data 
in test case, I want run one command/sub/method/require that will reinit 
DB to some predefined state. I don't see any benifits in your approach.

I don't know what to add. ruz shuts up.

> 
> 	Jesse
> 



More information about the Rt-devel mailing list