我正在运行Angle App进行单元测试,我想在tfs中运行它,我想删除以前生成的xml文件。如果不这样做,则每个测试用例通过和失败都会从前一个xml中添加,是在上次运行中生成的
让我知道是否有一种方法可以在karma.config中进行配置,或者我可以更改npm命令来删除以前生成的报告
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-tfs-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
reporters: ['progress', 'tfs'],
//reporters: ['progress', 'coverage'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['ChromeHeadless'],
singleRun: false,
loggers: [{type: 'console'}],
tfsReporter: {
outputDir: 'testresults',
outputFile: 'testresults_${date}.xml'
}
});
};