Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.

Commit 3ca83cd

Browse files
dfcoffinclaude
andcommitted
Refactor README badges and enhance testing documentation
Badge Improvements: - Reorder Build Status to first position in status badges group - Remove Green Button and NAESB REQ.21 badges as requested - Add NAESB ESPI ver. 4.0 badge for current standard compliance - Improve badge organization with logical grouping Testing Documentation: - Replace external test harness reference with comprehensive internal testing docs - Document all 3 test classes: MigrationVerificationTest, TestApplication, SpringBootTestConfiguration - Add detailed Maven command examples for different testing scenarios - Include test coverage checklist with 8 verification categories - Document test report generation and location - Provide clear instructions for development vs production builds 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent ae66d53 commit 3ca83cd

File tree

1 file changed

+93
-4
lines changed

1 file changed

+93
-4
lines changed

README.md

Lines changed: 93 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[![Build Status](https://img.shields.io/badge/Build-Passing-success?style=flat&logo=github-actions)](https://github.com/GreenButtonAlliance/OpenESPI-Common-java/actions)
12
[![CI/CD Pipeline](https://github.com/GreenButtonAlliance/OpenESPI-Common-java/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/GreenButtonAlliance/OpenESPI-Common-java/actions/workflows/ci.yml)
23
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=GreenButtonAlliance_OpenESPI-Common-java&metric=alert_status)](https://sonarcloud.io/dashboard?id=GreenButtonAlliance_OpenESPI-Common-java)
34
[![Java](https://img.shields.io/badge/Java-21-orange?style=flat&logo=openjdk)](https://openjdk.org/)
@@ -6,9 +7,7 @@
67
[![Jakarta EE](https://img.shields.io/badge/Jakarta%20EE-9+-purple?style=flat&logo=eclipse)](https://jakarta.ee/)
78
[![Hibernate](https://img.shields.io/badge/Hibernate-6.x-yellow?style=flat&logo=hibernate)](https://hibernate.org/)
89
[![License](https://img.shields.io/badge/License-Apache%202.0-lightgrey?style=flat&logo=apache)](https://www.apache.org/licenses/LICENSE-2.0)
9-
[![Build Status](https://img.shields.io/badge/Build-Passing-success?style=flat&logo=github-actions)](https://github.com/GreenButtonAlliance/OpenESPI-Common-java/actions)
10-
[![Green Button](https://img.shields.io/badge/Green%20Button-ESPI%201.0-green?style=flat)](https://www.greenbuttonalliance.org/)
11-
[![NAESB](https://img.shields.io/badge/NAESB-REQ.21-blue?style=flat)](https://www.naesb.org/)
10+
[![NAESB](https://img.shields.io/badge/NAESB-ESPI%20ver.%204.0-blue?style=flat)](https://www.naesb.org/)
1211
[![MapStruct](https://img.shields.io/badge/MapStruct-1.6.0-orange?style=flat)](https://mapstruct.org/)
1312
[![Lombok](https://img.shields.io/badge/Lombok-1.18.34-red?style=flat)](https://projectlombok.org/)
1413

@@ -71,4 +70,94 @@ Open IntelliJ and open the project (File > Open...).
7170

7271
## Testing
7372

74-
All testing of OpenESPI is performed using the [Test Harness](https://github.com/greenbuttonalliance/OpenESPI-GreenButtonCMDTest.git) project. See the [README](https://github.com/greenbuttonalliance/OpenESPI-GreenButtonCMDTest/blob/master/README.md) file for instructions.
73+
The project includes comprehensive test classes to verify the Spring Boot 3.5 migration and core functionality:
74+
75+
### Test Classes
76+
77+
1. **`MigrationVerificationTest`** - Verifies core Spring Boot 3.5 migration features:
78+
- Jakarta EE 9+ Validation API functionality
79+
- Jakarta XML Binding (JAXB) for DTO marshalling
80+
- UUID primary key architecture
81+
- ESPI resource inheritance structure
82+
- Entity properties with Jakarta annotations
83+
- Customer domain entities independence
84+
- SummaryMeasurement DTO business logic
85+
86+
2. **`TestApplication`** - Spring Boot test application:
87+
- Minimal Spring Boot configuration for testing
88+
- Entity scanning for domain objects
89+
- JPA repository configuration
90+
- Test-specific profile activation
91+
92+
3. **`SpringBootTestConfiguration`** - Test configuration beans:
93+
- ESPI ID generator service for UUID5 generation
94+
- JAXB marshallers for domain objects and XML fragments
95+
- Bean validation factory
96+
- REST template for testing
97+
98+
### Running Tests
99+
100+
#### Run All Tests (Recommended)
101+
```bash
102+
# Execute complete test suite
103+
mvn clean test
104+
105+
# Run tests with verbose output
106+
mvn clean test -X
107+
108+
# Run specific test class
109+
mvn test -Dtest=MigrationVerificationTest
110+
```
111+
112+
#### Build with Tests
113+
```bash
114+
# Full build with test execution
115+
mvn clean package
116+
117+
# Install to local repository with tests
118+
mvn clean install
119+
120+
# Verify build integrity
121+
mvn clean verify
122+
```
123+
124+
#### Development Builds (Skip Tests)
125+
```bash
126+
# Fast compilation without tests (development only)
127+
mvn clean compile -Dmaven.test.skip=true
128+
129+
# Fast package without tests (development only)
130+
mvn clean package -Dmaven.test.skip=true
131+
132+
# Fast install without tests (development only)
133+
mvn clean install -Dmaven.test.skip=true
134+
```
135+
136+
#### Profile-Specific Testing
137+
```bash
138+
# Run with specific Maven profile
139+
mvn clean test -P <profile-name>
140+
141+
# Example: development profile
142+
mvn clean test -P development
143+
```
144+
145+
### Test Coverage
146+
147+
The test suite verifies:
148+
- ✅ Jakarta EE 9+ API compatibility
149+
- ✅ Spring Boot 3.5 auto-configuration
150+
- ✅ JAXB XML marshalling/unmarshalling
151+
- ✅ UUID primary key generation and usage
152+
- ✅ Entity relationship mapping
153+
- ✅ Bean validation functionality
154+
- ✅ DTO record structure and ESPI business logic
155+
- ✅ Compilation integrity across all modules
156+
157+
### Test Reports
158+
159+
Test results are generated in:
160+
- `target/surefire-reports/` - Test execution reports
161+
- `target/site/jacoco/` - Code coverage reports (if jacoco plugin enabled)
162+
163+
For integration testing with external Green Button data, refer to the consumer applications that use this common module.

0 commit comments

Comments
 (0)