As apps grow, development tends to slow down due to fragile or difficult-to-understand code. Test-Driven Development can help! It can make your code simpler, easier to refactor, and quicker to ship. We’ll walk through a demonstration of using Cypress tests to drive your code for a higher-quality codebase.
5. Vue is one of the most
testable frontend frameworks
6.
7. Questions! 🤔
• Do I write the test or production code first?
• What do I test first?
• How many E2E/unit tests do I write?
• How much test code do I write at a time?
Production code?
• Do I test every line of code and configuration?
13. https://www.cypress.io/how-it-works/
"One of our goals was to make test-driven
development a reality for end-to-end
testing. Cypress is at its best when you use
it as you build your application. We give you
the power to code as fast as possible.”
14. “…unlock the ability to do TDD with full end-
to-end tests for the very first time…The end
result is that you will have developed more,
your code will be better, and it will be
completely tested.”
https://www.cypress.io/how-it-works/
We are adding more and more web content across different frameworks
Just added a talk about testing Vue components
Also about extracting a component under test; it’s in React but the principles apply to Vue
Free trial to check it out and let us know what you want to see
Who here uses the Vue web pack template?
How many of you use the Webpack template?
E2E and component testing built in
But you still have a lot of questions
Diagram from Growing Object Oriented Software Guided by Tests
Outside-in TDD
Webpack template has Istanbul code coverage built in
Specifically it’s unit test coverage
The people I’ve learned testing from, whose opinions I respect the most, don’t talk about percentage coverage
Here’s why. In TDD, end-to-end tests necessarily cover everything
You don’t need a unit test to cover everything; it doesn’t deliver value
Cypress was specifically built with a focus on TDD
Completely free to use
Nearing 1.0 release
Based in Atlanta, some Cypress folks in the room—introduce them
Cypress was specifically built with a focus on TDD
Completely free to use
Nearing 1.0 release
Based in Atlanta, some Cypress folks in the room—introduce them
Cypress was specifically built with a focus on TDD
Completely free to use
Nearing 1.0 release
Based in Atlanta, some Cypress folks in the room—introduce them
I can’t vouch for the fact of whether you can do TDD with Nightwatch. But I don’t hear of many people doing it
Several Vue projects for a major company
Apply for future positions