I wonder if there is a way to split cucumber gradle task to invoke separate cucumber tasks?
Below is the depiction of what we're trying to do:
We do this because we need to bypass a limitation of Browserstack where for older devices we can only have maximum of 5 parallel threads for each test execution.
Any help is appreciated. Many thanks.
Related
There is currently a --parallel option that can run scenarios in parallel using cucumberjs 5.1.0. I want to find out if there is a way to run feature files in parallel instead of scenarios, with this version of cucumberjs.
Looking at the code it looks like there is only the capability to run by scenario https://github.com/cucumber/cucumber-js/blob/master/src/runtime/parallel/master.js#L105 . What is your reason for wanting to run by Feature instead of scenario?
A scenario is meant to be a completely independent test that don't rely on anything set up by the scenarios that ran before it, which is why the makers of cucumber have provided parallel functionality in the way that they have.
Hooks can be used to set up the scenarios individually (by tags or the scenario's name) or run scripts to register users and other test data needed for the tests.
In summary, the way they provide the parallel testing functionality means you are forced to stick to best practices.
Iam using Selenium Cucumber Maven framework with Junit. How can we run cucumber feature files in parallel from Command line. I am very thankful if you guys help me. Please help me with a solution.
Have a look at this article https://automationrhapsody.com/running-cucumber-tests-in-parallel/
First of all you need to write (or generate) runner classes for each feature file. Next configure the maven-surefire-plugin to run tests in parallel. If you are using maven-failsafe-plugin look at https://maven.apache.org/surefire/maven-failsafe-plugin/examples/fork-options-and-parallel-execution.html for the configuration.
Be careful in which setup you run the tests. I would recommend you to setup a selenium grid with one master and multiple slaves to avoid hardware restrictions and of course concurrency issues.
I am using jmeter-maven-plugin to run jmeter performance scripts. This plugin execute scripts sequentially. However, I wish to run number of scripts in parallel.
I really don't know quite where to start with this.
Any help would be appreciated.
Not an answer, but a workaround.
You can try to merge all your scripts. Put each of them in it's own Thread Group in a single .jmx.
Is there any way to divide my cucumber features into different directories with different setups?
I'm creating a 'premium' version of my application with different features enabled behind feature toggles, and I need to somehow figure out how to divide my tests with different grouped setup.
If I could re-write the feature toggles .js file before each 'premium' test runs, this would get the job done.
Can cucumber tests be grouped, and be given different setups by group?
This sounds like a great fit for tags. You could use a #premium tag and apply it to any scenario that is only enabled in the premium version. You can run different sets of tests as follows:
cucumber . #Run all tests
cucumber . --tags ~#premium #Run non-premium tests
is there a way to improve the performance of the Grails commandline tasks. For example the test-app task is taking some time until all dependencies are checked, classes compiled etc. Even simple tasks like create-domain-class is taking some seconds to run.
You can use the "grails interactive" shell for running unit tests, generating basic artifacts and so on. This way you don't have to pay the startup cost for every simple command.
Note that this didn't really work for integration tests last time I tried.