Gatling test scripts

Given that the Atlassian recommends Gatling, should not exist a few examples to help start up. Am I that did not find or do not even exist?

It should be a great start for those (like me) that are starting to mesure the performance. 

 

1 answer

I agree with you Jose, especially since no HW recommendations (aside from bare minimums) are provided by Atlassian.

The Gatling documentation itself is rather thin. It's an excellent tool but the syntax can be cumbersome given the amount of examples available. If it helps, here's a very simple Browse Scenario I am using. Update/change the values according to your environment:

 

package default
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import scala.util.Random
class Confluence extends Simulation {

        val httpProtocol = http
                .warmUp("http://www.google.com")
                .baseURL("YOUR_BASE_URL_HERE")
                .inferHtmlResources()
                .acceptHeader("application/json, text/javascript, */*; q=0.01")
                .acceptLanguageHeader("en-US,en;q=0.5")
                .userAgentHeader("Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0")
        val headers_0 = Map(
                "Accept" -> "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
                "Accept-Encoding" -> "gzip, deflate")
    object Browse {
    val feeder = sitemap("/path/to/sitemap.xml")
    val Browse = exec(http("Home") // Name displayed in the reports
                .get("/")
                .headers(headers_0))
                .pause(2)
                .feed(feeder)
                .exec(http("RandomPage") // Provided by the feeder from the sitemap
                .get("${loc}")
                .headers(headers_0))
  }
val scn = scenario("CONFLUENCE").exec(Browse.browse) // Execute the objects you want
setUp(scn.inject(rampUsers(200) over (30 seconds))).protocols(httpProtocol)

I understand if you can't or don't want to but I would really appreciate it if you could post a slightly more complete example. I understand Gatling want to sell consulting and I know it's an opensource project but that documentation is just shy of insulting.

Showing how to use log in and use check would be useful

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

103 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you