guillaume
14 years agoContributor
How to know if execution is about to finish (Correctly or Exception) ?
Hello.
Let me explain my problem with this small example :
Setup environment is very simple : First call of StartTest = SetUp.
TearDown is a bit more complex, we can identify 2 cases :
I looked into Runner object properties without result. I also looked at others TC Events sources.
Did anyone solve something similar ?
Thank you.
Guillaume.
Let me explain my problem with this small example :
- I have 3 items in my project
- I have registered an event listener on the StartTest and the StopTest event.
- When my 1st test start, I need so set the environment up.
- When my last test finish, I need to teardown the environment.
Setup environment is very simple : First call of StartTest = SetUp.
TearDown is a bit more complex, we can identify 2 cases :
- I know which test is supposed to be executed the last one. Thus, when StopTest test is call for this one, I simply tear down the env.
- If this test is never executed (i.e due to previous exception in TestItem2), I won't be to call the clean routine.
I looked into Runner object properties without result. I also looked at others TC Events sources.
Did anyone solve something similar ?
Thank you.
Guillaume.