--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
val scenarioToRun = System.getProperty("scenarioToRun") scenarioToRun is null
here's what the maven command looks like mvn clean install -DscenarioToRun=abc and in my scenario I am trying to access it as follows:val scenarioToRun = System.getProperty("scenarioToRun") scenarioToRun is null
But it triggers only 1 action (default) not 5(user input from command line) |
val userCount = Integer.getInteger("userCount", 1).toInt
val flowRepeatCount = Integer.getInteger("flowRepeatCount", 1).toInt
val definitionId = java.lang.Long.getLong("definitionId", 0L)
val testServerUrl = System.getProperty("testServerUrl")
JAVA_OPTS="-DuserCount=5 -DflowRepeatCount=5 -DdefinitionId=10220101 -DtestServerUrl='https://someurl.com'" ./gatling.sh -s TestCL
which assumes that gatling.sh is executable. Do chmod ug+x gatling.sh if it's not.
Regards,--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The request class('TestCL') can not be found in the classpath.
Exception in thread "main" java.util.NoSuchElementException: head of empty list
at scala.collection.immutable.Nil$.head(List.scala:337)
at scala.collection.immutable.Nil$.head(List.scala:334)
at io.gatling.app.Gatling.start(Gatling.scala:219)
at io.gatling.app.Gatling$.fromMap(Gatling.scala:55)
at io.gatling.app.Gatling$.runGatling(Gatling.scala:80)
at io.gatling.app.Gatling$.runGatling(Gatling.scala:59)
at io.gatling.app.Gatling$.main(Gatling.scala:51)
at io.gatling.app.Gatling.main(Gatling.scala)
set JAVA_OPTS=-DuserCount=3 -DflowRepeatCount=3 -DdefinitionId=10201
body=
{
"errors" : {
"error" : "Unexpected character ('$' (code 36)): expected a valid value (num
ber, String, array, object, 'true', 'false' or 'null')\n at [Source: org.apache.
catalina.connector.CoyoteInputStream@31e6639f; line: 1, column: 19]"
}
}
---- Errors --------------------------------------------------------------------
> status.find.in(200,304,201,202,203,204,205,206,207,208,209), but actually found 400
class TestCLI extends Simulation {
val userCount = Integer.getInteger("userCount", 1).
toInt
val holdEachUserToWait = 2
val flowRepeatCount = Integer.getInteger("flowRepeatCount", 1).toInt
val definitionId = java.lang.Long.getLong("definitionId", 0L)
val testServerUrl = "Some URL"
val envAuthenticationHeaderFromPostman = """Basic UGVREXW87uY2V0ZXN0OlBlcmWRcmdhbmNldGODKDE="""
val httpProtocol = http
........
........
........
val headers_0 = Map(........
........)
val scn = scenario("T")
.repeat (flowRepeatCount) {
exec(http("Test")
.post("""/api/wfo""")
.headers(headers_0)
.body(StringBody("""{"definitionId": $definitionId}"""))) // <== I think it didnt get the value of definition ID
.pause(holdEachUserToWait)
}
setUp(scn.inject(atOnceUsers(userCount))).protocols(httpProtocol)
}
.body(StringBody("""{"definitionId": ${definitionId}}""")))
---- Response Time Distribution ------------------------------------------------
> t < 800 ms 0 ( 0%)
> 800 ms < t < 1200 ms 0 ( 0%)
> t > 1200 ms 0 ( 0%)
> failed 1 (100%)
---- Errors --------------------------------------------------------------------
> No attribute named 'definitionId' is defined 1 (100.0%)
================================================================================
.body(StringBody("""{"definitionId": $definitionId}""")))
.body(StringBody("""{"definitionId": " + definitionId + "}"""")))
.body(StringBody("""{"definitionId": " + definitionId + "}"""")))
set JAVA_OPTS=-DuserCount=2 -DflowRepeatCount=2 -DdefinitionId=1123612
body=
{
"errors" : {
"error" : "Can not construct instance of java.lang.Long from String value '
+ definitionId + ': not a valid Long value\n at [Source: org.apache.catalina.con
nector.CoyoteInputStream@1d4e804c; line: 1, column: 2] (through reference chain:
tv.nativ.mio.api.model.workflow.create.NewWorkflow[\"definitionId\"])"
}
}
body=
{
"errors" : {
"error" : "Unexpected character ('+' (code 43)): was expecting a colon to se
parate field name and value\n at [Source: org.apache.catalina.connector.CoyoteIn
putStream@3c496336; line: 1, column: 20]"
}
}
JAVA_OPTS=-DuserCount=2 -DflowRepeatCount=3 -DdefinitionId=102168 -DtestServerUrl=https://someURL -DenvAuthenticationHeaderFromPostman="Basic UWRZm9aGwsxFsB1V7RXK0OlB5cmZvcm1hbmNldGVzdDE="
sudo JAVA_OPTS=-DuserCount=2 -DflowRepeatCount=3 -DdefinitionId=102168 -DtestServerUrl=https://someURL -DenvAuthenticationHeaderFromPostman="Basic UWRZm9aGwsxFsB1V7RXK0OlB5cmZvcm1hbmNldGVzdDE=" sudo bash gatling.sh
JAVA_OPTS="-DuserCount=2 -DflowRepeatCount=3 -DdefinitionId=102168 -DtestServerUrl='https://someURL' -DenvAuthenticationHeaderFromPostman='Basic UWRZm9aGwsxFsB1V7RXK0OlB5cmZvcm1hbmNldGVzdDE='" ./gatling.sh
Error: Could not find or load main class UWRZm9aGwsxFsB1V7RXK0OlB5cmZvcm1hbmNldGVzdDE='
sudo bash gatling.sh)
JAVA_OPTS="-DuserCount=2 -DflowRepeatCount=3 -DdefinitionId=102168 -DtestServerUrl='https://someURL' -DenvAuthenticationHeaderFromPostman='Basic UWRZm9aGwsxFsB1V7RXK0OlB5cmZvcm1hbmNldGVzdDE='" sudo bash gatling.sh
-DenvAuthenticationHeaderFromPostman='Basic UWRZm9aGwsxFsB1V7RXK0OlB5cmZvcm1hbmNldGVzdDE='"