Skip to content

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

Merged
merged 6 commits into from
Sep 25, 2018

Conversation

aljcalandra
Copy link
Contributor

Give better error messaging when parsing and referencing steps.
Return error message with test regardless of type of exception

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/verification tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)
  • Changes to Framework doesn't have backward incompatible changes for tests or have related Pull Request with fixes to tests

… 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
@coveralls
Copy link

coveralls commented Sep 21, 2018

Coverage Status

Coverage decreased (-0.03%) to 57.365% when pulling 95da8b6 on MQE-1173 into 10a269e on develop.

Copy link
Contributor

@KevinBKozan KevinBKozan left a 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
Copy link
Contributor

@KevinBKozan KevinBKozan left a 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 " .
Copy link
Contributor

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
@aljcalandra aljcalandra merged commit 95bcb1d into develop Sep 25, 2018
@aljcalandra aljcalandra deleted the MQE-1173 branch September 25, 2018 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants