Skip to content

Add quiet mode to test suite and remove verbose package banners - #28

Closed
lwJi wants to merge 1 commit into
mainfrom
feature/quiet-mode-and-cleanup
Closed

Add quiet mode to test suite and remove verbose package banners#28
lwJi wants to merge 1 commit into
mainfrom
feature/quiet-mode-and-cleanup

Conversation

@lwJi

@lwJi lwJi commented Jan 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add --quiet/-q flag to run_tests.sh that shows only checkmark on success or failure messages on error
  • Add -quiet flag to AllTests.wl with the same behavior
  • Remove verbose package loading banners from all src/*.wl modules
  • Remove "Loading/completed" print statements from unit test files
  • Update documentation in AGENTS.md, CLAUDE.md, and README.md

Test plan

  • Run ./test/run_tests.sh to verify normal verbose mode still works
  • Run ./test/run_tests.sh --quiet to verify quiet mode shows only checkmark on success
  • Run wolframscript -script test/AllTests.wl for verbose output
  • Run wolframscript -script test/AllTests.wl -quiet for quiet output
  • Verify failure cases show appropriate error messages in quiet mode

- Add --quiet/-q flag to run_tests.sh that shows only checkmark on
  success or failure messages on error
- Add -quiet flag to AllTests.wl with same behavior
- Remove verbose package loading banners from all src/*.wl modules
- Remove "Loading/completed" print statements from unit test files
- Update documentation in AGENTS.md, CLAUDE.md, and README.md to
  reflect the new quiet mode options

The quiet mode is useful for CI environments and when running tests
repeatedly during development, reducing noise while still reporting
failures clearly.
@claude

claude Bot commented Jan 7, 2026

Copy link
Copy Markdown

Pull Request Review

Summary

This PR adds quiet mode functionality to the test suite and removes verbose package loading banners. The implementation is well-executed with good attention to detail. Overall, this is a solid contribution that improves the developer experience.


Strengths

1. Excellent Code Quality

  • Consistent implementation across both Bash and Wolfram Language
  • Clean separation of concerns with the QPrint conditional printing abstraction
  • Proper error handling and exit codes maintained in quiet mode

2. Good Design Decisions

  • QPrint function provides a clean abstraction for conditional output
  • $FailureMessages collection allows aggregating failures before printing
  • Quiet mode properly propagates through the call hierarchy
  • Unicode checkmark/cross provides clear visual feedback

3. Comprehensive Coverage

  • Removed verbose banners from all 8 source modules consistently
  • Cleaned up all 7 unit test files
  • Updated documentation in 3 locations
  • Both test runners support quiet mode

4. Documentation

  • Clear usage examples in updated docs
  • Helpful comments in the code
  • Good help text in run_tests.sh

Issues Found

1. Bug: Incomplete Failure Capture in run_tests.sh (MODERATE)

Location: test/run_tests.sh:224

The grep pattern only captures FAIL or FAILED, but misses ERROR, REGRESSION DETECTED, and SKIP warnings.

Recommendation: Use grep -E "(FAIL|FAILED|ERROR|REGRESSION)"


2. Code Smell: Print Suppression via Block (MINOR)

Location: test/AllTests.wl:42

Globally suppressing Print could hide unexpected errors from Get[file]. Since you removed the Loading/completed messages, this Block might be unnecessary.


3. Missing Edge Case: Unit Test Failures in Quiet Mode (MINOR)

Location: test/AllTests.wl:53-57

Unit test failures from TestReport are not captured or displayed in quiet mode. Consider adding AppendFailure for failed unit tests.


4. Shell Injection Validation Issue (LOW PRIORITY)

Location: test/AllTests.wl:75

The validation regex allows periods and slashes which could enable directory traversal. Risk is very low since input comes from test_cases.txt in the repo.


Minor Suggestions

5. Inconsistent Quiet Mode Flag

  • Bash: --quiet or -q
  • Wolfram: -quiet (single dash)

Worth documenting explicitly in help text.

6. Documentation: Consider Adding Example Output

Showing before/after output would be helpful for users.


Security Assessment

No security concerns. Changes are cosmetic with proper validation.


Test Coverage

Excellent coverage of quiet mode. Missing: Unit test for quiet mode with failing tests.


Overall Assessment

Rating: Approve with minor suggestions

This is a well-implemented feature. Issues found are minor and the PR can be merged as-is.

Priority Recommendations:

  1. Fix grep pattern to capture ERROR messages
  2. Add unit test failure capture in quiet mode
  3. Consider removing Block[{Print}]

Breaking Changes: None - fully backward compatible
Performance: Negligible impact

Great work! This will make CI/CD logs much cleaner.

@lwJi lwJi closed this Jan 8, 2026
@lwJi
lwJi deleted the feature/quiet-mode-and-cleanup branch January 9, 2026 04:48
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