Skip to main content

Integration Testing

Purpose​

Integration testing verifies that the components of the API interact correctly, as expected in end-to-end workflows.

Test Approach​

  • Use mock requests and mock data where appropriate.
  • Confirm that endpoints return correct status codes and response structures.
  • Verify that POST requests correctly process input data.

Example Integration Test Cases​

Test CaseDescriptionInputExpected Output
GET /testVerify endpoint returns correct JSONN/A{ "name": "Test1", "status": "test" }
POST /test/:id with infoEnsure POST data is processed{ "info": "hello" } and id=123{ "name": "Test message with info: hello and ID: 123" }
POST /test/:id without infoValidate handling of missing data{} and id=123Status code 418 with { "message": "No info!" }

Running Integration Tests​

Currently, the unit tests also serve as a basic integration check.

npm test

Notes​

  • All tests are automated.
  • No manual entry or interpretation is required.