At Gatling, we are excited to celebrate today’s release of Java 21, the latest Long-Term Support (LTS) release. Since the release of version 3.7 in November 2021, Gatling has supported Java in the bundled version and via plugins for Maven and Gradle.
What is Java?
Java is a programming language whose programs run on any operating system: iOS, Windows, Android, MacOS, and Linux, thanks to the “write once and run anywhere” approach. Due to its flexibility and features, Java continues to be one of the top 5 programming languages. First developed by Sun Microsystems in 1995 and now owned by Oracle Corporation, Java releases a Short-Term Support version every six months and an LTS every two years.
Gatling supports Java software developers and beyond
At Gatling, we believe in a “shift left” strategy for load testing, integrating load testing earlier in the software development lifecycle. In support of the shift left strategy, our software must be usable by developers in the coding languages they regularly use.
The shift left philosophy led to Gatling’s scripting styles for Java, which allows Java software developers to code tests in Java. But we didn’t stop there! We also provide scripting styles for Scala and Kotlin. Anyone can learn to write a load-testing script, even with little or no coding experience, using our documentation and learning through the Gatling Academy.
In addition to Java, Scala, and Kotlin scripting styles, we support writing load tests in an exciting new no-code generator on Gatling Enterprise Cloud. The no-code generator lets you write a load test by selecting options such as the test type and the duration and creates a test script in Java, Scala, and Kotlin that you can copy to your local development environment for further customization. Stay tuned for future releases that will continue to enhance the Gatling user and developer experience.
Java 21 at a glance
The release of Java 21 brings exciting new features to the Java ecosystem. New and exciting features include:
Virtual threads: Introduces lightweight threads that reduce the complexity of writing, maintaining, and observing high-throughput concurrent applications.
Structured Concurrency (preview stage): Improves concurrent programming using an API. Coalesces related tasks in different threads as a single work unit. This feature will Improve error handling and cancellation.
At Gatling, we’re also eager to test and experiment with new performance-related features such as the Generational ZGC, the Foreign Memory API, and the Vector API.
Gatling + Java 21: What you should know
Gatling is committed to supporting software developers. Part of that commitment is keeping Gatling up to date with supported Java LTS releases and associated libraries. Some important libraries have already stopped supporting Java 8.
With the release of Gatling 3.10 in approximately one month, we will stop compiling against Java 8, which was released nearly ten years ago in March 2014. Gatling will instead compile against Java 11. We recommend visiting the official Java documentation for upgrade and migration details.
Gatling will continue to support the Java LTS releases 11, 17, and 21. We also support the latest Short-Term Support Releases (STS) when they are newer than the latest LTS release. The following table summarizes Gatling’s Java support by version, with important dates.
Java 21 LTS release
Gatling supports Java 21, 17, 11 & 8
Mid to late October 2023
Gatling drops support for Java 8. Continued support for Java 21, 17, & 11
Java 22 STS release
Gatling adds support for Java 22. Continued support for Java 21, 17, & 11
Gatling and Java moving forward
At Gatling, we want developers to thrive in the best language for them and their teams. Since we started supporting Java, we have added Java code examples to the documentation and developed Gatling Academy modules for teams using Java. Through 3 modules, the Academy teaches you how to write load tests, even if you are not an experienced developer.
We’ve worked for years alongside software engineers to deliver load-testing insights, best practices, and knowledge to help users benefit from best-in-class tests. With 15+ years of experience, our professional services experts can help your organization with your load-testing strategy and success. Load testing can be simple and fast; however, depending on the use case, team knowledge, and experience, organizations often contact us for expertise and assistance in their load-testing projects.
Professional services we offer for Gatling projects:
Developing realistic test scripts in Java and running relevant tests on Gatling
Assistance with migrating other scripts into Gatling-Java scripts
Convert a Gatling-Scala script into a Gatling-Java script
Assistance migrating to the latest version of Gatling
Train your software engineers to Load-test-as-code in Java