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
var fileBFeeder = csv("fileB.csv").circular | |
val scn = scenario("test") | |
.feed(fileBFeeder) | |
.exec(http("My Req") | |
.get("/api/users") | |
.check( | |
regex("""${account_id}""") | |
.saveAs("account_id"))) | |
.exec(session => { |
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
git stash (save changes temporarily to get pull/switch branch etc.) | |
1. git stash save "message" :- save local changes temporary | |
2. git stash apply :- apply stash changes without dropping it | |
3. git stash pop :- remove stash and apply | |
4. git stash drop :- remove stashed changes without applying it | |
5. git stash show -p stash@{0} :- see what stashed @index 0 | |
git stash only one file | |
1. git add app/controllers/cart_controller.java |
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
if ((parserFailureConditions != null) | |
&& (parserFailureConditions.length != 0)) { | |
numberOfParserFailureConditions = getNumberOfFailureConditions(parserFailureConditions[0]); | |
} | |
/* | |
* As the the passed array holds JSON String at first location, | |
* this method initialize the 'number_failureConditions' based on no. of JSON elements. | |
*/ | |
public int getNumberOfFailureConditions(String condition) { |
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
package com.test.actor; | |
import com.benbria.actor.Actor; | |
import com.benbria.actor.Behaviour; | |
import com.benbria.actor.ThreadActor; | |
public class ActorExample { | |
public static void main(String[] args) throws InterruptedException { | |
Actor<String> actor = ThreadActor.spawn(new Behaviour<String>() { | |
@Override |
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
Make sure you have "login.csv" in gatling data folder and | |
"login.csv" contains proper creadentials to login into your web app. | |
package mywebapp.lib | |
import scala.concurrent.duration._ | |
import io.gatling.core.Predef._ | |
import io.gatling.http.Predef._ | |
import io.gatling.jdbc.Predef._ | |
import mywebapp.config._ |
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.*; |