Тесты TestNG пропускаются в контейнере docker - PullRequest
0 голосов
/ 22 апреля 2020

У меня есть проект maven + testng + java на моем компьютере. Когда я упаковываю проект в jar и запускаю его локально с необходимыми jar-файлами библиотеки, тесты работают нормально. Но когда я делаю те же шаги при составлении docker образа и запуске контейнера, мои тесты testNg не выполняются.

Stacktrace:

[RunInfo] Adding method selector: org.testng.internal.XmlMethodSelector@b97c004 priority: 10
**[TestNGClassFinder] SKIPPING CLASS class com.sample**
[[SuiteRunner]] Created 1 TestRunners
[TestRunner] Running test Snap Test on 0  classes,  included groups:[] excluded groups:[]
[TestRunner] WILL BE RUN IN RANDOM ORDER:
[TestRunner] WILL BE RUN SEQUENTIALLY:
[TestRunner] ===
[TestRunner] Found 0 applicable methods

*********** INVOKED METHODS


***********

Creating /usr/share/tag/test-output/Snap Test Suite/Snap Test.html

===============================================
    Snap Test
    Tests run: 0, Failures: 0, Skips: 0
===============================================


===============================================
Snap Test Suite
Total tests run: 0, Failures: 0, Skips: 0
===============================================

Creating /usr/share/tag/test-output/Snap Test Suite/toc.html
Creating /usr/share/tag/test-output/Snap Test Suite/Snap Test.properties
Creating /usr/share/tag/test-output/Snap Test Suite/index.html
Creating /usr/share/tag/test-output/Snap Test Suite/main.html
Creating /usr/share/tag/test-output/Snap Test Suite/groups.html
Creating /usr/share/tag/test-output/Snap Test Suite/methods.html
Creating /usr/share/tag/test-output/Snap Test Suite/methods-alphabetical.html
Creating /usr/share/tag/test-output/Snap Test Suite/classes.html
Creating /usr/share/tag/test-output/Snap Test Suite/reporter-output.html
Creating /usr/share/tag/test-output/Snap Test Suite/methods-not-run.html
Creating /usr/share/tag/test-output/Snap Test Suite/testng.xml.html
Creating /usr/share/tag/test-output/index.html
[TestNG] No tests found. Nothing was run

Может кто-нибудь помочь мне понять, что идет не так?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...