Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to pass own plugin via CucumberPlugin.plugin #35

Open
el-dom opened this issue Jun 29, 2017 · 3 comments
Open

[Question] How to pass own plugin via CucumberPlugin.plugin #35

el-dom opened this issue Jun 29, 2017 · 3 comments
Labels

Comments

@el-dom
Copy link
Contributor

el-dom commented Jun 29, 2017

I have an own implementation of the gherkin.formatter.Reporter trait which needs to be passed in as a --plugin option.
While it should be possible using the testrunner like this

testOptions in Test += Tests.Argument(framework,"--plugin","acceptanceTests.CucumberReporter")

i struggle to achieve the same using the sbt plugin. Since the Plugin trait is sealed, it cannot be extended and the available Plugin case classes cannot be used for this.
Am i missing something?

@lewismj
Copy link
Owner

lewismj commented Jul 4, 2017

Hi,
Sorry for the delay, I can make some changes. A bit frustraing is that there are a few changes in the pipeline, but I've been waiting for a Cucumber/Scala 2.12 issues to be resolved, but that has been outstanding for a while now. I'll try to take a look when I can.
Regards,
Mike

@el-dom
Copy link
Contributor Author

el-dom commented Jul 5, 2017

Take your time, i worked around it by setting up an own main class CucumberPlugin.mainClass := "acceptanceTests.CucumberRunner" and attaching the plugin arg there

object CucumberRunner {
  def main(argv: Array[String]): Unit = {
    Main.main(argv :+ "--plugin" :+ "acceptanceTests.CucumberReporter")
  }
}

@lewismj lewismj added the ready label Oct 22, 2017
@lewismj
Copy link
Owner

lewismj commented Oct 26, 2017

I've removed the sealed modifier and I will test with next set of changes to plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants