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
Kotest support #1250
Comments
Short answer - yes :) Would you try to add separate module as a PR? Is it easy to migrate into Maven? |
cool :-) sure, migration to maven should be straightforward |
Not related to kotest but to Kotlin in general: If there is general interest of having something like this included in fluentlenium just let me know :) even if it currently is just a small POC, I am pretty sure that using the capabilities kotlin is giving us here could help to write even more readable tests with fluentlenium in kotlin :) Would you be interested to have a kotlin dsl module added as well (or maybe a kotlin module with all kotlin related stuff)? |
@christian-draeger is it something related to KoTest or separate extension? Sorry, I'm not great with Kotlin, I've only used Espresso in this language :) |
hey @slawekradzyminski , just as short intro: Finally, one could claim its only syntactic sugar, but it clearly helps to increase readability and plays really well with the idea to have a fluent interface for selenium :) here a short example that compares classical approach (java style) with a dsl style prototype i wrote: @Page
lateinit var page: StartPage
@Test
fun `an example test using page object pattern`() {
goTo(page)
assertThat(page.loginButton).isDisplayed
assertThat(page.loginButton.text()).isEqualTo("Sign in")
assertThat(jq("footer a")).hasSize(36)
}
@Test
fun `an example test using page object pattern via dsl`() {
goTo(page)
page {
loginButton {
assert {
it.isDisplayed
it hasText "Sign in"
}
}
"footer a" {
assert {
it hasSize 36
}
}
}
} The power of it is that its still totally regular kotlin code, which means you can just put whatever code like if conditions, loops, calculations or other method calls etc in between, which is a big benefit over the java builder pattern for instance. good examples how far one could go with kotlin DSLs: if you would be open to provide a kotlin DSL extension just let me know - i can open a PR :) |
I see no problems with adding it, would you like me to release initial fluentlenium-kotest module first or should I wait for your PR with fluentlenium-kotest-dsl and then release those 2 new modules? I need to add a few things into docs but generally speaking release is almost ready 😄 |
ah no, don't let the kotest users wait 🙂 |
@abendt guess we should update the docs at least slightly (and main README). Is this something you can do? :) |
@slawekradzyminski could you provide some information how the docs work? which files do i need to edit? .md .html? |
Looks perfect :) docs will be released when I merge new release to master |
@abendt give me some time with release because You can also help me debug why it's not working (I assume that's one of the newly bumped libraries). Here is full release guide btw: |
will have a look |
what i did: then the build fails with this message:
is this what you mean or something different? |
what maven version are you using? |
Same error here on every maven version I tried. I don’t understand why it builds submodules using release version. It should first build snapshot and change poms later :( |
when running the command looking at the output it seems its not executing all maven phases for the core module Next i changed the configuration of the maven-release-plugin thereby overwriting the arguments coming from the parent pom:
this results in a different command executed during release:prepare: This runs successfully! The difference is the profile |
that profile is defined here: https://github.com/sonatype/oss-parents/blob/master/oss-parent/pom.xml#L107 |
this also allows to reproduce the issue w/o release:
|
the profile apparently adds three plugins to the build. i tried to add the plugins directly to the parent pom. with the javadoc plugin i could reproduce the issue:
Upgrading the maven-javadoc-plugin version seems to fix that issue |
another suggestion is to add a github action that runs the release step with dryMode: https://maven.apache.org/maven-release/maven-release-plugin/prepare-mojo.html#dryRun this could help to catch incompatible changes related to the maven-release-plugin earlier |
i have created another PR that should provide a workaround by upgrading the maven-javadoc-plugin to the latest version |
@abendt should I run this:
Or this
Thanks for help :) |
i think the first one should be enough. when doing a <arguments>${arguments} -Psonatype-oss-release</arguments> |
adding the profile manually is just useful to test the behavior without actually starting a maven release |
I'm uploading the jars now :) |
I gave up for now. There is explicit requirement to have javadoc in each module (source). I don't know how we released Spock module before. I created a ticket, let's see how it goes. |
try to change the classifier from groovydoc to javadoc |
Good tip, looks better:) |
Released v4.8.0 |
@slawekradzyminski can we close this ticket now? i announced this release in the kotest slack. there was a question about a kotlin DSL. @christian-draeger if you are still up to work on that i suggest to open a new ticket here and move the discussion there. i can then also link that ticket to the slack question. |
hi folks,
in a previous project i have used fluentlenium in combination with Kotest (https://kotest.io/). Kotest is a testframework for kotlin.
i recently took some time to cleanup the code and to extend it to the different Kotest testing styles (https://kotest.io/docs/framework/testing-styles.html).
would you generally be interested to add this to the fluentlenium project?
The text was updated successfully, but these errors were encountered: