The gatling-dummy-sampler is a plugin for simulating realistic actions without making actual requests. It is especially useful when:
- The request involves a cost.
- The response times are already known or predictable.
Imagine a scenario where you are testing an integration with a third-party API. This API charges for each request, but you want to avoid unnecessary costs during testing. Using the Dummy Sampler, you can:
- Mock Specific Requests in Transactions: Replace a single request within a transaction with a mocked response, while allowing other requests to interact with the API as usual.
- Include Third-Party Timing Without Charges: If you're tuning your application to meet NFRs, you can simulate the third-party API's response time in the transaction without incurring costs.
- Predict Response Time for Future Components: Use the mocked response times to estimate the behavior of yet-to-be-implemented components or systems, aiding in proactive planning and performance evaluation.
Example | Documentation |
---|---|
Java / Scala | Java / Scala |
Looks like we are good! 😄
Here's the current progress and planned features for the plugin:
- Java API
- Support for Gatling EL in parameters.
- Create test cases with examples.
- Ability to set status KO/OK.