Best Practice for testing WPF Applications

2 Answers 219 Views
General Discussions WPF Testing
Richard
Top achievements
Rank 2
Iron
Veteran
Iron
Richard asked on 21 Nov 2023, 11:45 AM

I’m evaluating Test Studio internally at the moment for a WPF application we are writing. Given that I have full control over the WPF App and can make any changes I need; are there any best practices I can implement in WPF to facilitate Test Studio when it is recording testing steps? 

e.g. Control Names, a helper package for exposing the WPF structure to Test Studio?

Any suggestions on what I can do to make the generated steps more readable would be greatly appreciated.

Thanks,
Richard

2 Answers, 1 is accepted

Sort by
0
Steven
Top achievements
Rank 2
Iron
answered on 21 Nov 2023, 08:38 PM

I haven't been using it on WPF Apps, but have been using it on Web Apps for the last few years. A few things that I can speak about would be:

  • If you can use Unique Id's on all components. It facilitates Test Studio's ability to find them in the DOM.
  • I make my tests more readable by using comments with a line above and beneath.
  • If possible use Telerik's components. I've spent a lot of time writing Coded Steps for Bootstrap components for Date, etc.

TS is very powerful. Some things I've done that may help stimulate some ideas and get the juices flowing:

  • Read/Written SQL Server DB's
  • Read and stored zip codes for specific addresses on the USPS website, then saved them in the correct rows of an Excel file to update erroneous zip codes automatically. This was done for hundreds of rows of errorneoua zips codes and decreased our Transportation department's manual attempt at fixing  them from days to hours (2.5hrs).
  • Obtained performance baselines of some of our web products so subsequent version releases can be performance tested against previous versions.
  • Used Test Studios for APIs to collect API baselines then schedule tests to run periodically and detect changes in 3rd Party Vendor APIs that might affect their operation with our software.

Finally, I have found their Support to be excellent! I always have multiple possible answers sitting in Support Center the day after I ask them.

SSq

 


Elena
Telerik team
commented on 22 Nov 2023, 03:33 PM

Hi SSq, 

I appreciate your time to acknowledge and summarize what you have gained already! Thanks for your warm words! 

Best,
Elena

0
Elena
Telerik team
answered on 22 Nov 2023, 03:31 PM

Hi Richard,

I am pleased to know you are interested in Test Studio. 

The suggestions shared by Steven are quite relevant also for WPF testing. Most suitable approach will be to implement unique names or ids for the elements which will be used in the automated tests. 

Other than that Test Studio has built-in translators also for the WPF components so you will use them out-of-the-box while recording your tests.

Please, have in mind that most of the online documentation demoes samples for web test scenarios, but what is not specific to web pages (let's say frames and popups), is also applicable for WPF applications. 

I remain available for any additional questions you may have. Thank you for your cooperation in advance.

Regards,
Elena
Progress Telerik

Virtual Classroom is the free self-paced technical training portal that gets you up to speed with Telerik and Kendo UI products including Telerik Test Studio! Check it out at https://learn.telerik.com/.
Tags
General Discussions WPF Testing
Asked by
Richard
Top achievements
Rank 2
Iron
Veteran
Iron
Answers by
Steven
Top achievements
Rank 2
Iron
Elena
Telerik team
Share this question
or