All AppInstallcerCLIE2ETests fail with the same message: "Access to the registry key ... AppModelUnlock ... is denied." #813
-
Hello friends, I am trying to get my local development environment set up, and while the code compiles and runs, all 67 of the end-to-end tests fail with the same message, similar to this one:
The line that's triggering the exception is: src\AppInstallerCLIE2ETests\SetUpFixture.cs(130). I'm relatively new to Windows development, especially with Visual Studios, so I may be missing something obvious. I have followed all the steps in the README.md under "Building the client>Prerequisites" including enabling Developer Mode. I can also confirm that the registry key
Any help is appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
These tests are built to run on the build servers, and so expect to set up everything themselves. This requires Admin permissions to do, and in order to run them locally you will need to run VS as Admin. There is a README in the root of the E2E tests directory as well that should help: https://github.com/microsoft/winget-cli/tree/master/src/AppInstallerCLIE2ETests Alternately, you can be lazy like myself and not bother running them until they fail in the build. They take much longer to run than the unit tests and often have build server specific issues anyway, as well as the difficult setup, so I have optimized for that path. I may be a special case though, being so entrenched in the project. I certainly understand the desire to ensure that things are running smoothly before you start changes on an unfamiliar project. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the explaination and pointing me to the readme. When submitting a PR with a new feature, would you expect a new e2e tests or just new unit tests? |
Beta Was this translation helpful? Give feedback.
-
It depends on the feature, but for zip package handling I would expect new E2E test(s). I do prefer as much testing as possible be done in the unit tests, but having some smoke testing in the E2E is good too. I think it is especially needed to ensure that things are working correctly with regards to where files are placed and registry updates, because of how being inside a package works. |
Beta Was this translation helpful? Give feedback.
These tests are built to run on the build servers, and so expect to set up everything themselves. This requires Admin permissions to do, and in order to run them locally you will need to run VS as Admin. There is a README in the root of the E2E tests directory as well that should help: https://github.com/microsoft/winget-cli/tree/master/src/AppInstallerCLIE2ETests
Alternately, you can be lazy like myself and not bother running them until they fail in the build. They take much longer to run than the unit tests and often have build server specific issues anyway, as well as the difficult setup, so I have optimized for that path. I may be a special case though, being so entrenched in the proj…