Forum Discussion

hooligan495's avatar
hooligan495
New Contributor
3 months ago

TestComplete and WPF

I've a .net 8 WPF project where I have the following steps to build it: 

  1. Compile the app
  2. use donet publish
  3. Create an msi

 

When I compile and run the app TestComplete recognizes my app as a WPF application and creates proper WPFObjects(control.NameProperty) that I can use for my test scripts.

However when the dotnet publish command is run on my app (to create a self contained folder) Testcomplete no longer recognizes my app as being an accepted window (Windows.UI.Core.CoreWindow.   So I can't even use test complete's spy to walk teh object tree. 

In my project if I check the * for accepted windows Spy will now walk the object tree but they are all UIAObjects not WPFObjects.  Is there a way to tell TEstComplete that this truly is a WPF app? 

3 Replies

  • Thanks for your reply Marsha! 

    I think your first link got me to another link that identifies the possible problem:

    https://support.smartbear.com/testcomplete/docs/app-testing/desktop/net/supported-technologies.html

     There is a bullet point that says: 

    • You should compile the tested application with the self-contained single file option set to false for TestComplete to work properly during local testing.

     

    the dotnet publish command does create a self-contained version of our application.    It is a product requirement that we bundle this way and install this way.    My question is WHY does testcomplete require us to stay away from self-contained.   

    We build our installer and hand it to the automation engineer that is using test complete.  And our eventual target install environment will require this approach

    Thanks for any insight

     

     

     

     

    • Marsha_R's avatar
      Marsha_R
      Moderator

      I understand your requirements. What my teams have done in the past is to give the bundle to whoever is testing, let them install it manually, and then proceed with TestComplete tests. It really doesn't add any information to have TestComplete retest the install each time you want to repeat a product test.

      As to why the TestComplete requirement is that way, you'll need to ask Support that question. Here's the link to contact them.

      https://support.smartbear.com/testcomplete/message/

  • Let's make sure that everything for your WPF testing is set up properly. Check out these requirements and let us know.

    Take a look here

    https://support.smartbear.com/testcomplete/docs/app-testing/desktop/wpf/supported-technologies.html

    and here

    https://support.smartbear.com/testcomplete/docs/app-testing/desktop/wpf/requirements.html