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

Add test cases to improve mutation score indicator #60

Merged

Conversation

Kourin1996
Copy link
Contributor

Description

Add test cases in message package to improve MSI (mutation score indicator)

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have added sufficient documentation in code

Additional comments

Please post additional comments in this section if you have them, otherwise delete it

@codecov
Copy link

codecov bot commented Jan 9, 2023

Codecov Report

Merging #60 (dda3271) into mutation-tests-only (da4fb4f) will decrease coverage by 2.30%.
The diff coverage is 58.82%.

❗ Current head dda3271 differs from pull request most recent head 97bd746. Consider uploading reports for the commit 97bd746 to get more accurate results

@@                   Coverage Diff                   @@
##           mutation-tests-only      #60      +/-   ##
=======================================================
- Coverage                95.51%   93.20%   -2.31%     
=======================================================
  Files                        6        6              
  Lines                     1292     1339      +47     
=======================================================
+ Hits                      1234     1248      +14     
- Misses                      42       73      +31     
- Partials                    16       18       +2     
Impacted Files Coverage Δ
messages/helpers.go 88.97% <18.75%> (-11.03%) ⬇️
core/ibft.go 91.39% <69.38%> (-3.68%) ⬇️
messages/event_manager.go 100.00% <100.00%> (ø)
messages/messages.go 97.20% <100.00%> (+5.58%) ⬆️
messages/event_subscription.go 94.59% <0.00%> (+8.10%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@JekaMas
Copy link
Contributor

JekaMas commented Jan 9, 2023

What is the result score?

@Kourin1996
Copy link
Contributor Author

@JekaMas thanks for reviewing. make mut told the score was 0.989011. But this score is sometimes different every time I ran mutation test, I will run mutation test 10 times. And will finish fix of lint issue today.

@Kourin1996
Copy link
Contributor Author

Kourin1996 commented Jan 9, 2023

@JekaMas I have one quick question. I've not seen any issue from core package. Does it mean there is no issue in core package or we're skipping test for core for now?

@Kourin1996
Copy link
Contributor Author

I ran test 10 times and got the following scores:

MSI: "0.9862637362637363"
MSI: "0.978021978021978"
MSI: "0.9697802197802198"
MSI: "0.967032967032967"
MSI: "0.9642857142857143"
MSI: "0.9642857142857143"
MSI: "0.9642857142857143"
MSI: "0.9642857142857143"
MSI: "0.9642857142857143"
MSI: "0.9642857142857143"

the average is about 0.968

.golangci.yml Show resolved Hide resolved
@Kourin1996 Kourin1996 merged commit 428332e into mutation-tests-only Jan 20, 2023
@Kourin1996 Kourin1996 deleted the feature/EVM-82_improve_mutation_score_indicator branch January 20, 2023 10:45
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.

7 participants