CodeceptJS icon indicating copy to clipboard operation
CodeceptJS copied to clipboard

Gherkin + Chunk combination

Open kulin24 opened this issue 8 years ago • 13 comments

What are you trying to achieve?

I am trying to execute the gherkin scenarios in parallel using chunk functionality.

What do you get instead?

The scenarios are not executed in parallel. The chunk configuration is not taking effect.

Provide console output if related. Use --verbose mode for more details.

Admins-MacBook-Pro:Codeceptv1 admin$ npm run test

> [email protected] test /Users/admin/Desktop/My_Data/QuantumJS/Codeceptv1
> codeceptjs run-multiple wiki

Use JS config file
undefined
Nothing scheduled for execution
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `codeceptjs run-multiple wiki`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/admin/.npm/_logs/2018-10-31T13_21_59_165Z-debug.log


Provide test source code if related

console.log('Use JS config file');

console.log(process.profile);
var deviceCaps = require('./test-config/devices/deviceCaps.json')

exports.config = {
    tests: './*_test.js',
    timeout: 10000,
    output: './output',
    helpers: {
        PerfectoWebDriverIO: {
            action: "PerfectoWebDriverIO Test",
            require: "./perfectowebdriverio.js",
            url: "https://google.com/",
            host: "<HOST>",
            path: "<PATH>",
            port: "<PORT>",
            jobName: "PerfectoWebDriverIO Test Job",
            buildNumber: 38,
            branch: "Not Branched Yet",
            projectName: "Perfecto-CodeceptJS Example Tests",
            projectVersion: "v0.1a",
            tags: ["codeceptjs", "webdriverio", "nodejs", "example tag"],
            restart: false,
            logLevel: "verbose",

            desiredCapabilities: {
                browserName: "Firefox",
                user: "<USER>",
                securityToken: "<TOKEN>",
                platformName: "Windows",
                platformVersion: "10",
                browserVersion: "62",
                resolution: "1280x1024",
                location: "US East"
            }
        }
    },
    mocha: {
        reporterOptions: {
            mochaFile: './output/result.xml',
        },
    },
    name: 'tests',
    bootstrap: './bootstrap.js',
    include: {
        I: "./custom_steps.js",
        Smth: "./pages/Smth.js",
        loginPage: "./pages/Login.js",
        signinFragment: "./fragments/Signin.js"
    },
    gherkin: {
        features: "./features/*.feature",
        steps: [
            "./step_definitions/steps.js",
            "./step_definitions/wiki_steps.js"
        ]
    },
    timeout: 10000,
    multiple: deviceCaps
};

DeviceCaps.json file:

{ "wiki": { "chunks": 2, "browsers": [ { "browser": "Firefox", "browserName": "Firefox", "user": "[email protected]", "securityToken": "", "platformName": "Windows", "platformVersion": "10", "browserVersion": "62", "resolution": "1280x1024", "location": "US East" }, { "browser": "Chrome", "browserName": "Chrome", "user": "", "securityToken": "", "platformName": "Windows", "platformVersion": "10", "browserVersion": "70", "resolution": "1280x1024", "location": "US East" } ], "grep": "@wiki" } }

Details

  • CodeceptJS version: 1.4.4
  • NodeJS Version: 5.7.1
  • Operating System: Mac
  • Protractor || WebDriverIO || Nightmare version (if related) WebdriverIO
  • Configuration file: Shared above

kulin24 avatar Oct 31 '18 13:10 kulin24

If I remove the chunks configuration then the scenarios are executing as expected in sequential manner on two browsers chrome and firefox in parallel.

So the question is, do we support chunks with gherkin approach?

kulin24 avatar Oct 31 '18 13:10 kulin24

Any updates here? @kulin24

kdelalic avatar Nov 29 '18 16:11 kdelalic

No, there is no update on this issue. This bug still exists as far as I know.

kulin24 avatar Nov 30 '18 04:11 kulin24

Parralel execution is not working with Gherkin scenario :disappointed:

vitoo avatar Dec 04 '18 13:12 vitoo

@kulin24 did you find out what is problem? Does it work now?

PredragPavlovic avatar Jan 23 '19 11:01 PredragPavlovic

Any updates on this issue?

mayankchincholkar avatar Feb 18 '19 01:02 mayankchincholkar

I don’t have any updates on this issue. Because of this bug and one more issue we ended up writing our own Wdio + cucumber fraemwork.

I don’t think the owners of this framework has given us any acknowledgment on this issue nor do we have any ETA on the resolution of this issue.

kulin24 avatar Feb 18 '19 04:02 kulin24

This is still an issue

evanjmg avatar Sep 10 '19 10:09 evanjmg

Parallel Executions with Gherkin is still an issue

gkushang avatar Jan 30 '20 21:01 gkushang

Yes, unfortunately, it still is :( Even with codecept 2.6.2

eugengaspar avatar Apr 29 '20 14:04 eugengaspar

I have faced issues in Before After hooks when Browser session closes or launches, and issue is still there specifically with WebDriver.

cc @koushikmohan1996

gkushang avatar Apr 29 '20 15:04 gkushang

@kulin24 do you have some docs of how to use , or where you get the PerfectoWebDriverIO helper ?im trying to check if there is a way to connect with perfecto mobile. Thanks in advance

javierfuentesm avatar Apr 16 '21 03:04 javierfuentesm

@javierfuentesm / @kulin24 I'm looking for an example of perfecto integration - can either of you assist?

ttupper92618 avatar Aug 09 '21 21:08 ttupper92618