Integration Test of REST APIs with Code Coverage

后端 未结 2 1238
忘了有多久
忘了有多久 2021-02-01 07:45

We have built a REST API that exposes bunch of business services - a business service may invoke other platform/utility services to perform database read and writes, to perform

2条回答
  •  野的像风
    2021-02-01 08:24

    You may also check out the tool named Arquillian, it's a bit difficult to set up at first, but provides the complete runtime for integration tests (i.e. starts its own container instance and deploys your application along with the tests) and provides extensions that solve your problems (invoking REST endpoints, feeding the databases, comparing results after the tests).

    Jacoco extension generates the coverage reports than can be later displayed i.e. by the Sonar tool.

    I've used it for a relatively small-scale JEE6 project and, once I had managed to set it up, I was quite happy with how it works.

提交回复
热议问题