Skip to content
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

[Core, JUnit, Android] Add the ambiguous result type. #1168

Merged
merged 2 commits into from
Jul 7, 2017

Conversation

brasmusson
Copy link
Contributor

Summary

Report ambiguous steps as a separate result type, instead of reporting them as failed.

Details

Report ambiguous steps as a separate result type, instead of reporting them as failed. The new ambiguous result type will make the exit code non-zero (the same as the failed result type currently used when ambiguous step matches are found).

Motivation and Context

Cucumber-JS already has a separate result type for ambiguous step matches. In Cucumber-Ruby there is an initiative to introduce them

How Has This Been Tested?

The automated test suite has been updated to verify this behaviour.

I have manually introduces ambiguous step matches in the java-calculator example to manually check the implementation.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@mpkorstanje
Copy link
Contributor

Looks good. Took the opportunity to add a bit of consistency to the the AndroidInstrumentationReporter, JUnitReporter and TestNgReporter.

brasmusson and others added 2 commits July 7, 2017 14:46
Report ambiguous steps as a separate result type, instead of reporting
them as failed. The new ambiguous result type will make the exit code
non-zero (the same as the failed result type currently used when
ambiguous step matches are found).
 The AndroidInstrumentationReporter, JUnitReporter and TestNgReporter have
  some subtle style difference between. This made the code base a bit harder to
  understand.

  Using a switch-case-default-throws pattern makes it consistent and will make
  errors explicit when more states are added.
@mpkorstanje mpkorstanje merged commit 2c9a79d into master Jul 7, 2017
@mpkorstanje mpkorstanje deleted the ambiguous-result branch July 7, 2017 12:55
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants