You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Jacques Le Roux (Jira)" <ji...@apache.org> on 2024/04/01 17:11:00 UTC

[jira] [Commented] (OFBIZ-12985) Groovy tests fails

    [ https://issues.apache.org/jira/browse/OFBIZ-12985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17832906#comment-17832906 ] 

Jacques Le Roux commented on OFBIZ-12985:
-----------------------------------------

The problem is when reading the testdef files, not only invoicetests.xml (not changed for years) but for instance also fixedassettests.xml (both valid). Not sure why yet...

> Groovy tests fails
> ------------------
>
>                 Key: OFBIZ-12985
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12985
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL APPLICATIONS, ALL PLUGINS
>    Affects Versions: Upcoming Branch
>            Reporter: Jacques Le Roux
>            Priority: Blocker
>             Fix For: Upcoming Branch
>
>
> Groovy testIntegration, tests suites and tests cases no longer work
> It seems testIntegrations work but when you look at the log you find a lot of (46, barely same than number of files: 44, did not digg more) "Unable to load test suite class" errors like this 1st one:
> {quote}
> |ModelTestSuite|E|Unable to load test suite class : org.apache.ofbiz.party.PartyTests|
> {quote}
> You can find that in last ofbizTrunkFrameworkPlugins BB build: [https://ci2.apache.org/#/builders/46/builds/777]
> The result seems successful. It's a misleading testIntegration result (not sure what does that) and an already old one. TestIntegrations still work in 18.12 and the issue is somehow related to OFBIZ-12813.
> It's a really confusing situation. Several issues prevent Groovy tests to work.
> It has somehow already been commented in build.gradle by [https://s.apache.org/7xsza]
> {quote}// Groovy tests often fail, because JUNIT does not have access to the ofbiz enviroment.
> // If a groovy test is supposed to be tested this way, it can be added here.
> {quote}
> But has been neglected, certainly because of the misleading testIntegration result .
> Moreover, do we really need to put all Groovy tests files there by hand (44) as included, maybe similarly to excludedJavaSources in build.gradle (9 files)?
> The 1st reason is due to wrong Groovy tests package names and locations due to n OFBIZ-12813
> If we refer to our way of naming packages they are correctly referenced in testdef (eg org.apache.ofbiz.accounting vs org.apache.accounting.accounting)
> So it's only a simple packages names and locations changes.
> After fixing the names and location of accounting Groovy tests, I have solely added InvoicePerShipmentTests.groovy in sourceSets/test/groovy as suggested by the comment in build.gradle referred above.
> {noformat}
> groovy {
>             srcDirs = getDirectoryInActiveComponentsIfExists('src/test/groovy')
>             include 'org/apache/ofbiz/service/ModelServiceTest.groovy'
>             include 'org/apache/ofbiz/test/TestServices.groovy'
>             include 'org/apache/ofbiz/base/util/FileUtilTests.groovy'
>             include 'org/apache/ofbiz/accounting/InvoicePerShipmentTests.groovy'
>         }
> {noformat} 
> But InvoicePerShipmentTests does not pass, yet....



--
This message was sent by Atlassian Jira
(v8.20.10#820010)