Testing React apps with React Testing Library (RTL)

Learn how to test React components with React Testing Library, the recommended library from Facebook for testing.

4.28 (868 reviews)
Udemy
platform
English
language
Software Testing
category
Testing React apps with React Testing Library (RTL)
4,237
students
2.5 hours
content
Feb 2021
last update
$54.99
regular price

What you will learn

The principles of Test Driven Development (TDD)

Know what React Testing Library is and its differences with Enzyme

Understand how Jest works with React Testing Library

Query elements with getBy, queryBy, findBy, getAllBy, queryAllBy, findAllBy

Simulate user interaction with the fireEvent and userEvent API

Learn about coverage and debugging

How to mock third party libraries like Axios

How to use Typescript with a React app

Why take this course?

Welcome to testing React components with React Testing Library! In this course, you will learn lots of things. You will learn:

  • The principles of Test Driven Development

  • Know what is React Testing Library (RTL) and its differences with Enzyme (another popular test framework for React)

  • Understand how Create React App (CRA) works.

  • Understand how Jest works with RTL

  • How to test with RTL and query elements with:

    • getBy, queryBy, findBy, getAllBy, queryAllBy, findAllBy

  • How to simulate user interaction with the fireEvent API

  • How to simulate user interaction with the userEvent API

  • Testing components in isolation (unit tests)

  • Learn about coverage and debugging

  • How to mock 3rd party libraries like Axios and mock a GET request

  • Learn about the pitfalls of CRA

You will have all the fundamental tools to test any React component and have that coverage at 100%!

Have fun, and never stop learning!

Screenshots

Testing React apps with React Testing Library (RTL) - Screenshot_01Testing React apps with React Testing Library (RTL) - Screenshot_02Testing React apps with React Testing Library (RTL) - Screenshot_03Testing React apps with React Testing Library (RTL) - Screenshot_04

Reviews

Jair
September 13, 2023
This course covers the basics for RTL, it is a short course so that we can get the basics in a short time, great course.
Ananth
March 10, 2023
Simple and covered most of the topics. Appreciate it.. but more appreciated if covered hooks testing in depth
Nilesh
January 10, 2023
Almost cover all points but as part of the complex can try to include more examples including React Redux, selectors, and different hooks, So it's more beneficial for learners also.
Emiliano
December 2, 2022
Need more basic explanation on what a test must do or how to think at the moment you create a test case
Patrick
October 13, 2022
Good course, but needs to be updated as the technology used in the course gave me problems but was able to find work arounds.
Lucas
October 7, 2022
Need some updates. Starting with class 13 we can't follow up because some of the Jest packages are deprecated. This is really cumbersome for the studies :/
Arun
September 6, 2022
A nice course to start with react testing. You will learn about Jest, React testing library and how you can start writing test cases. I'm reducing 0.5 from the rating due to some mistakes present in the videos ;)
Aatif
August 19, 2022
It was wonderful learning with you, It helps me very much because the way he explain in very good and grab each and everything.
Scott
July 14, 2022
The instructor doesn't start writing code and testing until 25% of the way through the course. Also doesn't explain why things are/aren't working. Just says things like "the test fails because there is an error".
Carlos
June 4, 2022
The course is too short, I would recommend the course only for those who are new to react Testing. The course only scratches the surface of various topics, nothing deep.
Yuliana
May 20, 2022
It was a very well explained, but most of the examples where about input. Would be nice to have SVG testing too. But overall is a course I would recommend to my colleagues. Gracias David!
Shivam
May 18, 2022
A couple of hours back I had no clear idea about how to write tests for front-end. Now I feel very confident and I believe I can easily write the test cases which in the apps I am working on. Tutorial is very crisp clear and simple. I highly recommend any one to opt for this course I tried some other courses as well but found this easier to follow. You should know react in order to take up this course. Jest and RTL is explained well. Its defiantly worth investing.
Carlos
May 17, 2022
Very basic course, it should be named intro to testing React apps. If you come with a background writing test with Jest and Enzime you can learn almost nothing from the course. It should be more focused on learning the React Testing Library itself.
Scott
May 11, 2022
This course is covering test-library pretty well, but parts move a bit slow for me. I don't need to see the typing of the setup code.
Ricardo
April 24, 2022
Very good course, showing all the concepts about testing, using a simple project created from scratch.

Charts

Price

Testing React apps with React Testing Library (RTL) - Price chart

Rating

Testing React apps with React Testing Library (RTL) - Ratings chart

Enrollment distribution

Testing React apps with React Testing Library (RTL) - Distribution chart
3546522
udemy ID
10/4/2020
course created date
2/14/2021
course indexed date
Bot
course submited by