Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

User Interface Testing [closed]

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.

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

like image 754
Niki Avatar asked Sep 03 '08 12:09

Niki


People also ask

What is the meaning of user interface testing?

What is UI Testing? UI Testing, also known as GUI Testing is basically a mechanism meant to test the aspects of any software that a user will come into contact with. This usually means testing the visual elements to verify that they are functioning according to requirements – in terms of functionality and performance.

How should UI tests be tested?

UI testing is centered around two main things. First, checking how the application handles user actions carried out using the keyboard, mouse, and other input devices. Second, checking whether visual elements are displayed and working correctly.

When should testing is stopped?

Stop the testing when the test cases have been completed with some prescribed pass percentage. Stop the testing when the testing budget comes to its end. Stop the testing when the code coverage and functionality requirements come to the desired level. Stop the testing when the bug rate drops below a prescribed level.

Is GUI testing a functional or nonfunctional?

Both UI and GUI testing are functional tests.


2 Answers

There are GUI testing tools that will click buttons and stuff for you but they're pretty fragile in my experience.

The best thing to do is to keep your UI layer as thin as possible. Your event handler classes should optimally be only one or two lines that call out to other more testable classes. That way you can test your business logic in unit tests without having to actually do a button click.

like image 170
jodonnell Avatar answered Oct 05 '22 23:10

jodonnell


You can automate GUI testing using White framework.

Also consider using TDD friendly design, i.e. use MVP/MVC pattern.

I would highly recommend you to read documentation from Microsoft patterns&practies teams.

Especially have a look at the Composite UI application block and CompositeWPF.

These projects specifically designed to give you best practices in GUI apps development including test driven UI.

like image 23
aku Avatar answered Oct 06 '22 01:10

aku