Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ASP.NET Core 3 and React

You're reading from   ASP.NET Core 3 and React Hands-On full stack web development using ASP.NET Core, React, and TypeScript 3

Arrow left icon
Product type Paperback
Published in Dec 2019
Publisher Packt
ISBN-13 9781789950229
Length 598 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Jason Watmore Jason Watmore
Author Profile Icon Jason Watmore
Jason Watmore
Carl Rippon Carl Rippon
Author Profile Icon Carl Rippon
Carl Rippon
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Preface 1. Section 1: Getting Started FREE CHAPTER
2. Understanding the ASP.NET Core React Template 3. Creating Decoupled React and ASP.NET Core Apps 4. Section 2: Building a Frontend with React and TypeScript
5. Getting Started with React and TypeScript 6. Routing with React Router 7. Working with Forms 8. Managing State with Redux 9. Section 3: Building an ASP.NET Core Backend
10. Interacting with the Database with Dapper 11. Creating REST API Endpoints 12. Creating a Real-Time API with SignalR 13. Improving Performance and Scalability 14. Securing the Backend 15. Interacting with RESTful APIs 16. Section 4: Moving into Production
17. Adding Automated Tests 18. Configuring and Deploying to Azure 19. Implementing CI and CD with Azure DevOps 20. Assessments 21. Other Books You May Enjoy

Adding Automated Tests

Now, it's time to get our Q and A app ready for production. In this chapter, we are going to add automated tests to the frontend and backend of our app, which will give us the confidence to take the next step: moving our app into production.

First, we will focus on the backend and use xUnit to implement unit tests on pure functions with no dependencies. Then, we'll move on to test controllers and mock out their dependencies using Moq.

Next, we will turn our attention to testing frontends with the popular Jest tool. We will learn how to implement unit tests on pure functions and integration tests on React components by leveraging the fantastic React Testing Library.

Then, we will learn how to implement end-to-end tests with Cypress. We'll use this to test a key path through the app where the frontend and backend will be working together.

In...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime