Also you can find some syntax help at 
https://nightlies.apache.org/ofbiz/trunk/readme/html5/README.html#testing-tasks

HTH

Jacques

Le 29/01/2025 à 11:44, gaetan.chaboussie a écrit :
Hi Groza,

My understanding is the following :

-*Unit tests* should be in packages detected as tests by gradle [1], and so they 
"should" run automaticaly when running the standard gradle test task.

In unit tests you won't be able to access a proper delegator or dispatcher 
though.

- *Integration tests* are defined in your components like in [2]. These tests 
need to be declared in your component in order to be run.

In integration tests, you have access to a test delegator and dispatcher, if 
you extend OfbizTestCase.

They run though a command like `gradlew "ofbiz --test component=<your component> --test 
suitename=<your test suite>"`

Hope this helps !

Best regards,

Gaetan

[1] 
https://github.com/apache/ofbiz-framework/blob/4bdca76bf1b1d41f3f2152f8128ae566e91dfc7f/build.gradle#L297
[2] 
https://github.com/apache/ofbiz-framework/blob/4bdca76bf1b1d41f3f2152f8128ae566e91dfc7f/applications/order/ofbiz-component.xml#L52

On 1/29/25 11:14, Groza Danut wrote:
Hi all,

Do you know where I can find an updated documentation for testing in Ofbiz?

I'm having trouble with the following questions:
What is the location of integration tests?
Do I need to define both integration and unit tests in the testdef files
for them to run?

PS: I'm referring to Java tests.

Reply via email to