I got stuck to a really annoying issue. Looks pretty simple to solve but I can't see what am I doing wrong.
All started from JMeter: more than nine parameters from Jenkins.
I managed to get the values from Jenkins in Jmeter by spiting an array.
String line = "${__P(jenkinsparams)}";
String[] words = line.split(",");
String looks like:
-Jjenkinsparams="999,999,8443,1433,SQL2012,sa"
So I have:
- words[0] = 999;
- words[1] = 999;
- words[2] = 8443;
- [...]
- words[5] = sa;
This operation is made inside a BeanShell Sampler with 1 thread. How can I use these values as further on? Even in different Thread Groups.
I've tried:
props.put("SqlIP",words[0]);
props.put("SqlInstance", words[1]);
but ${__P(SqlIP)} doesn't retrieve the value when used in JDBC Connection Configuration as:
jdbc:sqlserver://${__P(SqlIP)}\\${__P(SqlInstance)}
How can I use properties/variables to send data from that array to build an JDBC connection? I need them for: SQL IP, SQL instance, SQL username and SQL password. All sent in that array from Jenkins. Thank you