- Notifications
You must be signed in to change notification settings - Fork29
✨ feat: implement scalatest integration#373
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
options: T | ||
): Try[RuntimeOptionsBuilder] = { | ||
Try { | ||
// TODO verify how getClass behaves with the trait |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
So let`s say
trait CucumberSuiteOptionstrait CucumberSuiteOptionSpf extends CucumberSuiteOptionsdef parse[T <: CucumberSuiteOptions](options: T with CucumberSuiteOptions): String = { val clazz = options.getClass clazz.toString}parse(new CucumberSuiteOptionSpf{}) // val res3: String = class rs$line$16$$anon$1
In Welcome to Scala 3.3.1 (17.0.2, Java OpenJDK 64-Bit Server VM).
Uh oh!
There was an error while loading.Please reload this page.
class RunCukesTest extends CucumberSuite with CucumberSuiteOptions { | ||
override def featuresPath: Seq[String] = Nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
what about Functor Option to express something that could be ... could be
parse(options) match { | ||
case Success(value) => value | ||
case Failure(exception) => | ||
println( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
are we sure that we would like to have this print in SOUT asis ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Probably not but so far I just got inspired from the cucumber-junit module and copy/pasted stuff from there.
private val context: CucumberExecutionContext | ||
) extends Suite { | ||
private val children: Seq[PickleSuite] = { |
mpkorstanjeJun 18, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
How many levels of hierarchy can Scala test express? If more than 2, it might be worthwhile to match the layout in the feature file. Representing only the feature and pickles was a JUnit 4 limitation.
@dfurmans@mpkorstanje this is a very first draft, I don't even remember if it compiles yet 😅 No need for a deep review for now I guess. I don't have plans to work on it in the coming weeks, if anyone wants to take over and complete it, I'm perfectly fine with that :) |
Alright, no worries! I'm currently working on some stuff in cucumber for junit 5 that is somewhat related. |
No description provided.