Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

CodeSignal

Automating API Tests with C++

via CodeSignal

Overview

Learn to write automated tests for C++ APIs using gtest and httplib. You'll create test cases, send API requests, assert results, reuse code with fixtures, and cover CRUD and auth scenarios—ensuring your APIs are reliable and fully tested.

Syllabus

  • Unit 1: Introduction to API Testing with C++
    • Basic API Test with C++
    • Testing API Requests with Arrange-Act-Assert Pattern in C++
    • Focus on Retrieving Complete Todo Items with gtest
    • Retrieving a Todo Item by ID Using gtest and httplib
  • Unit 2: Organizing Tests with Classes and Fixtures in C++
    • Using Google Test Fixtures for API Testing
    • Fixing Fixture Setup in Google Test
    • Creating and Using Fixtures in C++ Tests
    • Encapsulating Test Functions in Class-Based Structures
    • Testing PATCH Request for Todo Item Update in C++
  • Unit 3: Testing CRUD Operations with Setup and Teardown in C++
    • Building Setup Phase for Test Environment in C++
    • Implementing Teardown Phase for Test Cleanup in C++
    • Ensuring Independent and Error-Free Tests with gtest Fixtures
  • Unit 4: Testing Authenticated API Endpoints with C++
    • API Key Authentication Test Implementation
    • Implement Session Test Helper and Login
    • Hello World Task
    • Testing JWT Authentication in C++
    • Hello World Function in C++

Reviews

Start your review of Automating API Tests with C++

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.