Невозможно создать покрытие кода для модуля интеграционного тестирования с помощью jacoco.JAVA

Программисты JAVA общаются здесь
Ответить Пред. темаСлед. тема
Гость
 Невозможно создать покрытие кода для модуля интеграционного тестирования с помощью jacoco.

Сообщение Гость »

У меня есть проект maven с прикрепленной структурой каталогов.
Изображение

Он содержит родительский.pom и два модуля.
  • плагин1.1 Он содержит фактический исходный код внутри src/main
    1.2 Он содержит примеры модульных тестов внутри src/test
  • интеграционные тесты
    2.1 Он содержит все интеграционные тесты для исходного кода плагина/источника/основного кода.
Теперь я пытаюсь добавить плагин Jacoco для генерации результатов покрытия кода, включающих все модульные и интеграционные тестовые примеры.
Мои отчеты для модуля плагин получают сгенерирован, но файл для интеграционных тестов пуст.
Все POM.xml прикрепляю ниже.
Родительский POM:

Код: Выделить всё


4.0.0


com.atlassian.pom
public-pom
6.3.1


com.atlassian.confluence.plugins.xmlrpc.bloggingrpc
bloggingrpc-parent
4.3.5-SNAPSHOT
pom

Confluence Blogging RPC Plugin Parent



https://studio.plugins.atlassian.com/wiki/display/BLOG


plugin
integration-tests



scm:git:[email protected]:atlassian/confluence-blogging-rpc-plugin.git
scm:git:[email protected]:atlassian/confluence-blogging-rpc-plugin.git
https://bitbucket.org/atlassian/confluence-blogging-rpc-plugin
HEAD



com.atlassian.confluence.plugins.xmlrpc.bloggingrpc
8.6.0-rc1
${confluence.version}
3.0.0

8.11.4
 
1024m
-Xmx${jvm.args.xmx} ${jvm.args.custom}

2.2
tomcat9x
localhost



maven-failsafe-plugin

2.22.2
1.6.8
firefox
false
3.11.0.3922

https://jira.atlassian.com/projects/CONFSRVDEV/issues
https://server-syd-bamboo.internal.atlassian.com/allPlans.action
Confluence Blogging Rpc Plugin
confluence-blogging-rpc-plugin

${project.artifactId}




flaky

10
2




com.googlecode.maven-download-plugin
download-maven-plugin
${download.maven.plugin.version}


download-flaky-configuration
process-test-resources

wget


https://s3-ap-southeast-2.amazonaws.com/confluence-server/bamboo/issuecreator_plugins_config.json
${project.build.testOutputDirectory}
true





org.apache.maven.plugins
maven-failsafe-plugin

${ci.tests.skipAfterFailureCount}
${ci.tests.rerunFailingTestsCount}


listener
com.atlassian.test.reporting.JUnitFlakyTestListener



${env.bamboo_buildResultKey}
${env.bamboo_planRepository_1_branchName}

true
target/failsafe-reports/flakey-tests.txt
issuecreator_plugins_config.json
${env.bamboo_issuecreator_jiraUserName}
${env.bamboo_issuecreator_jiraPassword}







com.atlassian
flaky-test-reporter
test


com.googlecode.maven-download-plugin
download-maven-plugin
${download.maven.plugin.version}
test








com.atlassian.drs
dependency-report-maven-plugin
1.5.17

confluence-blogging-rpc-plugin
true



post-integration-test

upload





org.sonarsource.scanner.maven
sonar-maven-plugin
${sonar-maven-plugin.version}





Интеграционный тест POM.xml
ПРИМЕЧАНИЕ Поскольку исходный код присутствует внутри плагинов/, я явно включил путь в определении агента jacoco.
${project.basedir}/../plugin/**/*

Код: Выделить всё

