Azure Load testing cannot create a new test

244 Views Asked by At

I have a yaml file for test config as follows:

version: v0.1
testId: NAME
testPlan: sampleTest
description: 'Load Test'
engineInstances: 1
failureCriteria:
  - avg(response_time_ms) > 15000
  - percentage(error) > 10

and in my pipeline yaml file I have AzureLoadTest@1 as following:

   - task: AzureLoadTest@1
      inputs:
        azureSubscription: ${{ connection }}
        loadTestConfigFile: '$yaml path'
        resourceGroup: ${{ ResourceGroup }}
        loadTestResource: ${{ TestResource }} 
         env: ...

for some reason the pipeline created the load test in one resource group and as long as the testId is the same value as the one which is created the pipeline passes but if I wanna change the testId or run the pipeline with a new resource group it keeps failing with this

error:
`{ error:
   { code: 'TestNotFound',
     message: 'Test couldn\'t find with given identifier NAME',
     target: null,
     details: null } }
##[error]Error in getting the test.`

is there a solution to solve this?

the azure load testing doc shows that if the testId does not exist it should create one https://learn.microsoft.com/en-us/azure/load-testing/reference-test-config-yaml

1

There are 1 best solutions below

1
On

If you check the documentation in the link (reference-test-config-yaml), you'll see it points you to the details page in the Azure portal. If you look there, you will notice it uses a GUID for the testId, not a string.