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

3.90 (22 reviews)
Udemy
platform
English
language
Software Testing
category
Node JS API Unit Testing -Using Mocha Chai -Complete Project
126
students
4 hours
content
Nov 2022
last update
$44.99
regular price

What you will learn

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

Why take this course?

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.




Content

Introduction

Introduction

Create Project and Install Packages

Create Project and Install Packages Part-1

Create Router and Controller File

Create Router and Controller File Part-2

MongoDB Database Connection

MongoDB Database Connection Part-3

Design MongoDB Schema

Design MongoDB Schema Part-4

Create User API Endpoint

Create User API Endpoint Part-5

API Fields Validation

API Fields Validation Part-6

Get all User List API Endpoint

Get all User List API Endpoint Part-7

Get Single User API End-Point

Get Single User API Endpoint Part-8

Delete User API Endpoint

Delete User API Endpoint Part-9

Update User-Info API End-Point

Update User-Info API Endpoint Part-10

Install Mocha-Chai and Add First Test

Install Mocha-Chai and Add First Test Part-11

Add Test Case to Check Get User List API Endpoint

Add Test Case to Check Get User List API Endpoint Part-12

Test Case to Check Single User API Endpoint

Test Case to Check Single User API Endpoint Part-13

Delete User API Endpoint Test

Delete User API Endpoint Test Part-14

Create User API Endpoint Test Case

Create User API Endpoint Test Case Part-15

Update User API Endpoint Test Case

Update User API Endpoint Test Case Part-16

Fix Some Bugs

Fix Some Bugs Part-17

Generate Mocha Chai Test Report

Generate Mocha Chai Test Report Part-18

Screenshots

Node JS API Unit Testing -Using Mocha Chai -Complete Project - Screenshot_01Node JS API Unit Testing -Using Mocha Chai -Complete Project - Screenshot_02Node JS API Unit Testing -Using Mocha Chai -Complete Project - Screenshot_03Node JS API Unit Testing -Using Mocha Chai -Complete Project - Screenshot_04

Reviews

Dennis
September 1, 2023
This is a great course. You will learn a lot!!! I highly recommend this course. You will build your own APIs, connect it to MongoDB, and perform automation on the API. Brilliant course. The instructor is super brilliant!!!!!!!!!!!!!!!!
Jason
August 3, 2023
You need to mention that when installing nodemon that you have to install it globally. I had to "npm install -g nodemon" in order for "nodemon app.js" to run in the terminal
Adrian
June 24, 2023
The course lost me when it created an instance of data using axios to test specific functionality. That creates a copy of that hardcoded object every single time you run your tests. That is not how API tests are done! I give it 2.5 stars because, until that point, it was on the spot.
Lawal
November 27, 2022
This course is so amazing because the instructor is clear and throughout. It is not one of those courses you will get lost. This is the first course I have ever completed. I totally recommend this course to whoever is trying to learn Unit testing Node JS APIs

Coupons

DateDiscountStatus
8/15/202288% OFF
expired

Charts

Price

Node JS API Unit Testing -Using Mocha Chai -Complete Project - Price chart

Rating

Node JS API Unit Testing -Using Mocha Chai -Complete Project - Ratings chart

Enrollment distribution

Node JS API Unit Testing -Using Mocha Chai -Complete Project - Distribution chart

Related Topics

4829390
udemy ID
8/12/2022
course created date
8/15/2022
course indexed date
Bot
course submited by