TestIT Reports is a web application that collects and displays statistics from the TestIT test management system. It provides insights into test case creation, modification, and execution by different users.
- User Management: Create, update, and delete users with different roles (USER, ADMIN)
- Project Management: Add projects from TestIT, manage visibility, and track statistics
- Statistics Collection: Automatically collect statistics from TestIT API on a scheduled basis
- Statistics Visualization: View statistics for test cases and test runs by user and date
- API Integration: Seamless integration with TestIT API
- Authentication: Secure JWT-based authentication
- Test Point Tracking: Detailed tracking of individual test point results for accurate statistics
- Duplicate Prevention: Improved logic to prevent duplicate statistics when collecting data multiple times
- Historical Data: Maintain historical data for all test executions for comprehensive reporting
- Java 17 with Spring Boot 3.1.5
- Spring Security for authentication and authorization
- Spring Data JPA for database access
- PostgreSQL for data storage
- Flyway for database migrations
- JWT for authentication
- WebFlux for reactive API client
- React 18 with TypeScript
- Material-UI for UI components
- React Router for routing
- Axios for API requests
- Formik and Yup for form validation
- Chart.js for data visualization
- Users: Store user information and authentication details
- Projects: Store project information from TestIT
- User-Project Relationships: Track which users have access to which projects
- Test Case Statistics: Store statistics about test case creation and modification
- Test Run Statistics: Store statistics about test execution results
- Test Point Results: Store detailed information about individual test point executions
- Global Settings: Store application-wide settings
POST /api/auth/login: Login userPOST /api/auth/register: Register new user
GET /api/users/me: Get current userPUT /api/users/me: Update current userPUT /api/users/me/token: Update current user's TestIT tokenGET /api/users: Get all users (admin only)GET /api/users/{id}: Get user by ID (admin only)POST /api/users: Create user (admin only)PUT /api/users/{id}: Update user (admin only)DELETE /api/users/{id}: Delete user (admin only)
GET /api/projects: Get all projects visible to current userGET /api/projects/all: Get all projects assigned to current user (visible and hidden)GET /api/projects/{id}: Get project by IDPOST /api/projects/add: Add project from TestITPUT /api/projects/{id}/visibility: Update project visibility for current userDELETE /api/projects/{id}/remove: Remove project from current userPUT /api/projects/{id}/status: Update project status (admin only)DELETE /api/projects/{id}: Delete project (admin only)
GET /api/statistics/projects/{projectId}: Get statistics for a projectPOST /api/statistics/projects/{projectId}/collect: Manually collect statistics for a projectPOST /api/statistics/collect-all: Manually collect statistics for all projects (admin only)
GET /api/admin/settings: Get all global settingsGET /api/admin/settings/{key}: Get global setting by keyPUT /api/admin/settings/{key}: Update global settingPOST /api/admin/settings: Create or update global settingPUT /api/admin/settings/global-token: Update global TestIT tokenPUT /api/admin/settings/api-schedule: Update API schedule cron expressionPUT /api/admin/settings/api-base-url: Update API base URL
- Java 17 or higher
- PostgreSQL 12 or higher
- Maven 3.6 or higher
- Node.js 16 or higher
- npm 8 or higher
The application can be configured using the following properties in application.properties:
# Database Configuration
spring.datasource.url=jdbc:postgresql://localhost:5432/testit_reports
spring.datasource.username=postgres
spring.datasource.password=postgres
# JWT Configuration
jwt.secret=your-secret-key
jwt.expiration=86400000
# TestIT API Configuration
testit.api.base-url=https://your-testit-instance.com/api/v2
testit.api.scheduler.cron=0 0 1 * * ? # Run at 1:00 AM every day- Clone the repository
- Configure the database connection in
application.properties - Run the backend application using the provided script:
./run.shOr using Maven directly:
mvn spring-boot:run- Navigate to the frontend directory
- Install dependencies and start the development server:
cd frontend
npm install
npm startOr use the provided script:
cd frontend
./run-frontend.shYou can also run the entire application using Docker Compose:
./run-docker.sh- Register an admin user
- Login with the admin user
- Configure global settings (TestIT API URL, global token, etc.)
- Create regular users
- Add projects from TestIT
- View statistics for projects
src/main/java/com/testit/reports/
├── client/ # TestIT API client
├── controller/ # REST controllers
├── model/ # Entity classes
├── repository/ # Data access layer
├── security/ # Security configuration
├── service/ # Business logic
└── TestItReportsApplication.java
frontend/
├── public/ # Static files
└── src/
├── components/ # Reusable UI components
├── context/ # React context providers
├── hooks/ # Custom React hooks
├── pages/ # Page components
├── services/ # API services
└── utils/ # Utility functions
The application now tracks individual test point results in a dedicated table, providing more accurate and detailed statistics. This allows for:
- Precise counting of passed and failed tests
- Prevention of duplicate statistics when collecting data multiple times
- Better historical data for comprehensive reporting
- Statistics are now calculated directly from the test point results table
- Test point statuses are always updated when collecting statistics, ensuring the most recent data is used
- Improved handling of project deletion with proper cleanup of related data
- More accurate statistics display on project dashboards
- Better handling of date ranges for statistics filtering
- Improved performance for statistics calculations
This project is licensed under the MIT License - see the LICENSE file for details.