How can I pass a variable group in Jmeter using Azure Pipeline?

后端 未结 3 1066
离开以前
离开以前 2020-12-04 04:26

I need to use the Variable group in the azure pipeline that links to Azure Key Vault secret. The secret will be used to connect to a sql database.

Is there a way th

3条回答
  •  醉酒成梦
    2020-12-04 04:37

    Since there no such option or checkbox in task of pipeline to directly achieve pass variable value to .jmx file, you can use the Replace token task to achieve the Parameter value replaced.

    • Use Azure Key Vault task to download the relevant secrets firstly.

    • Add Replace Token task(note: add this task before test step thus the test step can executed with the .jmx file which has received the value), then specify the target files

    • Then configure the variable in .jmx file with the format #{parameter name}#:

    Note: The parameter name which defined in the .jmx file should same with the variable name which in Azure key Vault. Otherwise, the parameter could not get the value from variable.

    This is my source files which exists in my agent locally, you can see that the value was passed successfully:

提交回复
热议问题