Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ian Fleming
    @midniteio
    @guilhotarras Sure, workerEnvVars will do pretty much what it sounds like: it exports environment variables to the spawned process. I actually just looked at this to double check and realized it wasn't setting them properly, just inheritting you're current environment variables (which apparently is why we missed this, since our team duplicates that code to both export the variables and pass them :angry:) In any case, that fix lands here: midniteio/multi-cuke#68
    Moving past that though, assuming that fix gets in, you can access those in your world.js just as you would any other environment variable with process.env.PROPERTYNAME or process.env['PROPERTYNAME'] or, if using es6, you can do object deconstruction and just simply let {PROPERTYNAME} = process.env (assuming in this case your workerEnvVars looked something like
    {
      PROPERTYNAME: 'Some value'
    }
    Ian Fleming
    @midniteio
    That above PR has landed, so these directions should get you what you're looking for.
    guilhotarras
    @guilhotarras
    Ok Thanks !
    guilhotarras
    @guilhotarras
    I have one more question: On my world.js file I have defined several variables that I use on the step definitions
    this.afterHooks = {
    "preAssessmentId": null,
    "iebModule": null,
    "deleteStudyPlan": false,
    "userLogin": null,
    "userPassword": null,
    "screenShots": []
    };
    My question is, when I run multi-cuke, each thread has its own this.afterHooks variable ?
    or everything on world.js is shared between the threads ?
    guilhotarras
    @guilhotarras
    And another thing, how many workers do you recommend being used, to not affect to much the tests perfomance ?
    guilhotarras
    @guilhotarras
    I have noticed that when you run test 1 and test2 and the report files are generated, next you run test3 and test 4, but the merged result file uses all test1, test2, test3 and test4. I would like to have the merged result file as an output of the last execution test suite. In this example, would be for only test 3 and test 4. Is this possible ?
    Current behavior is grabbing all json files to generate the results.json, and in my case I would like to grab only the json files of the last execution.
    Ian Fleming
    @midniteio
    I suppose it would rebuild it with all runs after running again... hmm... that seems like not what you'd want at all. Will fix tonight
    The number of worker is pretty dependent on the machine running it. I have a long-standing issue here: midniteio/multi-cuke#11 that would sort of address this by introducing an abstract cost/resource system (where you could then basically spin up clients up until you reach some threshhold of performance basically and keep you leveled there automatically). That's not been worked on yet though
    I'm not sure if I have recommendations on how many you should run because it's both machine and browser dependent. As an example, we use this in my company actually testing a custom version of CEF that has more overhead than Chrome or Firefox etc would have, so our number in parallel would differ
    Ian Fleming
    @midniteio
    Re: afterhooks- yeah each thread runs its own instance of Cucumber so each has its own instance of world/afterhooks/etc. For a given scenario, you'll still have access to it across each step, but you wouldn't be able to pass data from scenario to scenario (which you shouldn't do fundamentally anyway really, and in Cucumber itself I believe it will reset world and hooks on each scenario as well)
    guilhotarras
    @guilhotarras
    Alright ! I will be waiting for the re run feature that is very important. When do you expect it to be done ?
    Ian Fleming
    @midniteio
    @guilhotarras sorry for the delayed response. I will try to get that worked up and merged I tomorrow (March 7)
    guilhotarras
    @guilhotarras
    Thanks. Please ping me when its done.
    guilhotarras
    @guilhotarras
    Also, the expected behavior is that when a test fails, the json output is ignored, until a new run is made and successful. The json output will only represent a failure when all the number of re runs of that scenario fails, right ? Thank you very much
    guilhotarras
    @guilhotarras
    Hi there, there is also another bug, when passing tags: ['@01_web_app_build_number', '@02_eula_check'] (more than one tag), multi-cuke says that there are no scenarios that match this
    Ian Fleming
    @midniteio
    FYI, New versino of Gherkin released today breaks multicuke it would seem. I will be bumping version to address this
    guilhotarras
    @guilhotarras
    Hi ... how does that affect multi-cuke ?
    guilhotarras
    @guilhotarras
    I am having a very strange issue on my bamboo server (locally it works well) - when I run 2 scenarios, there are runned 2 times the same tests ! If I am running 3 scenarios, they run 3 times the same tests. Can you help ?
    guilhotarras
    @guilhotarras
    I found the problem. It seems that multi-cuke is not compatible with further versions of gherkin. The working version is 4.0.0 . Test it yourself. Install gherkin 4.1.0 or 4.1.1 and check that multi-cuke repeats all tests after execution
    guilhotarras
    @guilhotarras
    Sorry, I have another important question. How can I run a Scenario using the Scenario name instead of its tags ?
    Gerry McGovern
    @gerrymcgovern1
    Hi Guys, trying to use multi-cuke from the command line, like this multi-cuke src/test/features/ -t @test. However I get the message command not found: multi-cuke. I have installed via npm and I can see the multi-cuke folder in node_modules. I have also tried installing globally but same issue. Anybody got any idea what I am doing wrong?