rajat
June 28, 2023, 5:22am
1
can someone pls help me - how can we use password in encrypted form in our gatling script.
it should also be masked in logs .Below is the code which i am using-
private val httpProtocol = http
.proxy(Proxy(“proxy.abc.com ”, 8080).credentials("username ",“password”))
It’s your responsibility to provide an encryption mechanism if you want one.
GeMi
June 28, 2023, 10:02am
3
You can use as parameter as in example here:
package pl.gemiusz;
import io.gatling.javaapi.core.ScenarioBuilder;
import io.gatling.javaapi.core.Simulation;
import io.gatling.javaapi.http.HttpProtocolBuilder;
import static io.gatling.javaapi.core.CoreDsl.*;
import static io.gatling.javaapi.http.HttpDsl.Proxy;
import static io.gatling.javaapi.http.HttpDsl.http;
/**
* HOW TO RUN:
* mvnw gatling:test -Dgatling.simulationClass=pl.gemiusz.Case0011ProxyCommandLineParametersSimulation -Dfoo=10 -Dbar=GeMi -DuseProxy=true -DproxyHost=127.0.0.1 -DproxyPort=8080
*/
public class Case0011ProxyCommandLineParametersSimulation extends Simulation {
int foo = Integer.getInteger("foo", 1);
String bar = System.getProperty("bar");
This file has been truncated. show original
system
Closed
July 28, 2023, 10:02am
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.