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

improve gatling user experience - pause, callonce #1622

Closed
ptrthomas opened this issue May 27, 2021 · 5 comments
Closed

improve gatling user experience - pause, callonce #1622

ptrthomas opened this issue May 27, 2021 · 5 comments
Assignees

Comments

@ptrthomas
Copy link
Member

after the good work done by @abhi-rao in #1612 it got me thinking - until now I'd not encouraged the use of Feature-s and especially Scenario-s that depend on state set by another Scenario / Feature - but I now see where this can make a lot of sense when scripting advanced performance models and giving the best flexibility to re-use existing Karate test suites "as-is"

and that is the theme of this ticket. how can we make it possible for a team to take an existing suite and re-use it as a performance test with the least amount of change and configuration overrides

inviting comments from all here, cc @joelpramos @kirksl @aleruz @douglas-six @theathlete3141

I'll start with the 2 top-most items in my mind

  • today teams that use callonce find that most of the time - they need to make this a karate.callSingle() because when a feature is now multiplied X times by karate-gatling - the callonce is multiplied X times which is not the intent. I've unfortunately seen teams that brought down their identity service and abandoned karate as a result. yes this is mentioned in the documentation, but we can do better
  • when teams want to introduce "think time" they have to take care to use a special routine that plugs-into and plays well with the gatling actor / async system - but now teams need to have their test scripts be "gatling aware" and perhaps use a config to "switch" things. what I'm proposing is say a new karate.pause() API, that will automatically use gatling when running in "perf mode" but fall back to ZERO milliseconds by default. and if a configure pauseIfNotPerfEnabled is true (default false) it will apply to "normal mode"

WDYT

@ptrthomas ptrthomas added this to the 1.1.0 milestone May 27, 2021
@ptrthomas ptrthomas self-assigned this May 27, 2021
@kirksl
Copy link
Contributor

kirksl commented Jun 1, 2021

@ptrthomas i think you hit the nail on the head with your top 2 items.

anything to abstract away awareness and maintanence of gatling in tests would really improve the experience. regarding karate.pause() i think it would be an additional win if it could be configured with an upper and lower bound number that a randomizer could pick from to skew the pause times for better think time fidelity. (eg i want each call to randomly pick a pause time between 1 and 10 seconds, karate.pause(1, 10)

one more thing not mentioned. wondering if data management might be something else to improve upon? eg today we detect if the __gatling variables are present and switch between data sources.

@ptrthomas
Copy link
Member Author

@kirksl great. the randomizer is getting into gatling territory, so not quite sure but will think through.

regarding data management I think the other PR I mentioned solves it, see this commit: 6c1cb85

@kirksl
Copy link
Contributor

kirksl commented Jun 2, 2021

@ptrthomas thinking more... disregard randomizer notes. makes sense to leave that power to the user, especially when everyone would likely have their own idea of what "randomization" means to them. thanks for the commit i think that addresses the data needs.

ptrthomas added a commit that referenced this issue Jun 13, 2021
ptrthomas added a commit that referenced this issue Jun 13, 2021
configure key is shortened to pauseIfNotPerf
callonce cache for perf now is across jvm not just feature
ptrthomas added a commit that referenced this issue Jun 13, 2021
@ptrthomas
Copy link
Member Author

attention all - everything in this ticket is implemented and the configure key is pauseIfNotPerf

I would really appreciate if all of you can test this out once.

also note the unification of runner with gatling, please see docs, screenshot below:

image

@ptrthomas
Copy link
Member Author

1.1.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