Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » AUT persist in memory after testsuite ?(Once the test is over, the AUT java instance is still in memory)
AUT persist in memory after testsuite ? [message #1066180] Mon, 01 July 2013 08:34 Go to next message
Paraita Wohler is currently offline Paraita Wohler
Messages: 8
Registered: June 2013
Junior Member
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 #1066203 is a reply to message #1066180] Mon, 01 July 2013 10:15 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1124
Registered: July 2009
Senior Member
Hi,

The fact that the AUT is still running does indeed sound rather odd - I don't know how the testexec works there, but you could enter a bug for it.
The new feature to be able to "cleanly" restart an AUT is probably what is causing your new issue since 7.1 - depending on what toolkit you're using, you may be able to use external key presses instead of normal key presses.

The good news is that I think that stopping and restarting the AUT agent between the tests should cause any of its child processes (the AUT) to be stopped. You may need to add some synchronization for the AUT agent (waiting for it to start and stop) - we have a script lying around that does that if you need it.

HTH,
Alex
Re: AUT persist in memory after testsuite ? [message #1066342 is a reply to message #1066203] Tue, 02 July 2013 04:54 Go to previous message
Paraita Wohler is currently offline Paraita Wohler
Messages: 8
Registered: June 2013
Junior Member
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).
Previous Topic:How to do a "sum" of two variables?
Next Topic:can not run test with remote aut agent
Goto Forum:
  


Current Time: Fri Aug 22 21:50:52 EDT 2014

Powered by FUDForum. Page generated in 0.01876 seconds