microsoft / azure-load-testing

MIT License
22 stars 2 forks source link

[BUG] Test Run was stuck in Executing state after adding Secret parameter #61

Closed shilamontubig closed 2 years ago

shilamontubig commented 2 years ago

I've tried using KeyVault in Azure Load Testing, following the steps described at https://docs.microsoft.com/en-us/azure/load-testing/how-to-parameterize-load-tests#secrets, but the test run was stuck in Executing Status.

I have tried running a jmx file with no Secret parameter and it works fine with no issues.

Steps To Reproduce

Actual Result: Test Run was stuck in Executing status When it eventually failed no Test Logs were created. Cancelling the test run also took awhile.

Other Details: Location: Australia East

AB#1495145

ninallam commented 2 years ago

Hi @shilamontubig can you confirm if you have provided the secret URI in the format https://myvault.vault.azure.net/secrets/mysecret/ ? Checking if you have intentionally removed the key vault name in the description above?

shilamontubig commented 2 years ago

Hi @ninallam Yes I have removed the vault name in the description above. The secret URI is in this format: https://myvaultname.vault.azure.net/secrets/TestSubscriptionKey/.

ninallam commented 2 years ago

@shilamontubig Thanks for reporting the issue. There's seems to be some problem with the secret input parameter. As a workaround can you please try using a specific version of the secret for now? For example: https://myvault.vault.azure.net/secrets/mysecret/ec96f02080254f109c51a1f14cdb1931. Please let us know if this is working for you.

shilamontubig commented 2 years ago

Hi @ninallam Thanks for your feedback. I have also tried the same format (https://myvault.vault.azure.net/secrets/TestSubscriptionKey/a9a15bc440134bea88b1f9dcd690a4) and I still got the same result. The test run was stuck in Executing state.

ninallam commented 2 years ago

@shilamontubig thanks for confirming. Could you share the test run ID to debug further? Testrun ID can be obtained from the Share URL in the test run. The last GUID is the test run ID.

image

ninallam commented 2 years ago

@kusweta to debug this

ninallam commented 2 years ago

@shilamontubig is the test run working fine without secret parameters?

shilamontubig commented 2 years ago

hi @ninallam Yes, the test runs successfully without secret parameters. Here are the run ids that you can check:

ninallam commented 2 years ago

Hi @shilamontubig We see that you are using secrets without defining user defined variables. Could you please use a user - defined variable as mentioned in the doc https://docs.microsoft.com/en-us/azure/load-testing/how-to-parameterize-load-tests#use-secrets-in-apache-jmeter Please let us know if it works for you. Meanwhile we will take this feedback to improve and make the necessary changes for secrets to work without user defined variables.

shilamontubig commented 2 years ago

Hi @ninallam. I have set-up the secret using a user defined variable based on the documentation previously but when it failed I reverted back to using environment variable function ie. ${__BeanShell( System.getenv("variableName") )}.

Today, I tried using __GetSecret function again in the .jmx file and the run was still stuck in Executing state. Please see the User Defined variable below: https://pastebin.pl/view/c085ffbb Run ID: 59059051-c972-4c54-b7cb-ebdc16b90021

cijuvargeeseNeu commented 2 years ago

Hi @ninallam Any update on the above mentioned issue. I am also facing the same issue while including a secret in the jmx test. This appears to be working fine when I ran the test without ${__GetSecret()} function and passing the data as parameter Run ID: /testRunId/ac2f83e9-a525-4067-9024-633d5ef7602e

ninallam commented 2 years ago

@kusweta can you please check the above test runs?

ninallam commented 2 years ago

@shilamontubig @cijuvargeeseNeu we have fixed this issue. Could you please confirm if it is working for you now?

cijuvargeeseNeu commented 2 years ago

@ninallam I have checked this and it is working fine. Appreciate the help!!

ninallam commented 2 years ago

Thanks for confirming. Closing this issue.

sreedharputtaguntaus commented 2 years ago

@ninallam @kusweta I'm facing the same issue. Despite having the secret url as described in the documentation, I'm getting the Invalid Secret Url error in pipelines. Can either of you help me on this?