Troubleshooting a test run
If the tests that were running ./test-em-all.bash start stop fail, following these steps can help you identify the problem and resume the tests once the problem has been fixed:
- First, check the status of the running microservices with the following command:
docker compose ps
If all the microservices are up and running and healthy, you will receive the following output:
- If any of the microservices do not have a status of
Up, check their log output for any errors by using thedocker compose logscommand. For example, you would use the following command if you wanted to check the log output for theproductservice:
docker compose logs product
At this stage, it is not easy to cause an error to be logged, since the microservices are so simple. Instead, here is a sample error log from the
...productmicroservice in Chapter 6, Adding Persistence. Assume that the following is found in its log output: