I am new to Gatling (2.1.2) and want to do a small prototype project to show to my colleagues.
According to the quick start page, there are several ways I can run a
You can always create a simple Java class that starts Gatling with the Gatling.fromArgs. With this setup you can have all in just one happy executable jar. Let this class be the jar mainClass instead of "io.gatling.app.Gatling". This example is for a scala simulation class "my.package.MySimulation".
import scala.Option;
import io.gatling.app.Gatling;
import io.gatling.core.scenario.Simulation;
public class StartSimulation {
public static void main(String[] args) {
Gatling.fromArgs(new String[]{}, new Option>() {
private static final long serialVersionUID = 1L;
@Override
public int productArity() {
return 0;
}
@Override
public Object productElement(int arg0) {
return null;
}
@SuppressWarnings("unchecked")
@Override
public Class get() {
try {
return (Class) Class.forName("my.package.MySimulation");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
return null;
}
@Override
public boolean isEmpty() {
return false;
}
@Override
public boolean canEqual(Object o) {
return false;
}
});
}
}