简体   繁体   English

如何使用多个私有插件运行Grails应用程序的所有单元测试

[英]How to run all unit tests for Grails app with multi private plugins

My project includes several private plugins (modules) with unit tests. 我的项目包括几个带有单元测试的私有插件(模块)。 I tried to run tests in main directory and in plugin's using a grails test-app , but the script only find tests in main project. 我试图使用grails test-app在主目录和插件中运行测试,但是脚本仅在主项目中找到测试。 Plugins have across dependencies. 插件具有跨依赖关系。 Which command/script should I use to execute all tests in main project and in private plugins(modules)? 我应该使用哪个命令/脚本来执行主项目和专用插件(模块)中的所有测试?

Grails 2.5 IntelliJ IDEA 14.1.5 Grails 2.5 IntelliJ IDEA 14.1.5

Unit tests in your Grails application are targeted to test the code of your web application but not the code of the plugins your web application uses. Grails应用程序中的单元测试旨在测试Web应用程序的代码,而不是Web应用程序使用的插件的代码。

If you want to test the code of your plugin you need to implement a unit test in the plugins project folder. 如果要测试插件的代码,则需要在plugins项目文件夹中实施单元测试。

If you want to test the interaction of your web application with the included plugins you need to implement an integration test and test your Grails artefact (controller, service, ..) and verify the interaction. 如果要测试Web应用程序与随附插件的交互,则需要实施集成测试并测试Grails工件(控制器,服务等)并验证交互。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM