algattik/azure-pipelines-jmeter-extension

TaurusRunner@0 task fails if JMeterInstaller@0 task is named or changed from default name

Opened this issue · 0 comments

Hi @algattik , first, thanks for this awesome extension. I think it works great.

I hope this issue isn't documented already but I don't think I saw it among known issues or in the documentation.

To Reproduce

  • Add all pre-requisites for JMeterInstaller@0 task
  • Add JMeterInstaller@0 task
  • Give JMeterInstaller@0 task a name. This can be Any standard task name for Azure DevOps.
    • This is what causes the error. (See below code block for example)
  • Add TaurusInstaller@0 task
  • Add TaurusRunner@0 task
  • Run the pipeline
    - task: JMeterInstaller@0
      name: InstallJmeterOnAgent
      displayName: Install JMeter on Agent
      inputs:
        jmeterVersion: '5.4.1'

Pipeline Error

Pipeline fails at TaurusRunner@0 task with the following error

##[warning]Can't find loc string for key: InputVersionNotValidVersion
##[error]Error: InputVersionNotValidVersion $(JMeterInstaller.JMeterVersion)

Troubleshooting

Checking the variable for $(JMeter.JMeterVersion), the value is displayed as INSTALLJMETERONAGENT_JMETERVERSION=5.4.1 where INSTALLJMETERONAGENT is the name given to task JMeterInstaller@0. This variable is different from the default JMETERINSTALLER_JMETERVERSION=5.4.1 which is assigned to the variable when no name is specified.

Conclusion

  • Setting a different name (aside from the default name) for task JMeterInstaller@0 will cause pipeline to fail on task TaurusRunner@0 except the $(JMeterInstaller.JMeterVersion) variable is updated for task TaurusRunner@0.

Suggestion

Update the code to automatically get the variable name of task JMeterInstaller@0 or add documentation to