jdi-testing / jdi-light

Powerful Framework for UI Automation Testing on Java
https://jdi-docs.github.io/jdi-light/
MIT License
109 stars 47 forks source link

NPE in HTML tests in JDK 17, 18 #5254

Closed pnatashap closed 10 months ago

pnatashap commented 11 months ago

Most reproducible JDK 17 allure-report-jdk17.zip

Log: Error: Tests run: 1686, Failures: 3, Errors: 0, Skipped: 60, Time elapsed: 424.6 s <<< FAILURE! - in TestSuite Error: before(io.github.epam.html.tests.elements.common.AlertsTests) Time elapsed: 5.955 s <<< FAILURE! java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "com.jdiai.tools.FixedQueue.push(Object)" because the return value of "com.jdiai.tools.Safe.get()" is null at io.github.epam.html.tests.elements.common.AlertsTests.before(AlertsTests.java:23) Caused by: java.lang.NullPointerException: Cannot invoke "com.jdiai.tools.FixedQueue.push(Object)" because the return value of "com.jdiai.tools.Safe.get()" is null at io.github.epam.html.tests.elements.common.AlertsTests.before(AlertsTests.java:23)

Error: before(io.github.epam.html.tests.elements.complex.RadioTests) Time elapsed: 5.956 s <<< FAILURE! java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "com.jdiai.tools.FixedQueue.push(Object)" because the return value of "com.jdiai.tools.Safe.get()" is null at io.github.epam.html.tests.elements.complex.RadioTests.before(RadioTests.java:22) Caused by: java.lang.NullPointerException: Cannot invoke "com.jdiai.tools.FixedQueue.push(Object)" because the return value of "com.jdiai.tools.Safe.get()" is null at io.github.epam.html.tests.elements.complex.RadioTests.before(RadioTests.java:22)

Error: before(io.github.epam.html.tests.site.MenuTests) Time elapsed: 2.05 s <<< FAILURE! java.lang.RuntimeException: java.lang.NullPointerException

[49:49.85] Cannot invoke "java.lang.Long.longValue()" because the return value of "com.jdiai.tools.Safe.get()" is null at io.github.epam.html.tests.site.MenuTests.before(MenuTests.java:24) Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "com.jdiai.tools.Safe.get()" is null at io.github.epam.html.tests.site.MenuTests.before(MenuTests.java:24)

pnatashap commented 10 months ago

https://github.com/jdi-testing/jdi-light/pull/5280 тестовое изменение влито, проверим, будет ли повторение

Связано с особенностью testng - иногда тест начинается в общем потоке, потом включается многопоточность (первые тесты страдают), тогда мы теряем доступ к старому значению