Forum Discussion
Support not able to resolve the issue.
I put the handler as firefox is getting hung so it kill the fireofx and we do not get this issue. but we got another issue - The Operation cannot be performed because the user session is locked.
REM Kill Firefox if it Exists
tasklist /FI "IMAGENAME eq firefox.exe" 2>NUL | find /I /N "firefox.exe">NUL
if "%ERRORLEVEL%"=="0" taskkill /f /t /im firefox.exe
timeout /T 2
Why we are getting the error - user sessin is locked ?
Thanks
NG
Does your ten tests run sequentially in the same firefox or each test close firefox and launch another one ?
Generally i restart a new instance of Firefox every 5 tests to avoid problems due to :
- memory leak in tested app
- memory footage of firefox
- crash of firefox
- AlexKaras5 years ago
Champion Level 2
Hi,
a) I would add 'start /wait' before any line that starts test execution via TestExecute to postpone batch file execution until TestExecute exits;
b) While this is not a solution but rather workaround, take a look at the Freeze Diagnostic option (https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/properties/freeze-diagnostics.html)
- AlexKaras5 years ago
Champion Level 2
Hi,
> In the last para , what does "My Title" here means ?
C:\>start /wait /? Starts a separate window to run a specified program or command. START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED] [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL] [/NODE <NUMA node>] [/AFFINITY <hex affinity mask>] [/WAIT] [/B] [command/program] [parameters] "title" Title to display in window title bar.
> if I select use all process will it take care of firefox.exe process which get hung ?
It will (to my understanding).
Though I would specify just firefox.exe to lower (potential) load on the system.
- AlexKaras5 years ago
Champion Level 2
> why do you think we should use Stat wait command
To wait until TestExecute completes to run tests and only then continue with other batch file commands.
This might or might not solve the problem with hanging Firefox, but in any case I think that batch file execution must be postponed until the given test project finishes to run.
- nisgupta5 years agoValued Contributor
We are running our projects(tests) using batch file.
when running each project - we check whether any browser is running and if it is then close and kill the browser . launch the browser and ran some steps of the tests. Once the step is finished , we close the browser and also kill the browser process.
Now when the next project in sequence - we are checking again if there is any browser process then close and kill . Then doing the same steps as mentioned above. and so on.
let me know if you need more information. I have attached the batch file this trigger the project.
Thanks
NG
- nisgupta5 years agoValued Contributor
I am looking at the documentation for Start / Wait command
In the last para , what does "My Title" here means ?
I also looked the documentation about the diagnostics
For the project - Under the Freeze Diagmostics if I select use all process will it take care of firefox.exe process which get hung ?
Thanks
NG
- AlexKaras5 years ago
Champion Level 2
Hi,
> Is it the correct way ?
As per documentation: "To add a process to the Process list, press the Add button and type the desired process name (only the file name, without the extension)."
- nisgupta5 years agoValued Contributor
I have incuded the firefox under freeze diagnostics in all the projects that we are running. but for now I have not added start wait command .
As we have 25 projects running in sequence , firefox become unresponsive for one of the project . I have attached the screenshot when the forefox become unresponsive.
Thanks
NG
- AlexKaras5 years ago
Champion Level 2
Hi,
> want to confirm if this is the right process?
As for me it looks OK...
Any problem during execution?
P.S.
> Since there are multiple projects so multiple commands .
BTW, why not to create a Project Suite, add all required projects to it (in required order) and execute just this project suite (which will sequentially execute all projects that are included and enabled)?