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

fix: move to use junit+allure over karate #1968

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

maxandersen
Copy link
Collaborator

@maxandersen maxandersen commented Mar 23, 2025

I love Karate and I'll always be a fan of it but
as time passed I realized it is a big dependency to have
with all the javascript/nashorn compabilitie for something
that for us is just calling out to a shell and does string comparisons.

This starts removing need for using Karate and instead uses plain
JUnit with assertj as gradle integration tests + using Allure to collect intermediate step results.

That last part was/is a key feature of karate where we can see all the steps
before and after a reported failure.

To run the build and see report try out just itestreport

end result is to remove karate/itests possibly even the asserta ones (they only run on non-windows anyways) and have it all handled in gradle run and standard junit execution and reporting.

I love Karate and I'll always be a fan of it but
as time passed I realized it is a big dependency to have
with all the javascript/nashorn compabilitie for something
that for us is just calling out to a shell and does string comparisons.

This starts removing need for using Karate and instead uses plain
JUnit as gradle integration tests + using Allure to collect intermediate step results.

That last part was/is a key feature of karate where we can see all the steps
before and after a reported failure.

To run the build and see report try out `just itestreport`
@maxandersen
Copy link
Collaborator Author

this is related to #1967 but it is not required we move everything to assertj - can do it iteratively.

@maxandersen
Copy link
Collaborator Author

goal of this would eventually remove need for the various workarounds/managing of karate tests.

@maxandersen
Copy link
Collaborator Author

added fix to ensure actual built jbang is on path so it will succeed in github action

@quintesse
Copy link
Contributor

That would be nice, because running the karate tests always messes up my system somewhat. Hopefully when running from JUnit we can set up a proper test environment.

Copy link
Collaborator Author

Hmm - karate was supposed to run isolated - done the same setup now at least :)

@quintesse
Copy link
Contributor

For me it always created a couple of files and modified one. I almost committed those changes by mistake a number of times.

Copy link
Collaborator Author

ah yes - true; there is some of that - being inside proper java code should make it much easier to track down.

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

Successfully merging this pull request may close these issues.

2 participants