1

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

ht1994G
  • 11
  • 2

1 Answers1

0

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.

  • testId string Required. Id of the test to run. testId must be between 2 to 50 characters. For a new test, enter an Id with characters [a-z0-9_-]. For an existing test, you can get the test Id from the test details page in Azure portal. This field was called testName earlier, which has been deprecated. You can still run existing tests with testNamefield. characters and the example also shows – ht1994G Jun 28 '23 at 18:10