The React Testing Library Bootcamp - The Developer Guide

Learn how to test your React application with React Test Library and Jest

4.45 (337 reviews)
Udemy
platform
English
language
Software Testing
category
instructor
The React Testing Library Bootcamp - The Developer Guide
1,601
students
5 hours
content
Dec 2021
last update
$64.99
regular price

What you will learn

Learn the importance's and power of testing your React application

Learn the best practices when writing tests with RTL and Jest

Test real life application with a test driven development approach

Deal with difficult problems like nested queries and mocking HTTP requests

Description

React testing library is the most popular tool to test your React application. It is extremely simple and intuitive to use but the outcomes are very powerful. It helps increase confidence in your React application and thus when it is shipped to production, your end-users will have a bug-free experience. This course will teach you everything you need to learn to start utilizing this popular library. So hope on in and enjoy the ride.


What you will learn

- The best practice of how to test with React Testing Library

- The importance of testing

- Testing component that make HTTP requests

- Mocking requests with Mock Service Worker

- Finding the right element in your component

- Dealing with the context API in your tests


Engaging content

You don't just code along in this course, but you also apply what you learn with engaging course assignments. After learning a concept, you will then be prompted to use what you learned in a coding challenge. These coding challenges will help you internalize React Testing Library in your mind. It is highly recommended to actually do the challenges rather than treating them as a code along.


Instructor support

I will always do my best to answer any questions in the Q&A section of the course. You can also reach out to me on YouTube or Twitter.

Content

Introduction

What Is Testing and Why Do We Care
Manual vs Automated Testing
Test Driven Development

The Fundamentals of RTL

App Overview
Inspecting a React Application
Test the Behaviour, Not the Implementation
The Structure of a Test Block
Querying for Elements
Assertions
Creating the Input Element
Completing the Test

Handling Browser Interactions

User Events
Assignment: User Events
Testing the Presences of an Element
Adding the Error Handling Logic
Challenge: Add Error Handling
Challenge: Answers
A Little Bit of Manual Testing
Testing the Happy Path

Organizing Test Files

Utilizing Jest Hooks
Creating Helper Functions to Reduce Duplicity
Challenge: Write a Helper Function
Challenge: Answer
Removing Unnecessary Variables
The Describe Block

Testing Components with Props

App Overview
Breakdown of App
Dealing with Props
Challenge: Testing Image Src
Challenge: Solution
Adding the Elements to Make Our Tests Pass
Testing the Heart Button
Adding the Logic to Make Our Tests Pass
Doing Some Manual Testing

Testing Multiple Elements

The Cards Component
Querying for Multiple Elements
Creating the Cards Component
Manual Testing
More Complex User Events
Adding the Filter Component

Handling and Mocking HTTP Requests

The Pets Component
Adding a Server
Fetching Data From Our Server
Writing a Flawed Test
Issues with Making HTTP Request in Your Tests
Mocking HTTP Requests with Mock Server Worker

Integration Testing

What is Integration Testing
Writing Our First Integration Test
Adding the Gender Filter Logic
Nested Queries to Find Elements
Adding Some Complicated Logic
Fixing a Typo
Testing That We Can Filter by Gender and Favourite
Fixing the Styling

Testing Components With Providers

Refactoring Our App to Use Context
Adding a Mock Provider to Our Tests

Reviews

Hiren
September 4, 2023
Watched it a 2x speed but still took at least 2+ hours. Since this course is just about basics of RTL it could have been a lot more concise in terms of time. Also in section 8 instructor struggled to make application work which was unnecessary to show on video, since this course if about testing and not about how to write react code.
Mike
July 16, 2023
This course explains the basics very well and is split out in a way that is easy to find specific concepts you want to understand in greater detail.
Robert
April 23, 2023
This was a very good course and helped me learn this new testing framework. I highly recommend it if you are trying to learn React Testing Library and need a little more context than the docs provide. I took half a star off because 1) the instructor didn't really explain the differences of getBy vs queryBy vs findBy for querying elements, 2) several times he said "check out the resources attached to this video" and there wasn't anything attached, and 3) it appeared the content was stream of consciousness where he made a typo or mistake and had to stop the video to figure out what was wrong after searching for it in the video, jumping around the try to locate the problem. Having said that, again, I highly recommend the course.
Jose
April 14, 2023
It goes straight to what we need to know. May be the course doesn't go really deep into some features of testing library, but I think that's the point for a bootcamp. Giving you a good base, and may be you can continue on your own. I'd recommend it.
Igor
March 18, 2023
It follows TDD concept, only tutorial that do so. But it's not updated and does not follow recommended testing library guide lines. You will learn a lot but if you are complete beginner it will be frustrating at times to google around some issues.
Raees
March 18, 2023
It was well structured and i loved his way of teaching, basically taught me how to think like a tester and then apply, gave me ideas rather than learning just functionalities i learned how to apply in my projects too , Would definitely
Jeirsen
January 25, 2023
Really liked the course, i think the integration testing part can be improved a bit more, maybe provide more resources to the videos, but in general it is a good course to start with testing in React
Mahalingappa
January 11, 2023
The way of explanation was very excellent and one more thing needs to add such redux with the store and how to test the with redux with store.
David
December 7, 2022
Great course, first one I’ve seen that covers testing in a complete TDD fashion. The instructor was clear and covered the test and debugging process well. Only really lacked by not covering mocking functionality.
mohammed
November 9, 2022
The good points: 1. The instructor was clear and the audio quality was very good 2. covered testing library basics The bad points: 1. source code was not provided. 2. alot of time was spent on building the react components, while they only needed to be introduced and provided, so that we focus on testing only and go deeper on advanced topics.
Andrew
October 7, 2022
Great course, very much enjoy your teaching style. Sometimes I wish you would repeat stuff while you're doing it though so I don't have to pause and go back as much like 'now we're adding this b/c of course, we're trying to add this element' etc. Thank you, keep up the great work!
Attila
September 28, 2022
This is not the first time I study with Laith, he always brings great content and excellent explanations. Thanks for this one, too!
Aytaç
September 19, 2022
The way of explanation and examples are great, I like his tutorials on Youtube and after checking his RTL tutorial on Youtube I decided that it will be one of the Best Choices to purchase his complete course from Udemy.
Bartosz
July 24, 2022
An interesting introduction to the subject. Basic things. For most unit tests, it should be fine. I'm happy.
Luca
June 19, 2022
This course was so helpful to me to understand the basic of testing. It's well explained, easy to understand, but full of content. Well Done!

Charts

Price

The React Testing Library Bootcamp - The Developer Guide - Price chart

Rating

The React Testing Library Bootcamp - The Developer Guide - Ratings chart

Enrollment distribution

The React Testing Library Bootcamp - The Developer Guide - Distribution chart
4441718
udemy ID
12/12/2021
course created date
12/28/2021
course indexed date
Bot
course submited by