[英]Where to place JavaScript unit test files in a web application
I am working on one component (which is a web application - struts - that is deployed as a WAR), and I developed some new Javascript for which I wrote some QUnit testing. 我正在研究一个组件(这是一个Web应用程序 - struts - 部署为WAR),我开发了一些新的Javascript,我为此编写了一些QUnit测试。 I do not know where I need to place the files that go with my QUnit (qunit.js, qunit.ccs, myTestClass.js, and the hmtl page), so that they are not packaged and deployed in the production artifact.
我不知道在哪里需要放置与我的QUnit(qunit.js,qunit.ccs,myTestClass.js和hmtl页面)一起使用的文件,以便它们不会打包并部署在生产工件中。
For example, all the java unit test goes into a test folder. 例如,所有java单元测试都进入测试文件夹。 But the html/jsp/js files need to be somewhere in the webapp folder.
但是html / jsp / js文件需要位于webapp文件夹中的某个位置。
Thanks! 谢谢!
I ran into the same problem, I placed them on directory outside of the webapp and created a .html that calls loads the actual js library using a relative path. 我遇到了同样的问题,我将它们放在webapp之外的目录中并创建了一个.html,它使用相对路径调用加载实际的js库。 I don't think people have a standard location for this question as of yet.
我不认为人们对此问题有一个标准的位置。
I am using IntelliJ Idea so its easy to define a folder outside of the webapp that does not go in the final war. 我正在使用IntelliJ Idea,因此很容易定义webapp之外的文件夹,而不是最后的战争。
Hope this helps. 希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.