Giter Club home page Giter Club logo

gatling-funtest-example's Introduction

Gatling functional tests example project

Example project setup for using the new functional testing functionality coming in Gatling 2.2.0.

Using it you can writing functional tests in Gatling even easier then before.

Use sbt test to run the example

Example code

From GatlingFunSpecExample

class GatlingFunSpecExample extends GatlingHttpFunSpec {

  val baseURL = "http://example.com"

  spec {
    http("Example index.html test")
      .get("/index.html")
      .check(h1.exists)
  }

}

object GatlingFunSpecExample {
  def h1 = css("h1")
}

Running the example.

All you need to do to run the example is clone this repository and then in the project root

  • sbt test runs the TraditionalUnitTest inside src/test
  • sbt gatling:testruns the GatlingFunSpecExample inside src/test
  • sbt it:testruns the Integration Test Example io.gatling.funspec.example.GatlingFunSpecExampleIT inside src/it

Note: you need to put the it scope into the Ivy projectDependencies definition in order to make the it tests compile:

lazy val projectDependencies = Seq(
  "org.scalatest"                   %% "scalatest"                  % "2.2.3"          % "test,it",
  "io.gatling.highcharts"           % "gatling-charts-highcharts"   % "2.2.0"          % "test,it",
  "io.gatling"                      % "gatling-test-framework"      % "2.2.0"          % "test,it"
)

Building from SNAPSHOTs

# from the gatling-funspec-example directory
cd ..
git clone [email protected]:gatling/gatling.git
cd gatling
sbt publish-local
cd ..
git clone [email protected]:gatling/gatling-sbt.git
cd gatling-sbt
sbt publish-local

gatling-funtest-example's People

Contributors

zoosky avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.