Tests should work for you, not against you. Teams that hate testing don't test. But tests can make you a better programmer. They're like silent pair partners, guiding you to write the best code.
Your success at testing relies heavily on your approach and design. This talk will cover different approaches to testing, the great debate over end-to-end tests vs. unit tests and tools for testing your Ember app. After which you'll be able to design tests that best serve your team.
Novice to intermediate-level developers interested in designing better, more reliable test suites for their Ember applications.
- Shows individual pieces of code work in collaboration
- Takes pressure off developers to write full-coverage unit tests
- Focuses on user experience
- Verifies real-world scenarios
- Reduces the chance of missing a bug
- May be resilient to sweeping code changes (depending on how high-level the test is)
- Slow to run due to dependencies (require browser/server)
- Misses small bugs hidden under larger issues
- Determining root cause of failing UI tests is difficult and time-consuming
- Relies too heavily on external tools
- Undermines reliability of automated tests
- Encourages QA and developers to manually test the UI
- Little to no feedback on code design
- The methodologies above emphasize 3 types of tests: end-to-end, integration and unit
- Verifies real-world scenarios, fully integrating the user interface
- Tests multiple layers of functionality without verifying user behavior
- Can cover most of Ember’s functionality
- More complex code bases tend to benefit from an emphasis on comprehensive unit tests
- Smaller code bases tend to do well with robust end-to-end tests
- Minimize integration tests
- Split tests into two categories: high-level end-to-end tests and low-level unit tests
- High-level tests are resilient to code changes
- Low-level tests give you fast, reliable feedback on your code
- Add integration tests only as they're needed
- Work with your team to determine testing standards
- Keep logic out of UI
- Avoid non-deterministic tests
- 3 parts: setup, action, assertion
- Make your tests easy to read
- Keep logic out of tests
- Make it clear what's being tests
- Keep test data minimal
- Jasmine
- QUnit
- Mocha
- Capybara
- Selenium
- Phantom
- Casper
- Different approaches to testing
- Finding the best fit for your team
- Ember tools for different types of tests
- Testing best practices
Testing is hard. But great tests make great code.
This talk explores different approaches to testing and the reasoning behind each methodology. It dives deep into the debate over whether to emphasize end-to-end tests or unit tests. And it will help novice to intermediate Ember developers better understand how to design reliable tests for their apps, empowering them to take ownership of their tests and go beyond "getting to green."