我使用摩卡来运行我的测试。我正在使用命令make test
运行我的测试。因此,我的Makefile看起来如下:
Makefile:
test:
# Clear console log before we start.
@clear
# Make sure we are not having too much modules.
@npm prune
# Make sure we have the required modules.
@npm install
# Clear the console, so we only see the test results.
@clear
# Run the test.
./node_modules/.bin/mocha-casperjs sample.js --xunit=xmllog.xml
.PHONY: test
但是xmllog.xml从来没有创建过。在运行测试之前,我试着触摸xmllog.xml。我试着在测试中出现错误,以确保跳过失败的测试。我已经对失败的测试进行了评论。但是没有创建xmllog.xml。有人有线索吗?
我正在运行mocha-casperjs版本1.1.0-beta3。
谢谢!
答案:
多亏了@vanadium23 23,我才能解决这个太简单的问题。我混淆了CasperJS本身和mocha-casperjs的文档。他的回答是:
在文档中,没有-xunit这样的选项。相反,您需要使用选项--file=xmllog.xml
谢谢@vanadium23 23
发布于 2015-04-20 00:46:44
在文档中,没有-xunit这样的选项。相反,您需要使用选项--file=xmllog.xml
https://stackoverflow.com/questions/29742729
复制相似问题