richardeschloss / nuxt-test-utils

Nuxt testing utils (a single home for all your favorite testing utils)
MIT License
4 stars 1 forks source link

Brainstorming ideas (see notes) #1

Open richardeschloss opened 4 years ago

richardeschloss commented 4 years ago
richardeschloss commented 3 years ago

Consider supporting some of the ideas presented in nuxt test utils proposal. (To anyone who as already installed nuxt-test-utils, my apologies for neglecting this project. It's still in v0.0.1, and deserves more attention. It will come)

richardeschloss commented 3 years ago

I think it's important to demonstrate (with video) just how fast developers can work when they see the right testing utilities being used. Traditionally, testing is placed on the back burner because of the friction experienced. Think about it: suppose your team contributes 100 components to a project, and then 50 of those just have a minor change, such as file renaming. Same component, just different name. So, it's a total pain the ass to have to change out the names in all of the tests. No one wants to do this kind of maintenance work, not even the TDD proponents like myself.

So, not only is it important to make testing a first-class citizen of the SDLC, it's important to make the component the first class of the project. The utilities should be smart enough to know when components come and go or change (ideal, but not an easy task to pull off).

The main reason so many tests go slow is that many developers fall into this mindset that they need all of their build to be running to test it. The result: super slow tests! Tests that take forever to run. Thus, the right demo videos will show just exactly how fast tests can go when components are tested in isolation. When tests auto-run on save, people will see things working much faster than what they can see on the browser. This sort of quicker feedback should encourage more widespread adoption of testing.

My own personal pitfall is I find myself "repeating myself" with boilerplate code, and I think I can go faster if I stash that code into these utils.

richardeschloss commented 3 years ago

An old but helpful article may be here: https://medium.com/javascript-in-plain-english/nuxt-automated-testing-the-tricky-parts-773f04481dd0?source=your_stories_page---------------------------

Fair note: a lot of my thinking has evolved since writing that, so while the concepts are still the same, the actual code snippets there are out of date (improvements to that have been made since then)