Unit Test Your APIs. Test Everything.

API Tester is a free and open source platform to test APIs, for both simple & detailed proxy tests. Because good testing shouldn't just be for source code.

Background

TDD is a practice to improve software quality by monitoring detailed test results in a traffic light format. This makes it easier to track quality, and see regressions quickly. API Tester applies this principle to API calls, where quality issues & regressions can often be detected early, before they reach users.

new-indicator

Create a Test Suite

Click the "Create Test Suite" button above to create a suite, or visit the GitHub repo for REST calls. Save your test suite admin id as it will never be shown again.

Add test cases

Test cases are added in the test dashboard. HTTP services can be tested immediately, others can update results using a simple REST call.

View results in real-time

Results are displayed in real-time in your dashboard, and can be retrieved in CTRF format in YAML or JSON via REST. Monitor your tests in real-time at https://tdd.upstr.dev/dash.

Easy API & Proxy Unit Tests

Start with easy API tests by testing headers & payloads. Go deeper with Proxy Unit Tests of runtime variables with the sample Apigee integration, with more platforms to follow.

Simple API Tests

Any API can be tested through header and payload assertions. Test results can be saved and broadcast out in real-time to any web clients with either the admin or view id.

curl -X POST https://tdd.upstr.dev/tests/run \
-H "Content-Type: application/yaml" \
-d '
tests:
  - name: test apigee mock
    url: https://mocktarget.apigee.net
    path: /json
    method: GET
    assertions:
      - $.firstName==john
      - $.city===San Jose
      - response.status===200
      - response.header.content-length===68
'
                            

Proxy Unit Tests

The same mock endpoint is proxied through Apigee here, so we can also set and test variables in the test case. These assertions would fail without the Apigee shared flow.

curl -X POST https://tdd.upstr.dev/tests/run \
-H "Content-Type: application/yaml" \
-d '
tests:
  - name: test apigee mock proxy
    url: https://api.upstr.dev/v1/apigeemock
    path: /json
    method: GET
    variables:
      test.name: test123
    assertions:
      - test.message===Hello test123!
      - proxy.basepath===/v1/apigeemock
'