Skip to content

Conversation

@CalvinAllen
Copy link
Contributor

Summary

Significantly improve test coverage with unit tests and E2E integration tests.

Unit Tests (21 tests, was 2)

Category Tests
Shorthand parsing 3
Full task parsing 5
Steps parsing 3
Parallel parsing 2
Task names 2
Get task 2
Mixed/complex 2
Edge cases 2

Bug fix: Added #[serde(deny_unknown_fields)] to StepDef to fix parallel block parsing.

E2E Integration Tests

New workflow: integration-test.yml

  • Runs on Linux, macOS, Windows
  • Builds release binary
  • Tests against fixture files

Test Fixtures:

  • tests/fixtures/basic/ - shorthand, full tasks, env vars
  • tests/fixtures/steps/ - sequential, delegation, parallel
  • tests/fixtures/nested/ - subdirectory task delegation

Tests:

  • --help, --version, --list
  • Shorthand task execution
  • Full task execution
  • Environment variables
  • Sequential steps
  • Task delegation in steps
  • Parallel execution
  • Nested task files
  • Error case (nonexistent task)

Test Plan

  • cargo test passes locally (21 tests)
  • cargo clippy passes
  • Manual testing of fixtures passes
  • Integration test workflow runs on all platforms

Unit Tests:
- Add 21 tests for config parsing (was 2)
- Test shorthand and full task parsing
- Test env, dir, steps, parallel parsing
- Test task delegation
- Test task_names() and get_task()
- Test edge cases (colons in names, empty env)
- Fix parallel parsing by adding deny_unknown_fields to StepDef

E2E Integration Tests:
- Add integration-test.yml workflow
- Test on Linux, macOS, Windows
- Add test fixtures:
  - basic: shorthand, full tasks, env vars
  - steps: sequential, delegation, parallel
  - nested: subdirectory task delegation
- Test --help, --version, --list
- Test task execution with output verification
- Test error cases (nonexistent task)
@CalvinAllen CalvinAllen merged commit f8f18c6 into main Jan 9, 2026
16 checks passed
@CalvinAllen CalvinAllen deleted the test/coverage/unit-and-e2e branch January 9, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants