Effective Software Testing

Share this post

Should my end-to-end tests never stub stuff?

effectivesoftwaretesting.substack.com

Should my end-to-end tests never stub stuff?

Maurício Aniche
Mar 25, 2022
8
Share this post

Should my end-to-end tests never stub stuff?

effectivesoftwaretesting.substack.com

My PhD supervisor used to say what words like always and never should never be used in software engineering.

So, should my end-to-end tests never stub stuff? Well, it can "stub stuff", it that's gonna help you. Why not?

Remember it's all about what you want to test. If you are writing an end-to-end test, but your goal is not really exercise that other component, and your test wouldn't be missing much if that component isn't the real one, then, stubbing it is fine, if you ask me.

Oh, but then this is not an end-to-end test anymore. Well, by the book, it is not. But it's ok. The three types of test levels we commonly use (unit, integration, and system/end-to-end tests) are there to guide us more than restrain us.

Share this post

Should my end-to-end tests never stub stuff?

effectivesoftwaretesting.substack.com
Comments
TopNewCommunity

No posts

Ready for more?

© 2023 Maurício Aniche
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing