Node JS API Unit Testing -Using Mocha Chai -Complete Project
You will learn to build rest api using node js and express js, how to add unit testing for rest api using mocha and chai
Development,Software Testing,Unit Testing
Lectures -20
Resources -1
Duration -3.5 hours
30-days Money-Back Guarantee
Get your team access to 10000+ top Tutorials Point courses anytime, anywhere.
Course Description
Welcome to this course. In this course, you will learn API Unit Testing using mocha and chai. At first, you will learn how to build the rest API using node js, express js, and MongoDB. You will learn how to test the API endpoint in postman. I will show you how to organize and save the endpoint in postman. Using postman we will be able to perform all sorts of things like create, update, get, and delete operations.
After that, you will learn how to add unit testing for the API using mocha and chai. We will add different sorts of testing for all of our API endpoints.
Here are some lists that you are gonna learn from this course:
How to build rest API.
API End-point unit testing using mocha and chai.
How to save data to MongoDB database.
How to organize node js project, routing, and controller of node js app.
How to use postman to test API endpoint.
How to add Mocha Chai test for each and every API endpoint.
How to use different kinds of assertion functions of chai in the test.
How to generate a test report after doing all the test
Different kinds of status codes need to use with mocha chai testing.
How to choose status code when building rest API.
How to use Axios to do HTTP requests.
Who this course is for:
- If you are a backend developer and want to learn unit-testing
- If you want to learn how to use mocha and chai to test your api
- If you want to learn backend development and want to use mongodb with node js and express js
Goals
How to use mocha and chai to test API endpoint
How to build Rest API Using Node Js and Express Js
Node JS API Unit Testing
How to test API in postman
How to use mongodb database with node js
How to generate test report
Prerequisites
Students don't need to have any prior knowledge to take this course
Curriculum
Check out the detailed breakdown of what’s inside the course
Introduction
2 Lectures
-
Introduction 04:36 04:36
-
Downloadable Resources
Create Project and Install Packages
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Create Router and Controller File
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
MongoDB Database Connection
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Design MongoDB Schema
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Create User API Endpoint
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
API Fields Validation
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Get all User List API Endpoint
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Get Single User API Endpoint
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Delete User API Endpoint
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Update User-Info API Endpoint
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Install Mocha-Chai and Add First Test
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Add Test Case to Check Get User List API Endpoint
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Test Case to Check Single User API Endpoint
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Delete User API Endpoint Test
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Create User API Endpoint Test Case
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Update User API Endpoint Test Case
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Fix Some Bugs
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Generate Mocha Chai Test Report
1 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Instructor Details
![Yazdani Chowdhury](https://www.tutorialspoint.com/assets/profiles/502588/profile/200_1484001-1697105641.jpg)
Yazdani Chowdhury
Course Certificate
Use your certificate to make a career change or to advance in your current career.
![sample Tutorialspoint certificate](/market/public/assets/newDesign/img/primePacks/V-certificate.png)
Our students work
with the Best
![adobe logo](/market/public/assets/newDesign/img/adobe.png)
![adp logo](/market/public/assets/newDesign/img/adp.png)
![apple logo](/market/public/assets/newDesign/img/apple.png)
![armani logo](/market/public/assets/newDesign/img/armani.jpg)
![bosch logo](/market/public/assets/newDesign/img/bosch.png)
![capegemini logo](/market/public/assets/newDesign/img/capegemini.png)
![cisco logo](/market/public/assets/newDesign/img/cisco.png)
![hdfc bank logo](/market/public/assets/newDesign/img/hdfcbank.png)
![ibm logo](/market/public/assets/newDesign/img/ibm.png)
![intel logo](/market/public/assets/newDesign/img/intel.png)
![mastercard logo](/market/public/assets/newDesign/img/mastercard.png)
![netflix logo](/market/public/assets/newDesign/img/netflix.png)
![qualcomm logo](/market/public/assets/newDesign/img/qualcomm.png)
![samsung logo](/market/public/assets/newDesign/img/samsung.png)
![sony logo](/market/public/assets/newDesign/img/sony.png)
![unilever logo](/market/public/assets/newDesign/img/unilever.png)
![walmart logo](/market/public/assets/newDesign/img/walmart.png)
![adobe logo](/market/public/assets/newDesign/img/adobe.png)
![adp logo](/market/public/assets/newDesign/img/adp.png)
![apple logo](/market/public/assets/newDesign/img/apple.png)
![armani logo](/market/public/assets/newDesign/img/armani.jpg)
![bosch logo](/market/public/assets/newDesign/img/bosch.png)
![capegemini logo](/market/public/assets/newDesign/img/capegemini.png)
![cisco logo](/market/public/assets/newDesign/img/cisco.png)
![hdfcbank logo](/market/public/assets/newDesign/img/hdfcbank.png)
![ibm logo](/market/public/assets/newDesign/img/ibm.png)
![intel logo](/market/public/assets/newDesign/img/intel.png)
![mastercard logo](/market/public/assets/newDesign/img/mastercard.png)
![netflix logo](/market/public/assets/newDesign/img/netflix.png)
![qualcomm logo](/market/public/assets/newDesign/img/qualcomm.png)
![samsung logo](/market/public/assets/newDesign/img/samsung.png)
![sony logo](/market/public/assets/newDesign/img/sony.png)
![unilever logo](/market/public/assets/newDesign/img/unilever.png)
![walmart logo](/market/public/assets/newDesign/img/walmart.png)
Related Video Courses
View MoreAnnual Membership
Become a valued member of Tutorials Point and enjoy unlimited access to our vast library of top-rated Video Courses
Subscribe now![Annual Membership Annual Membership](/market/public/assets/newDesign/img/membership-large-small.jpg)
Online Certifications
Master prominent technologies at full length and become a valued certified professional.
Explore Now![Online Certifications Online Certifications](/market/public/assets/newDesign/img/traning-for-a-team.png)