Hi Gatling Team/Experts,
I am getting this error when gatling is trying to fetch static files like .css & .woff. Can you help me identify what’s causing this and how to fix this ?
Environment :
Operating System : macOS Catalina
Java : openjdk version “11.0.11” 2021-04-20
Gatling bundle version : 3.7.2 [ Have tried with 3.7.3 as well as 3.7.1]
Command using to execute : sh bin/gatling.sh -s <<package.JavaClassName>>
Sample Code :
import static io.gatling.javaapi.core.CoreDsl.;
import static io.gatling.javaapi.http.HttpDsl.;
import io.gatling.javaapi.core.;
import io.gatling.javaapi.http.;
public class StaticCss extends Simulation {
HttpProtocolBuilder httpProtocol =
http
.baseUrl(“https://static.oracle.com/cdn/jet/11.1.2/default/css/redwood/oj-redwood-min.css”)
.inferHtmlResources(AllowList(), DenyList());
// A scenario is a chain of requests and pauses
ScenarioBuilder scn =
scenario(“Scenario Name”)
.exec(http(“request_1”).get(""));
{
setUp(scn.injectOpen(atOnceUsers(1)).protocols(httpProtocol));
}
}
Error :
j.l.StringIndexOutOfBoundsException: String index out of range : 18
Let me know if you need any other details. Appreciate any inputs.