[SOLVED]Run test case of subproject jme3-plugins

I’m working on VRM Loader and bvhretarget. And I needed to add some interface to GltfLoader. So I cloned jmonkey and added an interface to GltfLoader. And I created test code that uses the added interface and executed Right Click> Debug File, but it failed. I get an error like this. It is jme3 sdk.

Executing: gradle :jme3-plugins:debug
Arguments: [-PmainClass=com.jme3.scene.plugins.gltf.GltfLoaderTest, -PcmdLineArgs=, -PjvmLineArgs=, -c, D:\gameWorkspace\jmonkeyengine\settings.gradle]


> Configure project :
Full Version: 3.3-6819
POM Version: 3.3.0-SNAPSHOT

> Task :jme3-core:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :jme3-core:updateVersionPropertiesFile
> Task :jme3-core:processResources
> Task :jme3-core:classes
> Task :jme3-core:jar

> Task :jme3-plugins:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :jme3-plugins:processResources NO-SOURCE
> Task :jme3-plugins:classes

> Task :jme3-plugins:debug
Listening for transport dt_socket at address: 5005
Error: Could not find or load main class com.jme3.scene.plugins.gltf.GltfLoaderTest

> Task :jme3-plugins:debug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':jme3-plugins:debug'.
> Process 'command 'C:\Program Files\Amazon Corretto\jdk1.8.0_202\bin\java.exe'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 23s
6 actionable tasks: 6 executed

I tried to set up a new jmonkey project with no modifications at all, but it was the same. Can someone run test method of GltfLoaderTest.java?

Since I can build the whole with gradlew.bat, my problem is that I can not run subproject test cases.

By way of background, to build that Loader that depends on a customized jmonkey, I need to include the customized jmonkey jar in the Loader project’s dependencies, or include the Loader in the jme3-plugins project. The latter can omit dependency management. So I want to work on jme3-plugins subproject.
However, I can not execute test cases on subprojects. Even existing ones.

I am not familiar with gradle, multi-project or jmonkey project setup. How should I approach?

It was a very basic issue. [test file] solved it.

1 Like