excilys/gatling — Issue #399: Wrong recording of post parameters with special characters
Author: fabienbancharel
Created: 2012-02-06 16:54:37+00:00
State: open

Tested with 1.0.3 :
In some post params, like javax.faces.ViewState for JSF, special characters seems to be recorded as Carriage return by the recorder (both in text or scala format), thus, a JSF webapp scenario cannot be compiled.

1) What is recorded by the recorder (3 lines) :
.param("javax.faces.ViewState", "rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAE1cHQAGi9wYWdl
cy9zZWN1cmVkL2FjY3VlaWwuanNw
")

2) What we see in Firebug (%0D%0A or %3D%0D%0A causing carriage return) on one line :
javax.faces.ViewState=rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAE3cHQALi9wYWdl%0D%0Acy9zZWN1cmVkL3BlcnNvbi9zZWFyY2gvcGVyc29uLXNlYXJjaC5qc3A%3D%0D%0A

3) Error executing in simulator :
Exception in thread "main" java.lang.RuntimeException: Compilation failed:
gatling:120: error: unclosed string literal
.param("javax.faces.ViewState", "rO0ABXVyABNbTGphdmEubGF
uZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAE1cHQAGi9wYWdl
^
gatling:122: error: unclosed string literal
")
gatling:168: error: ')' expected but '}' found.
}
^
7 errors found
at com.excilys.ebi.gatling.app.compiler.ScalaScenarioCompiler.compile(ScalaScenarioCompiler.scala:77)