& l t ; m o d e l V e r s i o n & g t ; 4 . 0 . 0 & l t ; / m o d e l V e r s i o n & g t ; < b r   / > < b r   / >         & l t ; p a r e n t & g t ; < b r   / >                 & l t ; g r o u p I d & g t ; c o m . a t l a s s i a n . c o n f l u e n c e . p l u g i n s . x m l r p c . b l o g g i n g r p c & l t ; / g r o u p I d & g t ; < b r   / >                 & l t ; a r t i f a c t I d & g t ; b l o g g i n g r p c - p a r e n t & l t ; / a r t i f a c t I d & g t ; < b r   / >                 & l t ; v e r s i o n & g t ; 4 . 3 . 5 - S N A P S H O T & l t ; / v e r s i o n & g t ; < b r   / >         & l t ; / p a r e n t & g t ; < b r   / > < b r   / >         & l t ; a r t i f a c t I d & g t ; b l o g g i n g r p c - i n t e g r a t i o n - t e s t s & l t ; / a r t i f a c t I d & g t ; < b r   / > < b r   / >         & l t ; n a m e & g t ; C o n f l u e n c e   B l o g g i n g   R P C   P l u g i n   I n t e g r a t i o n   T e s t s & l t ; / n a m e & g t ; < b r   / > < b r   / >         & l t ; p r o p e r t i e s & g t ; < b r   / >                 & l t ; s o n a r . t e s t s & g t ; s r c / t e s t & l t ; / s o n a r . t e s t s & g t ; < b r   / >         & l t ; / p r o p e r t i e s & g t ; < b r   / >         & l t ; d e p e n d e n c y M a n a g e m e n t & g t ; < b r   / >                 & l t ; d e p e n d e n c i e s & g t ; < b r   / >                         & l t ; d e p e n d e n c y & g t ; < b r   / >                                 & l t ; g r o u p I d & g t ; c o m . a t l a s s i a n . c o n f l u e n c e & l t ; / g r o u p I d & g t ; < b r   / >                                 & l t ; a r t i f a c t I d & g t ; c o n f l u e n c e - p l u g i n s - p l a t f o r m - t e s t - p o m & l t ; / a r t i f a c t I d & g t ; < b r   / >                                 & l t ; v e r s i o n & g t ; $ { c o n f l u e n c e . v e r s i o n } & l t ; / v e r s i o n & g t ; < b r   / >                                 & l t ; t y p e & g t ; p o m & l t ; / t y p e & g t ; < b r   / >                                 & l t ; s c o p e & g t ; i m p o r t & l t ; / s c o p e & g t ; < b r   / >                         & l t ; / d e p e n d e n c y & g t ; < b r   / >                         & l t ; d e p e n d e n c y & g t ; < b r   / >                                 & l t ; g r o u p I d & g t ; c o m . a t l a s s i a n . c o n f l u e n c e . p l u g i n & l t ; / g r o u p I d & g t ; < b r   / >                                 & l t ; a r t i f a c t I d & g t ; f u n c - t e s t - p a c k a g e & l t ; / a r t i f a c t I d & g t ; < b r   / >                                 & l t ; v e r s i o n & g t ; $ { a t l a s s i a n . p r o d u c t . t e s t - l i b . v e r s i o n } & l t ; / v e r s i o n & g t ; < b r   / >                                 & l t ; s c o p e & g t ; t e s t & l t ; / s c o p e & g t ; < b r   / >                         & l t ; / d e p e n d e n c y & g t ; < b r   / >                         & l t ; d e p e n d e n c y & g t ; < b r   / >                                 & l t ; g r o u p I d & g t ; c o m . a t l a s s i a n . c o n f l u e n c e . p l u g i n & l t ; / g r o u p I d & g t ; < b r   / >                                 & l t ; a r t i f a c t I d & g t ; f u n c - t e s t & l t ; / a r t i f a c t I d & g t ; < b r   / >                                 & l t ; v e r s i o n & g t ; $ { a t l a s s i a n . p r o d u c t . t e s t - l i b . v e r s i o n } & l t ; / v e r s i o n & g t ; < b r   / >                                 & l t ; s c o p e & g t ; t e s t & l t ; / s c o p e & g t ; < b r   / >                         & l t ; / d e p e n d e n c y & g t ; < b r   / >                         & l t ; d e p e n d e n c y & g t ; < b r   / >                                 & l t ; g r o u p I d & g t ; c o m . g o o g l e . i n j e c t & l t ; / g r o u p I d & g t ; < b r   / >                                 & l t ; a r t i f a c t I d & g t ; g u i c e & l t ; / a r t i f a c t I d & g t ; < b r   / >                                 & l t ; v e r s i o n & g t ; 5 . 1 . 0 & l t ; / v e r s i o n & g t ; < b r   / >                         & l t ; / d e p e n d e n c y & g t ; < b r   / >                 & l t ; / d e p e n d e n c i e s & g t ; < b r   / >         & l t ; / d e p e n d e n c y M a n a g e m e n t & g t ; < b r   / >         & l t ; d e p e n d e n c i e s & g t ; < b r   / >                 & l t ; d e p e n d e n c y & g t ; < b r   / >                         & l t ; g r o u p I d & g t ; c o m . a t l a s s i a n . c o n f l u e n c e & l t ; / g r o u p I d & g t ; < b r   / >                         & l t ; a r t i f a c t I d & g t ; c o n f l u e n c e - s t a t e l e s s - t e s t - r u n n e r & l t ; / a r t i f a c t I d & g t ; < b r   / >                         & l t ; s c o p e & g t ; t e s t & l t ; / s c o p e & g t ; < b r   / >                 & l t ; / d e p e n d e n c y & g t ; < b r   / >                 & l t ; d e p e n d e n c y & g t ; < b r   / >                         & l t ; g r o u p I d & g t ; c o m . a t l a s s i a n . s e l e n i u m & l t ; / g r o u p I d & g t ; < b r   / >                         & l t ; a r t i f a c t I d & g t ; a t l a s s i a n - w e b d r i v e r - c o r e & l t ; / a r t i f a c t I d & g t ; < b r   / >                         & l t ; s c o p e & g t ; t e s t & l t ; / s c o p e & g t ; < b r   / >                 & l t ; / d e p e n d e n c y & g t ; < b r   / >                 & l t ; d e p e n d e n c y & g t ; < b r   / >                         & l t ; g r o u p I d & g t ; j a v a x . x m l . b i n d & l t ; / g r o u p I d & g t ; < b r   / >                         & l t;artifactId>jaxb-api
test


