cancel
Showing results for 
Search instead for 
Did you mean: 

Starting Testexecute with powershell hanging process windows update 1803

Rhendriks1
New Contributor

Starting Testexecute with powershell hanging process windows update 1803

Hey,

I encounter a problem using testexecute after an update of windows

Problem:

The process TestExeute.exe keeps runnning after the test has finished.

The powershell script that is waiting for the process to finish never continues and gets stuck.

 

The test is started on a windows 10 (build 17134) machine with TestExecute 11 on it using the following command:

Start-Process "C:\Program Files (x86)\SmartBear\TestExecute 11\Bin\TestExecute.exe" -ArgumentList '"C:\PAthToTestPRoject\TestProject TEST.pjs" /project:"TestProject TEST" /test:"Script|TestCentrum|TestCentrum_Main" /r  /e /SilentMode /ForceConversion'

 

This script has worked until we installed the windows update 1803.

After rebooting the virtual machine and starting an instance of testcomplete or testexecute a edge browser would start.

I followed the advice on the forum to not enable support for microsoft store apps.

the Edge browser didn't start anymore but the TestExecute process still didn't always close at the end of the test.

 

What I have found so far:

I found a process cftmon.exe that when I analyse the wait chain it's waiting for the testeExecute proces.

in the testexecute proces it says it's waiting for cftmon.exe.

when I kill the cftmon.exe process it restarts immidiatly and the testexecute process is closed.

 

 

 

 

7 REPLIES 7
Rhendriks1
New Contributor

Starting TestExecute with console

Hey,

Problem:

The process TestExeute.exe keeps runnning after the test has finished.

The powershell script that is waiting for the process to finish never continues and gets stuck.

 

The test is started on a windows 10 (build 17134) machine with TestExecute 11 on it using the following command:

Start-Process "C:\Program Files (x86)\SmartBear\TestExecute 11\Bin\TestExecute.exe" -ArgumentList '"C:\testprojectPath\TestProject TEST.pjs" /project:"TestProject TEST" /test:"Script|TestCentrum|TestCentrum_Main" /r /e /SilentMode /ForceConversion'

 

This script has worked until we installed the windows update 1803.

After rebooting the virtual machine and starting an instance of testcomplete or testexecute a edge browser would start.

I followed the advice on the forum to not enable support for microsoft store apps.

the Edge browser didn't start anymore but the TestExecute process still didn't close at the end of the test.

 

This would happen sometimes, there have been times that I was able to interupt the test and it would close the process.

 

What I have found so far:

I found a process CFTmon.exe that when I analyse the whaitchain says it's waiting for the testeExecute proces.

 

in the testexecute proces it says it's waiting for CFTmon.exe.

afbeelding.png

when I kill the CFTmon.exe process it restarts immidiatly and the testexecute process is closed.

 

I hope I was clear in my explanation any help would be appreciated.

 

greetings,

cunderw
Community Hero

Re: Starting Testexecute with powershell hanging process windows update 1803

Not sure if this will help with the latest windows update, but you might try something similar to how we run TE from powershell.

 

function closeTestExecute() {
	$testExecute = Get-Process TestExecute -ErrorAction SilentlyContinue
	if ($testExecute) {
		# try gracefully first
		$testExecute.CloseMainWindow()
		# kill after five seconds
		Sleep 5
		if (!$testExecute.HasExited) {
			$testExecute | Stop-Process -Force
		}
	}
	Remove-Variable testExecute
}
closeTestExecute
...
...
...
$arg1 = "/r"
$arg2 = "/project:$projectName"
$arg3 = "/SilentMode"
$arg4 = "/e"
$arg5 = "/DoNotShowLog"
$arg6 = "/Timeout 7200"
$AllArgs = @($NextTest, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6)
& "C:\Program Files (x86)\SmartBear\TestExecute 12\x64\Bin\TestExecute.exe" $AllArgs | Out-Null

Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Rhendriks1
New Contributor

Re: Starting Testexecute with powershell hanging process windows update 1803

Hey Carson,

 

Thanks for your quick reply.

So the issue is not that I cannot close the process, I could close it through powershell at any time.

ussually the machine would pick up the next test once it notices that the TestExecute has finished by for example using:

$processId = start-proces  "C:\Program Files (x86)\SmartBear\TestExecute 12\x64\Bin\TestExecute.exe" $AllArgs -PassThru

$processId .WaitForExit()

 

or

polling every 60 seconds on the procces name of TestExecute and when it doesn't exist anymore starting up the next test.

So the main problem is how to decide when the test is finished if the process doesn't end after running the test.

 

The timeout parameter could help but the playtimes of the test are variable, and I'm not sure if it would close the program I'll have to try it out.

I cannont find the Donotshowlog parameter in the Testcomplete command line documentation. But the show log at the end of the test is disabled in the project settings. https://support.smartbear.com/testcomplete/docs/working-with/automating/command-line-and-exit-codes/...

 

But I think I might still be unclear in what the problem exactly is, I'll try to find a virtual machine where it happens tomorrow and have more screenshots of how TestExecute 11 seems to start closing down and uses very little memory in comparison to when it's runnning the test and then doesn't close down.

 

A solution I tried out was restarting the ctfmon process every half an hour so I wouldn't have to check which seemed more like a hack than a solution.

 

If I misunderstood your answer further explanation would be helpful.

 

greetings and thanks again,

 

RHendriks

cunderw
Community Hero

Re: Starting Testexecute with powershell hanging process windows update 1803

Ah ok, I see what you're saying now, you're never getting an exit code for it. This is likely something to do specifically with the latest update of windows. Do you see this in the latest version of test execute? You might need to talk directly with support on this. Definitely seems like a bug. 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
shankar_r
Community Hero

Re: Starting TestExecute with console

This is more like support ticket, You can create support for your issue here,

https://support.smartbear.com/message/?prod=TestComplete


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

AlexKaras
Community Hero

Re: Starting TestExecute with console

Hi,

 

I can say nothing about TestExecute as I was not using it for some time, but I can confirm that I am observing sporadic cases when TestComplete 12.60 does not exit after the project is closed. No extra CPU or memory consumption. This started to happen after some latest Windows updates and seems to be related to Edge and, maybe, some other applications like Settings, etc.

There were no problems with TC 12.60 Beta with no updates installed, so I think that this is some collision between TestComplete and the changes provided by Windows updates starting, approximately, from mid-August.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Rhendriks1
New Contributor

Re: Starting TestExecute with console

Hello,

 

I started a support ticket thanks for all the help so far.

If the solution is clear and general applicable I'll post it here.

 

Thanks again and greetings,

 

Rohan

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors