After discussion, we decide to implement the following concepts:
.testcaferc.json is a name of the configuration file.<browser_name> and <sources> parameters become optional. I.e. it's a possible to run TestCafe with testcafe command.process.cwd()). If it exists then TestCafe reads the options from it.src, browsers and reporter methods (see code exampe). Instead of this, pass an array of the arguments to the appropriate method..reporter method supports the path to saved report as a second parameter return runner
.reporter('json', '/reports/report.json')
.testcaferc.json
{
'hostname': '123.456.789',
'port1': 1234,
'port2': 5678,
'src': 'path1/folder',
'ssl': {
'key': keyFile.name,
'rejectUnauthorized': 'true'
},
'browsers': 'ie',
'concurrency': 0.5,
'filter': {
'fixture': 'testFixture',
'test': 'some test',
'fixtureGrep': '^Unstable'
},
'reporter': 'json'
}
Implemented in https://github.com/DevExpress/testcafe/pull/3147
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests. For TestCafe API, usage and configuration inquiries, we recommend asking them on StackOverflow.
Most helpful comment
After discussion, we decide to implement the following concepts:
.testcaferc.jsonis a name of the configuration file.<browser_name>and<sources>parameters become optional. I.e. it's a possible to run TestCafe withtestcafecommand.process.cwd()). If it exists then TestCafe reads the options from it.src,browsersandreportermethods (see code exampe). Instead of this, pass an array of the arguments to the appropriate method..reportermethod supports the path to saved report as a second parameter