Skip to content

feat: add integration testing with reporters-validator - #31

Merged
gibiw merged 3 commits into
masterfrom
feat/integration-tests
Apr 6, 2026
Merged

feat: add integration testing with reporters-validator#31
gibiw merged 3 commits into
masterfrom
feat/integration-tests

Conversation

@gibiw

@gibiw gibiw commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add integration test infrastructure using reporters-validator to validate JSON reports against expected YAML files and JSON Schema from specs
  • Replace old example/ directory with comprehensive examples/ covering all reporter features: pass/fail/error/skip, QaseId, QaseIds, Title, Suite, Field, Parameter, Steps
  • Fix duplicate sendResults() call in Reporter that caused doubled stats in run.json

New files

  • examples/ — 15 test examples across 4 test classes (AttributeTest, ParameterTest, StepTest, CombinedTest)
  • expected/codeception-examples.yaml — expected test results for validation
  • scripts/clean_expected.py — script to clean dynamic fields from expected YAML
  • .github/workflows/integration-tests.yml — CI workflow for integration testing

Bug fix

  • src/Reporter.php — removed redundant sendResults() call before completeRun(), since completeRun() already calls sendResults() internally via FileReporter

Test plan

  • Run examples locally with QASE_MODE=report — 15 results generated
  • Run reporters-validator validate — "All validations passed"
  • Verify CI workflow passes on GitHub Actions

gibiw added 3 commits April 6, 2026 16:13
completeRun() already calls sendResults() internally.
Calling both caused doubled stats in run.json report.
Add test examples covering all reporter features:
- pass/fail/error/skip statuses
- QaseId, QaseIds attributes
- Title, Suite, Field, Parameter attributes
- Steps via Asserts module
- Combined attributes

Add CI workflow, expected YAML, and cleanup script.
Replaced by examples/ with comprehensive test coverage for
integration testing with reporters-validator.
@gibiw
gibiw merged commit 63a3c5a into master Apr 6, 2026
1 check passed
@gibiw
gibiw deleted the feat/integration-tests branch April 6, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant