Hi,
I am attempting too migrate from gatling 2.0.3 to 2.2.0 to pick up several bug fixes and such. it seems that lots of things have changed. I’m currently stuck on various errors please take a look at the package/import errors and give some guidance.
Thanks in advance,
Christian
Where have these package members gone?
`
error: object result is not a member of package io.gatling.core
[ant:scalac] import io.gatling.core.result.message.{OK, KO}
[ant:scalac] ^
error: object PopulatedScenarioBuilder is not a member of package io.gatling.core.structure
[ant:scalac] import io.gatling.core.structure.{ChainBuilder, PopulatedScenarioBuilder, ScenarioBuilder}
error: object StringBody is not a member of package io.gatling.http.request
[ant:scalac] import io.gatling.http.request.StringBody
error: object HttpRequestWithParamsBuilder is not a member of package io.gatling.http.request.builder
[ant:scalac] import io.gatling.http.request.builder.{HttpRequestWithParamsBuilder, HttpAttributes, CommonAttributes, HttpRequestBuilder}
error: object ws is not a member of package io.gatling.http.check
[ant:scalac] import io.gatling.http.check.ws.WsCheckSupport
`
Hi,
First check the migration guides.
Then, those classes are not public APIs, so neither their packages, nor names nor signatures are guaranteed to be stable. However, they should be pretty similar and your favorite IDE should be able to fix those imports.
Regards,
There were way too many discrepancies so I went back and first migrated from 2.0.3 to 2.1.7. I’ve got one outstanding gradle issue, but I’ll call her done.
Now I need to go from 2.1.7 to 2.2.0 to pick up various bug fixes and such for the team. I definitely checked the migration guides first but lots seem to be missing. It doesn’t really list all the stuff about members that have been moved/removed/replaced and how to resolve. For instance(s)…
- io.gatling.http.check.ws.WsCheckSupport is no longer a thing? Has it been relocated or removed altogether? If removed, what can I use instead?
- Same for → StringBody is not a member of package io.gatling.http.request
- And → io.gatling.http.config.HttpProtocolBuilder
- And → io.gatling.core.structure.PopulatedScenarioBuilder
- And → ExpressionWrapper
- And → io.gatling.core.result.writer.DataWriter
- And → io.gatling.core.util.TimeHelper
- And so on…
I’ve been searching through the gatling repo for things that have been refactored around, but I just can’t find all the stuff. And for the members that have been completely removed, where’s the guidance on what to replace them with?
Thanks in advance for the followup,
Christian
Hi Christian,
Those classes are not and have never been public APIs. You won’t find any reference to them in our documentation and we’ll never go to the length of documenting internal changes. That’s the all point of not making them public.
We understand that some people use the Gatling DSL return types to build their own DSL on top of ours.
Maybe once our DSL implementation is stable (eg once HTTP2 support is implemented and stable), we’ll decide to turn the return types into public API. The same thing goes for protocol support implementation.
Until then, you’d better actively follow Gatling developments and be ready to dig a bit into the code when upgrading. Or get a contract with us if you want us to help.
Regarding the classes you mention:
- some of them just changed package but still have the same name => you should be able to figure out the new package with your IDE
- some were renamed => if those were DSL components return types, you should be able to figure out the new name with your IDE
- some others were completely dropped/refactored
We’re of course willing to help migrating any maintainer of an open-source protocol support, such as the ones listed here. If any of those people get the chance to read this, please get in touch.
Regards,