Hello CurtisDo,
Thank-you for your question.
Basically you have to know there is no functional testing tool which can run without exiting it at some point of time, each running of such tools use amount of memory which its free depends on ending the tool’s process, meaning exiting it eventually;
Plus, the actual AUT (Application Under Test) which ZAPTEST needs to reopen each time it executes its business processes, although I believe in your testing script it eventually logout but then login back for the next iteration which means the memory is still being used each login to the AUT and also its capacity is being increased due to business processes needs.
Based on the above there is a serious problem of freeing memory if you run any testing tool and the AUT for a long period of time, and because of this problem sometimes the “Out of memory” message appears in ZAPTEST:
Therefore I believe the best way to overcome this issue is to run ZAPTEST for less amount of time, and make sure between every several runs ZAPTEST will be completely restarted (Including closing its process) and same thing regarding the tested AUT.
I believe there is a possibility to make the above somewhat an automatic process, but it may never be 100% free of problems (The ZAPTETAUT memory may not get free as expected if the applications will have closing difficulties, and because the process is automatic we will not have control on it during it run phase).
To make it automatic you can try to do the following:
You can use such utilities as the MS Windows’ “Task Scheduler” to execute ZAPTEST and to make sure both ZAPTEST and the AUT processes will be closed after several runs, this you can do by executing a small VBS files such as the following from within the MS Windows’ “Task Scheduler”:
Save the folowing script into a text file, name it as “Execution” and change its suffix from “txt” to “vbs” (Change the “Your Test Name” to the actual test you want to execute):
Set WshShell = CreateObject(“WScript.Shell”)
WshShell.Run “C:Your Test Name.zap”
WshShell.AppActivate “ZAPTEST”
WScript.Sleep 5000
WshShell.SendKeys “{F5}”
Save the following script into a text file, “name it as “End Process” and change its suffix from “txt” to “vbs” (Change the “Process Name” to the actual process name you want to end):
Dim blnRunning, colProcesses, objProcess, myProcess
myProcess = “Process Name”
blnRunning = False
Set colProcesses = GetObject(“winmgmts:{impersonationLevel=impersonate}”).ExecQuery( “Select * From Win32_Process”, , 48 )
For Each objProcess in colProcesses
If LCase( myProcess ) = LCase( objProcess.Name ) Then
myProcess = objProcess.Name
objProcess.Terminate()
End If
Next
If blnRunning Then
Do Until Not blnRunning
Set colProcesses = GetObject(“winmgmts:{impersonationLevel=impersonate}”).ExecQuery( “Select * From Win32_Process Where Name = ‘”& myProcess & “‘” )
WScript.Sleep 100 ‘Wait for 100 MilliSeconds
If colProcesses.Count = 0 Then ‘If no more processes are running, exit loop
blnRunning = False
End If
Loop
End If
Both the above scripts can be used on different applications, such as ZAPTEST and all of your AUTs, rename the above scripts according to the app it handles, each script handles a single app.
Hope this will give you more automatic control upon the ZAPTEST tests’ executions, but you have to remember the basic fact:
In order to have memory you must first free memory, and the best way to do it is by ending processes running in the OS background.
Please contact Zap for further help.
Thanks,
Sasha