AUT persist in memory after testsuite ? [message #1066180] |
Mon, 01 July 2013 08:34  |
Eclipse User |
|
|
|
Hi,
I have a problem where my AUT Agent does not "release" my AUT once the test is over. Here's my test bench:
- the AUT agent is already launched, listening on port 60000.
- I use testexec to execute my tests.
- I use the -data and -autconfig flags to set my AUT.
- testsuites should be run separately. (testexec -testsuite myts1, testexec -testsuite myts2, etc...)
I understand that using the -autconfig, the AUT Agent launch the given AUT itself. So when I call testexec, everything runs fine, and when the test is finished, the AUT is closed (at least visually) but after say 4 calls to testexec, I get 4 instances of the same AUT in memory. Since I'm running on a slow machine running xp 32 bits, I can really feel my system getting slower and slower.
Before using the -autconfig flag, I was using the -autid flag, but that imply the AUT is already running, so I also use autrun before pulling up testexec. Well I get another problem with that, because I can't close the AUT without making my testsuite fail. Because the AUT doesn't have any File->Exit menu, I use the ALT+F4 shortcut. AUT Agent wasn't complaining about it until the recent version of Jubula (7.1) with the message in the file attachment.
Putting all my testsuite in a sole testsuite or job won't be possible, as Jubula is going to be integrated in our continuous integration workflow, and I need to be able to select from another tool which tests I'll run.
|
|
|
|
Re: AUT persist in memory after testsuite ? [message #1066342 is a reply to message #1066203] |
Tue, 02 July 2013 04:54  |
Eclipse User |
|
|
|
Thank you Alexandra for your answer.
The following snippets are the commands I send from a Java Process instance:
The autrun process:
D:\applications\jubula_7.1.00054\server\autrun.exe -w "workspace" -swing -i "MY_AUT_ID" -e "C:\path\to\java-app-runner.cmd"
The testexec process:
D:\applications\jubula_7.1.00054\jubula\testexec.exe -project "MY_PROJECT_NAME" -version "1.0" -dburl "jdbc:postgresql://localhost:5432/jubula" -dbuser "my_username" -dbpw "my_password" -server "localhost" -port "60000" -autid "MY_AUT_ID" -language "en_US" -resultdir "C:\path\to\resultdir" -datadir "C:\path\to\datadir" -testsuite "MY_TEST_SUITE"
Like I said in my previous message, if my test closes the AUT, the whole test fails. If I use the -autconfig/-data flags instead of -autid, my autrun process is not necessary because the AUT Agent will open the AUT automatically, the test will then proceed, at the end of the test the AUT closes, but it is still in memory.
I've tried the external key combination action but it's the same issue. I also tried the prepare for termination step with a wait step before closing the AUT as I've read in the documentation.
The workaround I'm currently using is that after the test finishes (the AT+F4 step is deactivated), I use another Java process that will taskkill my AUT. It's ugly but that do the trick.
Between the autrun and testexec processes I've put a time sleep of 10 seconds so the AUT launches before the testexec starts (for synchronization issues).
|
|
|
Powered by
FUDForum. Page generated in 0.03806 seconds