Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testng launchers no longer work with eclipse 2023-06 #194

Closed
adrian-herscu opened this issue Sep 13, 2023 · 4 comments · Fixed by #195
Closed

testng launchers no longer work with eclipse 2023-06 #194

adrian-herscu opened this issue Sep 13, 2023 · 4 comments · Fixed by #195
Assignees
Labels
bug Something isn't working
Milestone

Comments

@adrian-herscu
Copy link
Collaborator

Description
TestNG launchers no longer work with eclipse 2023-06.

  • have to run TestNG with JDK-11 or higher
  • must ensure all Maven properties are defined
  • there are Maven properties with are incorrectly parsed by m2e -- for example:
<reference.href>
                <![CDATA[@{StringUtilsExtensions.format('${alm.href}', '(\\d+)', value)}]]></reference.href>

even after fixing all the above it still fails, apparently the test.properties file is not loaded at all.

Reproduction
Steps to reproduce the behavior:

  1. launch a testng class or testng.xml

Expected behavior
test(s) should execute/debug

** Actual Log **

[RemoteTestNG] detected TestNG version 7.4.0
20:12:02.800 [DEBUG] [main ]: Config - config file jgiven.properties not loaded: jgiven.properties
20:12:02.804 [DEBUG] [main ]: Config - Using folder target/site/jgiven-reports/functional-dev//local to store JGiven reports
20:12:02.805 [DEBUG] [main ]: Config - Using folder target/site/jgiven-reports/functional-dev//local to store JGiven reports
20:12:03.721 [INFO ] [TestingWebWithJGiven:::54:]: UnitilsScenarioTest - starting test class TestingWebWithJGiven
20:12:03.957 [WARN ] [TestingWebWithJGiven:::54:]: ConfigurationLoader - No custom configuration file unitils.properties found.
20:12:03.958 [INFO ] [TestingWebWithJGiven:::54:]: ConfigurationLoader - No local configuration file unitils-local.properties found.
20:12:04.065 [DEBUG] [TestingWebWithJGiven:::54:]: ModulesLoader - Skipping module easymock. Module class not found in classpath. Module class name: org.unitils.easymock.EasyMockModule
20:12:04.066 [DEBUG] [TestingWebWithJGiven:::54:]: ModulesLoader - Skipping module hibernate. Module class not found in classpath. Module class name: org.unitils.orm.hibernate.HibernateModule
20:12:04.067 [DEBUG] [TestingWebWithJGiven:::54:]: ModulesLoader - Skipping module inject. Module class not found in classpath. Module class name: org.unitils.inject.InjectModule
20:12:04.125 [DEBUG] [TestingWebWithJGiven:::54:]: ConfigUtils - Creating instance of interface org.unitils.io.filecontent.FileContentReaderFactory. Implementation class org.unitils.io.filecontent.impl.DefaultFileContentReaderFactory
20:12:04.127 [DEBUG] [TestingWebWithJGiven:::54:]: ConfigUtils - Creating instance of interface org.unitils.io.reader.ReadingStrategyFactory. Implementation class org.unitils.io.reader.impl.FileReadingStrategyFactory
20:12:04.128 [DEBUG] [TestingWebWithJGiven:::54:]: ConfigUtils - Creating instance of interface org.unitils.io.reader.FileResolvingStrategyFactory. Implementation class org.unitils.io.reader.impl.DefaultFileResolvingStrategyFactory
20:12:04.135 [DEBUG] [TestingWebWithJGiven:::54:]: ConfigUtils - Creating instance of interface org.unitils.io.temp.TempServiceFactory. Implementation class org.unitils.io.temp.impl.DefaultTempServiceFactory
20:12:04.139 [DEBUG] [TestingWebWithJGiven:::54:]: ModulesLoader - Skipping module jpa. Module class not found in classpath. Module class name: org.unitils.orm.jpa.JpaModule
20:12:04.140 [DEBUG] [TestingWebWithJGiven:::54:]: ModulesLoader - Skipping module mock. Module class not found in classpath. Module class name: org.unitils.mock.MockModule
20:12:04.140 [DEBUG] [TestingWebWithJGiven:::54:]: ModulesLoader - Skipping module spring. Module class not found in classpath. Module class name: org.unitils.spring.SpringModule
20:12:04.431 [INFO ] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: UnitilsScenarioTest - starting test method TestingWebWithJGiven:shouldFind:389a62f9:54: with 5 active threads
20:12:04.436 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: UnitilsScenarioTest - running on fresh thread, new random id UFlTNIuCSx-DZ1RXxwEfGg set
20:12:04.437 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: ConfigUtils - Creating instance of interface org.unitils.database.transaction.UnitilsTransactionManager. Implementation class org.unitils.database.transaction.impl.DefaultUnitilsTransactionManager
20:12:04.440 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: ConfigUtils - Creating instance of interface org.unitils.database.config.DataSourceFactory. Implementation class org.unitils.database.config.PropertiesDataSourceFactory
20:12:04.444 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: ConfigUtils - Creating instance of interface org.unitils.database.config.DataSourceFactory. Implementation class org.unitils.database.config.PropertiesDataSourceFactory
20:12:04.446 [INFO ] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: PropertiesDataSourceFactory - Creating data source. Driver: null, url: null, user: null, password: <not shown>
20:12:04.514 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: DefaultUnitilsTransactionManager - Starting transaction
20:12:04.578 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
20:12:05.782 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: StageEx - poll delay 5 seconds; timeout 15 seconds
20:12:05.828 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: StageLifecycleManager - Added methods '[]' as 'AfterStage' methods to the register
20:12:05.829 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: StageLifecycleManager - Added methods '[]' as 'BeforeStage' methods to the register
20:12:05.833 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: StageLifecycleManager - Added methods '[protected void dev.aherscu.qa.jgiven.commons.utils.StageEx.configurePolling()]' as 'BeforeScenario' methods to the register
20:12:05.833 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: StageLifecycleManager - Added methods '[private void dev.aherscu.qa.jgiven.webdriver.steps.WebDriverFixtures.afterScenarioQuitWebDriver()]' as 'AfterScenario' methods to the register
20:12:06.012 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: StageLifecycleManager - Added methods '[]' as 'AfterStage' methods to the register
20:12:06.013 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: StageLifecycleManager - Added methods '[]' as 'BeforeStage' methods to the register
20:12:06.013 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: StageLifecycleManager - Added methods '[protected void dev.aherscu.qa.jgiven.commons.utils.StageEx.configurePolling()]' as 'BeforeScenario' methods to the register
20:12:06.013 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: StageLifecycleManager - Added methods '[]' as 'AfterScenario' methods to the register
20:12:06.135 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: StageLifecycleManager - Added methods '[]' as 'AfterStage' methods to the register
20:12:06.136 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: StageLifecycleManager - Added methods '[]' as 'BeforeStage' methods to the register
20:12:06.136 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: StageLifecycleManager - Added methods '[protected void dev.aherscu.qa.jgiven.commons.utils.StageEx.configurePolling()]' as 'BeforeScenario' methods to the register
20:12:06.136 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: StageLifecycleManager - Added methods '[]' as 'AfterScenario' methods to the register
20:12:06.240 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: ApplicationPerMethodWebSessionTest - after method quitting web driver
20:12:06.244 [DEBUG] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: DefaultUnitilsTransactionManager - Committing transaction
20:12:06.244 [WARN ] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: UnitilsScenarioTest - after test got null
20:12:06.244 [INFO ] [TestingWebWithJGiven:shouldFind:389a62f9:54:]: UnitilsScenarioTest - test dev.aherscu.qa.testing.example.scenarios.tutorial3.TestingWebWithJGiven:shouldFind ended
20:12:06.245 [INFO ] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: UnitilsScenarioTest - starting test method TestingWebWithJGiven:shouldFind:132f67bc:54: with 5 active threads
20:12:06.245 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: UnitilsScenarioTest - running on previous thread, reusing random id UFlTNIuCSx-DZ1RXxwEfGg
20:12:06.246 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: DefaultUnitilsTransactionManager - Starting transaction
20:12:06.246 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: DataSourceTransactionManager - Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
20:12:06.252 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: StageLifecycleManager - Added methods '[]' as 'AfterStage' methods to the register
20:12:06.252 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: StageLifecycleManager - Added methods '[]' as 'BeforeStage' methods to the register
20:12:06.252 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: StageLifecycleManager - Added methods '[protected void dev.aherscu.qa.jgiven.commons.utils.StageEx.configurePolling()]' as 'BeforeScenario' methods to the register
20:12:06.252 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: StageLifecycleManager - Added methods '[private void dev.aherscu.qa.jgiven.webdriver.steps.WebDriverFixtures.afterScenarioQuitWebDriver()]' as 'AfterScenario' methods to the register
20:12:06.253 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: StageLifecycleManager - Added methods '[]' as 'AfterStage' methods to the register
20:12:06.253 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: StageLifecycleManager - Added methods '[]' as 'BeforeStage' methods to the register
20:12:06.253 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: StageLifecycleManager - Added methods '[protected void dev.aherscu.qa.jgiven.commons.utils.StageEx.configurePolling()]' as 'BeforeScenario' methods to the register
20:12:06.253 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: StageLifecycleManager - Added methods '[]' as 'AfterScenario' methods to the register
20:12:06.254 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: StageLifecycleManager - Added methods '[]' as 'AfterStage' methods to the register
20:12:06.254 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: StageLifecycleManager - Added methods '[]' as 'BeforeStage' methods to the register
20:12:06.255 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: StageLifecycleManager - Added methods '[protected void dev.aherscu.qa.jgiven.commons.utils.StageEx.configurePolling()]' as 'BeforeScenario' methods to the register
20:12:06.255 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: StageLifecycleManager - Added methods '[]' as 'AfterScenario' methods to the register
20:12:06.259 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: ApplicationPerMethodWebSessionTest - after method quitting web driver
20:12:06.262 [DEBUG] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: DefaultUnitilsTransactionManager - Committing transaction
20:12:06.262 [WARN ] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: UnitilsScenarioTest - after test got null
20:12:06.263 [INFO ] [TestingWebWithJGiven:shouldFind:132f67bc:54:]: UnitilsScenarioTest - test dev.aherscu.qa.testing.example.scenarios.tutorial3.TestingWebWithJGiven:shouldFind ended

