{"id":6782,"date":"2016-07-11T19:55:00","date_gmt":"2016-07-11T19:55:00","guid":{"rendered":"http:\/\/www.abstracta.us\/?p=6782"},"modified":"2025-05-05T21:21:11","modified_gmt":"2025-05-05T21:21:11","slug":"gatling-tool-review-performance-tests-written-scala","status":"publish","type":"post","link":"https:\/\/abstracta.us\/blog\/performance-testing\/gatling-tool-review-performance-tests-written-scala\/","title":{"rendered":"Gatling Tool Review for Performance Tests (Written in Scala)"},"content":{"rendered":"<p><!-- Go to www.addthis.com\/dashboard to customize your tools --><script src=\"\/\/s7.addthis.com\/js\/300\/addthis_widget.js#pubid=ra-58d80a50fc4f926d\" type=\"text\/javascript\"><\/script><\/p>\n<h1><span style=\"font-weight: 400; color: #333333;\">Looking to try Gatling for load testing?<\/span><\/h1>\n<p><span style=\"color: #333333;\"><span style=\"font-weight: 400;\">Have you heard of <\/span><span style=\"color: #00b674;\"><a href=\"http:\/\/gatling.io\/#\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Gatling<\/span><\/a><\/span><span style=\"font-weight: 400;\"> for performance tests? It&#8217;s a relatively new open-source tool (created in 2012, so pretty new), that has recently been gaining popularity (250,000 downloads in four years, 60,000 of those in the last three months, meaning it has been gaining attention from the community). So that you don\u2019t have to dedicate too much time out of your day to learn more about this tool, I wrote this review to sum up some of its features and benefits. Hopefully, within just a few minutes, this Gatling tool review will give you a good idea of what you can do with it. As there are hardly any articles about the topic in Spanish, this a translation of my <span style=\"color: #00b674;\"><a href=\"http:\/\/blog.abstracta.com.uy\/2016\/07\/review-de-gatling-para-pruebas-de.html\" target=\"_blank\" rel=\"noopener\">original post<\/a><\/span> (written in espa\u00f1ol!).<\/span><\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Key_Features_of_Gatling\"><\/span><strong><span style=\"color: #00b674;\">Key Features of Gatling<\/span><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><span style=\"font-weight: 400; color: #333333;\">Tool for performance testing<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Free and open-source (developed in Java \/ Scala)<\/span><\/li>\n<li><span style=\"color: #333333;\"><span style=\"font-weight: 400;\">The scripting language is <\/span><a href=\"http:\/\/scala-lang.org\/\"><span style=\"font-weight: 400;\">Scala<\/span><\/a><span style=\"font-weight: 400;\">, with its own <\/span><a style=\"color: #333333;\" href=\"https:\/\/es.wikipedia.org\/wiki\/Lenguaje_espec%C3%ADfico_del_dominio\"><span style=\"font-weight: 400;\">DSL<\/span><\/a><\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">It works with whichever operating system and any browser<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">It supports HTTP\/S, JMS, and JDBC protocols<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Colorful reports in HTML<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #333333;\"><span style=\"font-weight: 400;\">It doesn\u2019t allow you to distribute the load between machines, but it can execute its tests in different test clouds. It can scale using <a href=\"http:\/\/flood.io\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">flood.io<\/span><\/a><\/span><span style=\"font-weight: 400;\">\u00a0or <\/span><span style=\"color: #00b674;\"><a href=\"http:\/\/gettaurus.io\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Taurus<\/span><\/a><\/span><span style=\"font-weight: 400;\"> with <\/span><span style=\"color: #00b674;\"><a href=\"http:\/\/blazemeter.com\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">BlazeMeter<\/span><\/a><\/span><span style=\"font-weight: 400;\"> (Taurus provides many facilities for continuous integration)<\/span><\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Its_a_Great_Tool_for_When\"><\/span><strong><span style=\"color: #00b674;\">It&#8217;s a Great Tool for When:<\/span><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><span style=\"font-weight: 400; color: #333333;\">You need to simulate less than 600 concurrent users. This is just a reference number, depending on how much processing your simulation script has, but if it needs to generate more, then you will have to pay for a tool in the cloud. A colleague told me that he managed to execute a script with 4,000 concurrent users with a simple script from just one machine.<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">You want to learn about performance tests (it\u2019s very simple and the code is very legible)<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">You are interested in maintaining the test code (the language, Scala, and the Gatling\u2019s DSL are pretty focused on facilitating the maintainability of the tests, which is ideal if you are focusing on continuous integration).<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #333333;\"><span style=\"font-weight: 400;\">This tool allows you to carry out a load simulation of concurrent users against a system through the HTTP\/S, JMS, or JDBC protocols. The most typical scenario of when you want to use this tool is to simulate users of a web system in order to analyze the bottlenecks and optimize it. For comparison, some very popular alternatives on the market are <\/span><span style=\"color: #00b674;\"><a href=\"http:\/\/jmeter.apache.org\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">JMeter<\/span><\/a><\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"color: #00b674;\"><a href=\"http:\/\/www8.hp.com\/uy\/es\/software-solutions\/loadrunner-load-testing\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">HP LoadRunner<\/span><\/a><\/span><span style=\"font-weight: 400;\"> (to name one open-source tool and one commercial, both are widely used).<\/span><\/span><\/p>\n<p><span style=\"font-weight: 400; color: #333333;\">Gatling is a free and open-source tool. It works on Java, thus it\u2019s suitable for all operating systems. It requires the JDK8 (it\u2019s not enough with the runtime, we need the development kit).<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #333333;\">The tool has two executables: one to record the tests and the other to execute them. The tests are recorded in Scala, which is a very clean and easy to read language, even upon looking at it for the first time. After each execution, you get a colorful and wordy report.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Fundamental_Aspects_of_the_Correct_Simulation_of_Users\"><\/span><strong><span style=\"color: #00b674;\">Fundamental A<\/span><span style=\"color: #00b674;\">spects of the Correct Simulation of Users<\/span><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400; color: #333333;\">The scripts count on fundamental aspects for the correct simulation of users, which for our consideration are:<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400; color: #333333;\">Handling of protocol (from the invocations and responses to the management of headers, cookies, etc.)<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Handling of strings, facilities to parse, regular expressions, and including, localization of elements for xpath, json path, css, and more<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Validations, being that we need to check that the responses are correct<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Parametrization from different sources of data (here I see a very strong point of this tool since it offers various, easy alternatives to use)<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Handling of dynamic variables, known as variable correlation<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Handling of different scopes of the variables (level of threads, tests, etc.)<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Modularization (facilitating the maintainability and legibility of the scripts)\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Handling waits (to simulate think times)<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Metrics management (response times, individual ones and group ones, transactions per second, amount of concurrent users, errors, amount of transferred data, etc)<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Management of errors and exceptions<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Flow control (loops, if-then-else)<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400; color: #333333;\">What other things do you consider in the moment of evaluating the scripting language of a load or stress simulation tool?<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Gatling_Reports\"><\/span><strong><span style=\"color: #00b674;\">Gatling Reports<\/span><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400; color: #333333;\">Regarding the reports, they are very colorful and complete. Here I\u2019d like to highlight that its reports:<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400; color: #333333;\">Are in HTML with easy navigation, with an index and organized<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Graphically show the information in a well grouped and very well processed and well-related way<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Include a graphic of the number of virtual users during the test<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">You can zoom in on the graphics to focus and analyze them with more detail in certain areas<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Graph the requests per second and the responses per second, including the comparison of the number of active users<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">You can see each request in detail, in order to refine your analysis<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Separate the response times for the ones that were \u201cok\u201d and the ones that failed<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Handle of the concept of percentiles<\/span><\/li>\n<li><span style=\"font-weight: 400; color: #333333;\">Have a log of errors found<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400; color: #333333;\">What other things do you deem important when evaluating the reports of a stress or load simulation tool?<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #333333;\"><strong>In short, we at Abstracta are big fans of Gatling.<\/strong><\/span><\/p>\n<p>We have used it several times in the past and we are now receiving several requests from clients to use it. In the future, I am sure that it will continue to be an important item in our continuous integration toolshed.<\/p>\n<p><span style=\"font-weight: 400; color: #333333;\">Have you used Gatling? How does it measure up for you?<\/span><\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"Recommended_for_You\"><\/span><strong><span style=\"color: #333333;\">Recommended for You<\/span><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><a href=\"http:\/\/abstracta.us\/blog\/tools\/introduction-to-taurus-an-alternative-to-jmeter\/\" target=\"_blank\" rel=\"noopener\">Introduction to Taurus: An Alternative to JMeter<\/a><br \/>\n<a href=\"http:\/\/abstracta.us\/blog\/performance-testing\/gatling-vs-jmeter-findings\/\">Gatling vs JMeter: Our Findings<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Looking to try Gatling for load testing? Have you heard of Gatling for performance tests? It&#8217;s a relatively new open-source tool (created in 2012, so pretty new), that has recently been gaining popularity (250,000 downloads in four years, 60,000 of those in the last three&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[102,50,37],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v14.0.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Gatling Tool Review for Performance Tests (Written in Scala) | Abstracta<\/title>\n<meta name=\"description\" content=\"Gatling is an increasingly popular open-source performance testing tool. This Gatling tool review will give you a good idea of what you can do with it.\" \/>\n<meta name=\"robots\" content=\"index, follow\" \/>\n<meta name=\"googlebot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta name=\"bingbot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/abstracta.us\/blog\/performance-testing\/gatling-tool-review-performance-tests-written-scala\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Gatling Tool Review for Performance Tests (Written in Scala) | Abstracta\" \/>\n<meta property=\"og:description\" content=\"Gatling is an increasingly popular open-source performance testing tool. This Gatling tool review will give you a good idea of what you can do with it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/abstracta.us\/blog\/performance-testing\/gatling-tool-review-performance-tests-written-scala\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog about AI-powered quality engineering for teams building complex software | Abstracta\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/AbstractaQA\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-07-11T19:55:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-05T21:21:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/abstracta.us\/wp-content\/uploads\/2016\/07\/Gatling-min-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"420\" \/>\n\t<meta property=\"og:image:height\" content=\"236\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fltoledo\" \/>\n<meta name=\"twitter:site\" content=\"@AbstractaUS\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/abstracta.us\/blog\/#website\",\"url\":\"https:\/\/abstracta.us\/blog\/\",\"name\":\"Blog about AI-powered quality engineering for teams building complex software | Abstracta\",\"description\":\"AI-powered quality engineering\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/abstracta.us\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/abstracta.us\/blog\/performance-testing\/gatling-tool-review-performance-tests-written-scala\/#webpage\",\"url\":\"https:\/\/abstracta.us\/blog\/performance-testing\/gatling-tool-review-performance-tests-written-scala\/\",\"name\":\"Gatling Tool Review for Performance Tests (Written in Scala) | Abstracta\",\"isPartOf\":{\"@id\":\"https:\/\/abstracta.us\/blog\/#website\"},\"datePublished\":\"2016-07-11T19:55:00+00:00\",\"dateModified\":\"2025-05-05T21:21:11+00:00\",\"author\":{\"@id\":\"https:\/\/abstracta.us\/blog\/#\/schema\/person\/7421e539de0357d3adb0c69ed469a1c2\"},\"description\":\"Gatling is an increasingly popular open-source performance testing tool. This Gatling tool review will give you a good idea of what you can do with it.\",\"breadcrumb\":{\"@id\":\"https:\/\/abstracta.us\/blog\/performance-testing\/gatling-tool-review-performance-tests-written-scala\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/abstracta.us\/blog\/performance-testing\/gatling-tool-review-performance-tests-written-scala\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/abstracta.us\/blog\/performance-testing\/gatling-tool-review-performance-tests-written-scala\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/abstracta.us\/blog\/\",\"url\":\"https:\/\/abstracta.us\/blog\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/abstracta.us\/blog\/performance-testing\/\",\"url\":\"https:\/\/abstracta.us\/blog\/performance-testing\/\",\"name\":\"Performance Testing\"}},{\"@type\":\"ListItem\",\"position\":3,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/abstracta.us\/blog\/performance-testing\/gatling-tool-review-performance-tests-written-scala\/\",\"url\":\"https:\/\/abstracta.us\/blog\/performance-testing\/gatling-tool-review-performance-tests-written-scala\/\",\"name\":\"Gatling Tool Review for Performance Tests (Written in Scala)\"}}]},{\"@type\":[\"Person\"],\"@id\":\"https:\/\/abstracta.us\/blog\/#\/schema\/person\/7421e539de0357d3adb0c69ed469a1c2\",\"name\":\"Federico Toledo, Chief Quality Officer at Abstracta\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/abstracta.us\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6de7ec6536c4028b5c02ad4ec1b9af0d?s=96&d=blank&r=g\",\"caption\":\"Federico Toledo, Chief Quality Officer at Abstracta\"},\"description\":\"Co-founder and COO of Abstracta\",\"sameAs\":[\"https:\/\/twitter.com\/fltoledo\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/abstracta.us\/blog\/wp-json\/wp\/v2\/posts\/6782"}],"collection":[{"href":"https:\/\/abstracta.us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abstracta.us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abstracta.us\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/abstracta.us\/blog\/wp-json\/wp\/v2\/comments?post=6782"}],"version-history":[{"count":9,"href":"https:\/\/abstracta.us\/blog\/wp-json\/wp\/v2\/posts\/6782\/revisions"}],"predecessor-version":[{"id":17522,"href":"https:\/\/abstracta.us\/blog\/wp-json\/wp\/v2\/posts\/6782\/revisions\/17522"}],"wp:attachment":[{"href":"https:\/\/abstracta.us\/blog\/wp-json\/wp\/v2\/media?parent=6782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abstracta.us\/blog\/wp-json\/wp\/v2\/categories?post=6782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abstracta.us\/blog\/wp-json\/wp\/v2\/tags?post=6782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}