DEV Community

Discussion on: Challenging the Testing Pyramid

Collapse
 
zizaco profile image
Zizaco

Thank you for the interesting post. Altought, I feel like the "test trophy" is more like a gimmick than a real thing. "Static testing" (eslint, types and stuff) is inherent to the test pyramid as well.

To me it's not clear why people want to find excuses to avoid writing real 1x1 unit tests (the base of the pyramid).

The only plausable reason to avoid unit tests is if the codebase is already rotten (aka: legacy and untested), then you might go with an inverted pyramid just to keep regression under control.

It's not like the pyramid cannot be criticized. But it is a good pattern to follow in 95% of the cases. And one might take care not to demonize it for those who are yet learning about test automation, code design and tdd. :)

Collapse
 
aikhelis profile image
Alex Ikhelis

I second to what Zizaco said - both in thanking and defending the Test Pyramid, especially when it comes to new learners for whom Test Pyramid is currently part of de-facto methodology.

Having said that, I do not think that mentioning stubbing capabilities of Cypress aligns well with the test trophy suggested approach, used as the keynote to the article.

Collapse
 
juristr profile image
Juri Strumpflohner

Hey, thx for your comment. Yea for sure, unit tests are still extremely valuable. But if you re-think for a sec the whole testing scenario, those tests that give you the most value are those that integrate the entire thing, right. To simulate the user basically.

But then of course there is also developer experience (like how easy are those tests to write, how maintainable, how fast are they on CI etc...).

There's of course no silver bullet, but Cypress addresses a lot of the issues why previously people somehow tried to avoid those slow, costly, hard to maintain end-to-end (UI based) tests :)