Function execution order in the mxunit test folder

I am using MxUnit as a testing environment for my ColdFusion project. But I'm not sure in what order the functions are executed in the test script. I inserted dummy records in the database for my testing in beforeTests()and deleted these records in afterTests(). I have the following functions in the test folder

public void function Read() {
//Block of code
}
public void function Save() {
//Block of code
}
public void function Delete() {
//Block of code
}

But first it is executed Delete(), therefore it read()returns "No record Found" (error message), because the record is deleted in delete () itself. So I thought that it works in alphabetical order, so I changed the names of the functions accordingly ( Read(),Save(),XDelete()- since it is in alphabetical order). The same thing happens again.

But it works fine when I rename functions as A_Read(),B_save(),C_Delete().

, - , .

+4
2

, , setUp tearDown beforeTests afterTests. , , .

+4

Source: https://habr.com/ru/post/1547929/


All Articles