开发者

Writing a Test Automation Framework: What pattern(s) to use?

开发者 https://www.devze.com 2023-02-11 12:01 出处:网络
I am writing a Test Automation Framework that involves automating testing a Winforms and WPF based application having 200 screens. The Automation Framework should do the control clicks and screen acti

I am writing a Test Automation Framework that involves automating testing a Winforms and WPF based application having 200 screens. The Automation Framework should do the control clicks and screen actions just as a tester would do to test a case by manually clicking the controls on the screens.

The Framework can change only when one of the following happens:

  1. New screens and functionalities are added.
  2. Existing screens are modified (UI).
  3. Existing screen functionalities are modified. For example, changing a ListView to a GridView to show data on a button click.
  4. Changes in business rules.

I am new to patterns, and am learning. Bas开发者_开发问答ed on these requirements, can someone please tell me what patterns may prove most useful (if at all) is writing this fraemwork?


Snowbear is correct above...some specifics would help. But it seems pretty obvious that you'd be using the Command and Decorator patterns, for sure.

Just keep in mind - patterns are battlefield tactics, not laws. They need to be adjusted to fit the battlefield. I had to overcome a tendency to be legalistic about using them when I learned them.


I am not sure you will accept this as an answer but here goes:

Don't write a framework. Put effort in finding and experimenting with existing testing tools. WPF UI testing is very different from WinForms testing. Patterns are the least of your worries.

EDIT Have a look at these posts:

  1. WinForms
  2. WPF


Before you attempt to list all the patterns you need, you should design a higher level architecture for the application. Just from the description I guess you would need some sort of "form parsing" or "component mapping" which will be passed to an "actor" which will carry out actions associated with the components (e.g. click, insert text). At the end the form is submitted to the audition system. This is obviously my way of doing it, probably there is a better way.

0

精彩评论

暂无评论...
验证码 换一张
取 消