User Interface Testing

2019-01-16 20:41发布

We are working on a large project with a measure of new/modified GUI functionality. We've found in the past that we often introduced new problems in related code when adding new functionality.

We have non-technical users perform testing, but they often miss parts and allow bugs to slip through.

My question: Are there any best practices for organizing the UI testing of a WinForms project? Is there any way to automate it?

Thanks!

11条回答
一纸荒年 Trace。
2楼-- · 2019-01-16 20:50

In the event that someone finds this useful:

List of GUI testing tools found on Wikipedia.

查看更多
再贱就再见
3楼-- · 2019-01-16 20:51

I found this quick and dirty way to test web page layouts in various browsers. It's called browsershots.org. Our client requires support in 5 browsers right now and that takes about a week for full regression testing. This service will deliver screenshots of some 70+ browsers and versions. I print them out and hold up the pages to the light. If they don't line up, there must be a layout problem.

查看更多
Lonely孤独者°
4楼-- · 2019-01-16 20:52

Keep the GUI layer as thin as possible. Michael Feathers article, The Humble Dialog Box, is a classic. Also check out Martin Fowler's Passive View. I have also heard that the "automatic button clickers" are fragile, and that it's easy to spend more time maintaining the test than you spend maintaining the code.

查看更多
乱世女痞
5楼-- · 2019-01-16 20:52

I used a trial download similar to this product (http://www.tethyssolutions.com/product.htm) and this product (http://www.mjtnet.com/macro_scheduler.htm) years ago and I was happy with the results. These are pretty cheap solutions and some of these macro recorder products can actually be used for automated testing.

查看更多
一纸荒年 Trace。
6楼-- · 2019-01-16 20:58

I can't really help with organization or best practices, but an NUnit extension appears to be available for forms testing, NUnitForms.

查看更多
Deceive 欺骗
7楼-- · 2019-01-16 21:02

How to organize UI testing depends on how you design the test cases.

Automating Windows Forms application in unit test level can use TDD framework, such as NUnit; or use BDD framework, such as NSpec.

Automating Windows Forms applications in functional testing level can use White, CodedUI, or even directly using Windows Automation API 3.0 (UI Automation and MSAA).

Since all these stuffs mentioned above are technologies rather than solutions, it's better to build some fundamental test automation/scripting frameworks based on these technologies before you start to write automated tests.

查看更多
登录 后发表回答