量角器fdescribe and fit不适用于jasmine reporters
我在conf.js中有这个量角器fdescribe and fit不适用于jasmine reporters,jasmine,protractor,Jasmine,Protractor,我在conf.js中有这个 onPrepare: function() { /**if comment out then spec runs, if uncomment then spec doesn't run var jasmineReporters = require('jasmine-reporters'); jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({ conso
onPrepare: function() {
/**if comment out then spec runs, if uncomment then spec doesn't run
var jasmineReporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
consolidateAll: true,
filePrefix: 'portal_tests_xmloutput',
savePath: './test_results_report'
})); **/
},
};
在我的test_spec.js中
fdescribe('my tests', function() {
it('test1', function(){
});
fit('test2', function(){
});
it('test3', function(){
});
}
当我运行测试时,它将输出
[launcher] Running 1 instances of WebDriver
Started
No specs found
Finished in 0.002 seconds
如果我在conf.js中注释掉jasmine reporters声明并再次运行,它将运行正确的测试和输出
[launcher] Running 1 instances of WebDriver
Started
test2
.
1 spec, 0 failures
Finished in 5.675 seconds
为什么jasmine reporters会干扰重点规范测试?我想让jasmine reporters在使用fdescribe和fit跑步时启用。我正在使用
量角器:1.8.0
jasmine reporters:2.0.4您是否在配置文件中提供了
framework='jasmine2'
设置 这个问题在jasmine中得到了解决-reporters@2.0.5
显然,当使用
fit
时,jasmine不会调用suiteStarted
或suiteDone
回调jasmine reporters
依赖于调用这些方法,因此被炸毁。从2.0.5开始,它现在尝试检测这些方法是否已被调用并进行了调整。Nice catch-想知道它为什么停止工作。升级没有为我修复它。