Karate in Docker and CI/CD pipelines
As we have seen in the previous chapters, Karate is very powerful for API testing. However, so far, we have only run tests on our local systems. Also, these tests were run by us on an ad hoc basis. These are very helpful while developing applications or running tests when we want some information about the current state of APIs.
In many cases, this is not enough. Instead, these tests should be run automatically within build pipelines that typically pull the current application code and build and deploy it to a test server, test it, and continue deployment until this reaches live instances to be used in production. This process is called continuous integration/continuous deployment (CI/CD), with the goal of a completely automated build and test flow.
In any case, this must be all triggered by automation, so we don’t forget to run tests at the appropriate time. This does not mean, though, that we should not be informed about the test...