Lets say that we're working with a standard Model, View, Controller pattern for a GUI application and we want to thoroughly test it.
My question is: How do we go about automatically testing the "View" part of the application? I.e how do I make sure that my GUI Components are getting displayed correctly? Is there even a need for doing this?
Testing the Model and the Controller should be as straightforward as writing standard unit tests while utilising things like mocks, so no problem there.
Testing the full working components, i.e. all three, Model View and the Controller working together can also be done - using frameworks that simulate user input.
However what do I do if I simply want to make sure, that my pane, that's supposed to show some text and a picture, is showing the text and the picture in an expected fashion?
My best idea for this was taking screenshots and making sure that the screenshots match the displayed components.
What are your thoughts? In my case I'm working with a Java FX application.
Aucun commentaire:
Enregistrer un commentaire