Open jdmwood opened 5 years ago
I was running into the same issue. Opted to set clearFoldersBeforeTest: false
and clear the directory with beforeLaunch. This way the directory is cleaned out when the test run first starts but not with each sharded test.
// config.js
let rmDir = require('../helpers/rmDir');
let path = require('path');
let testReportsDir = path.resolve(__dirname, '../reports/testreports');
...
beforeLaunch() {
// clean out the test results directory
rmDir(testReportsDir);
},
// rmDir.js
var fs = require('fs');
async function rmDir(dirPath)
{
try { var files = fs.readdirSync(dirPath); }
catch(e) { return; }
if (files.length > 0)
for (var i = 0; i < files.length; i++) {
var filePath = dirPath + '/' + files[i];
if (fs.statSync(filePath).isFile())
fs.unlinkSync(filePath);
else
rmDir(filePath);
}
return fs.rmdirSync(dirPath);
};
module.exports = rmDir;
Bug report
5.40
and6.0.0
Chrome 73.0.3683.86
11.5.0
The report shows the wrong number of tests - it shows whichever tests were run in one of the browser instances
npm install && npm test
It looks like the report gets cleared whenever one of the browser instances closes?
PS: I also tried with later protractor and webdriver-manager (^6.0.0 and webdriver-manager ^13.0.0). You can see this in * protractor-bug-1.zip. Not sure this is working correctly as I get weird errors.