Session

What to Avoid When Writing Unit Tests

“These tests should never have been written. They provide no or little value.” -ME

Testing code has been described as an "art form." It is, but it should not be. There are many good patterns that should be followed when writing tests. There is even a lifecycle of tests that should be paid some attention. There are also many BAD patterns that developers should be aware of so that they can be avoided (or cleaned up).

This session will provide a series of examples of bad front-end tests and how to write them correctly.

* Tests Should Not Be "Well-Factored"
* Keep The Reader In The Test
* Violate The DRY Principle
* Testing Too Much
* Duplication Of Code Logic
* Bad Test Double
* Testing The Mock
* False Positives
* Testing Private Functionality Directly
* Excessive Setup

"I really enjoyed your talk at Code PaLOUsa (2022) yesterday, and so did several of my team members who tuned in online. Our Teams chats were abuzz with how we will be changing our unit test strategy soon! Thanks for the insight!" - Trenton Minch, QA Lead at eBlu Solutions LLC

Bob Fornal

Senior Developer with a passion for learning, testing, mentoring, speaking and personal growth. Blessed husband and proud father of two.

Columbus, Ohio, United States

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top