walid mahjoub
walid mahjoub

Reputation: 21

Using Gatling for functional testing

I want to get into test automation, and I have already seen selenium that allows to do the functional test. I also saw gatling for performance testing and load/stress tests. I want to know if it is possible to do the functional tests with gatling?

Upvotes: 1

Views: 910

Answers (1)

Marcel
Marcel

Reputation: 1463

This is an example for a functional spec from their documentation:

class GatlingFunSpecExample extends GatlingHttpFunSpec { 

  val baseURL = "http://example.com"
  override def httpConf = super.httpConf.header("MyHeader", "MyValue")

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

}

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

Link to the documentation: https://gatling.io/docs/2.3/general/functional_specs/

Upvotes: 1

Related Questions