Observing issues with formParam when using new version of Gatling

Hello,

I am migrating my scripts from Gatling 3.3.1 to 3.11.2.
For formParam method; when I pass the value; its giving an error and suggests to convert the value as String Expression. However, in the older version it takes the value as in the HAR file (Observed in request response in Chrome Dev tools).

Any suggestions here on how to resolve this issue?

Thanks,
Nutan

Sorry, but it’s unclear what your issue is.

Do you have an issue when generating from an HAR file? If so can you please provide your HAR file?

If not, please provide a procedure to reproduce your issue.

Note: the gap between the version you’re upgrading from and to is huge, make sure to check each upgrade guides: Gatling upgrade guides

could you share your script and show exactly your formParam of HAR file ?

Its not an issue generating HAR file. I have imported the HAR file using the gatling recorder tool.
In places when formParam function is used; it always says to send the formParam value as an expression. Please, see attached screenshot.
In the previous versions; it was working. I am trying to avoid to convert to expression as this is happening across all the regression suite (The regression suite is too big)

Thanks

Hello,

I cannot share the script. However, the formParam is
.formParam(“ctl100_ctl100_headerBody.ScriptManager…”,“<value as in the screenshot error”)

Thanks

It should work so I’m pretty sure you’ve broken the imports.

Please make sure to only have:

import scala.concurrent.duration._

import io.gatling.core.Predef._
import io.gatling.http.Predef._

I have these imports in the scripts.
Does new version of gatling does not consider special characters (like ; , :slight_smile: in formParam?

Does new version of gatling does not consider special characters (like ; , :slight_smile: in formParam?

No, unrelated.

I have these imports in the scripts.

Are you sure you don’t also have other imports too. Duplicate imports can break Scala code.

If not, there’s no way to help you unless you provide a code sample that shows your issue, even with sensible data removed.

For security concern, please at least change your script data, else it is very ambiguous for us to understand what exactly you have done there.
Possible that you are trying to convert data type which leads to the error.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.