将 keyStore 和 trustStore 添加到 Gatling 请求
Adding keyStore and trustStore to Gatling requests
我一直在使用 Gatling 进行性能测试,现在需要找到一种方法将 keyStore 和 trustStore 添加到我的请求中。想知道我是否可以在 HttpProtocolBuilder
中添加这些内容,或者我是否必须采取稍微不同的方法。
基本上是否存在与以下 RestAssured 命令等效的加特林机?
given()
.keyStore("src/test/resources/fooKeyStore.jks","fooPassword")
.trustStore("src/test/resources/fooTrustStore.jks","fooPassword")
Was wondering if that is something I can add in the HttpProtocolBuilder
在那里,您只能使用 perUserKeyManagerFactory 为每个虚拟用户创建一个不同的 KeyManager。仅当您想为每个虚拟用户提供不同的密钥库时才应该采用这种方法。
您可以在 gatling.conf 中定义默认密钥库。
我建议您使用默认的可信 TrustManager:您想要 运行 负载测试,而不是保护应用程序。
我一直在使用 Gatling 进行性能测试,现在需要找到一种方法将 keyStore 和 trustStore 添加到我的请求中。想知道我是否可以在 HttpProtocolBuilder
中添加这些内容,或者我是否必须采取稍微不同的方法。
基本上是否存在与以下 RestAssured 命令等效的加特林机?
given()
.keyStore("src/test/resources/fooKeyStore.jks","fooPassword")
.trustStore("src/test/resources/fooTrustStore.jks","fooPassword")
Was wondering if that is something I can add in the HttpProtocolBuilder
在那里,您只能使用 perUserKeyManagerFactory 为每个虚拟用户创建一个不同的 KeyManager。仅当您想为每个虚拟用户提供不同的密钥库时才应该采用这种方法。
您可以在 gatling.conf 中定义默认密钥库。
我建议您使用默认的可信 TrustManager:您想要 运行 负载测试,而不是保护应用程序。