使用nightwatchjs,目前我具有以下命令文件;
我从测试脚本中引用了这些;
"Volvo landing page Fuel Type SEO Crawl paths are correct": function (browser) {
browser.cars_for_sale.make_level.seo_crawl_path_links.fuelTypeArrayComparison();
},
"Volvo landing page Colour SEO Crawl paths are correct": function (browser) {
browser.cars_for_sale.make_level.seo_crawl_path_links.colourArrayComparison();
},
etc
但是,我还想编写一个命令文件,使用一个命令文件来测试所有这些文件。
(在allArrayComparison.js文件中)的内容;
exports.command = function() {
this
...runs the colourArrayComparison.js file
...runs the engineSizeComparison.js file
etc
然后像这样从我的测试脚本中引用该文件;
"Volvo all arrays are displayed": function (browser) {
browser.cars_for_sale.make_level.seo_crawl_path_allArrayComparison();
},
那么在nightwatch.js中实际上是否可以从另一个命令文件引用另一个命令文件?
或者有更简单的方法吗?
任何帮助将不胜感激。
谢谢