-
Notifications
You must be signed in to change notification settings - Fork 99
[question] Is there a way to pass Azure variables to a Jmeter property variable? #32
Comments
I believe there are some ways to implement this. One possible one is to:
Something like: variable "JMETER_NO_THREADS " {
type = number
default = 2
}
variable "JMETER_RAMP_UP" {
type = number
default = 1
} Then, you can use those parameters at: jmeter-aci-terraform/terraform/main.tf Line 156 in 2584ef3
Something like: "cd /jmeter; /entrypoint.sh -n -J noThreads=${var.JMETER_NO_THREADS} -J rampUp=${var.JMETER_RAMP_UP} -J server.rmi.ssl.disable=true -t ${var.JMETER_JMX_FILE} -l ${var.JMETER_RESULTS_FILE} -e -o ${var.JMETER_DASHBOARD_FOLDER} -R ${join(",", "${azurerm_container_group.jmeter_workers.*.ip_address}")}", Then, when triggering the pipeline, you would replace values for both |
@allantargino This really helps. Thank you! So I've configured everything and add jmeter arguments on the main.tf file but it seems like the script will not run and so does error producing the report. This is a different issue that I'm facing now but I think you have an idea on why the script is not running. Thanks for your help! Here's the error: |
@allantargino The error on my previous comment is because of jmeter not finding the csv files needed to login on the application. Relative file names are resolved with respect to the path of the active test plan. So are there any ways we can store the needed CSV file in the server host system in such a way, the file is relative to the jmeter scipt (active test plan)? |
@allantargino - I am getting an error
As you suggested, I have updated
I assign value and start pipeline as below.
I map this property value to Host variable in my Test Plan-->User Defined Variables. I can see that the host entry is passed correctly to jmeter controller.
Everything works if I use the same host entry in JMX file and run test without passing HOST property. What I may be missing? |
Answering my own question - it turns out that I was not mapping variables with properties in right way. I needed to pass default value for every property in my test plan before assigning it to a variable.
Its working after that. |
Hi @harveydecapiataxsystems, |
Hi @Mahesh-MSFT, |
@allantargino Yes, I have placed all the necessary csv files in the jmeter folder where the script also resides. It's now working. Thank you! |
I used to run Jmeter using the command line non gui mode and passing the needed property variables from there to have configurable test plans instead of having multiple jmx scripts.
jmeter -JnoThreads=2 -JrampUp=1 -n -t sample.jmx
I simply passed the number of threads value and ramp up values.
If I need to do updating on the pipeline, can you provide examples?
The text was updated successfully, but these errors were encountered: