A modern web application for visualizing and analyzing Jest test results. GoJest provides an intuitive interface to upload, view, and filter test summary JSON files with detailed failure analysis and interactive filtering capabilities.
- File Upload: Drag-and-drop or click-to-upload Jest test summary JSON files
- Interactive Dashboard: Beautiful, responsive UI with real-time statistics
- Advanced Filtering: Filter tests by status (passed, failed, pending) and assertions
- Detailed Failure Analysis: Modal views with comprehensive failure details and stack traces
- Go 1.22.4 or later
- Modern web browser with JavaScript enabled
-
Clone the repository
git clone https://github.com/zYasser/GoJest.git cd GoJest -
Install dependencies
go mod tidy
-
Build the application
go build -o gojest.exe . -
Access the application Open your browser and navigate to
http://localhost:8080(or your custom port)
GoJest/
├── main.go # Main application entry point
├── go.mod # Go module dependencies
├── internal/
│ └── summary/
│ ├── model_summary.go # Data models for test results
│ └── test_summary_handler.go # HTTP handlers and business logic
├── templates/
│ ├── index.html # File upload page
│ └── test_summary.html # Test results dashboard
├── test/
│ └── test.json # Sample Jest test results
└── README.md # This file
-
Generate Jest Test Summary Run your Jest tests with the
--jsonflag and output to a file:npm test -- --json --outputFile=test-results.json -
Upload to GoJest
- Navigate to the home page
- Drag and drop your JSON file or click to select
- The application will automatically process and display results
- Overview Statistics: See total passed, failed, pending tests, and test suites
- Test Results List: Browse individual test results with detailed information
- Filter Options:
- Show only failed tests
- Show only failed assertions
- Show only passed tests
- Show only pending tests
- Assertion Details: Expand individual test assertions with filtering capabilities
- Failure Analysis: Click on failed assertions to view detailed error information
GET /- File upload pagePOST /upload-test-summary- Upload and process test summary JSONGET /summary- View test results dashboardGET /summary?onlyFailedTests=true- Filtered results (supports multiple filters)
GoJest is designed to work with Jest test summary JSON output. The application expects JSON files with the following structure:
{
"numFailedTestSuites": 4,
"numFailedTests": 2,
"numPassedTestSuites": 5,
"numPassedTests": 208,
"numPendingTestSuites": 0,
"numPendingTests": 0,
"numRuntimeErrorTestSuites": 3,
"numTodoTests": 0,
"numTotalTestSuites": 9,
"testResults": [...]
}- Backend: Go 1.22.4
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- Styling: Tailwind CSS
- Interactions: HTMX
- Templates: Go HTML templates
# Install Air for hot reloading (optional)
go install github.com/cosmtrek/air@latest
# Run with hot reloading
air# Build the application
go build -o gojest main.go
# Run the binary
./gojestThe application supports flexible port configuration:
gojest- Run on default port 8080gojest -port 3000- Run on custom portgojest -help- Show help informationgojest -version- Show version information
PORT=3000 gojest- Use environment variable for port
- Command line flag (
-port) - Environment variable (
PORT) - Default port (8080)