Import HAR-File from Firefox (NetExport) => Syntax-Error in JSON

Hi again,

i have a problem by importing a HAR-File of a POST-Requests wich are processing JSON-Content:

Example:
The parameters of a JSON-Call are as follows (formatExpression is a String not JSON!):

{
“formatExpression”: “[{“type”:“pageNumber”,“format”:“1”}]”

}

after the recording and saving, the content of the HAR-File is then:

{
“content”: {
“mimeType”: “text/html”,
“text”: “{“formatExpression”:”[{\“type\”:\“pageNumber\”,\“format\”:\“1\”}]"}"

}
}

after importing the HAR-File via ‘recorder.sh’ the content in the produced SCALA-File is:

{
“formatExpression”: “[{“type”:“pageNumber”,“format”:“1”}]”
}

which is invalid JSON and should be:

{
“formatExpression”: “[{“type”:“pageNumber”,“format”:“1”}]”

}

Any help on this topic is appreciated.

Thanks.

Hartmut

That is a bug.
Could you please create an issue here: https://github.com/excilys/gatling ?

Thanks
Nicolas

Hi Hartmut,

I don’t know if you’re watching the comments on the issue.

I’m sorry, I don’t really get it.

“content” belongs to response, not request, so I don’t understand how it could end up in the Simulation (a request body would be dumped, but not the response one).

Could you provide an HAR sample so we can reproduce, please?

Update: This issue was a fault at my side, gatling is working here. Check the issue at git.