This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ExampleSimulation extends TestableSimulation { | |
describe("foo") | |
before { | |
println("executed before gatling") | |
} | |
setUp( | |
// ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait TestableSimulation extends Simulation with FlatSpecLike with BeforeAndAfter { | |
val props = scala.collection.mutable.Map.empty[String, String] | |
for { p <- sys.props if (p._1.startsWith("gatling")) } yield { props += p } | |
GatlingConfiguration.setUp(props) | |
val simClass = getClass.asInstanceOf[Class[io.gatling.core.scenario.Simulation]] | |
val cleanSimClassName = simClass.getSimpleName.clean | |
val outputDirectoryName = configuration.core.outputDirectoryBaseName.getOrElse(cleanSimClassName) | |
var selection = new Selection(simClass, outputDirectoryName, "no description") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ExampleSimulation extends TestableSimulation { | |
describe("foo") | |
before { | |
println("executed before gatling") | |
} | |
setUp( | |
// ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.net.URL; | |
import java.util.Date; | |
import java.util.List; | |
import java.util.logging.Level; | |
import org.json.*; | |
import org.openqa.selenium.*; | |
import org.openqa.selenium.chrome.*; | |
import org.openqa.selenium.logging.*; |