Skip to content

Macro code coverage reporting#551

Merged
Blacksmoke16 merged 13 commits intomasterfrom
macro-code-coverage
Jul 27, 2025
Merged

Macro code coverage reporting#551
Blacksmoke16 merged 13 commits intomasterfrom
macro-code-coverage

Conversation

@Blacksmoke16
Copy link
Member

Context

Depends on and integrates crystal-lang/crystal#15738 into the spec component, test.sh script, and CI flow. A macro level code coverage report will now be generated for each component and each compile time failure test path.

Also does a bit of a pass on spec component to make it a bit more clear.

Changelog

  • Breaking: Remove codegen parameter from ASPEC::Methods.assert_error and ASPEC::Methods.assert_success
  • Breaking: Remove ASPEC::Methods.assert_error in favor of ASPEC::Methods.assert_compile_time_error and ASPEC::Methods.assert_runtime_error
  • Breaking: Remove ASPEC::Methods.assert_success in favor of ASPEC::Methods.assert_compiles and ASPEC::Methods.assert_executes
  • Generate macro code coverage reports for each component and compile time failure test path

Before merging, remember to add the athena-framework/athena prefix to the PR number in the PR title

@codecov
Copy link

codecov bot commented Jun 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Flag Coverage Δ
unit 96.96% <7.72%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
clock 100.00% <ø> (ø)
console 97.15% <100.00%> (+0.01%) ⬆️
dependency_injection 93.13% <100.00%> (-4.52%) ⬇️
dotenv 98.38% <ø> (-0.20%) ⬇️
event_dispatcher 95.65% <100.00%> (+0.50%) ⬆️
framework 97.99% <100.00%> (-0.07%) ⬇️
image_size 95.94% <ø> (ø)
mercure 95.02% <ø> (ø)
mime 99.35% <ø> (-0.05%) ⬇️
negotiation 97.94% <ø> (ø)
routing 98.35% <100.00%> (-0.01%) ⬇️
serializer 95.80% <ø> (-0.68%) ⬇️
spec 93.86% <100.00%> (-2.83%) ⬇️
validator 94.69% <ø> (-0.03%) ⬇️

📢 Thoughts on this report? Let us know!

@Blacksmoke16 Blacksmoke16 marked this pull request as ready for review July 26, 2025 18:06
@Blacksmoke16 Blacksmoke16 merged commit 423e77a into master Jul 27, 2025
13 of 14 checks passed
@Blacksmoke16 Blacksmoke16 deleted the macro-code-coverage branch July 27, 2025 01:47
PallasAthenaie pushed a commit to athena-framework/console that referenced this pull request Jul 27, 2025
PallasAthenaie pushed a commit to athena-framework/dependency-injection that referenced this pull request Jul 27, 2025
PallasAthenaie pushed a commit to athena-framework/event-dispatcher that referenced this pull request Jul 27, 2025
PallasAthenaie pushed a commit to athena-framework/framework that referenced this pull request Jul 27, 2025
PallasAthenaie pushed a commit to athena-framework/routing that referenced this pull request Jul 27, 2025
PallasAthenaie pushed a commit to athena-framework/spec that referenced this pull request Jul 27, 2025
Blacksmoke16 added a commit to athena-framework/dependency-injection that referenced this pull request Dec 26, 2025
Blacksmoke16 added a commit that referenced this pull request Dec 29, 2025
…es` usages (#642)

## Context

#551 made it so that only
`assert_compile_time_error` generates a macro code coverage report.
`assert_compiles` should also as it can be used to test success paths in
isolation, which otherwise would have some lines/code paths go
unreported.

## Changelog

- Generate macro code coverage report for
`ASPEC::Methods.assert_compiles` usages
Blacksmoke16 added a commit to athena-framework/spec that referenced this pull request Dec 29, 2025
…es` usages (athena-framework/athena#642)

## Context

athena-framework/athena#551 made it so that only
`assert_compile_time_error` generates a macro code coverage report.
`assert_compiles` should also as it can be used to test success paths in
isolation, which otherwise would have some lines/code paths go
unreported.

## Changelog

- Generate macro code coverage report for
`ASPEC::Methods.assert_compiles` usages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant