-
Notifications
You must be signed in to change notification settings - Fork 749
test(amazonq): add skipped test report generator #6540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I can't remember if there was more to the discussion last week, but do we want to run this as part of any existing workflow? Is the expected use case to be during pre-release testing as a heads-up to partner teams? |
|
I believe it was going to be added in our post-release steps to update the release thread with skipped tests |
| function findSkippedTests(directoryPath: string): SkippedTest[] { | ||
| const skippedTests: SkippedTest[] = [] | ||
|
|
||
| const skipPatterns = [/\b(describe|it)\.skip\(['"`](.*?)['"`]/g] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about something like
aws-toolkit-vscode/packages/core/src/test/codecatalyst/uriHandlers.test.ts
Lines 122 to 137 in 29c4048
| it('checks that the environment exists', async function () { | |
| // This test is not accurate anymore because dependencies are checked prior to API calls | |
| // Unit tests are ran without other extensions activated, so this fails on the SSH extension check | |
| this.skip() | |
| const getDevEnvStub = sinon.stub().rejects(new Error('No dev environment found')) | |
| client.getDevEnvironment = getDevEnvStub | |
| const errorMessage = getTestWindow() | |
| .waitForMessage(/Failed to handle/) | |
| .then((message) => { | |
| message.assertSeverity(SeverityLevel.Error) | |
| }) | |
| await handler.handleUri(createConnectUri(devenvId)) | |
| await errorMessage | |
| }) |
I can't think of a good solution here since it can be conditionally skipped or always skipped via this.skip. Do you think its worth including these as a separate "conditionally skipped"?
Either approach seems fine, but could be worth documenting that in this script.
|
Merging since this script is part of our post-release steps. It has no impact on any of the features |
## Problem
This scripts creates a report of skipped tests in the amazon q folder
## Solution
Run: `npm run skippedTestReport`
```
Skipped Tests Report
Total skipped tests: 5
Files affected: 4
===================
📁 packages/amazonq/test/e2e/amazonq/featureDev.test.ts
Skipped tests:
• /dev {msg} entry (line 165)
• file-level accepts (line 220)
📁 packages/amazonq/test/e2e/amazonq/template.test.ts
Skipped tests:
• Amazon Q Test Template (line 16)
📁 packages/amazonq/test/e2e/amazonq/testGen.test.ts
Skipped tests:
• ${language} file (line 168)
📁 packages/amazonq/test/e2e/amazonq/transformByQ.test.ts
Skipped tests:
• Running a Java upgrade from start to finish (line 345)
```
---
- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
Problem
This scripts creates a report of skipped tests in the amazon q folder
Solution
Run:
npm run skippedTestReportfeature/xbranches will not be squash-merged at release time.