This is my first post on Stack Overflow so I hope I'm doing it right.
So I have a config file that looks like this
exports.config = {
specs: [
'./test/specs/change-account-name.test.js',
'./test/specs/change-account-language.test.js',
'./test/specs/change-account-timezone.test.js'
],
maxInstances: 10,
capabilities: [{
maxInstances: 5,
//
browserName: 'chrome',
acceptInsecureCerts: true
}],
logLevel: 'info',
baseUrl: "<webpage address>",
waitforTimeout: 10000,
connectionRetryTimeout: 120000,
connectionRetryCount: 3,
services: ['chromedriver'],
framework: 'mocha',
reporters: [
'spec',
[CustomReporter, {
application: "<web app name>",
system: "production",
outputDir: "./results/"
}]
],
mochaOpts: {
ui: 'bdd',
timeout: 60000
}
}
I want to gain access to the file names of the specs after all the test suites have run. I thought these would be accessible from the afterSession hook through the spec-parameter. For my example this would look something like this:
[
'./test/specs/change-account-name.test.js',
'./test/specs/change-account-language.test.js',
'./test/specs/change-account-timezone.test.js'
]
But when I inspect the argument only one of the spec files is passed to specs:
['./test/specs/change-account-name.test.js']
Any ideas why this is the case?