Reader small image

You're reading from  Building Microservices with Node.js

Product typeBook
Published inMay 2024
Reading LevelIntermediate
PublisherPackt
ISBN-139781838985936
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Daniel Kapexhiu
Daniel Kapexhiu
author image
Daniel Kapexhiu

Daniel Kapexhiu is a software developer with over 6 years of working experience developing web applications using the latest technologies in frontend and backend development. Daniel has been studying and learning software development for about 12 years and has extended expertise in programming. He specializes in the JavaScript ecosystem, and is always updated about new releases of ECMAScript. He is ever eager to learn and master the new tools and paradigms of JavaScript.
Read more about Daniel Kapexhiu

Right arrow

API testing and API gateway

API testing is crucial for ensuring the reliability and correctness of microservices. An API Gateway is a central component in a microservices architecture, providing a unified entry point for managing and securing APIs.

API testing

API testing is the process of confirming that an API is working as expected. Developers can run API tests manually, or they can automate them with an API testing tool. There are several types of API tests, and each one plays a distinct role in ensuring that the API remains reliable:

  • Unit testing: In unit testing, we test individual units of code (functions, modules) in isolation. Requirements and examples are as follows:
    • Tools: Testing frameworks such as Jest, Mocha, or Jasmine.
    • Example (using Jest):
      test('adds 1 + 2 to equal 3', () => {
        expect(sum(1, 2)).toBe(3);
      });
  • Integration testing: Through integration testing, we verify the interaction between different components or services. Requirements...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Building Microservices with Node.js
Published in: May 2024Publisher: PacktISBN-13: 9781838985936

Author (1)

author image
Daniel Kapexhiu

Daniel Kapexhiu is a software developer with over 6 years of working experience developing web applications using the latest technologies in frontend and backend development. Daniel has been studying and learning software development for about 12 years and has extended expertise in programming. He specializes in the JavaScript ecosystem, and is always updated about new releases of ECMAScript. He is ever eager to learn and master the new tools and paradigms of JavaScript.
Read more about Daniel Kapexhiu