Code Monkey home page Code Monkey logo

Comments (8)

lewismj avatar lewismj commented on June 9, 2024

I've been looking into a few issues, I mentioned on another one, I've been sort of waiting for Cucumber 1.2.6 so that I can get a Scala 2.12 release out and then bundle in a few changes.
If it doesn't get released soon I'll stash some changes and go for an intermediate release.

from cucumber.

lewismj avatar lewismj commented on June 9, 2024

As per comment on another issue ... I will try to combine this with some other features. Apologies for long wait, there was a big gap in waiting for Scala 2.12 support in Cucumber. The latest snapshots of 2.0.0 (Cucumber) support it, so I've released the existing framework with Scala 2.12 support; so can focus on some updates.

from cucumber.

arpanchaudhury avatar arpanchaudhury commented on June 9, 2024

@lewismj Can you also update the README on how can we run tests in parallel?

from cucumber.

lewismj avatar lewismj commented on June 9, 2024

For running tests in parallel, is this via the runner or plugin? The runner is a Scala test type framework. I think it might be easier to do that than the plugin that creates a JVM.
I will take a look in the runner - it should be a case of just using futures or perhaps something nice in Monix for handling this... Will have a look this evening and try to get to this, this week.

from cucumber.

arpanchaudhury avatar arpanchaudhury commented on June 9, 2024

Awesome. Thanks.

from cucumber.

lewismj avatar lewismj commented on June 9, 2024

I will add something into the runner to do 'parallelise individual tests' this should allow someone to switch on a flag that will parallelise each test within a suite. Should be able to do that in the next day or two and try to bundle with a couple of things for a new release this weekend. (fingers crossed).

parallelExecution in Test should run suites in parallel, a separate property can be used to paralellise the individual tests.

from cucumber.

lewismj avatar lewismj commented on June 9, 2024

I just looked at this, and in order to parallelize tests, it would mean running multiple Cucumber JVM and stitching together the results as suggested in the first post. A bit more work than I was hoping for.

In the runner it may be possible to parallelize test suites by:

Have a new trait:

trait CucumberTestSuite extends CucumberSpec {
  def features: List[String] = List.empty
}

Allow steps to be defined as:

class AddAndMultiplySteps extends ScalaDsl with EN with Matchers with CucumberTestSuite {
  override def features = List("Multiplication.feature","Addition.feature")

And then in the runner:

    val features = Try {
      val instance = Class.forName(name).newInstance.asInstanceOf[ {def features: List[String]}]
      instance.features
    }.toOption

Which would extract out the features of each suite - which hopefully I can pass as parameters into the Cucumber JVM. Then would allow me to wrap the invokeCucumber in a future and allow switch on of parrallelExecution in Test. It would also be backward compatible, so not immediately break anyone upgrading the runner.

from cucumber.

lewismj avatar lewismj commented on June 9, 2024

I just updated the runner, its backward compatible. There is a bit way to run tests in parallel if you mixin a new trait.

At present, I don't stitch together the different outputs, but will look into that in a future release.
However, if you have a very large number of tests and want to run them all in parallel, the update will allow that.

from cucumber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.