From 74e5ad4564956da39e39abf079f96f5077d8b9d2 Mon Sep 17 00:00:00 2001 From: Ravi Sawlani Date: Thu, 19 Oct 2023 19:32:45 +0530 Subject: [PATCH] added test --- test/src/cli/testParallelExecution.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/test/src/cli/testParallelExecution.js b/test/src/cli/testParallelExecution.js index 7039476279..63043a1838 100644 --- a/test/src/cli/testParallelExecution.js +++ b/test/src/cli/testParallelExecution.js @@ -12,6 +12,7 @@ describe('test Parallel Execution', function() { const allOpts = []; this.timeout(10000); + let workerCount; beforeEach(function() { mockery.enable({useCleanCache: true, warnOnUnregistered: false}); @@ -48,7 +49,7 @@ describe('test Parallel Execution', function() { this.tasks = []; this.index = 0; - + workerCount = maxWorkerCount; workerPoolArgv.push(args); } @@ -628,4 +629,20 @@ describe('test Parallel Execution', function() { assert.equal(client2.transport.settings.webdriver.port, 9999); }); + it('test number of work threads for parallel execution', function() { + + const CliRunner = common.require('runner/cli/cli.js'); + const runner = new CliRunner({ + reporter: 'junit', + config: path.join(__dirname, '../../extra/parallelism-count.json'), + env: 'default', + headless: true + }); + + runner.setup({}); + + return runner.runTests().then(_ => { + assert.strictEqual(workerCount, 4); + }); + }); });