Code Monkey home page Code Monkey logo

Comments (11)

lewismj avatar lewismj commented on June 16, 2024

Yes, shouldn't be a problem, I'll take a look this evening. Try to get that published onto Maven.

from cucumber.

lewismj avatar lewismj commented on June 16, 2024

I just published an 0.1.2 version to standardize all builds of the runner, should be one for 2.10, 2.11 and 2.12, may take a few hours to appear on maven central, will check it later.

from cucumber.

lewismj avatar lewismj commented on June 16, 2024

I think the latest version of the runner should be available for Scala 2.10, 2.11 and 2.12, I'll re-open this issue if there are any problems.

from cucumber.

pjedruszuk avatar pjedruszuk commented on June 16, 2024

0.1.2 does not work for Scala 2.10, as shown below:
By the way: Using snapshots as dependencies is probalby not something, that is desirable in a production code... Is there a strong reqiirement to rely on 2.0.0.-SNAPSHOT for Cucumber dependencies?

Error:Error while importing SBT project:<br/>...<br/><pre>[error] unresolved dependency: io.cucumber#cucumber-jvm;2.0.0-SNAPSHOT: not found
[error] unresolved dependency: io.cucumber#cucumber-junit;2.0.0-SNAPSHOT: not found
[error] ({project_name}/*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: io.cucumber#cucumber-core;2.0.0-SNAPSHOT: not found
[error] unresolved dependency: io.cucumber#cucumber-scala_2.10;2.0.0-SNAPSHOT: not found
[error] unresolved dependency: io.cucumber#cucumber-jvm;2.0.0-SNAPSHOT: not found
[error] unresolved dependency: io.cucumber#cucumber-junit;2.0.0-SNAPSHOT: not found
[error] ({project_name}/*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: io.cucumber#cucumber-core;2.0.0-SNAPSHOT: not found
[error] unresolved dependency: io.cucumber#cucumber-scala_2.10;2.0.0-SNAPSHOT: not found
[error] unresolved dependency: io.cucumber#cucumber-jvm;2.0.0-SNAPSHOT: not found
[error] unresolved dependency: io.cucumber#cucumber-junit;2.0.0-SNAPSHOT: not found
[error] ({project_name}/*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: io.cucumber#cucumber-core;2.0.0-SNAPSHOT: not found
[error] unresolved dependency: io.cucumber#cucumber-scala_2.10;2.0.0-SNAPSHOT: not found
[error] unresolved dependency: io.cucumber#cucumber-jvm;2.0.0-SNAPSHOT: not found
[error] unresolved dependency: io.cucumber#cucumber-junit;2.0.0-SNAPSHOT: not found
[error] ({project_name}/*:update) sbt.ResolveException: unresolved dependency: io.cucumber#cucumber-core;2.0.0-SNAPSHOT: not found
[error] unresolved dependency: io.cucumber#cucumber-scala_2.10;2.0.0-SNAPSHOT: not found
[error] unresolved dependency: io.cucumber#cucumber-jvm;2.0.0-SNAPSHOT: not found
[error] unresolved dependency: io.cucumber#cucumber-junit;2.0.0-SNAPSHOT: not found
[error] Total time: 35 s, completed 2017-08-08 14:24:57

from cucumber.

lewismj avatar lewismj commented on June 16, 2024

I think you need to add
resolvers += Resolver.sonatypeRepo("snapshots")

The issue is that the SNAPSHOT version 2.0.0 is currently the only version that will support Scala 2.12, I will release a new version once its released. All prior versions of Cucumber don't work with Scala 2.12.

It took a long time before Cucumber had any build that would work with Scala 2.12 (only fairly recently had a build that would work at all), hopefully with the 2.0.0 release it should be easier to update. There was a fair bit of work blocked waiting on the update.

from cucumber.

lewismj avatar lewismj commented on June 16, 2024

I'll leave this open so that people know they have to use:
resolvers += Resolver.sonatypeRepo("snapshots")
Until we get a pdn release of Cucumber 2.0.0

from cucumber.

gauravknoldus avatar gauravknoldus commented on June 16, 2024

I have used the same resolver which you have mentioned above, but still my tests are not running. Consistently it gives me "cucumber.runtime.junit.UndefinedThrowable" exception. I have setup the right path of my stepdef in cucumberOptions.

Following you could see the resolver
image

Set up the path of my stepdef
image

Project settings in my build.sbt
image

Cucumber dependencies which I have used
image

Plugin that I have used in plugin.sbt
addSbtPlugin("com.waioeka.sbt" % "cucumber-plugin" % "0.1.4")

sbt.version = 0.13.15
scalaVersion := "2.11.8"
cucumber_sbt = "0.1.2"
cucumberRunner = "0.0.8"
cucumberVersion = "1.2.5"
scalaTestVersion = "3.0.1"

project structure
image

Could you please help me what I am doing wrong?

from cucumber.

lewismj avatar lewismj commented on June 16, 2024

Hi,

I think the first thing is, do you want to run Cucumber tests as part of your 'sbt test' test suite or as a standalone command 'sbt cucumber'. In the first case, treating Cucumber tests as standard unit tests - you would use the Runner otherwise (for a standalone command) I would use the plugin. You don't need both,

In most cases I would use it as part of 'sbt test'.

If using as sbt test, see this example:
https://github.com/lewismj/cucumber/tree/master/example

In your build.sbt file, make sure you add the framework.

val framework = new TestFramework("com.waioeka.sbt.runner.CucumberFramework")
testFrameworks += framework

together with any options:

testOptions in Test += Tests.Argument(framework,"--monochrome")
testOptions in Test += Tests.Argument(framework,"--glue","")
testOptions in Test += Tests.Argument(framework,"--plugin","pretty")
testOptions in Test += Tests.Argument(framework,"--plugin","html:/tmp/html")
testOptions in Test += Tests.Argument(framework,"--plugin","json:/tmp/json")

n.b. I would put the tests under a 'test' rather than 'main' source directory.

It mig toht be easier take the example project (https://github.com/lewismj/cucumber/tree/master/example) and customise it.

Note:

The plugin example is here: https://github.com/lewismj/cucumber/tree/master/plugin/example, n.b. the plugin is only if you want to run cucumber tests outside of the normal test framework. It was created because at work, we wanted to run 'cucumber' tests only via a particular command. Usually you would use just the Runner. i.e. If you want to run as part of 'sbt test' you don't need the plugin. Similarly, if running as a command 'sbt cucumber' you can ignore the runner. Most people use the runner though to run Cucumber as part of 'sbt test'.

from cucumber.

gauravknoldus avatar gauravknoldus commented on June 16, 2024

I have tried with "sbt cucumber" as a standalone command. Thanks a lot it works for me.

from cucumber.

lewismj avatar lewismj commented on June 16, 2024

0.13 version (runner) and updated plugin released to Maven (will be a few hours to propagate) this uses the release versions of the 2.0.0 Cucumber, which hopefully solves a few issues if you can't access snapshot versions.

from cucumber.

lewismj avatar lewismj commented on June 16, 2024

should be fixed, with 0.13 release.

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.