locked
Testing XBAP applications with coded ui RRS feed

  • Question

  • How does one successfully configure and map an XBAP application using coded ui?
    Monday, December 10, 2012 2:24 PM

Answers

All replies

  • Hi,

    Would you mind letting us know more information about this issue? Do you mean that you are testing the WPF XAML Browser Applications like it? What kind of issue did you get? Could you record a coded UI test for it? Did you get any error message when you playback your test?

    As my understanding, the coded UI test would support it. I think you could get more information from the following document. It shared us the detailed information about the level of support.

    Supported Configurations and Platforms for Coded UI Tests and Action Recordings

    About how to create a coded UI test, see this blog “Tutorial – How to create a Coded UI Test”.

    If I have misunderstood anything, please make free feel to let me know.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, December 12, 2012 3:10 AM
    Moderator
  • Hi Jack,

    Yes it is a WPF XAML Browser application. Coded UI will record however (even if we put in automationIDs in the objects) it takes over a minute for it to find any object mapped. I believe this is due to the depth of the browser application since it is creating three additional layers from the ieframe to the main application view. e.g ieframe -> uiitemwindow -> uiwpfwindow -> uiitemcustom -> uimainapplicationwindow

    I have also attempted to increase the search level depth in the appsettings with no change. 

    Thanks

    Wednesday, December 12, 2012 2:24 PM
  • Hi,

    Glad to receive your reply.

    Even if we put in automationIDs in the objects

    Not very sure about this changing, but if you changed your app, I suggest you re-record a new coded UI test and check it again, generate to code, and then compare the two coded UI test, for example, you could check the properties for the control, and check whether the properties have changed, since if you using the dynamic properties as the search properties, I doubt that it will impact the performance/test result.

    Reference:

    Coded UI: Playback is very slow when traversing large trees

    Smart Match & Slow Coded UI Tests

    I have also attempted to increase the search level depth in the appsettings with no change. 

    If possible, you could try to add more search properties for it, check the result.

    As my precious reply, whether your test playback normally? If you got any error message, please share it to us.

    See this blog post for Enabling Tracing:

    http://blogs.msdn.com/b/gautamg/archive/2009/11/29/how-to-enable-tracing-for-ui-test-components.aspx

    If still no help, would you mind sharing us a simple sample? I will try to record a coded UI test in my Environment. Please also attach your Visual Studio project, you can upload it to the sky driver, and then share the download link in your post. Thanks for your understanding,

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, December 13, 2012 10:00 AM
    Moderator
  • Hi Jack,

    Traversing large trees is precisely why we attempted to increase the search depth. A challenge to automating wpf web applications is the lack of search criteria available and why we result to including an automation help id into our elements.  In my search for answers I have come across mentions of these issues being solved in vs2012 however I experienced the same issue there. 

    I am unable to share a sample as it would require the actual wfp web application to reproduce. 

    Thanks

    Thursday, December 13, 2012 2:15 PM
  • Hi,

    So you add the custom property for this control, am I right?

    As my understanding, the depth of the browser application would impact the performance, maybe you could try to find other controls which have different depth, and check whether it could find the control quickly.

    In addition, this blog is about “Improving the performance of your Coded UI tests”, if possible, you could refer it, hope it could help. As you said that there are few properties for this control, one idea is that you could try to add more custom properties for it, and then use them as the search properties, check the result. See “Custom WPF Control’s custom properties”.

    Have a nice weekend,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, December 14, 2012 8:20 AM
    Moderator
  • Hello Jack,

    Yes we have tried all that with no improvement. 

    Friday, December 14, 2012 3:04 PM
  • Hi,

    Sorry for my reply no help.

    To get the issue confirmed and diagnose by product team, would you please create connect report for it? You will get email notification for update.http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx

    Thanks for your understanding.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 17, 2012 9:38 AM
    Moderator