Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
400 stars 192 forks source link

Add E2E CI test for Monitor #417

Open jongio opened 2 years ago

jongio commented 2 years ago

Let's ensure that azd monitor works for all supported hosts and dev environments. Does it launch the browser, and if not, does it fail gracefully?

jongio commented 2 years ago

I think we implemented monitor without a test for launching the browser.

ellismg commented 2 years ago

Yeah - we don't have a testing here.

What exactly do we want to validate? It should be easy enough to write a unit test that let's us determine if the right URL would be launched, which we could run in CI. It may be more difficult for us to write something that validates the browser actually launched and you landed at the correct spot, especially when we take auth into account.

rajeshkamal5050 commented 1 year ago

@v-xuto do we have this covered as part of the manual tests? can we also look at ways in which we can automate this in our azure-dev - template - tests pipeline https://dev.azure.com/azure-sdk/internal/_build?definitionId=5002?

v-xuto commented 1 year ago

@rajeshkamal5050 We have covered the azd monitor as part of manual tests like commands azd monitor --live,azd monitor --logs,azd monitor --overview. As Ellismg said, it may be more difficult for us to write something that validates the browser actually launched and you landed at the correct spot. We're going to do a deep investigation and try to automate it in our azure-dev - template - tests pipeline. If there are any progress or problems, we will synchronize in time.

v-xuto commented 1 year ago

@rajeshkamal5050 Regarding the automation of azd monitor, we are currently blocked here: There is no way to skip the two-factor authentication on azure portal when we open the url. Is it possible to provide an account that does not require authentication, or do you have other ideas?