-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/118 jacoco it test #123
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
Conversation
- This is not expected final solution. But is is example how to use Custom test configuration as Task.
- Introduces new solution for split of unit tests from Integration tests.
- Update of yml file for build and IntegrationTest.
- Extended build.yml to support Integration tests. - Replace "test" to Test in Dependencies. - Deleted extra yml file for Integration Tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finished the review for now. Please don't merge it yet, as this PR has similar "issues" (or rather, things to potentially change) like in AbsaOSS/atum-service#185.
.github/workflows/build.yml
Outdated
- name: Add coverage to PR | ||
id: jacoco | ||
uses: madrapps/jacoco-report@v1.5 | ||
uses: madrapps/jacoco-report@v1.6.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you want to be consistent with AbsaOSS/atum-service#185, consider to extract this version elsewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version is used once only. The rest of the file do not follow this. In the atum-service project, this change produces an error.
.github/workflows/build.yml
Outdated
- scala: 2.13.12 | ||
scalaShort: "2.13" | ||
overall: 0.0 | ||
overall: 75.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you did there :-D
ha, I didn't know that it's already this high :) cool, why not 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it's used only once, I think it's OK to be hard-coded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be done by team decision.
The base branch was changed.
JaCoCo core code coverage report - scala 2.13.12
|
JaCoCo slick code coverage report - scala 2.13.12
|
JaCoCo doobie code coverage report - scala 2.13.12
|
# Aliases in this file expected usage of test file naming conventions: | ||
# - "UnitTest" suffix for test files and Suites which define unit tests | ||
# - "IntegrationTest" suffix for test files and Suites which define integration tests | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about a testAll
alias?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be done in project customization action if needed.
From a future point of view, testAll is not a good option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, why you don't see it as a good option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, I hope we can support testPerformance
, testStability
, and similar test types.
So, as I said in the previous answer, test
can be part of customization but not a generic solution proposal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait do you see these test to be actually part of the code and not "outside setup"? 🤔 (Actually not sure what testStability
means.
And if they are created, what prevents us from (not) include them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do want to fight about it. Customization space is open.
I will add testAll for this project, ok?
.sbtrc
Outdated
|
||
# CPS QA types aliases | ||
# * Unit tests | ||
alias test=; testOnly *UnitTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idea:
What about making this plural. Sounds more natural to my non-native ear:
alias test=; testOnly *UnitTest | |
alias test=; testOnly *UnitTests |
NB! It affects all the renames bellow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed.
.sbtrc
Outdated
alias test=; testOnly *UnitTest | ||
|
||
# * Integration tests | ||
alias testIT=; testOnly *IntegrationTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idea:
To be consistent, also plural:
alias testIT=; testOnly *IntegrationTest | |
alias testIT=; testOnly *IntegrationTests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's good to go. I really like it.
Prepared solution for Integration Tests and Jacoco code coverage measuring.