jsc
14 years agoRegular Contributor
kill mechanism to end not finishing testitems
Hi all,
as my test sometimes runs into some sort of endless loop (like waiting for an object that will not appear, because of broken software), that could just be stopped manually, I want to fix this bug in my scripts and improve my test-framework, so that similar bugs (that I do not know yet) would not have such big consequences. (currently the test has to be manually stopped and the items afterwards will not be executed)
First of all, I fixed the bug with the loop.
Now I want to add some sort of kill-mechanism to my framework, that kills executing the current testitem and moves on to the next item.
My idea is, that the trigger for this kill-mechanism would be the duration of the testitem as I do not know which future bugs can appear and I do not create testitems that take longer than ~10 minutes. So I would set a variable to the starting time at the start of each test and would check regularly the duration of the execution of the current testitem. If the duration exceeds 20 minutes I would kill the tested application and start over with the next testitem. (each testitem beginns with logging in to the tested application)
As I think, that you have way more experience than me and you for sure have encountered such problems, I want to hear your opinion, before I add this to my framework:
- Is there a better way to solve the problem of not finishing test items?
- Is there a better trigger for the kill-mechanism?
- General drawbacks of my approach?
This would help me a lot.
Best regards,
Joachim
as my test sometimes runs into some sort of endless loop (like waiting for an object that will not appear, because of broken software), that could just be stopped manually, I want to fix this bug in my scripts and improve my test-framework, so that similar bugs (that I do not know yet) would not have such big consequences. (currently the test has to be manually stopped and the items afterwards will not be executed)
First of all, I fixed the bug with the loop.
Now I want to add some sort of kill-mechanism to my framework, that kills executing the current testitem and moves on to the next item.
My idea is, that the trigger for this kill-mechanism would be the duration of the testitem as I do not know which future bugs can appear and I do not create testitems that take longer than ~10 minutes. So I would set a variable to the starting time at the start of each test and would check regularly the duration of the execution of the current testitem. If the duration exceeds 20 minutes I would kill the tested application and start over with the next testitem. (each testitem beginns with logging in to the tested application)
As I think, that you have way more experience than me and you for sure have encountered such problems, I want to hear your opinion, before I add this to my framework:
- Is there a better way to solve the problem of not finishing test items?
- Is there a better trigger for the kill-mechanism?
- General drawbacks of my approach?
This would help me a lot.
Best regards,
Joachim