You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by me...@apache.org on 2025/08/22 18:28:57 UTC
(fineract) 01/03: WIP use gradle to aggregate (non-e2e) test results
This is an automated email from the ASF dual-hosted git repository.
meonkeys pushed a commit to branch auto-close-static-mocks
in repository https://gitbox.apache.org/repos/asf/fineract.git
commit a2880413dea981f18f37ff7bf8fcd6cbb69f7bf1
Author: Adam Monsen <ha...@gmail.com>
AuthorDate: Tue Aug 5 12:17:32 2025 -0700
WIP use gradle to aggregate (non-e2e) test results
Usage:
* run tests from one or more projects
* do not `gradle clean` between test runs
* run: `gradle testAggregateTestReport -x test`
* view report at `test-results/build/reports/tests/unit-test/aggregated-results/index.html`
Also... maybe we should be using Allure instead?
---
build.gradle | 3 +-
settings.gradle | 1 +
test-results/build.gradle | 74 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 77 insertions(+), 1 deletion(-)
diff --git a/build.gradle b/build.gradle
index cc02b39945..058625f7c2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -49,7 +49,8 @@ buildscript {
'fineract-e2e-tests-core',
'fineract-e2e-tests-runner',
'fineract-progressive-loan',
- 'fineract-progressive-loan-embeddable-schedule-generator'
+ 'fineract-progressive-loan-embeddable-schedule-generator',
+ 'test-results'
].contains(it.name)
}
fineractPublishProjects = subprojects.findAll{
diff --git a/settings.gradle b/settings.gradle
index de7530c1a1..607d507d08 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -75,6 +75,7 @@ include 'fineract-progressive-loan'
include 'fineract-progressive-loan-embeddable-schedule-generator'
// NOTE: custom Docker image with all custom modules included
include ':custom:docker'
+include ':test-results'
// NOTE: dynamically load custom modules with pattern "custom -> company -> category -> module"
file("${rootDir}/custom").eachDir { companyDir ->
if('build' != companyDir.name && 'docker' != companyDir.name) {
diff --git a/test-results/build.gradle b/test-results/build.gradle
new file mode 100644
index 0000000000..7919c15837
--- /dev/null
+++ b/test-results/build.gradle
@@ -0,0 +1,74 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//apply plugin: 'test-report-aggregation'
+
+plugins {
+ id 'test-report-aggregation'
+}
+
+description = 'Aggregate Test Results'
+
+// Declare dependencies using the testReportAggregation configuration
+// (list project results to aggregate here)
+dependencies {
+ // EVERYTHING. Doesn't work because we don't/can't run them all at once.
+ //testReportAggregation fineractJavaProjects
+
+ // FIXME - old project? delete?
+ //testReportAggregation project(':fineract-api')
+
+ // specific projects only (all but e2e) -- this is probably the way to go
+ testReportAggregation project(':fineract-core')
+ testReportAggregation project(':fineract-cob')
+ testReportAggregation project(':fineract-validation')
+ testReportAggregation project(':fineract-command')
+ testReportAggregation project(':fineract-accounting')
+ testReportAggregation project(':fineract-provider')
+ testReportAggregation project(':fineract-branch')
+ testReportAggregation project(':fineract-document')
+ testReportAggregation project(':fineract-investor')
+ testReportAggregation project(':fineract-charge')
+ testReportAggregation project(':fineract-rates')
+ testReportAggregation project(':fineract-tax')
+ testReportAggregation project(':fineract-loan')
+ testReportAggregation project(':fineract-savings')
+ testReportAggregation project(':fineract-report')
+ testReportAggregation project(':integration-tests')
+ testReportAggregation project(':twofactor-tests')
+ testReportAggregation project(':oauth2-tests')
+ testReportAggregation project(':fineract-client')
+ testReportAggregation project(':fineract-avro-schemas')
+ testReportAggregation project(':fineract-progressive-loan')
+ testReportAggregation project(':fineract-progressive-loan-embeddable-schedule-generator')
+}
+
+// Define a report of type AggregateTestReport which collects test data from unit test suites
+reporting {
+ reports {
+ testAggregateTestReport(AggregateTestReport) {
+ testType = TestSuiteType.UNIT_TEST
+ }
+ }
+}
+
+// make aggregate test report generation part of the 'check' lifecycle phase
+//tasks.named('check') {
+// dependsOn tasks.named('testAggregateTestReport', TestReport)
+//}