Coding and testing an authentication API [NodeJs + Cypress]

Creating +Testing An Authentication API Tutorial
Rating: 4.6 out of 5 (85 ratings)
4,048 students
English
English [Auto]

How to create the API endpoints
How to install and use Cypress
How to create a Mongo database for your API
How to encrypt passwords
How to create negative and positive tests for API flows in Cypress
How to make the tests robust and remove code duplication

Requirements

  • A Windows or Mac computer
  • IntelliJ installed
  • Postman installed

Description

Have you ever wondered how a login API actually works? Have you ever wanted to learn how to test the login API?

We created this free tutorial to fill this knowledge gap.


I'll walk you through how to:

  • How to create the API endpoints

  • How to install and use Cypress

  • How to create a Mongo database for your API

  • How to encrypt passwords

  • How to create negative and positive tests for API flows in Cypress

  • How to make the tests robust and remove code duplication


This is a tutorial for test automation professionals who already have an understanding of:

  • How APIs work

  • You have basic JavaScript knowledge

  • You want to keep improving in your domain

Prerequisites for the course:

A Windows or Mac computer

IntelliJ installed

Postman installed


So what are you waiting for? Let's jump into the tutorial.


Don't just take my word for it, check out what existing students have to say about my other courses:

“Great course! This was one of the most thorough training courses I have ever taken/endured/survived. For me the course had a real "graduate course" feel to it, along with some almost impossible challenges that will result in frustration as well as some very deep learning.”- David Kotschessa

“The C# section is taught by someone else, which surprised me, but I think they did a great job at instructing at a beginner level. The Selenium materials are quite comprehensive and the instructor is easy to follow and understand. I am impressed that the author has taken the time to keep the course materials updated, and therefore merits 5 stars in my book!” - David Draper

“Well I can't explain in words how much am excited after completing this course. The more I was close to completion the more am getting excited. You are a great instructor Nikolay. You don't just taught Selenium but other aspects of being a beautiful coder.Now am pretty confident and can say "Yes" to my clients when they need me to automate the application. Thank you Sir for all the hard work and effort you put in the course. Surely would like to see you in another engaging course!” - Randhawa Verma

I like fundamental approach used by author. Will see:) To prepare such a course - it's a really hard and big job. Respect and thank you.” - Serhii Kovalenko

Wonderful content and things explained in a nutshell. Overwhelmed by Author's dedication to put things in such a way that any novice or manual tester can follow and understand and definitely be on-boarded as a Selenium Automation Engineer next day at work. Thanks a million times for creating these courses! One Stop for Automation."- Rupashree Geethaaviji Ananthakrishna

“I am familiar with Nikolay from a course I saw on TestAutomation and have the highest regard for him. Glad to see him on Udemy.” - Annamalai Viswanathan

“One Of the Best courses on Selenium With C#. Cheers Nikolay!!” - Saransh Vaid

Who this course is for:

  • A test automation professional who wants to deepen your knowledge with API testing
  • Understand how APIs work
  • Have basic JavaScript knowledge
  • Want to keep improving in your domain

Course content

1 section23 lectures1h 57m total length
  • Facebook Group- Get Access to our Test Automation Masters secret group!
    00:12
  • Weekly JavaScript Testing Tips
    00:05
  • Free course for life, I hope!
    00:35
  • Introduction
    00:48
  • Start a Server
    03:09
  • Register endpoint
    04:23
  • Testing endpoint with Postman and Cypress
    09:03
  • Updating Cypress to be robust
    02:47
  • Creating Mongo DB
    03:58
  • Hiding username and password in env file
    03:13
  • Registering out first user
    11:16
  • Add positive and negative test case
    07:31
  • Making a more robust test
    03:42
  • Removing duplication
    04:12
  • Add body validation logic
    08:54
  • Add creation validation test
    12:56
  • Extract validation
    06:42
  • Logic to avoid duplicate user creation
    10:17
  • Encrypt a password
    05:26
  • Add login endpoint
    05:45
  • Testing the login endpoint
    05:02
  • Add JWT
    06:33
  • BONUS LECTURE!!!
    00:48

Instructor

Principal solutions architects and passionate teacher
Nikolay Advolodkin
  • 4.3 Instructor Rating
  • 15,910 Reviews
  • 72,268 Students
  • 12 Courses

Nikolay Advolodkin is a prolific Automation Test & Quality Assurance Engineer. Currently, he is the CEO and Software Testing Instructor at Ultimate QA. He has been voted as one of 33 Test Automation Leaders to follow in 2017 by TechBeacon. He is also the #1 Selenium Webdriver instructor in the world as rated by Udemy.

He is a frequent Contributor for the blog, SimpleProgrammer and a speaker at Automation Guild 2017.When he isn’t immersed in the realm of coding and all-things QA, Nikolay Advolodkin enjoys self-improvement and aims to hone his vast skill set daily, all while teaching online students how to master automated software testing.