none
Coded UI fails when debugging - VisualStudio.TestTools.UITest.Extension.FailedToLaunchApplicationException RRS feed

  • General discussion

  • I have a Coded UI test that I'm using to test a desktop application.  Specifically "Facets" if that matters.

    I'm using VS2017 Enterprise - v15.9.13 on a Win7 vdi/VM with the automation solution using .NET Framework 4.6.1.  Our solution is in C#.

    When I run the test case normally from VS2017, it fails, but much further down the path.  It's able to open the application, do multiple clicks and selections.

    When I debug the test case, it fails on the "second" opening step.  The first step opens the application (which it does and I can see it), but shortly after that, it shuts down and throws the following error message.  I did just bold a part in which it does appear to be opening the "ApplicationUnderTest" twice, but when debugging or even running normally, I don't see it attempting that.

    Test Name:    x
    Test FullName:    x.Feature.x.x.x
    Test Source:    C:\Users\x\Source\Repos\ITTesting.Services.Automation\x\x\Feature\x\x.cs : line 97
    Test Outcome:    Failed
    Test Duration:    0:00:28.082772

    Result StackTrace:    
    at Microsoft.VisualStudio.TestTools.UITesting.ApplicationUnderTest.ThrowIfProcessNotValid(Process process)
       at Microsoft.VisualStudio.TestTools.UITesting.ApplicationUnderTest.SetCurrentProcessPrivate(Process value)
       at Microsoft.VisualStudio.TestTools.UITesting.ApplicationUnderTest.<>c__DisplayClass32_0.<set_Process>b__0()
       at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
       at Microsoft.VisualStudio.TestTools.UITesting.ApplicationUnderTest.set_Process(Process value)
       at Microsoft.VisualStudio.TestTools.UITesting.ApplicationUnderTest.Start(ProcessStartInfo startInfo)
       at Microsoft.VisualStudio.TestTools.UITesting.ApplicationUnderTest..ctor(String fileName, String alternateFileName, String arguments)
       at Microsoft.VisualStudio.TestTools.UITesting.ApplicationUnderTest.<>c__DisplayClass3_0.<Launch>b__0()
       at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
       at Microsoft.VisualStudio.TestTools.UITesting.ApplicationUnderTest.Launch(String fileName, String alternateFileName, String arguments)
       at Microsoft.VisualStudio.TestTools.UITesting.ApplicationUnderTest.Launch(String fileName)
       at xProject.Page.BasexPage.OpenxFacetsApp() in C:\Users\x\Source\Repos\ITTesting.Services.Automation\x\xProject\Page\BasexPage.cs:line 68
       at xProject.Feature.x.x.TestInitialize() in C:\Users\x\Source\Repos\ITTesting.Services.Automation\x\xProject\Feature\x\x.cs:line 84
    Result Message:    
    Initialization method xProject.Feature.x.x.TestInitialize threw exception. Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToLaunchApplicationException: Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToLaunchApplicationException: "The application cannot be started. This could be due to one of the following reasons:
    1) Another instance of the application is already running and only one instance can be running at a time.
    2) The application started another process and has now stopped. You may need to launch the process directly.
    3) You do not have sufficient privileges for this application." File: C:\Program Files (x86)\Trizetto\Facets\System\Bin\ceraupd.exe..

    Is there something that I'm missing with debugging?  Why I wouldn't be able to step into it for the CodedUI?

    Thank you,

    Brian.

    • Moved by CoolDadTx Monday, July 8, 2019 6:11 PM Testing related
    Monday, July 8, 2019 4:05 PM