Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement config file #3131

Closed
AndreyBelym opened this issue Nov 19, 2018 · 3 comments
Closed

Implement config file #3131

AndreyBelym opened this issue Nov 19, 2018 · 3 comments
Assignees
Labels
AREA: server STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: enhancement The accepted proposal for future implementation.
Milestone

Comments

@AndreyBelym
Copy link
Contributor

No description provided.

@AndreyBelym AndreyBelym added TYPE: enhancement The accepted proposal for future implementation. AREA: server DOCUMENTATION: required labels Nov 19, 2018
@AndreyBelym AndreyBelym added this to the Sprint #22 milestone Nov 19, 2018
@miherlosev
Copy link
Contributor

miherlosev commented Nov 20, 2018

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.
  • configuration file are searched in the current directory (process.cwd()). If it exists then TestCafe reads the options from it.
  • if user-defined options merge with options from the configuration file then TestCafe shows the inform message 'The values for from the configuration file will be ignored'.
  • BREAKING CHANGES: at present, it's forbidden to use multiple calls for src, browsers and reporter methods (see code exampe). Instead of this, pass an array of the arguments to the appropriate method.
  • Programmatic .reporter method supports the path to saved report as a second parameter
  return runner
      .reporter('json', '/reports/report.json')
  • Configuration file uses a command line naming convention
.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'
         }

@miherlosev
Copy link
Contributor

Implemented in #3147

@lock
Copy link

lock bot commented Mar 27, 2019

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.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 27, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AREA: server STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: enhancement The accepted proposal for future implementation.
Projects
None yet
Development

No branches or pull requests

2 participants