Architecture Test Automation – Features to Test via Automated UI Testing

Architecturetest-automation

We recently had a consultant tell us that if a feature can only be tested via automated UI tests (e.g. Selenium, Coded UI), then there is an underlying architectural issue. While this statement might be a bit extreme, it is along the same lines of the testing pyramid in that UI tests should make up a small portion of your overall automated test suite.

So, what kinds of features should have automated UI testing? Will a system with a cogent architecture still have features that can only be verified through UI tests, or should these tests just serve as "back-up" for a suite of unit and service tests?

Best Answer

Presumably you have some sort of architecture that connects buttons and other widgets to actions -- click on save and the save function should be called, etc.

Assuming you have good test coverage of the actions themselves via unit or integration tests, the goal of automated UI testing is to insure that the widgets are all making proper calls to the underlying actions, and correctly displaying the results of those actions.

In other words, they validate that the UI properly reflects the state of the model, and is properly hooked up to the controller.

The other component is when some business logic is in the UI code. For example, maybe you require certain characters in a password field. You need to test those features somehow, since it may be difficult or impossible to do that via unit tests.

Related Topic