Cant Execute Recorded WPF Test

1 Answer 70 Views
Test Execution WPF Testing
Top achievements
Rank 1
Christian asked on 10 Sep 2021, 07:50 AM

Hi, i can record an Test, but every time i want to execute this test i get the same error:


'10.09.2021 09:43:17' - Executing test: 'WPFTest', path: 'WPFTest.tstest.'
'10.09.2021 09:43:17' - Using .Net Runtime version: '4.0.30319.42000' for test execution. Build version is '2021.2.809.0'.
'10.09.2021 09:43:17' - Starting execution....
'10.09.2021 09:43:17' - Failure detected during execution. Details:
'10.09.2021 09:43:17' - System.ArgumentException: Es wird kein Prozess mit der ID 2064 ausgeführt.
   bei System.Diagnostics.Process.GetProcessById(Int32 processId, String machineName)
   bei System.Diagnostics.Process.GetProcessById(Int32 processId)
   bei ArtOfTest.WebAii.Wpf.WpfApplication..ctor(Manager manager, Int32 pid, String appFileName)
   bei ArtOfTest.WebAii.Core.Manager.GetWpfApplication(Int32 iProcessId, String strAppLocation, Boolean& bCreatedNew)
   bei ArtOfTest.WebAii.Core.Manager.ConnectToApplication(Process proc, String pid)
   bei ArtOfTest.WebAii.Core.Manager.LaunchNewApplication(ProcessStartInfo pinfo)
   bei ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InitializeWpf(ExecutionEngineCreateParams initParams)
   bei ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.CreateAndInitializeEngine(Test test, ExecutionEngineCreateParams cp)
   bei ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)
'10.09.2021 09:43:17' - Test completed!


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 10 Sep 2021, 10:23 AM

Hello Christian,

Since you can record a test for the WPF application without errors, I guess that the issue with the execution is some sort of misconfiguration and will suggest you few steps to try. 

Attach the Test Studio process to an already running application

To check if the test can be executed at all, you can start the WPF application outside of Test Studio. Then choose to attach the recorder to the existing instance of the app. Although this is the recording mode again, you can execute the steps recorded previously by using the Run... options for partial execution.

Automate the same in a coded step 

To automate this process you will need a coded step at the beginning of your test - the sample how to connect to a running application in code is here.

Explore the WPF application and how it is being started

Based on the error listed in the execution log I guess that the WPF application starts a process with one id (this could be a splash scree, for example), and then the main process is replaced when the actual application starts. If this is how the application works, then you can implement the coded solution shared above. An alternative to this is to check with the application development team if the start process can be changed. 

I hope that this information will be useful for you. If you continue experience any issues, please, let me know what is the outcome of the first two suggestions. Also, generate the Test Studio application log while trying to run a test, which doesn't start - you can enable/clear the logging and collect it after the error in the Execution log is generated. 

Thank you for your cooperation in advance.

Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Test Studio course! Check it out at
Test Execution WPF Testing
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question