Question

I'm wondering why Coded UI tests are so important. It seems like I'm just recording my actions and so obviously everything is going to pass. It kinda seems like it's just me documenting that I did in fact mess around with the GUI. All my assertions seem ridiculously obvious. Of course they are going to be true. Can someone explain to me why these are worth the time? I'm sure they are, but I don't see why they are so important.... I mean, I could test my basic program by hand in five minutes, but it's going to take me a good hour to do legit coded UI tests.

Était-ce utile?

La solution

Because your application is likely to change in the future, so there's a possibility you could introduce a bug that causes your UI not to display correctly.

That's why you write tests, to test your application always behaves the way you expect it to.

Autres conseils

When I am doing my Code UI tests, the assertions I put in are going to be true yes. But I test these assertions as well by going into the code and changing what is expected (to things that are not meant to happen). This does take longer but I believe this is necessary to make sure if something does change, the error appears.A kind of double check.

Coded UI Tests are important because you know how the User interface will react and move through the application. When an unexpected result occurs the tests can fail. Using the assertion tool is great if an error occurs in the testing stage you can set an assertion to the error and choose to deliberately make the test fail as it occurs. The assertions are more significant when testing the data in the application- using the basic calculator application for example.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top