fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Investigate API integration tests

Open terracatta opened this issue 8 years ago • 1 comments

As I currently understand it, we do not currently fully test our API endpoints (all the way down the stack) and assert expected responses.

I would like to investigate either using or building a simple API integration testing library or framework so we can get 100% coverage across all of our API endpoints.

While I don't have a complete list of requirements, below is a list of basic expectations:

  • We are testing the whole stack up to the API response (including pulling data from the DB)
  • We can automate common actions like logging in as macros/functions so tests don't contain a lot of duplicate code
  • The test suite can correctly reset the DB to a clean state to achieve good isolation between tests (Rails wraps each DB change into a transaction that is rolled back after the test is completed)
  • We can manipulate things in the test client like cookies, user agents, etc.
  • Some basic websocket support so we can correctly test our new query page
  • Integrated with our CI process
  • Can run in a reasonable amount of time (less than 5 min would be great)

terracatta avatar Mar 02 '17 16:03 terracatta

Noting https://docs.pact.io/ for consideration when we go to do this.

zwass avatar Mar 15 '17 00:03 zwass