How to pass command line input in Gatling using Scala script?

28 views
Skip to first unread message

pandya ronak

unread,
Jun 24, 2016, 6:11:30 AM6/24/16
to Scala IDE Dev

I want that user can input 'Count, repeatCount, testServerUrl and definitionId' from command line while executing from Gatling. Can anybody please help me? TIA.

import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._

    class TestCLI extends Simulation {


        val count = 50
        val wait = 2
        val repeatCount = 2

        val testServerUrl = "Some url" 


        val scn = scenario("testabcd")
            .repeat (repeatCount ) {
                exec(http("asdfg")
                .post("""/xyzapi""")
                .headers(headers_0)
                .body(StringBody("""{"definitionId":10200121}"""))) // I also want to get this value dynamic from CLI and put here
                .pause(wait) 
            }                   

        setUp(scn.inject(atOnceUsers(count))).protocols(httpProtocol)

    }

pandya ronak

unread,
Jun 24, 2016, 6:11:30 AM6/24/16
to Scala IDE Dev
I want that user can input 'Count, repeatCount, testServerUrl and definitionId' from command line while executing from Gatling. Can anybody please help me?

Simon Schäfer

unread,
Jun 24, 2016, 6:28:22 AM6/24/16
to scala-ide-dev
Wrong mailing list. Please ask here: https://groups.google.com/forum/#!forum/scala-user


---- On Fri, 24 Jun 2016 08:00:28 +0200 pandya ronak <rona...@gmail.com>wrote ----

--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages