[Fix] Corrige escopo de cobertura do JaCoCo e elimina falsos zeros - #908
Open
roberto-bento wants to merge 1 commit into
Open
[Fix] Corrige escopo de cobertura do JaCoCo e elimina falsos zeros#908roberto-bento wants to merge 1 commit into
roberto-bento wants to merge 1 commit into
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
O que mudou?
Este PR resolve o problema de divergência na medição de cobertura de testes pelo JaCoCo. Anteriormente, as execuções de
prepare-agentereportpossuíam regras conflitantes, o que gerava relatórios com "falsos zeros" (classes com testes passando que apareciam zeradas) e limitava a visão do relatório aos pacotes antigos, ignorando a nova estrutura de pastas da migração DDD. A configuração foi unificada para varrer todo o sistema.Tarefas Relacionadas
HealthProfessionalControllerTest(Corrigir HealthProfessionalControllerTest e destravar os 237 testes #893)Mudanças Realizadas
<includes>e<excludes>) no bloco global<configuration>dojacoco-maven-plugin, garantindo que ambas as etapas do plugin operem sob as mesmas condições.controllersporbr/org/apae/api/**, fazendo com que o relatório meça toda a base de código e detecte automaticamente pacotes migrados (como oPatientRecordController).<excludes>para arquivos sem lógica testável (classeApiApplication, arquivos*DTO.*eMinioConfiguration.class), evitando impacto injusto no baseline.jacoco:check) foi adicionada nesta etapa.Evidências
Em anexo, as imagens comprovando a alteração nos relatórios locais:
AbsenceController,AuthControllereDashboardController) saíram do falso 0% e agora refletem a cobertura real de 100%.Nota sobre a validação: O escopo agora mede um total de 12.167 Instruções de Bytecode (Instructions) e 3.229 Linhas (Lines). O valor de "~12.000" apontado na issue original refere-se à contagem de instruções. O novo baseline realista de cobertura foi estabilizado em 19% das instruções, devidamente enxuto após a exclusão dos DTOs e classes de configuração.