DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Ben Halpern
Ben Halpern

Posted on

2 unit tests. 0 integration tests.

Top comments (18)

Collapse
 
yaser profile image
Yaser Al-Najjar • Edited on

"IT WORKS ON MY MACHINE"
(although I see a container right there 😁)

Collapse
 
integerman profile image
Matt Eland

Containerization fixes everything!

Collapse
 
benjamindavies profile image
Benjamin Davies

Only if it's in the container

Collapse
 
balajik profile image
Balaji K

Clear cache and try again πŸ˜‰

Collapse
 
mohammedaliroc1 profile image
MOHAMMEDALI

🀣🀣🀣🀣

Collapse
 
victoryarema profile image
Victor Yarema • Edited on

Not quite. Not always. I remember really many cases when integration tests are not needed simply because that specific integration logic will be checked with any single smoke test.
To be more precise the situation on the photo has absolutely nothing to do with integration testing. It would fail exactly the same in case of unit test like "put the car on top of the box and lift it".

Collapse
 
xgenvn profile image
Anh Tu Nguyen • Edited on

Depend on described use cases, this is undocumented user behavior!

Collapse
 
peledzohar profile image
Zohar Peled

Users. If we could only do without them, what a wonderful world it could be :-)

Collapse
 
katylava profile image
katy lavallee • Edited on

I was having trouble explaining integration vs unit test to my mentee once, and I showed her a couple of these jokes and she instantly understood.

Collapse
 
yeneme profile image
Yene

Expected behaviour

Collapse
 
allindeveloper profile image
Uchendu Precious

Just handle exceptions properly.

Collapse
 
itachiuchiha profile image
Itachi Uchiha

Use CTRL+R

Collapse
 
david_j_eddy profile image
David J Eddy

This is great!

Collapse
 
marinopoletine profile image
Marino Poletine

Why,docker, why???

Collapse
 
pankajjoshi2008 profile image
testing.tips

Don't trust the user, add validation.

Collapse
 
cloudlupus profile image
cloudwolf

2 unit tests and 1 integration test but needed a 2nd with the input order flipped

Collapse
 
mohammedaliroc1 profile image
MOHAMMEDALI

Input fail due errors is vswr

Top Heroku Alternatives (For Free!)

Recently Heroku shut down free Heroku Dynos, free Heroku Postgres, and free Heroku Data for Redis on November 28th, 2022. So Meshv Patel put together some free alternatives in this classic DEV post.