Azure-Samples / jmeter-aci-terraform

Scalable cloud load/stress testing pipeline solution with Apache JMeter and Terraform to dynamically provision and destroy the required infrastructure on Azure.
MIT License
119 stars 99 forks source link

${__P(xxx)} can not work. need help #76

Closed wenbya closed 2 years ago

wenbya commented 2 years ago

when in my local docker, I can pass out the count variable(or some others) but in this sample pipeline can't recognize the outer variables.

what I have changed:

  1. In sample.jmx add a Count variable to control loop count using ${__P(Count)}

  2. In main.tf pass it using -JCount=5 commands = [ "/bin/sh", "-c", "cd /jmeter; /entrypoint.sh -n -J server.rmi.ssl.disable=true -t ${var.JMETER_JMX_FILE} -l ${var.JMETER_RESULTS_FILE} -JCount=5 -e -o ${var.JMETER_DASHBOARD_FOLDER} -R ${join(",", "${azurerm_container_group.jmeter_workers.*.ip_address}")} ${var.JMETER_EXTRA_CLI_ARGUMENTS}", ]

it not works as expect but works well in my local docker. can I get some suggestions ?

wenbya commented 2 years ago

I got it, need use ${var.JMETER_EXTRA_CLI_ARGUMENTS}. but still not really works in pipeline.