Hi again,

After some research, it seems you should follow this kind of structure for your unit tests :

https://github.com/apache/ofbiz-framework/blob/7c2487bc3f1a6ec472585c27d7ceb5ca19471387/build.gradle#L259

So you should setup your tests at the right package (either groovy or java according to build instructions) and add the test decorator like this example

https://github.com/apache/ofbiz-framework/blob/7c2487bc3f1a6ec472585c27d7ceb5ca19471387/framework/base/src/test/java/org/apache/ofbiz/base/container/ComponentContainerTest.java#L63

Please let me know if you encounter any more trouble !

Regards

Gaetan

On 6/10/24 16:55, Carsten Schinzer wrote:
… and after some more assertions, I can add:
I have verified the paths to all my test suites to point to the correct Java 
classes.
I do not find any error in the test logs.
I do find the classes in the build/classes/java/test directory.
I do not find related test results at all.

An hint you can give me is appreciated!
Warm regards


Carsten

Am 10.06.2024 um 15:47 schrieb Carsten Schinzer 
<cars...@dcs-verkaufssysteme.de>:

Hello,


You mean like this:

<test-suite loader="main" location="testdef/CdcTicketsTests.xml“/
Yes, I think I did it well like that. no?
Warm regards


Carsten



Am 10.06.2024 um 09:17 schrieb Gaetan <gaetan.chabous...@nereide.fr>:

Hi Carsten, did you include your tests in the ofbiz-component file a the root 
of your plugin ?

Best regards

Gaetan

On 6/9/24 21:15, Carsten Schinzer wrote:
Hello all,


I am looking for a reference to integrate my plugin unit tests into the test 
run of OfBiz, i.e. when I run

./gradlew test
My defined test suite should be included and executed.

I did browse the official plugin repository and found no reference.

First issue: how to define the hook into the test task in build.gradle.
Second: Ho to make sure, the build.gradle dependencies on JUnit are only loaded 
for test and not packaged.

Does anyone have an example possibly how to do this.

Thanks & warm regards


Carsten


Reply via email to