Re: Unit testing for a custom module

2024-09-12 Thread Jacques Le Roux
Hi Carsten, I guess you found some explanations in "sourceSets{" ? HTH Jacques Le 11/09/2024 à 10:32, Carsten Schinzer a écrit : A little update here: This morning I found that when I place the integration tests in the main source tree they will not be executed in the JUnit run AND will be

Re: Unit testing for a custom module

2024-09-11 Thread Carsten Schinzer
A little update here: This morning I found that when I place the integration tests in the main source tree they will not be executed in the JUnit run AND will be found by the testIntegration command. So the (my?) misconception was to place the integration tests in the test source tree. So for

Re: Unit testing for a custom module

2024-09-10 Thread Carsten Schinzer
Hello all, Me again. I forgot to mention here that actually now I do execute the Unit Tests, but also three integration test classes are executed as part of the JUnit run. All three are extensions to org.apache.ofbiz.service.testtools.OFBizTestCase and to not define any Unit @Test annotation

Re: Unit testing for a custom module

2024-07-08 Thread Carsten Schinzer
Hello Gaetan, Apologies for the late reply. No, the issue is not solved. I shall have time towards end of this week to set you access up and let you know. Thanks a mill to offer help. Warm regards Carsten --- Dr. Carsten Schinzer *Inhaber* t +49 89 88569642 | f +49 89 99964059 | m +49 1

Re: Unit testing for a custom module

2024-07-04 Thread Gaetan
Hi Carsten, did you manage to solve your problem ? Regards, Gaetan On 6/21/24 14:45, Gaetan wrote: Hi, I created a public gitlab account account so that i can help you, with this address : (mr.plop.p...@netcourrier.com) If you feel confortable with it, you can share with me the repo link (re

Re: Unit testing for a custom module

2024-06-21 Thread Gaetan
Hi, I created a public gitlab account account so that i can help you, with this address : (mr.plop.p...@netcourrier.com) If you feel confortable with it, you can share with me the repo link (read only, of course). Best regards Gaetan PS: i don't know if there are any community rules for this

Re: Unit testing for a custom module

2024-06-21 Thread Carsten Schinzer
Hi Gaetan, Thanks to get back to me. I see no change - all the things you applied I already did. I also added your test case to the code and ran that locally - the test is obviously not found. It might have to do with the fact that I prefer JUnit 5 because of its advanced parametrized testing

Re: Unit testing for a custom module

2024-06-20 Thread Gaetan
Hi Carsten, do you have any updates on your case ? Regards, Gaetan On 6/11/24 09:58, Gaetan wrote: Hello Carsten. I set up a very small example plugin that i tested myself localy. Could you please reproduce the steps below ? - get ofbiz framework from apache repo (https://github.com/apach

Re: Unit testing for a custom module

2024-06-11 Thread Carsten Schinzer
Hello Gaetan Thanks indeed for your efforts!This is what I am doing except the the XML Schema here https://ofbiz.apache.org/dtds/test-suite.xsd Complains when I do not add test-case elements, which I did. But even without them that does not change the picture. I am running on MacOS 14.5 (Sonom

Re: Unit testing for a custom module

2024-06-11 Thread Gaetan
Hello Carsten. I set up a very small example plugin that i tested myself localy. Could you please reproduce the steps below ? - get ofbiz framework from apache repo (https://github.com/apache/ofbiz-framework)    - checkout trunk on ofbiz framework - get example plugin and set it up inside

Re: Unit testing for a custom module

2024-06-10 Thread Carsten Schinzer
Hello Gaetan, I do all this as you describe, source path for tests is as required and tests are properly annotated. The main difference is that this is not a unit test out of a framework, but unit tests sitting in a plugin component. I so not see any traces of the framework stepping into my test

Re: Unit testing for a custom module

2024-06-10 Thread Gaetan
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 accordin

Re: Unit testing for a custom module

2024-06-10 Thread Carsten Schinzer
… 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 g

Re: Unit testing for a custom module

2024-06-10 Thread Carsten Schinzer
Hello, You mean like this:

Re: Unit testing for a custom module

2024-06-10 Thread Gaetan
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