Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ go.work.sum

# Artifacts
artifacts/
tests/recording/artifacts/
tests/reporting/artifacts/
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,29 @@ go build -o acousticalc ./cmd/acousticalc

### Running Tests
```bash
# Run all tests
go test ./...
# Run fast unit and integration tests
go test ./tests/unit ./tests/integration

# Run tests with coverage
go test -cover ./...
# Run cross-platform end-to-end CLI tests with terminal recordings
go test ./tests/e2e

# View generated recordings and aggregated reports
ls tests/recording/artifacts
cat tests/reporting/artifacts/e2e_report.json

The Story 0.2.3 infrastructure stores per-run asciinema recordings under
`tests/recording/artifacts/` and persists consolidated cross-platform test
reports to `tests/reporting/artifacts/e2e_report.json` so GitHub Actions can
publish demo-ready evidence alongside the test matrix results.

# Enable visual evidence tests (requires CGO + desktop dependencies)
go test -tags visualtests ./pkg/...

# Generate coverage for unit tests
go test -cover ./tests/unit

# Run tests with coverage report
go test -coverprofile=coverage.out && go tool cover -html=coverage.out
# Generate coverage report for unit tests
go test -coverprofile=coverage.out ./tests/unit && go tool cover -html=coverage.out
```

## 📋 Roadmap
Expand Down
168 changes: 0 additions & 168 deletions cmd/acousticalc/main_integration_test.go

This file was deleted.

2 changes: 2 additions & 0 deletions pkg/calculator/calculator_visual_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build visualtests

package calculator

import (
Expand Down
35 changes: 35 additions & 0 deletions tests/cross_platform/platform.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package cross_platform

import (
"runtime"
"strings"
)

// Platform returns the canonical name of the platform the tests are running on.
//
// The Story 0.2.3 acceptance criteria requires cross-platform validation and
// reporting. Centralising the platform string ensures consistent labelling
// across the E2E framework, recorder, and reporters.
func Platform() string {
return runtime.GOOS
}

// NormalizeNewlines converts Windows style CRLF sequences into the newline
// representation used on Unix-like systems. This allows assertions written in
// a platform-agnostic fashion to succeed regardless of the host operating
// system the GitHub Actions job is running on.
func NormalizeNewlines(s string) string {
if runtime.GOOS != "windows" {
return s
}
return strings.ReplaceAll(s, "\r\n", "\n")
}

// PathWithExecutableSuffix appends the Windows executable suffix when running
// on Windows. Other platforms return the path unchanged.
func PathWithExecutableSuffix(path string) string {
if runtime.GOOS == "windows" {
return path + ".exe"
}
return path
}
Loading
Loading