
Master api testing and automation using typescript with real world APIs, building a scalable test framework and practicing authentication, reporting, and CI with GitHub and Jenkins.
Explore the course overview to map APIs and tech stack, set up TypeScript, and build tests using HTTP methods, then implement authentication, and prepare reports and CI with Jenkins.
Join a startup as a test automation engineer to design and automate API tests for RESTful services using JavaScript. Improve the automation framework and support CI/CD within a TypeScript workflow.
Explore Swagger documentation to learn how to test web services, view response bodies and headers, and try get and post requests directly.
Decide and justify the tech stack for your API testing framework, choosing TypeScript with Supertest and Jest to align with the existing NestJS and Swagger-driven API environment.
Kick off week three by initializing a project, installing dependencies, and configuring TypeScript with type definitions and configuration file. Practice reading documentation through setup exercises to install libraries for testing.
For task 3.1, set up a new project by verifying NodeJS, initializing npm, and installing jest and supertest as the test runner and http assertion library.
Set up a Node project for API testing by installing Node and NPM, initializing with npm init, and installing jest and supertest as dev dependencies; review the package.json.
Set up TypeScript with jest by installing a TypeScript preprocessor, add types for jest and for super test, and create a configuration so TypeScript works with your tests.
Install and configure jest for a TypeScript project, add type definitions and supertest typings, set up a basic configuration with npx, and downgrade jest to match type definitions.
Demonstrate an API testing framework with a proof of concept on json placeholder.com, covering get, post, put, patch, and delete to secure team approval.
Master get requests in a restful api by testing a get call in Postman against json placeholder, verifying status 200 and json response, then implementing tests with supertest and jest.
Implement a get request for a proof-of-concept using supertest in TypeScript, wiring describe and it blocks against jsonplaceholder's /posts, with async/await and status 200 assertions.
Explore how query parameters in rest APIs extend the get, put, post, and delete methods to filter, sort, and paginate results via URL key-value pairs, with Postman examples.
Learn to implement and test get requests with query parameters in supertest, using direct query strings or the .query() helper to filter by postId and limit, and inspect responses.
Explore how the post method creates resources by sending a json, xml, or text payload to a post uri, with a json body including title, body, and userId.
Learn how to implement post requests in super test by sending a body with dot post and dot send, and assert that the response body title matches the sent data.
Update an existing RESTful resource with the put method by targeting a specific id and sending the full title, body, and userId, demonstrating overwriting behavior in Postman.
Implement the put method using super test, update the data, and verify the title changes by comparing the before and after get responses.
Master the patch method for partial updates to an existing resource, updating only changed fields instead of the whole body, versus put's full payload in Postman.
Implement a patch request by copying the put request, sending only the title, and updating the http method from put to patch while running the specs to verify the response.
Explore the delete method to remove server resources, understand responses and status codes, and test deletion in Postman and with SuperTest, including follow-up get checks.
Learn to implement delete requests in a TypeScript API test, using request.delete by id, verify a 200 response and an empty body with precise assertions.
Learn to design and automate API tests for brand endpoints using TypeScript, covering get all, get by ID, create, update, and delete with assertions.
Practice calling the get /brands endpoint, verify a 200 response, and ensure a list with at least two brands, each having id and name.
Develop and run a TypeScript API test for get brands endpoint using supertest in VS Code, validating 200 status, body length, and verifying underscore id and underscore name as keys.
Learn to fetch a single brand by id with api testing in TypeScript, verify a 200 response and the brand name using swagger's try it out feature.
Master API testing and automation using TypeScript by implementing a get /brands/:id test, asserting status and name, hardcoding an id, debugging 404s, and iterating tests.
Post to /brand to create a brand with a name and description, and confirm a 200 response. Validate that the response echoes the name and includes createdAt, guided by Swagger.
Learn to test the post /brands endpoint by creating a brand in VS Code, using describe blocks, post requests, and assertions on status, name, and createdAt to ensure unique responses.
Master api testing and automation using typescript: update and delete a brand via put /brand/:id and delete /brand/:id using Swagger, with partial and full updates and test assertions.
Learn how to test and automate put and delete /brand/:id operations using TypeScript, verify responses, handle test optimization, and manage test data across updates and deletions.
Master API testing and automation using TypeScript by structuring tests in a sequential create, get, update, delete flow to enable repeatable runs and CI integration.
Generate a unique brand name for each test run by appending a random id to fix the post /brand test and verify the response name matches the generated data.
create a unique brand in the post brand test, capture its id and name, and reuse them in the get brand id test to ensure reliable, repeatable api testing.
Fix put and delete /brand/:id tests by reusing the unique id from create/get tests and passing it to update and delete tests, while keeping the describe blocks in place.
Fix put and delete tests for /brand/:id by using shared variables and parent describe blocks to share a new brand across tests, enabling repeatable tests without hard-coded data.
Expand testing coverage by implementing negative testing with schema validation and business logic checks to ensure API data adheres to structure, format, and core rules.
Implement schema validation for a post brand request by enforcing a required name and minimum length two, with 422 errors and messages name is required and brand name too short.
Master TypeScript-based testing and automation focuses on business logic validation, preventing duplicate brand entries and handling non-existent brand ids with 404 errors through tests.
Write tests for schema validation, enforcing a 30-character maximum for brand names and ensuring the brand description is a string. Validate put and delete brand ID requests for non-existent IDs.
Learn to implement negative tests for a brand API, covering schema and logic validations, max name length, description is a string, invalid id errors, ensuring 422 responses and clear messages.
Leverage before all and after all hooks to create a brand before tests and clean up afterward, enabling independent, refactor-friendly API testing workflows with TypeScript.
Learn how to use the before all hook to create a brand once and fetch a brand id, eliminating test dependencies and ensuring independent, stable api tests.
Learn how to use the before all hook to create a brand once with a post request and share data across tests, reducing dependencies and duplicate code.
Apply the before all hook to remove data and test dependencies for brand id and delete brand id tests, enabling independent runs and reducing duplicate code.
Learn to use a before all hook in API tests to create a brand, share its id across tests, and remove dependencies, improving test independence and maintainability.
Learn to use the after all hook for teardown in API testing with TypeScript, cleaning up created brands after tests to keep databases small.
In today’s digital landscape, APIs are integral, serving as the connectors that enable different software systems to communicate and interact. They’re essential for the smooth functioning of everything from web applications to mobile apps. However, ensuring these APIs work correctly and efficiently is a critical task – and that’s precisely where API testing steps in.
API testing is crucial to ensure that these vital interactions happen smoothly and securely. But let’s face it, manual API testing can be a real challenge. It’s time-consuming, prone to human error, and struggles to keep up with the rapid pace of development and deployment in today’s agile environments.
That’s where API Test Automation shines. It allows teams to test APIs quickly, accurately, and efficiently, giving them the confidence to deploy their apps knowing that they’ll work as expected. And the best part? You can be the one to provide this invaluable service to your team.
This course, “Mastering API Test Automation using TypeScript“, is designed to equip you with the skills and knowledge you need to become an expert in API Test Automation. We’ll start with the basics and work our way up to advanced techniques, with plenty of hands-on experience along the way.
Here’s what you’ll learn:
Project overview and tech stack familiarization
Setup and installation of necessary tools and frameworks
Proof of concept using different HTTP methods
Building and improving API tests on a real project
Scaling tests by implementing a testing framework
Implementing authentication in the test framework
Advanced topics like file uploads, utility files, reports, and CI integration with Jenkins
Best practices and tips for successful API test automation
By the end of this course, you’ll be able to confidently build scalable API test automation solutions, making you an invaluable asset to your team and paving the way for success in your career. So why wait?
Enroll now and let’s start this exciting journey together!