microsoft / PowerApps-TestEngine

MIT License
100 stars 30 forks source link

System AggregateException when trying to run sample test #162

Closed snitgaard closed 1 year ago

snitgaard commented 1 year ago

Describe the bug

When trying to execute dotnet run after setting up the test sample, it provides the System AggregateException with the following message:

[Error]: System.AggregateException: One or more errors occurred. (Errors: Error 39-40: Unexpected characters. The formula contains 'ParenClose' where 'Error' is expected.
Error 39-40: Unexpected characters. Characters are used in the formula in an unexpected way.)
 ---> System.InvalidOperationException: Errors: Error 39-40: Unexpected characters. The formula contains 'ParenClose' where 'Error' is expected.
Error 39-40: Unexpected characters. Characters are used in the formula in an unexpected way.
   at Microsoft.PowerFx.CheckResult.ThrowOnErrors()
   at Microsoft.PowerFx.RecalcEngine.EvalAsync(String expressionText, CancellationToken cancel, RecordValue parameters, ParserOptions options)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at Microsoft.PowerFx.RecalcEngine.Eval(String expressionText, RecordValue parameters, ParserOptions options)
   at Microsoft.PowerApps.TestEngine.PowerFx.PowerFxEngine.Execute(String testSteps) in C:\Users\CAS00\PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\PowerFx\PowerFxEngine.cs:line 123
   at Microsoft.PowerApps.TestEngine.PowerFx.PowerFxEngine.ExecuteWithRetryAsync(String testSteps) in C:\Users\CAS00\PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\PowerFx\PowerFxEngine.cs:line 70
   at Microsoft.PowerApps.TestEngine.SingleTestRunner.RunTestAsync(String testRunId, String testRunDirectory, TestSuiteDefinition testSuiteDefinition, BrowserConfiguration browserConfig, String queryParams) in C:\Users\CAS00\PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\SingleTestRunner.cs:line 142

To Reproduce

Steps to reproduce the behavior:

  1. dotnet run on BasicGallery_1_0_0_2

Expected Behavior: Correctly running the tests
Actual Behavior: System AggregateException

Additional context

Theres no issue when the engine is trying to set up browser, test infrastructure or navigating to the correct URL. It happens specifically when trying to run the test cases. I've attempted changing properties in the sample on PowerApps website, and changing the test steps to be more forgiving. Even when trying to run the test cases on Test Studio, theres no issues whatsoever. It only occurs in Test Engine. The sample is: BasicGallery_1_0_0_2. I havent tried using any other samples yet.

snitgaard commented 1 year ago

I just attempted the fix mentioned with replacing , with ; and ; with ;; - it seems to have done the trick.