Skip to content

Conversation

@Ndiritu
Copy link
Contributor

@Ndiritu Ndiritu commented Aug 4, 2021

This PR:

closes #18

Copy link
Contributor

@MIchaelMainer MIchaelMainer left a comment

Choose a reason for hiding this comment

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

Do you have code coverage % info for before and after? This QA improvement would be useful for inclusion in quality review, as well as to put in your own review.

@Ndiritu
Copy link
Contributor Author

Ndiritu commented Aug 16, 2021

Do you have code coverage % info for before and after? This QA improvement would be useful for inclusion in quality review, as well as to put in your own review.

  • I've setup code coverage config using PHPUnit to this PR.
  • When validating a PR, we will be able to see the coverage summary in the github actions output for now.
  • Better solutions would be able to make this an action on it's own and potentially block PRs if they reduce the test coverage. PHPUnit doesn't seem to support a simple GitHub Action to do this = more work. Created a tracking item
  • PHPUnit produces a bunch of metrics. Path coverage seems to be most useful one IMO

Before - (current main)

Code Coverage Report:
  2021-08-16 10:16:20

 Summary:
  Classes: 14.29% (1/7)
  Methods: 62.26% (33/53)
  Paths:   60.78% (62/102)
  Branches:   84.50% (109/129)
  Lines:   79.25% (210/265)

After - (this PR)

Code Coverage Report:
  2021-08-16 10:15:12

 Summary:
  Classes: 66.67% (6/9)
  Methods: 83.87% (52/62)
  Paths:   62.42% (93/149)
  Branches:   96.09% (172/179)
  Lines:   90.67% (243/268)

To see more detail, running coverage locally would produce a coverage/ folder (gitignored) containing HTML pages with deeper analysis of which code paths still need testing:
php -xdebug.mode=coverage ./vendor/bin/phpunit

Biggest gaps are in GraphCollectionRequest and Enum classes

@Ndiritu Ndiritu changed the base branch from philip/feat/graph-request-changes to dev August 18, 2021 22:21
@Ndiritu Ndiritu changed the title Fix broken tests + Increase test coverage Fix broken tests + Add code coverage tracking Aug 19, 2021
@Ndiritu Ndiritu force-pushed the philip/fix/tests branch 2 times, most recently from 50e7961 to baf6add Compare August 19, 2021 10:57
@SilasKenneth SilasKenneth self-requested a review September 20, 2021 09:23
@Ndiritu Ndiritu merged commit 7eb0c84 into dev Sep 20, 2021
@Ndiritu Ndiritu deleted the philip/fix/tests branch October 28, 2021 18:49
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