Scott Babcock
03/13/2024, 7:12 PMNormally, the JVM disables its class cash if an agent is detected. It seems like Gradle is lacking such detection.
Vampire
03/13/2024, 7:23 PMScott Babcock
03/13/2024, 8:28 PMtest {
jvmArgs "-javaagent:${classpath.find { it.name.contains('junit-foundation') }.absolutePath}"
}
Scott Babcock
03/13/2024, 8:29 PMVampire
03/13/2024, 9:36 PMScott Babcock
03/13/2024, 10:26 PMVampire
03/13/2024, 10:26 PMScott Babcock
03/13/2024, 10:28 PMScott Babcock
03/13/2024, 10:29 PMVampire
03/13/2024, 10:33 PMScott Babcock
03/13/2024, 10:34 PMScott Babcock
03/13/2024, 10:35 PMScott Babcock
03/13/2024, 10:37 PMVampire
03/13/2024, 10:38 PMScott Babcock
03/13/2024, 10:38 PMScott Babcock
03/13/2024, 10:44 PMScott Babcock
03/13/2024, 10:45 PMVampire
03/13/2024, 10:45 PM@Ignore
in JUnitModelTest
and executed it.
I got 70 of 71 passed and 1 failureScott Babcock
03/13/2024, 10:46 PMVampire
03/13/2024, 10:48 PMJsUtilityTest.testInjectGlueLib
is the one that failed with "Response code 500. Message: Could not start a new session.".
All others are greenScott Babcock
03/13/2024, 10:49 PMVampire
03/13/2024, 10:49 PMScott Babcock
03/13/2024, 10:52 PMbuildship
pluginVampire
03/13/2024, 10:56 PMVampire
03/13/2024, 10:56 PMScott Babcock
03/13/2024, 10:57 PMScott Babcock
03/13/2024, 10:58 PMScott Babcock
03/13/2024, 10:59 PMbuild.gradle
would remove that dependency.Scott Babcock
03/13/2024, 11:03 PMVampire
03/13/2024, 11:04 PM-x testNg
, not problem 🙂Vampire
03/13/2024, 11:04 PMtestNg
test and the dependency from test
to testNg
it did not even try the JUnit tests in my first tryScott Babcock
03/13/2024, 11:05 PMScott Babcock
03/13/2024, 11:14 PMcom.nordstrom.automation.selenium.exceptions.InitialPageNotSpecifiedException: No initial page has been specified
at app//com.nordstrom.automation.selenium.core.TestBase.getInitialPage(TestBase.java:93)
at app//com.nordstrom.automation.selenium.core.ModelTestCore.testBasicPage(ModelTestCore.java:32)
at app//com.nordstrom.automation.selenium.junit.JUnitModelTest.testBasicPage(JUnitModelTest.java:22)
Scott Babcock
03/13/2024, 11:15 PMVampire
03/13/2024, 11:19 PMScott Babcock
03/13/2024, 11:19 PM./mvn-build.sh -b htmlunit
, the first set of tests that run are the JUnit 4 tests. They pass as expected.Scott Babcock
03/13/2024, 11:20 PMScott Babcock
03/13/2024, 11:21 PMVampire
03/13/2024, 11:24 PMNormally, the JVM disables its class cash if an agent is detected. It seems like Gradle is lacking such detection.But I totally don't get what he could mean. Gradle is not a JVM. It start a separate test process where the JVM arg is specified and which starts a Gradle class as mainclass which then cares about executing the tests. I don't know where Gradle could somewhere cache some class so that a Java agent doesn't see it. Also the JaCoCo agent works perfectly fine with tests run on Gradle.
Scott Babcock
03/13/2024, 11:27 PM