-
Notifications
You must be signed in to change notification settings - Fork 131
MQE-1173: [Dev experience] Error on test generation without reference on file #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… on file - Added error messaging at Action level - Extended range of errors caught at Test level - Added unit tests for Exception catching for TestGenerator and ActionMergeUtil
… on file - Removed unused use cases
… on file - Removed use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, but original ticket concern was about declaring an element
with parameterized=true
and no parameters in the selector.
This still causes a warning on ActionObject line 711, we should check if empty($varMatches[0])
and throw an exception there use your exception catching here.
… on file - Added setting parameter list to [] in case of no parameters
… on file - Moved count out of matching method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor feedback on Exception message. Othe features are working as expected.
); | ||
} elseif (count($matches) == 0) { | ||
throw new TestReferenceException( | ||
"Parameter Resolution Failed: No parameter matches found for reference " . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor picky-ness, exception message isn't quite clear. Should be more like
Parameter Resolution Failed: No parameters found in parameterized element with selector "selector"
From our standpoint the exception message makes sense, but we should probably keep this more specific.
… on file - Made requested changes - Updated unit tests to be a bit more descriptive
Give better error messaging when parsing and referencing steps.
Return error message with test regardless of type of exception
Contribution checklist