Skip to content

Conversation

miroslavpojer
Copy link
Contributor

Prepared solution for Integration Tests and Jacoco code coverage measuring.

Zejnilovic
Zejnilovic previously approved these changes Apr 15, 2024
salamonpavel
salamonpavel previously approved these changes Apr 16, 2024
Copy link
Collaborator

@lsulak lsulak left a 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.

- name: Add coverage to PR
id: jacoco
uses: madrapps/jacoco-report@v1.5
uses: madrapps/jacoco-report@v1.6.1
Copy link
Collaborator

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

Copy link
Contributor Author

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.

- scala: 2.13.12
scalaShort: "2.13"
overall: 0.0
overall: 75.0
Copy link
Collaborator

@lsulak lsulak Apr 22, 2024

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 👍

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Base automatically changed from feature/118-db-function-cleanup-pre-118 to master April 26, 2024 09:01
@lsulak lsulak dismissed stale reviews from salamonpavel and Zejnilovic April 26, 2024 09:01

The base branch was changed.

@miroslavpojer miroslavpojer requested a review from Zejnilovic May 13, 2024 05:51
@miroslavpojer miroslavpojer requested a review from Zejnilovic May 13, 2024 10:55
@AbsaOSS AbsaOSS deleted a comment from github-actions bot May 14, 2024
@AbsaOSS AbsaOSS deleted a comment from github-actions bot May 14, 2024
@AbsaOSS AbsaOSS deleted a comment from github-actions bot May 14, 2024
@AbsaOSS AbsaOSS deleted a comment from github-actions bot May 14, 2024
@AbsaOSS AbsaOSS deleted a comment from github-actions bot May 14, 2024
@AbsaOSS AbsaOSS deleted a comment from github-actions bot May 14, 2024
Copy link

JaCoCo core code coverage report - scala 2.13.12

Overall Project 61.8%

There is no coverage information present for the Files changed

Copy link

JaCoCo slick code coverage report - scala 2.13.12

Overall Project 90.52% 🍏

There is no coverage information present for the Files changed

Copy link

JaCoCo doobie code coverage report - scala 2.13.12

Overall Project 85.63% 🍏

There is no coverage information present for the Files changed

Zejnilovic
Zejnilovic previously approved these changes May 14, 2024
# 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

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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:

Suggested change
alias test=; testOnly *UnitTest
alias test=; testOnly *UnitTests

NB! It affects all the renames bellow.

Copy link
Contributor Author

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
Copy link
Contributor

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:

Suggested change
alias testIT=; testOnly *IntegrationTest
alias testIT=; testOnly *IntegrationTests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed.

Copy link
Collaborator

@lsulak lsulak left a 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.

@miroslavpojer miroslavpojer merged commit a7ae4ce into master May 21, 2024
@miroslavpojer miroslavpojer deleted the feature/118-jacoco_it_test branch May 21, 2024 10:17
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.

5 participants