▲ | a_t48 2 days ago | |
I'm not really a UI guy, but isn't this MVC (or some subset)? | ||
▲ | vasusen 2 days ago | parent | next [-] | |
It is quite popular in testing circles to write e2e tests that are easier to maintain. However, in practice I have found it to be quite useless due to the time it takes to write good page objects. QA teams usually rely on a complete POM before writing tests on it. I used to joke that by the time my team was done shipping a page object model, our product team would have changed the entire product again. | ||
▲ | JimDabell 2 days ago | parent | prev | next [-] | |
This seems like it’s reversing the M->V generation. You don’t want to write your tests explicitly for the minutiae of the markup you are generating, but you don’t want to bypass the view layer entirely and go straight to the model because then you aren’t testing what you intend to. So you build a new model from the view layer, and then test the model. If the markup changes enough that tests start failing, then you update the model instead of all the failing tests. I’m not certain that it buys enough to justify an extra layer of indirection in every front-end test though. Having a collection of selectors with meaningful names seems to get you about half the value without that extra layer. | ||
▲ | serial_dev 2 days ago | parent | prev [-] | |
Page object is a useful model for writing maintainable tests |