xml-apis
xml-apis
test


org.hamcrest
hamcrest
${hamcrest.version}
test


org.hamcrest
hamcrest-library
${hamcrest.version}
test


org.hamcrest
hamcrest-core
${hamcrest.version}
test


org.slf4j
slf4j-simple
test






org.jacoco
jacoco-maven-plugin
0.8.10


${project.basedir}/../plugin/**/*




it-prepare-agent

prepare-agent-integration



it-report
verify

report-integration





com.atlassian.maven.plugins
confluence-maven-plugin
${amps8.version}
true


webdriver-tests
integration-test

integration-test




false
${containerId}
${jvm.args}
${confluence.version}
${confluence.data.version}
${server}
${project.build.directory}/output.log


com.atlassian.confluence.plugins.xmlrpc.bloggingrpc
bloggingrpc
${project.version}



${confluence.version}  




maven-surefire-plugin

true






Плагины POM.xml

Код: Выделить всё

& l t ; m o d e l V e r s i o n & g t ; 4 . 0 . 0 & l t ; / m o d e l V e r s i o n & g t ; < b r   / > < b r   / >         & l t ; p a r e n t & g t ; < b r   / >                 & l t ; g r o u p I d & g t ; c o m . a t l a s s i a n . c o n f l u e n c e . p l u g i n s . x m l r p c . b l o g g i n g r p c & l t ; / g r o u p I d & g t ; < b r   / >                 & l t ; a r t i f a c t I d & g t ; b l o g g i n g r p c - p a r e n t & l t ; / a r t i f a c t I d & g t ; < b r   / >                 & l t ; v e r s i o n & g t ; 4 . 3 . 5 - S N A P S H O T & l t ; / v e r s i o n & g t ; < b r   / >         & l t ; / p a r e n t & g t ; < b r   / > < b r   / >         & l t ; a r t i f a c t I d & g t ; b l o g g i n g r p c & l t ; / a r t i f a c t I d & g t ; < b r   / >         & l t ; p a c k a g i n g & g t ; a t l a s s i a n - p l u g i n & l t ; / p a c k a g i n g & g t ; < b r   / > < b r   / >         & l t ; n a m e & g t ; C o n f l u e n c e   B l o g g i n g   R P C   P l u g i n & l t ; / n a m e & g t ; < b r   / > < b r   / >         & l t ; p r o p e r t i e s & g t ; < b r   / >                 & l t ; s o n a r . t e s t s & g t ; s r c / t e s t & l t ; / s o n a r . t e s t s & g t ; < b r   / >                 & l t ; s o n a r . s o u r c e s & g t ; s r c / m a i n & l t ; / s o n a r . s o u r c e s & g t ; < b r   / >         & l t ; / p r o p e r t i e s & g t ; < b r   / >         & l t ; d e p e n d e n c y M a n a g e m e n t & g t ; < b r   / >                 & l t ; d e p e n d e n c i e s & g t ; < b r   / >                         & l t ; d e p e n d e n c y & g t ; < b r   / >                                 & l t ; g r o u p I d & g t ; c o m . a t l a s s i a n . c o n f l u e n c e & l t ; / g r o u p I d & g t ; < b r   / >                                 & l t ; a r t i f a c t I d & g t ; c o n f l u e n c e - p l u g i n s - p l a t f o r m - p o m & l t ; / a r t i f a c t I d & g t ; < b r   / >                                 & l t ; v e r s i o n & g t ; $ { c o n f l u e n c e . v e r s i o n } & l t ; / v e r s i o n & g t ; < b r   / >                                 & l t ; t y p e & g t ; p o m & l t ; / t y p e & g t ; < b r   / >                                 & l t ; s c o p e & g t ; i m p o r t & l t ; / s c o p e & g t ; < b r   / >                         & l t ; / d e p e n d e n c y & g t ; < b r   / >                 & l t ; / d e p e n d e n c i e s & g t ; < b r   / >             & l t ; / d e p e n d e n c y M a n a g e m e n t & g t ; < b r   / >         & l t ; d e p e n d e n c i e s & g t ; < b r   / >                 & l t ; d e p e n d e n c y & g t ; < b r   / >                         & l t ; g r o u p I d & g t ; c o m . a t l a s s i a n . c o n f l u e n c e & l t ; / g r o u p I d & g t ; < b r   / >                         & l t ; a r t i f a c t I d & g t ; c o n f l u e n c e & l t ; / a r t i f a c t I d & g t ; < b r   / >                         & l t ; s c o p e & g t ; p r o v i d e d & l t ; / s c o p e & g t ; < b r   / >                         & l t ; e x c l u s i o n s & g t ; < b r   / >                                 & l t ; e x c l u s i o n & g t ; < b r   / >                                         & l t ; g r o u p I d & g t ; n e t . s o u r c e f o r g e . c s s p a r s er
cssparser


