How are tests on APIs supposed to work?

Hi all,

I’m relatively new to API testing in Postman and I’m really confused. Either the Postman developers have a completely different idea of how to test an API than I do, or I’m not understanding how the product is supposed to work.

What I want:

  • be able to check my tests (and API spec) in to GitHub
  • have various tests per API endpoint to test various success/error scenarios
  • call other APIs other than the API I’m testing to test that the API did what it was supposed to

First of all, I’ve created an API because that seems to be the only way to easily sync a Postman project with Git (because Postman uses this weird internal database format that you can’t store in version control.)

Now, on the Test tab of the API, I want to add a collection with tests. But I have three options:

  • Test suites
  • Integration tests
  • Contract tests
    What’s the difference? They all seem to do the same thing??

Now, I add some tests and I validate and it tells me “Issues found” - “The underlying collection is not in sync with the API schema. Review these issues to keep the collection in sync.”

Why this error? Why would my tests be “in sync” with my API? They’re tests, not API definitions.
So for some of my API calls it says:

Request not found in schema. Selecting this change will remove this request from collection.


Request doesn’t match schema when validated against (API method)

All the documentation links point to the same page with only very trivial instructions:

Can someone explain this please? Am I just trying to use the wrong product for the job? Then I’ll happily switch to something else, like SoapUI. But Postman seems popular with a lot of people, so if it can do this, I’d prefer to use it.