Skip to content

Conversation

@omgm
Copy link
Contributor

@omgm omgm commented Aug 4, 2015

Applied mutation testing with Ortask Mutator 1.9. Improved the quality of the tests (and the code) by 13% (from a score of 84.6% to 95.3%).

  • Explicitly made public fields 'public'.
  • Corrected the comparison of the error value by introducing bounds for it (added a new error precision field).
    -- Best programming practice: floats/doubles should never be compared like ints.
  • Made the new error precision part of the public API.
  • Added needed tests to document behavior with bad and edge-case parameters.

omgm added 2 commits August 3, 2015 17:51
Applied [mutation testing](http://confreaks.tv/videos/mwrc2014-re-thinking-regression-testing) with Ortask Mutator 1.9. Improved the quality of the tests (and the code) by 13% (from a score of 84.6% to 95.3%).

- Explicitly made public fields 'public'.
- Corrected the comparison of the error value by introducing bounds for it (added a new error precision field). 
    -- Best programming practice: floats/doubles should never be compared like ints.
- Made the new error precision part of the public API.
Applied [mutation testing](http://confreaks.tv/videos/mwrc2014-re-thinking-regression-testing) with Ortask Mutator 1.9. Improved the quality of the tests (and the code) by 13% (from a score of 84.6% to 95.3%).

- Added needed tests to document behavior with bad and edge-case parameters.
@omgm omgm changed the title Applied [mutation testing](http://confreaks.tv/videos/mwrc2014-re-thinking-regression-testing) with Ortask Mutator 1.9. Improved the quality of the tests (and the code) by 13% (from a score of 84.6% to 95.3%). Applied mutation testing to Improve the quality of the tests and the code for Java implementation. Aug 4, 2015
@omgm omgm changed the title Applied mutation testing to Improve the quality of the tests and the code for Java implementation. Applied mutation testing to improve the quality of the tests and the code for Java implementation. Aug 4, 2015
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these are public, might as well make them final

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bergundy they were package private before this PR. If the test is running in the same package, I suggest we keep them package-private, and final is just a nice addition.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's go with protected

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and final

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@omgm please change the attributes to final protected

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry guys, didn't know you were waiting on me. Changes have been done.

omgm added 2 commits August 4, 2015 06:36
For mutation analysis, I create a new test to leave the original one intact. I forgot to clean up the new tests when I committed. This has been fixed.
Made client-accessible fields 'protected final' as agreed.
bergundy added a commit that referenced this pull request Aug 11, 2015
Applied mutation testing to improve the quality of the tests and the code for Java implementation.
@bergundy bergundy merged commit cee7ced into EverythingMe:master Aug 11, 2015
@bergundy
Copy link
Collaborator

@omgm merged, thanks!

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