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.

Parallel and serial test running in one command

See original GitHub issue

Hello. Currently I’m running tests with using this npm scripts:

    "ava": "npm run ava:serial && npm run ava:parallel",
    "ava:serial": "NODE_ENV=test ava -vs test/*.test.serial.js",
    "ava:parallel": "NODE_ENV=test ava -v test/*.test.js",

Some tests I can run parallel and some test I can’t. What about parsing serial string in file name and run them serially? It would be great, because my approach is not too fast.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

28reactions
sindresorhuscommented, Nov 14, 2016

And if all tests in a file are serial, you can import just the serial test modifier:

import {serial as test} from 'ava';

// this is a serial test
test(t => {});
4reactions
vadimdemedescommented, Nov 13, 2016

Hey! You can use .serial() test modifier to run selected tests serially:

test.serial('requires to run serially', t => {
  // ...
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

Controlling the Serial and Parallel Test on XUnit
The tests that are in the same collection, it runs serially. By default, it is per class. Run Parallel. If you want to...
Read more >
TestNG Parallel Execution - How to run Selenium tests in ...
In parallel testing, the program's multiple parts (or modules) execute together, saving the testers a lot of time and effort. The operating ...
Read more >
How To Perform Parallel Test Execution In TestNG With ...
To trigger parallel test execution in TestNG, i.e., run tests on separate threads, we need to set the parallel attribute. This attribute ...
Read more >
Parallel Test Execution in Selenium : Tutorial | BrowserStack
The parallel test execution is different from sequential testing, where we test different modules or functionalities one after the other.
Read more >
Parallel Execution in Selenium: Session Handling & TestNG ...
Test cases in same instance will execute parallel but two methods of two different instances will run in different thread. The attribute thread- ......
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