Gatling Test in Background

SunilSK
Oct 23, 2020

There was an occasion when we wanted to run our full test suite using Gatling in the command line to measure few metrics. We did not want to use a build tool but wanted to execute on a remote server in background, so that we do not get disconnected and kill the test if the remote session is lost.

On the remote machine , we used sbt (but similar command can be used for maven or gradle builds).

  1. In the build root folder (If in our case the simulation to run is : computerdatabase.BasicSimulation)
mkdir -p simlogs ; setsid nohup gatling:testOnly computerdatabase.BasicSimulation > simlogs/simlog-`date +%Y-%m-%d-%H-%M`.log &
  1. 1 > We are using the linux `setsid` (setsid — creates a session and sets the process group ID)
  2. 2 >We are creating a folder and creating the logfile with datetimestamp.
  3. 3 > You can tail the logs to view the live stats OR come back later .

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

SunilSK
SunilSK

Written by SunilSK

Entering into Full Stack development from the analytical world of Performance Engineering !

No responses yet

Write a response