Contributions
Re: Log.SaveResultAs is triggering OnStopTestCase Event Handler
i was able to work around this issue by creating a project level boolean variable setting the variable value to true in the OnStartTestCase event handler using If logic to check the value of the variable just inside the OnStopTestCase event handler setting the variable value to false on the first line inside the If logic performing the Log.SaveResultsAs logic at the very end of the If logic The Log.SaveResultsAs is still triggering the OnStopTestCase event handler as soon as it is encountered but my boolean variable will prevent the second (and and all subsequent recursive) calls to all the code inside the event handler because it has been set to false when the second call is made. This still seems like a bug to me.10Views0likes0CommentsLog.SaveResultAs is triggering OnStopTestCase Event Handler
I have an OnStopTestCase event handler in my project. it gets triggered, of course, by the end of a test case. inside this event handler, i have just placed a Log.SaveResultsAs statement and it is triggering another OnStopTestCase event recursively. i am using version 15.61.1.7 x64. anyone know why this is happening or what i might be doing wrong17Views0likes2CommentsRe: Can't trigger TestExecute through Task Scheduler
several reasons. why is it sometimes necessary to reboot your workstation? usually it's because it's stuck on something. we noticed our agents were getting multiple agent connect error/reconnected messages for no apparent reason and at other times we couldn't figure out why a particular pipeline would indicate it had been queued but wasn't getting started but, as soon as we would bounce the agent, it would kick off. we have some pipelines scheduled to start at 3am so, why not bounce the agent about an hour before that to make sure it's a fresh, unstuck, copy?15Views0likes0CommentsRe: Can't trigger TestExecute through Task Scheduler
i finally have it working. my scheduled task points to a bat file that runs a powershell script with the verb runas to elevate the permissions and in the powershell script, i have this code that successfully bounces the azure agent and keeps it in the Apps section of Task Manager. Thanks for all your help. if (Get-Process -Name Agent.Listener -ErrorAction SilentlyContinue) { echo "Azure Agent is running. Stopping Agent" Stop-Process -Name 'Agent.Listener' -Force Start-Sleep -Milliseconds 10000 if (Get-Process -Name cmd -ErrorAction SilentlyContinue) { Stop-Process -Name cmd } Start-Sleep -Milliseconds 150000 } echo "Starting Azure Agent" $command = 'start "Agent.Listener" "C:\Agents\run.cmd" --startuptype autostartup' Start-Process 'cmd' -ArgumentList "/D /S /C $command"15Views0likes0CommentsRe: Can't trigger TestExecute through Task Scheduler
i might be onto something. because you made me think more about that auto login feature i did a little more research to discover where (since it wasn't in the typically windows startup location) does that auto-login originate. i searched the registry for "run.cmd" and found this piece of string data for the VSTSAgent C:\Windows\system32\cmd.exe /D /S /C start "Agent with AutoLogon" "C:\Agents\run.cmd" --startuptype autostartup i'm betting that if i use this string in either the scheduled task or a bat file (or possible a powershell script) at the point in my process where i want to restart the agent after it has been closed, it will start it up the right way. i will let you know how it turns out18Views0likes0CommentsRe: Can't trigger TestExecute through Task Scheduler
when we installed the agent on the VM we configured it for auto login so it already does start up automatically following a VM restart. i'm not sure from where the "auto" part originates from because there is nothing the typical startup folder on that VM but the agent always gets start following a restart. that's the way it's always been so i don't see how that will change what's going on with my task scheduler issue20Views0likes0Comments- 23Views0likes0Comments
Re: Can't trigger TestExecute through Task Scheduler
i know i pasted the screenshot that explains this reasoning, but, as you have pointed out, this new forum setup appears to be omitting certain posts because i've scrolled up and down and don't see it now. I'll try to explain again and the link to the explanation is: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&tabs=yaml%2Cbrowser#interactive-or-service This Agent.Listener application is for our Azure Devops system. We have Azure pipelines that have been created by TestComplete for browser based applications that are directed to run on the VM where this agent is running. so, we are "running UI tests" therefore the agent listener has to be running "As an interactive process with auto-logon enabled". if the listener is not in the Apps section (but instead in the Background process) then it is not interactive and the pipelines will not run. i realize that what i'm trying to do with this one script is not a UI but everything else we run on this VM is a UI test so that is how the agent listener has to run. You've tried your best. i really appreciate the amount of effort you have put into this but I'm getting to the point where I'm ready to give up. there just doesn't seem to be an answer for this. It's like a Catch-22. Thanks again!24Views0likes0CommentsRe: Can't trigger TestExecute through Task Scheduler
it still puts the agent.listener under the background processes the ONLY method i have found so far that will run the agent as an App is from TestExcecute as a TestedApp. if i could just get the testexecute command line to run via a scheduled task, bat file or powershell script i'd be in business but can't get that to work either.24Views0likes0Comments- 30Views0likes0Comments