build a complete test infrastructure

Asked by Victor Balan

hi everyone,
i've built a simple test infrastructure to test our company websites and applications. The test framework is composed by an application server where i load .skl scripts, a scheduler that schedule scripts previously loaded and 2 agents that run .skl scripts. Agents run on virtual servers with dedicated desktop and execute one task at time.

My problem is that sometimes some script fails and leave the desktop not clean. Some windows remains opened or some ie popus are not closed.

I don't know how to completly clean the enviroment at the end of one task to make all executions indipendent from each other.

I suppose i have to run a script in some sandbox or similar but i have no idea where to start.
Someone came across in this problem?

thank you

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Eugene S (shragovich) said :
#1

I solved that problem by creating a kind of test set within a batch (*.bat) file that runs my scripts one by one.
However in between the scripts I just refer to a piece of code (function) that does exactly what you want. For example close an IE page or any other open application.

That's my example implementation of determining whether there are any IE windows open and if there are, close them:

:closeIE
echo Checking if Internet Explorer is running
tasklist /FI "IMAGENAME eq iexplore.exe" 2>NUL | find /I /N "iexplore.exe">NUL
if "%ERRORLEVEL%"=="0" echo iexplore.exe is running. Killing... & taskkill /F /IM iexplore.exe
) else (
echo iexplore.exe is NOT running

This is a simple "DOS function".
You can check and close applications in a similar manner.

If that's what you are looking for and you need more info about DOS functions, you can find it here:
http://www.dostips.com/DtTutoFunctions.php

Cheers,
Eugene S

Can you help with this problem?

Provide an answer of your own, or ask Victor Balan for more information if necessary.

To post a message you must log in.