In this video, Meaghan Lewis explains the importance of using assertions to bring value to tests. Assertions are critical to confirm that the test is actually testing what it's supposed to and getting the right results returned.
- [Instructor] Assertions are the backbones of tests.…They make tests have meaning by validating the results.…Assertions will fail a test…when the expected results don't match the actual results.…There are various assertion libraries that can be used…in an automation project.…Popular assertion libraries are Assert…which is built in to Node.js itself,…Jasmine and Jest which are built into the framework…and Chai and Unexpected…which are standalone BDD assertion libraries.…
I recommend using the assertion library…that comes built in to Node.js…or built into the test framework itself.…There's no need to download unnecessary dependencies…if you can avoid it,…but if the framework you select…doesn't have an assertion library…or you want more flexibility,…pick any assertion library of your choice.…Let's see some examples…using each assertion library that I mentioned…where we can confirm that a function which adds two numbers…returns the right result.…
First up is Assert.…I've shown examples using Assert in chapter one,…but here's a refresher.…
- The test pyramid
- Unit, integration, and UI tests
- Creating an automation strategy
- Choosing test tools
- Deciding what to automation
- Identifying the risks and cost of automation
- Implementing test automation
- Using continuous integration
- Measuring code coverage
Skill Level Beginner
Value of automation1m 24s
1. Test Types
2. How to Approach Automation
3. Testing Tools
4. Decide What to Automate
5. Adopt Test Automation
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.