paint-brush
Why it's Time to Stop Using Meaningless Test Valuesby@prplcode
569 reads
569 reads

Why it's Time to Stop Using Meaningless Test Values

by Simon Egersand 🎈3mMay 12th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Using strings is bad practice — use integers instead of strings. This makes the test take a longer time to understand meaning and slow down. The name of the test might help, but as with other documentation, it will eventually change and be out-of-sync with the code. Irrelevant values on the other hand have the value `"irrelevant"`, which tells me I can safely ignore these in this test. Instead of using strings, use a meaningful number and a meaningful name.

Company Mentioned

Mention Thumbnail
featured image - Why it's Time to Stop Using Meaningless Test Values
Simon Egersand 🎈 HackerNoon profile picture
Simon Egersand 🎈

Simon Egersand 🎈

@prplcode

Sr. Software Engineer @Spotify | Tech Blogger 💻 | Professional Nerd 🤓 | Musician 🎸

About @prplcode
LEARN MORE ABOUT @PRPLCODE'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Simon Egersand 🎈 HackerNoon profile picture
Simon Egersand 🎈@prplcode
Sr. Software Engineer @Spotify | Tech Blogger 💻 | Professional Nerd 🤓 | Musician 🎸

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here
Allmendenetz
Kavin
Mstdn
Social
Deuchnord
Ktachibana
Parleur
Winscloud
Moomoo
Nutter
Mastodon
Ztn
Artist
Sebastianforst