net.sourceforge.nekohtml
nekohtml




com.google.guava
guava
provided


org.apache.commons
commons-lang3
provided


org.mockito
mockito-core
test


org.hamcrest
hamcrest
${hamcrest.version}
test


org.hamcrest
hamcrest-library
${hamcrest.version}
test


org.hamcrest
hamcrest-core
${hamcrest.version}
test


junit
junit
test


commons-lang
commons-lang
test






org.jacoco
jacoco-maven-plugin
0.8.10


ut-prepare-agent

prepare-agent



ut-report

report





com.atlassian.maven.plugins
confluence-maven-plugin
${amps8.version}
true

false
${containerId}
${jvm.args}
${confluence.version}
${confluence.data.version}
${server}
${project.build.directory}/output.log

${webdriver.browser}







когда я maven clean проверю, что все модульные тесты и интеграционные тесты выполняются.
Агент jacoco для каталога плагинов получает данные из каталога занятия

Код: Выделить всё

[INFO]
[INFO] --- jacoco:0.8.10:report (ut-report) @ bloggingrpc ---
[INFO] Loading execution data file /Users/psaraiwala/Desktop/Packages/code_coverage/confluence/confluence-blogging-rpc-plugin/plugin/target/jacoco.exec
[INFO] Analyzed bundle 'Confluence Blogging RPC Plugin' with 4 classes
[INFO]
[INFO] --< com.atlassian.confluence.plugins.xmlrpc.bloggingrpc:bloggingrpc-integration-tests >--
[INFO] Building Confluence Blogging RPC Plugin Integration Tests 4.3.5-SNAPSHOT [3/3]
[INFO]   from integration-tests/pom.xml

но то же самое для интеграционных тестов не работает.

Код: Выделить всё

[INFO] --- jacoco:0.8.10:report-integration (it-report) @ bloggingrpc-integration-tests ---
[INFO] Loading execution data file /Users/psaraiwala/Desktop/Packages/code_coverage/confluence/confluence-blogging-rpc-plugin/integration-tests/target/jacoco-it.exec
[INFO] Analyzed bundle 'Confluence Blogging RPC Plugin Integration Tests' with 0 classes

ПРИМЕЧАНИЕ Этот пакет не содержит исходного кода, поэтому я включил исходный код класса плагина в определение агента. Все равно он не работает??< /p>
Попробовал также чат-gpt.
Не удалось найти работающее решение.
Пожалуйста, помогите!!!!

Подробнее здесь: https://stackoverflow.com/questions/781 ... ing-jacoco
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение
  • Интеграция Jacoco с Sonar для подразделения и интеграционного тестирования
    Anonymous » » в форуме JAVA
    0 Ответы
    13 Просмотры
    Последнее сообщение Anonymous
  • Интеграция Jacoco с Sonar для подразделения и интеграционного тестирования
    Anonymous » » в форуме JAVA
    0 Ответы
    2 Просмотры
    Последнее сообщение Anonymous
  • Покрытие тестирования GitLab CI&CD с помощью jacoco
    Anonymous » » в форуме JAVA
    0 Ответы
    22 Просмотры
    Последнее сообщение Anonymous
  • Как рассчитать общее покрытие кода для кода Android с помощью Jacoco?
    Anonymous » » в форуме Android
    0 Ответы
    43 Просмотры
    Последнее сообщение Anonymous
  • Покрытие кода для тестов огурца с использованием Jacoco
    Anonymous » » в форуме JAVA
    0 Ответы
    27 Просмотры
    Последнее сообщение Anonymous

Вернуться в «JAVA»