Cómo cerrar el programa a través de TestComplete después de una prueba de palabras clave fallida

So lets say I am doing a Test Complete keyword test. If something fails in it the text stops . Actually what I have founded out is that if i have 8 checkpoints if the 4th one fails the rest will always fail after it. So i get a "test execution was interrupted" error. Thats fine but it doesnt finish out the test and close the application. The reason this is an issue is because any tests after it will fail because the application is still left open. I could rewrite these tests so that the application is open when they start but is there a way to kill and application after your tests fail? If the tests pass the application is closed.

preguntado el 03 de julio de 12 a las 23:07

2 Respuestas

You need to organize your tests with test items. In this case, you create at least 3 test items: the first one starts the application, the second performs the test and the third closes the application. If an error occurs during execution of the second test, this second test execution is ended and TestComplete runs the third finalization test item.

Information on test items can be found in the Tests and Test Items help topic. Please note that you need to specify the Elemento de prueba valor en el Stop on error column for the needed test item (the second one in the above example). Information on this and other columns can be found aquí. The column is hidden by default and you need to add it: right-click the header of the test items list and select Selector de campo. After this, drag the needed column to the header from the Selector de campo diálogo.

Find more information on this solution in Stopping Tests on Errors and Exceptions.

Alternative solution is using the OnLogError or OnStopTest event handlers. Find description of how to handle standard TestComplete events in the Creating Event Handlers for TestComplete Events Tópico de ayuda.

Respondido 04 Jul 12, 09:07

Perhaps I'm oversimplifying, but could it be the setting for the test playback? Pls check the following page and let me know if it helps: http://support.smartbear.com/viewarticle/28751/.

If that doesn't work feel free to repost in the SmartBear Forum: http://community.smartbear.com/

The support team is monitoring the forum and I'm sure they'll be happy to help.

Respondido 04 Jul 12, 00:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.