Closed arpalmares closed 12 months ago
Can you check the debuglogs within the test results folder 0b03a5
and paste here what the error is?
System.InvalidOperationException: Operation is not valid due to the current state of the object. at Microsoft.PowerApps.TestEngine.Users.UserManager.LoginAsUserAsync(String desiredUrl) in E:\repo\testengine\PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\Users\UserManager.cs:line 80 at Microsoft.PowerApps.TestEngine.SingleTestRunner.RunTestAsync(String testRunId, String testRunDirectory, TestSuiteDefinition testSuiteDefinition, BrowserConfiguration browserConfig, String domain, String queryParams, CultureInfo locale) in E:\repo\testengine\PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\SingleTestRunner.cs:line 119
@arpalmares : Thank you, can you paste the full debuglogs here.
Looks like this exception is thrown @ \UserManager.cs:line 80 when User email cannot be null
.
Can you confirm if it logs the same, if so please confirm or check if the username was set properly.
Username and password was populated. Account has MFA disabled and works when used manually.
Browser configuration: {"Browser":"Chromium","Device":null,"ScreenWidth":null,"ScreenHeight":null,"ConfigName":null}
Browser setup finished
Browser context created
Test infrastructure setup finished
Successfully navigated to target URL
[Error]: User email cannot be null
[Error]: Encountered an error. See the debug log for this test suite for more information.
Test suite summary Total cases: 1 Cases passed: 0 Cases failed: 1
System.InvalidOperationException: Operation is not valid due to the current state of the object. at Microsoft.PowerApps.TestEngine.Users.UserManager.LoginAsUserAsync(String desiredUrl) in E:\repo\testengine\PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\Users\UserManager.cs:line 80 at Microsoft.PowerApps.TestEngine.SingleTestRunner.RunTestAsync(String testRunId, String testRunDirectory, TestSuiteDefinition testSuiteDefinition, BrowserConfiguration browserConfig, String domain, String queryParams, CultureInfo locale) in E:\repo\testengine\PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\SingleTestRunner.cs:line 119
basicgallery testPlan.fx.yaml was updated with email and password in this section.
Am I missing anything?
basicgallery testPlan.fx.yaml was updated with email and password in this section.
Am I missing anything?
@arpalmares Setting the values here is not supported. Please set user1Password and user1Email environment variables to the values here and then try running TestEngine again. That is the supported way of running TestEngine.
I get it now. PS environment variables. Thank you.
Closing this issue since it is resolved now. Thank you
Adding this here just in case anyone else runs into this. The testSettings
section of the test plan file expects the name of the environment variable used for setting the credential values, and not the credentials themselves.
Here's the section from the documentation that explains how the credentials need to be setup - https://github.com/microsoft/PowerApps-TestEngine#set-up-user-authentication
To Reproduce
Steps to reproduce the behavior:
dotnet run -l trace
Expected Behavior: Run Tests with success
Actual Behavior: Test ran with failure. Looks like it did not log in.