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/05 19:42:39 UTC
(fineract) 01/02: 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 aggregate-test-results-gradle
in repository https://gitbox.apache.org/repos/asf/fineract.git
commit ade486a3e7b5067ad26a75de014935695bdc8d95
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`
---
build.gradle | 3 ++-
settings.gradle | 1 +
test-results/build.gradle | 55 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 58 insertions(+), 1 deletion(-)
diff --git a/build.gradle b/build.gradle
index a8a58ad682..8500217c69 100644
--- a/build.gradle
+++ b/build.gradle
@@ -50,7 +50,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..1b5d898200
--- /dev/null
+++ b/test-results/build.gradle
@@ -0,0 +1,55 @@
+//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)
+//}