我为 intern(测试框架)
创建了自动化测试,每当我通过 selenium-server
运行测试时,它都会运行一系列 foo
和 bar
单元测试不在我的测试目录中。这些测试是从 intern 还是 selenium 目录运行的?我无法弄清楚如何停止或删除这些测试。有什么建议吗?
这是我的 intern.js
文件,它没有为单元测试定义任何 suites
:
/* Name of the tunnel class to use for WebDriver tests. */
tunnel: "NullTunnel",
loaderOptions: {
/* Packages that should be registered with the loader in each testing environment */
},
/* Unit test suite(s) to run in each browser */
suites: [ /**/ ],
/* Functional test suite(s) to execute against each browser once unit tests are completed */
functionalSuites: [ "src/test/intern/integration/ITIndexHtml" ],
/* A regular expression matching URLs to files that should not be included in code coverage analysis */
excludeInstrumentation: /^(?:tests|node_modules)\//
});
最佳答案
最初在功能测试期间运行的测试是功能测试。浏览器并不都具有相同级别的测试支持,有时它们实现测试功能的方式也略有不同。实习生测试远程浏览器以确定哪些有效,哪些无效,然后尽可能尝试提供一致的行为(在不同浏览器之间保持一致)。
关于实习生在没有被调用的情况下运行 foo 和 bar 测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38129992/