AutoGeneral / IridiumApplicationTesting

A&G Web Application Testing Suite
https://www.gitbook.com/book/autogeneral/iridiumapplicationtesting-gettingstartedguide/details
MIT License
20 stars 13 forks source link

Add more verify steps #42

Closed mcasperson closed 8 years ago

mcasperson commented 8 years ago

Most of our tests currently just keep running without any assertions, only failing if the state of the application isn't as expected at the following step. This isn't really what a "test" should be doing. We need to describe expectations for the state of the application after each step to ensure we are getting the desired outcome as and when each modification is performed (i.e. when populating a dropdown, expect the underlying value to be set, the validation to of modified the interface or a modal to popup, etc., etc.). This will provide much better output when testing and provide greater certainty that the application is working as expected.

mcasperson commented 8 years ago

The code behind steps like And I wait "30" seconds for the element found by "DiscountTextXpath" to be displayed can be easily repurposed to create steps like Then I verify the element found by "DiscountTextXpath" is displayed or Then I verify the element found by "DiscountTextXpath" is displayed within "30" seconds.

mcasperson commented 8 years ago

The new verification steps have been implemented, and examples of these can be seen in the test at https://github.com/AutoGeneral/IridiumApplicationTesting/blob/master/src/test/resources/steptest.feature#L133.