Unit tests vs integration tests with Spring

前端 未结 7 744
清酒与你
清酒与你 2020-12-07 17:27

I\'m working on a Spring MVC project, and I have unit tests for all of the various components in the source tree.

For example, if I have a controller HomeContr

相关标签:
7条回答
  • 2020-12-07 18:30

    When I've created integration tests for web applications, I've put them in a separate directory. They are built using jUnit or TestNG and interact with the system under test using something like Selenium that hits the web pages as if they were users. The cycle would go like this: compile, run unit tests, build the web app, deploy it to a running server, execute the tests, undeploy the app, and report results. The idea is to test the whole system.

    0 讨论(0)
提交回复
热议问题