Java SDK
Efficiently write load tests as code in Java.
Create realistic load tests
Test-as-code allows you to build virtual user journeys that exactly match what your users do.
Improve your time to market
Take advantage of modern development practices to share and repurpose code. Save time on testing and deliver value to your users faster.
Integrate with your existing stack
Use your existing libraries and CI/CD integrations to make load testing seamless in your development lifecycle.
Script complex user scenarios with ease
- Abstract common tasks like user authentication to speed up test creation.
- Import your datasets and libraries. Use your Java libraries and project-specific data. Data formats include CSV, JSON, JDBC, Redis, and more.
- Store, transform, and reuse response data to precisely mimic real user behavior.
Use common development practices to collaborate and maintain your tests
- Track changes in your tests using Git and Git-based remote repositories. Use modern development practices, such as pull requests, conflict resolution, and branching, for your tests.
- Pull shared testing resources and components to harmonize your testing efforts across multiple teams. Share datasets, code, and test configurations to ensure quality and speed up your testing efforts.
- Involve your tech team in testing early in the dev process with familiar syntax and structure that makes test writing feel like part of the development process.
Flexibility to handle your testing needs
Optimized for testing HTTP servers: Gatling provides excellent support for the HTTP protocol, making it a tool of choice for load testing any HTTP server.
Gatling also supports a growing number of protocols. With the Java SDK, you can additionally test:
- WebSocket
- JMS
- SSE
- gRPC
- MQTT
Record user scenarios from your web application
The Java SDK has a built-in web recorder for capturing user scenarios and converting them into load test scripts. Some key features include:
- Capturing browser-based actions like clicks, inputs, and natural pauses between actions.
- Handling SSL certificates for HTTPS requests
- Create clean, minimalist scripts with filters for unnecessary requests like .css files.
- Convert tests from other tools into Gatling scripts by importing HAR files
Start testing now!
Test Gatling Enterprise for free! No credit card is required.
Dive into our other features
Frequently asked questions about the Java SDK
The Java SDK and Gatling Enterprise are perfectly integrated. After writing load tests in your local development environment, you can package and deploy the tests to the Gatling Enterprise platform through
- the UI
- CLI commands
- your CI/CD pipeline
Gatling builds and maintains plugins for the Maven and Gradle build tools and the Java SDK.
The Maven and Gradle build tools are great for deeper integration into development projects, including:
- Dependency management
- Source control management
- IDE integration
- Customization, extensibility, and scalability.
Gatling provides expressive SDKs in Java, JavaScript, TypeScript, Kotlin, and Scala. The scenarios are designed to be easy to read, even if you are not a seasoned developer in one of these languages. The Java and JavaScript SDKs are a great place to start if you are new to Gatling or load testing in general.