Show relative paths in acceptance test output#3170
Show relative paths in acceptance test output#3170simonbaird wants to merge 1 commit intoconforma:mainfrom
Conversation
Just a little cosmetic tweak (which I'm not planning to make a Jira for). Strip the working directory prefix from test file paths to display cleaner relative paths like 'features/task_validate_image.feature' instead of full absolute paths like '/home/sbaird/path/to/conforma/cli/features/task_validate_image.feature' Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review Summary by QodoShow relative paths in acceptance test output
WalkthroughsDescription• Strip working directory prefix from test file paths • Display cleaner relative paths in acceptance test output • Improve readability of test result messages Diagramflowchart LR
A["Scenario.Uri<br/>absolute path"] -- "filepath.Rel<br/>with cwd" --> B["uri variable<br/>relative path"]
B -- "used in output" --> C["Test result message<br/>cleaner display"]
File Changes1. acceptance/acceptance_test.go
|
Code Review by Qodo
1. Summary path not relative
|
📝 WalkthroughWalkthroughThe acceptance test hook is modified to compute and display relative file paths instead of absolute paths in test result messages for both FAILED and PASSED scenarios, with fallback to the original URI if path computation fails. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.5.0)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@acceptance/acceptance_test.go`:
- Around line 141-152: Normalize scenario.Uri into the local uri variable before
logging and ensure that same normalized uri is used when recording failures into
tracker; replace uses of scenario.Uri (where tracker is updated after
scenarioErr) with the normalized uri and move the normalization block so it runs
prior to both the fmt.Fprintf logging and any tracker.Record/append operations
that store the path.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fe14a6c5-2c88-4b28-a75f-06225bd8fe1a
📒 Files selected for processing (1)
acceptance/acceptance_test.go
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Just a little cosmetic tweak (which I'm not planning to make a Jira for).
Strip the working directory prefix from test file paths to display cleaner relative paths like 'features/task_validate_image.feature' instead of full absolute paths like
'/home/sbaird/path/to/conforma/cli/features/task_validate_image.feature'