scala - Gatling configure base url in configuration file -


i want configure base url of gatling simulation in configuration file. can easy switch between test , live system.

i works fine when configure in simulation-scala file with:

val httpconf = http         .baseurl("http://computer-database.herokuapp.com") 

if remove line above , configure in config (gatling.conf) file with:

gatling {    http {      baseurls = "http://localhost8080/baserate"      ... 

i following error , scenario not work because base url empty.

09:57:26.352 [error] i.g.c.c.gatlingconfiguration$ - gatling.conf file outdated, properties have been renamed or removed. please update (check gatling.conf in gatling bundle, or gatling-defaults.conf in gatling-core jar). enabled obsolete properties:'gatling.http.baseurls' removed, use httpprotocol. 

is still possible in current version of gatling configure base url outside of

my version gatling-maven-plugin:2.1.2.

i solved creating application.properties file in /test/resources/ with

baseurl=http://www.example.com 

i changed simulation this:

import com.typesafe.config._ class basicsimulation extends simulation {    val conf = configfactory.load()    val baseurl = conf.getstring("baseurl")    val httpconf = http.baseurl(baseurl) 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -