Hacker News new | ask | show | jobs
by adamb_ 3155 days ago
If you've built a wrapper around the integration in your application logic -- such that handling the actual HTTP requests has been abstracted away from the rest of your application -- then you can use a mocking framework (like Mockito for Java) directly in the unit tests. If you haven't, or want higher-level / isolated integration testing, you can create a mock application that mimics GitHub's API, put it in a Docker container, and use a docker-compose.yml during testing to quickly spin up your new test environment.