From this comment, to clean up my simulation definition (as suggested at https://github.com/gatling/gatling/issues/2365#issuecomment-62906708), when trying to set a session attribute to a value (read from a system property) an EL attribute doesnt seem to been picked, and the request being sent is:
request-bodies/sources_placeholders.json:3 contains the expression expected to be replaced and simulations/tests/PrePT.scala:29 is where the attribute is set.
This was tested with gatling-charts-highcharts-bundle-2.1.0-20141113.230508-72-bundle
Feeders files go in data, not request-bodies:
To be fair, my real life example is a mavenized project and the structure differs from what has been uploaded, but will remember this
You can’t have EL expressions in feeder files, those are not templates.
But this feeder file feeds a ELFileBody, so I would expect this steps:
· a json feeder reads each entry at sources_placeholders.json and sets session variables accordingly: the attribute DS.name is “${JDBCDS}”
· via the session API, I set the attribute JDBCDS to the value gotten from a system property.
· when a request is being made with ELFileBody, DS.txt gets read and every replacement gets done, on a first iteration ${DS.name} to ${JDBCDS} and then to jdbcds val
Of course I might be wrong or I misunderstood something
Then, where do you plan on using this value
I expect previous point reflects how I want to use it, I would expect, running the simulation with a system property JDBCDS with value XX to send a request like:
Of course I might be wrong or I misunderstood something
You indeed get it wrong. The "feed" operation injects the raw data into the
sessions and there's only one single pass in expression resolution, no
inception.
Bear in mind that I can't set this ${JDBCDS} EL at DS.txt, as this is a
simplified example
Not feasible then with Gatling features. You'd have to develop it yourself
like you've being doing so far.