3 ms·
That's a good trade off though, and not just for speed. Selenium tests are more difficult to write and take more effort to maintain. You should definitely test
by cstejerean 10y ago
That's a good trade off though, and not just for speed. Selenium tests are more difficult to write and take more effort to maintain. You should definitely test as much of your application as you can with unit tests and integration tests. The end to end tests with something like Selenium should then focus on the type of bugs that you couldn't catch with the lower level tests.
I've seen situations where people had Selenium tests for every possible validation error on a form. A lower level test would have been sufficient to test all validation permutations and making sure they return the right error message, and then a single high level test can ensure that when an error message is returned it is properly rendered on the screen.