===============================================
testng-self-tests
Total tests run: 2, Passes: 0, Failures: 0, Skips: 2
Configuration Failures: 4, Skips: 2
===============================================

20:12:06.872 [INFO ] [main ]: AbstractQaJgivenReporter - xml suite [Suite: "testng-self-tests"   org.testng.xml.XmlTest@9754d5e6 ]
20:12:06.873 [INFO ] [main ]: AbstractQaJgivenReporter - suite testng-self-tests
20:12:06.878 [INFO ] [main ]: AbstractQaJgivenReporter - configuration QaJGivenPerMethodReporter(super=AbstractQaJgivenReporter(sourceDirectory=target\site\jgiven-reports\functional-dev\local, outputDirectory=target\site\jgiven-reports\functional-dev\local\qa-html, debug=false, screenshotScale=1, datePattern=yyyy-MMM-dd HH:mm O, pdf=false, referenceTag=Reference, templateResource=/qa-jgiven-permethod-reporter.html))
20:12:06.924 [DEBUG] [main ]: QaJGivenPerMethodReporter - reading dev.aherscu.qa.testing.example.scenarios.tutorial3.TestingWebWithJGiven.json
20:12:07.116 [DEBUG] [main ]: QaJGivenPerMethodReporter - processing SUCCESS-dev.aherscu.qa.testing.example.scenarios.tutorial3.TestingWebWithJGiven-shouldFind
20:12:07.138 [DEBUG] [main ]: TemplateUtils$Loader - loading template resource from /qa-jgiven-permethod-reporter.html
20:12:07.546 [INFO ] [main ]: QaJGivenPerMethodReporter - setting attributes for SUCCESS-dev.aherscu.qa.testing.example.scenarios.tutorial3.TestingWebWithJGiven-shouldFind.html
20:12:07.571 [DEBUG] [main ]: QaJGivenPerMethodReporter - report generated for dev.aherscu.qa.testing.example.scenarios.tutorial3.TestingWebWithJGiven into SUCCESS-dev.aherscu.qa.testing.example.scenarios.tutorial3.TestingWebWithJGiven-shouldFind.html
@adrian-herscu adrian-herscu added the bug Something isn't working label Sep 13, 2023
@adrian-herscu adrian-herscu self-assigned this Sep 13, 2023
@adrian-herscu
Copy link
Collaborator Author

