question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feature] Enable overriding of `config.tests` for `run-multiple`

See original GitHub issue

Hello, first thank you for the work you have put in here!
(This is the second part of a feature request. For the first part please go to #976.)

Sidenote We at @trivago Leipzig use CodeceptJS for end-to-end testing and are working currently on a simple way to run multiple jobs in parallel without using grep and tags.

Feature A first step into having a working solution is to enable CodeceptJS to load tests not only by grep/tags but also by their concrete file name. As this is already working for the run command it would be a useful enhancement to CodeceptJS itself when the user is able to create multiple groups and override inside them the tests that should be run.

The true power with this feature lies in combination with #976. If both features get accepted it will be possible do dynamically create run-multiple configuration by the amount of overall scenarios and distribute them evenly between a defined amount of runs. For a working examples please have a look here and here.

Technical explaination I’d like to propose to extend the runSuite function to also pass the tests configuration down from the multiple configuration to the CodeceptJS runcall.

Example

{
  "tests": "./*_test.js",
  "multiple": {
    "default": {
      "browsers": ["chrome", { "browser": "firefox"}]
    },
    "group1": {
      "tests": "./*_group1_test.js",
      "browsers": ["chrome"]
    },
    "group2": {
      "tests": "./*_group2_test.js",
      "browsers": ["chrome"]
    }
  }
}

Todos

  • Add test-runner service in docker-compose.yml
  • Write test case and verify nothing is breaking
  • Adapt runSuite function
  • Create a Pull Request in the fork https://github.com/sveneisenschmidt/CodeceptJS/pull/2
  • Feedback by maintainers
  • Create a Pull Request in this repository

What do you think?

PS: If you want to see why glob support is needed please look at my demo repository:

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sveneisenschmidtcommented, Mar 4, 2018

@DavertMik @reubenmiller Thank you for the great feedback! I filed the PRs but got violations by Hound. Going to fix them soon.

I will join Slack and then we can further discuss how to implement dynamic multiple runs in a simple way. I have already an idea, but it relies on these concrete features.

Thank you!

Update: Added my first ideas https://gist.github.com/sveneisenschmidt/02c98a4a416ec8f3610ec6409e16393e

1reaction
DavertMikcommented, Mar 2, 2018

Yes, this looks like a good start to a long road. So that’s why I’d propose to add @sveneisenschmidt to our dev channel in Slack and continue there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[feature] Enable overriding of config.tests for run-multiple #978
We at @trivago Leipzig use CodeceptJS for end-to-end testing and are working currently on a simple way to run multiple jobs in parallel...
Read more >
Organizing Test Suite - WebdriverIO
This feature will help you to accomplish the same goal. When the --spec option is provided, it will override any patterns defined by...
Read more >
Overriding configuration in ASP.NET Core integration tests
This post gives an overview of the various ways to override configuration values in ASP.NET Core integration tests.
Read more >
Configuring Jest
Calling jest.useFakeTimers() in a test file will use these options or will override them if a configuration object is passed. For example, you ......
Read more >
Commands - CodeceptJS
Load config and run tests from test dir ... npx codeceptjs run --override '{ "helpers": {"WebDriver": {"browser": ... Run multiple suites.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found