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

Tags Do Not Work Correctly in karate-gatling:1.1.0 And Higher #1794

Closed
packleader opened this issue Oct 7, 2021 · 7 comments
Closed

Tags Do Not Work Correctly in karate-gatling:1.1.0 And Higher #1794

packleader opened this issue Oct 7, 2021 · 7 comments

Comments

@packleader
Copy link
Contributor

In karate-gatling version 1.1.0 and higher, karateFeature("classpath:mock/cats-delete.feature@name=delete") works correctly, but karateFeature("classpath:mock/cats-delete.feature", "@name=delete") does not. It appears that the tags var-args parameter is not being honored.

Symptoms

Given: karateFeature("classpath:mock/cats-delete.feature", "@name=delete")

Expected: Only the scenarios that match @name=delete in cats-delete.feature are executed

Actual: All scenarios in cats-delete.feature are executed

Testing

The easiest way to repeat this bug is to modify line 27 of CatsSimulation.scala

val delete = scenario("delete").group("delete cats") {
   exec(karateFeature("classpath:mock/cats-delete.feature", "@name=delete"))
}

Run the tests for karate-gatling and inspect the output for the following line. This confirms that all scenarios were executed, even those without @name=delete.

GatlingSystem-akka.actor.default-dispatcher-94] INFO  com.intuit.karate - [print] this should not appear in the logs !

Fix

I think I have an idea of what's causing this, so I can investigate and submit a PR.

packleader added a commit to packleader/karate that referenced this issue Oct 8, 2021
@ptrthomas ptrthomas added this to the 1.2.0 milestone Oct 8, 2021
@ptrthomas ptrthomas removed the fixed label Oct 8, 2021
ptrthomas added a commit that referenced this issue Oct 8, 2021
Issue #1794 - Fix for tags not being honored in karate-gatling
@ptrthomas ptrthomas added the fixed label Oct 8, 2021
@packleader
Copy link
Contributor Author

Thanks for accepting the PR. Can this issue be closed?

@ptrthomas
Copy link
Member

@packleader the process we follow is that we keep this open with a fixed tag until the formal non-RC release.

just so you know, we are not planning an RC release until hacktoberfest gets over :| hope that's ok

@packleader
Copy link
Contributor Author

I have confirmed that this is fixed in 1.2.0.RC2. However, I found two new bugs in the process. I'll open new issues as soon as I can assemble the minimal examples to reproduce them.

@ptrthomas
Copy link
Member

@packleader thanks - if possible, can you also see if migration to gatling latest is straightforward, in which case we can do that too: https://gatling.io/docs/gatling/reference/current/upgrading/3.6-to-3.7/

@packleader
Copy link
Contributor Author

I reviewed the release notes for Gatling 3.7, and I don't think any of the changes will impact us. Specifically, we don't seem to be using any of the newly-deprecated methods.

I upgraded to 3.7.3 in the karate-gatling pom, and the build still passes. I'll do some more thorough testing, but so far it looks good.

@ptrthomas
Copy link
Member

@packleader I upgraded to 3.7.3 and the gatling maven plugin to 4.0.1. as you said it all looked ok.

but couldn't get the examples/gatling project to run via maven at all. which is very strange, tried a lot and gave up for now. that 4.0.1 gatling maven plugin simply cannot find the simulation files

@ptrthomas
Copy link
Member

1.2.0 released

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

No branches or pull requests

2 participants