Gatling upload file with jsf

I recorded upload file with jsf, and gatling create such kind of code:

val scn = scenario(“RecordedSimulation”)
.post(uri1 + “”"/mypages/edit/Publication/247307/default?rf_fu_uid=0.7059967583045363""")
.get(uri1 + “”"/rfRes/fileUploadProgress.xhtml?ln=org.richfaces&rf_fu_uid_alt=0.7059967583045363""")
.get(uri1 + “”"/intern/images/icons/document/icon-ms-excel.gif""")

But when I try to use this code in my script, it doesn’t upload file

JSF uses a hidden ViewStateId token and generates dynamic UUID for components where you didn’t set them explicitly.
You can’t replay a raw script recorded on a JSF application, you have to parameterize it a capture the appropriate tokens in the responses.

HI, i have view state extractor and it works well.

And about this uid, how can I generate him and tell to server about it?

Those component ids are generated by JSF server-side, when the developers didn’t force one.
You’d have to capture them in the response bodies, typically with a regex or a css selector.