DEV Community

Discussion on: Why You're Not Writing UI Tests

Collapse
 
mikefreedman12 profile image
Mike Freedman

There are so many benefits to writing UI tests, even if you have a suite of high quality unit tests

  1. UI tests tend to get easier to write over time. There tends to be more code reuse when there is consistent look and feel across your application.

  2. Your testing the absolute outermost layer of your architecture, all the code is being reached, there is no logic being overlooked

  3. The same UI test can be run in so many different ways that can be useful for checking system quality

    a. Run the same test on different browsers
    b. Run the same test in a Load Test
    c. Run the same test with various Mock internet speed, quirks mode, etc.

  4. When tests fail, screenshots can show the impact the error has to the user experience, and help prioritize the severity of the bug.

Collapse
 
klamping profile image
Kevin Lamping

Yep, UI tests have a lot of power to them! I'm a big fan and these are all great benefits that you don't find with many other testing methods out there!