midniteio / multi-cuke Goto Github PK
View Code? Open in Web Editor NEWParallel cucumber-js testing via Node's child_process.spawn api
Parallel cucumber-js testing via Node's child_process.spawn api
Is there any way to generate a json output format for the test execution ?
Passing the argument to the cli of -w 8 does not run 8 tests in parallel, I even tried editing the .js files for main and cli and hard coded the worker defaults to 8 but still only 4 are run.
Should setting the -w argument allow more than 4 to be run?
Thanks
TypeError: Cannot read property 'stack' of undefined
at PrettyParser.parseException (C:\jenkins\workspace\***\node_modules\multi-cuke\distribution\lib\parsers\pretty.js:125:35)
at PrettyParser.handleResult (C:\jenkins\workspace\***\node_modules\multi-cuke\distribution\lib\parsers\pretty.js:60:21)
at done (C:\jenkins\workspace\***\node_modules\multi-cuke\distribution\lib\test-handler.js:151:43)
at C:\jenkins\workspace\***\node_modules\multi-cuke\distribution\lib\test-handler.js:182:16
at bound (domain.js:280:14)
at runBound (domain.js:293:12)
at tryCatcher (C:\jenkins\workspace\***\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\jenkins\workspace\***\node_modules\bluebird\js\release\promise.js:504:31)
at Promise._settlePromise (C:\jenkins\workspace\***\node_modules\bluebird\js\release\promise.js:561:18)
at Promise._settlePromise0 (C:\jenkins\workspace\***\node_modules\bluebird\js\release\promise.js:606:10)
at Promise._settlePromises (C:\jenkins\workspace\***\node_modules\bluebird\js\release\promise.js:685:18)
at Async._drainQueue (C:\jenkins\workspace\***\node_modules\bluebird\js\release\async.js:138:16)
at Async._drainQueues (C:\jenkins\workspace\***\node_modules\bluebird\js\release\async.js:148:10)
at Immediate.Async.drainQueues [as _onImmediate] (C:\jenkins\workspace\***\node_modules\bluebird\js\release\async.js:17:14)
at tryOnImmediate (timers.js:543:15)
at processImmediate [as _immediateCallback] (timers.js:523:5)
I have runMultiFeature.js having following code :
const multicuke = require('multi-cuke');
var options = {
'paths': ['./login.feature'],
'tags': [],
'requires': ['./ui'],
'cucumberPath': "node_modules/cucumber/bin/cucumber.js",
'workers': 4,
'workerEnvVars': {},
'logDir': '.multiCuke_logs',
'silentSummary': false,
'verbose': false,
'inlineStream': false,
'failFast': false,
'devMode': false,
'strict': false
};
multicuke(options);
and executing the .js file using "node runMultiFeature.js"
getting following error:
multicuke();
^
TypeError: multicuke is not a function
at Object. (C:\UI_automation_201016\runMultiFeature.js:17:1)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:141:18)
at node.js:933:3
Requires exception handling if cucumber itself crashes wholesale.
With debug output of what is scheduled when, and what is currently running.
stderr is the only way to get messages to appear.
Transmute all json logs to a single json log for use in reports/jenkins plugins
When using the optional verbose flag, the actual scenarios running print 'undefined:undefined'
If the feature files we try to run are all invalid due to bad syntax, multi-cuke returns a null exit code, but for the same files, cucumber-js returns 1. It might be better if multi-cuke was consistent with cucumber-js.
(also I realize this is intentional behavior, but I still wonder if it might be better to be consistent with the tool we're wrapping - example use case is that someone updates all of the feature files but accidentally leaves in merge conflict garbage, rendering all feature files invalid - the tests would all just pass and you might never notice unless you glanced at console logs)
This is already supported in cucumber.js, and we should provide the same functionality
If a tests fails for any non-cucumber reason (ex: missing install dependency throws exceptions which causes the test to fail before run), then the exception handling has trouble finding the file to parse.
Pretty parser is defined as a class that exposes an API to handle calls around test results and results output. Other parsers would be able to be used as a drop in replacement to handle results however needed, but still would require adding a flag/option to multi-cuke and defining a default parser if none passed.
Should support a timeout if the process has received no stdout in a given amount of time. This is to prevent the scenario where cucumber itself hangs or crashes and we stop receiving data back from the child.
With the updated to the defineSupportCode and the changes to step definitions, this tool will not execute a framework designed for cucumber 2.0 or greater
No way to have a warning. All warnings are considered failures.
Allow for a way to pass a function as an abstracted way to determine cost of a scenario, to allow for a scheduling algorithm
Logs should show step definition line (which is more useful), rather than gherkin file line.
It seems to happen randomly for any given test. I have seen it a few times with the unit tests.
This feature is supported by Cucumber :
@06_simulation_check_outline
Scenario Outline: (OUTLINE_) BAT 06 - Simulation Check (
@06_simulation_check_outline_1
Examples:
| SECTION | UNIT | SIMULATION |
| FINANCIAL | F1 | 1 |
@06_simulation_check_outline_2
Examples:
| SECTION | UNIT | SIMULATION |
| REGULATION | R1 | 1 |
If you run multi-cuke by one of the example tags (@06_simulation_check_outline_1), a message says that "There are no scenarios found that match the options passed.".
Also, if you run the tests using the scenario tag @06_simulation_check_outline, this error is shown:
Unhandled rejection TypeError: Cannot read property 'cells' of undefined
at new Worker (/Users/beckerqa/Documents/CPA2017/node_modules/multi-cuke/distribution/lib/worker.js:74:10)
at TestHandler.createWorker (/Users/beckerqa/Documents/CPA2017/node_modules/multi-cuke/distribution/lib/test-handler.js:169:20)
at /Users/beckerqa/Documents/CPA2017/node_modules/multi-cuke/distribution/lib/test-handler.js:101:20
at tryCatcher (/Users/beckerqa/Documents/CPA2017/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/beckerqa/Documents/CPA2017/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/Users/beckerqa/Documents/CPA2017/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/Users/beckerqa/Documents/CPA2017/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/Users/beckerqa/Documents/CPA2017/node_modules/bluebird/js/release/promise.js:691:18)
at Promise._fulfill (/Users/beckerqa/Documents/CPA2017/node_modules/bluebird/js/release/promise.js:636:18)
at Promise._resolveCallback (/Users/beckerqa/Documents/CPA2017/node_modules/bluebird/js/release/promise.js:431:57)
at Promise._settlePromiseFromHandler (/Users/beckerqa/Documents/CPA2017/node_modules/bluebird/js/release/promise.js:522:17)
at Promise._settlePromise (/Users/beckerqa/Documents/CPA2017/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/Users/beckerqa/Documents/CPA2017/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/Users/beckerqa/Documents/CPA2017/node_modules/bluebird/js/release/promise.js:691:18)
at Promise._fulfill (/Users/beckerqa/Documents/CPA2017/node_modules/bluebird/js/release/promise.js:636:18)
at Promise._resolveCallback (/Users/beckerqa/Documents/CPA2017/node_modules/bluebird/js/release/promise.js:431:57)
With output channels silenced, there is no built in to log to console, as console.log() will not output from step definitions. Should create a handler for messages from child process to allow for easier debugging.
multi-cuke doesn't seem to correctly support outlines. If I have this scenario:
Feature: LKG
@LKG
Scenario Outline: No-op test
Given I do nothing
Examples:
| iteration |
| 1 |
| 2 |
| 3 |
When I run it in regular cucumber I get:
Feature: LKG
@LKG
Scenario: No-op test
Given I do nothing
@LKG
Scenario: No-op test
Given I do nothing
@LKG
Scenario: No-op test
Given I do nothing
3 scenarios (3 passed)
3 steps (3 passed)
But when I run it in multi-cuke I get:
Feature: LKG
@LKG
Scenario: No-op test
Given I do nothing # lkg.feature:4
1 scenario (1 passed)
5 steps (5 passed)
8) Feature Finder should support multiple paths:
AssertionError: expected [ Array(4) ] to deeply equal [ Array(4) ]
+ expected - actual
[
{
- "featureFile": "test\\features\\sample.feature"
+ "featureFile": "test/features/sample.feature"
"scenarioLine": 7
}
{
- "featureFile": "test\\features\\sample.feature"
+ "featureFile": "test/features/sample.feature"
"scenarioLine": 11
}
{
- "featureFile": "test\\features\\sample.feature"
+ "featureFile": "test/features/sample.feature"
"scenarioLine": 14
}
{
- "featureFile": "test\\features\\sample2.feature"
+ "featureFile": "test/features/sample2.feature"
"scenarioLine": 4
}
]
When having a feature:
@BAT_file
Feature: CPA BAT
@01_web_app_build_number
Scenario: BAT 01 - Web App Build Number
Given I am on CPA Login page
And I should be at "LOGIN PAGE"
And I login with "BAT ACCOUNT"
and having this configuration:
const multicuke = require('multi-cuke').default;
var options = {
paths: ['./features'],
tags: ['@BAT_file'],
requires: [],
cucumberPath: "node_modules/cucumber/bin/cucumber.js",
workers: 4,
workerEnvVars: {},
logDir: '.multiCuke_logs',
silentSummary: false,
verbose: false,
inlineStream: false,
failFast: false,
devMode: false,
strict: false
};
multicuke(options);
multi-cuke throws this message: There are no scenarios found that match the options passed.
So, I assume that feature tags are being ignored
the --verbose
flag on multi-cuke should support no options (e.g: -v
--verbose
) to print to console, or a filepath to log to file (e.g: -v file://path
--verbose file://path
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.