Azure load test is throwing this error "Keystore file not found, loading empty keystore". How to send Authorization Token to the azure load test

Prima25 6 Reputation points
2022-04-01T01:43:51.39+00:00

Tried uploading Keystore file to Testplan and Updated keystore details in System.properties file. Nothing worked.

And the test needs Auth token which is generated by sending client id and secret. I don't want to give the client id and secret in the jmx file. I will generate Auth token separately and send it in the HTTP header. This works fine in the jmeter script. But in the Azure load test portal, 403 error is occurring.

Please help for both issues and are these issues interrelated?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,001 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,875 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Monalla-MSFT 11,636 Reputation points
    2022-04-19T12:07:36.3+00:00

    Hello @Prima25 - Thanks for reaching out and apologies for the delay in responding to you.

    Try to configure clientID and secret outside jmx script and see if that helps.

    Please take a look at this doc for reference: how-to-parameterize-load-tests

    ----UPDATE:

    Looks like you are using certificates for authorization. Currently Azure Load Testing does not support certificate-based authorization. If you can generate a token using client id and secret, you can do that following the steps mentioned here

    Hope this helps. and please feel free to reach out if you have any further questions.

    ------------------------------------------------------------------

    If the above response was helpful, please feel free to "Accept as Answer" and "Upvote" the same so it can be beneficial to the community.


  2. Pankaj 1 Reputation point
    2022-04-25T09:16:46.91+00:00

    Hi @Monalla-MSFT

    I am trying to configure load test using .yaml file (using Azure Load Testing Task) and want to use multiple certificates in KeyStore.p12 file as input to my test. By using this KeyStore.p12 file and a KeyStoreAliasReference.csv referred in jmx file, I am able to run this using jmeter where I am configuring following properties in system.properties file of jmeter. javax.net.ssl.keyStoreType=PKCS,javax.net.ssl.keyStore=KeyStore.p12,javax.net.ssl.keyStorePassword=testpassword, https.use.cached.ssl.context=false,https.keyStoreStartIndex=0,https.keyStoreEndIndex=3

    Referred
    https://learn.microsoft.com/en-us/azure/load-testing/reference-test-config-yaml
    https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/test/azure-load-testing?view=azure-devops

    and tried passing above properties in yaml configuration using following but did not work.

    Please suggest on how/where can these properties be specified so that certificates from KeyStore.p12 file are picked up correctly.

    env: |
    [ {
    "name": "javax.net.ssl.keyStoreType",
    "value": "PKCS12",
    } and so on
    ]

    Thanks