microsoft / PowerApps-TestEngine

MIT License
101 stars 29 forks source link

Validate File Path String of Test Plan networkRequestMocks.responseDataFile and Related Regressions #302

Closed arpavan closed 1 year ago

arpavan commented 1 year ago

Detailed Description of Fixes in this PR

This PR includes an improvement for properly validating the user-defined file path for the networkRequestMocks.responseDataFile field in the test plan file. Previously, if a user specifies an invalid path to this field, it would fail the test with a generic assertion error. With this fix, the exact reason for the test failure is called out by a one-line error message in the console, and detailed information in the logs - thus indicating to the user that the test failed due to bad input data and not due to a legitimate issue in the app/code. The fix includes a change in the logic to validate the file path to now validate the directory path using proper Directory APIs.

Since the fix made for the above issue uncovers additional regressions, fixes for those have also been included -

Checklist

github-actions[bot] commented 1 year ago

Code Coverage

Package Line Rate Branch Rate Complexity Health
Microsoft.PowerApps.TestEngine 91% 87% 980
Summary 91% (2538 / 2785) 87% (596 / 682) 980

Minimum allowed line rate is 85%