It still does not work due to reference.href and reference.templatelink properties, even after trying to override them in launcher's VM arguments:

-Dtest.properties.file=environments/dev/test.properties -Dreference.href= -Dreference.templatelink=

@adrian-herscu adrian-herscu reopened this Sep 15, 2023
@adrian-herscu
Copy link
Collaborator Author

adrian-herscu commented Sep 15, 2023

In addition, the M2E importer cannot be configured to run Maven with specific JRE version, hence the project is always imported as Java 11 project, There is some issue with Java 11 and Lombok under Eclipse:
projectlombok/lombok#1676
This causes many fake build errors.

The cure can be replaceing:

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">

to JavaSE-8, but this will get overriden every time the Maven project is reimported.

@adrian-herscu
Copy link
Collaborator Author

Should be resolved by #198
(More and more tools and libraries are switching to JDK 11 making it harder to keep JDK 8)

@adrian-herscu adrian-herscu added this to the 1.0.0 milestone Oct 14, 2023
@adrian-herscu adrian-herscu added wontfix This will not be worked on blocked Blocked due to some external issue labels Dec 6, 2023
@adrian-herscu
Copy link
Collaborator Author

see #215

@adrian-herscu adrian-herscu removed wontfix This will not be worked on blocked Blocked due to some external issue labels Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment