Skip to content

Conversation

@jpinkney-aws
Copy link
Contributor

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.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jpinkney-aws jpinkney-aws requested a review from a team as a code owner February 10, 2025 15:56
@Hweinstock
Copy link
Contributor

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?

@jpinkney-aws jpinkney-aws changed the title tests(amazonq): add skipped test report generator test(amazonq): add skipped test report generator Feb 10, 2025
@jpinkney-aws jpinkney-aws reopened this Feb 10, 2025
@jpinkney-aws
Copy link
Contributor Author

jpinkney-aws commented Feb 10, 2025

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]
Copy link
Contributor

@Hweinstock Hweinstock Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about something like

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.

@jpinkney-aws
Copy link
Contributor Author

Merging since this script is part of our post-release steps. It has no impact on any of the features

@jpinkney-aws jpinkney-aws merged commit 99eefe0 into aws:master Feb 13, 2025
10 of 17 checks passed
s7ab059789 pushed a commit to s7ab059789/aws-toolkit-vscode that referenced this pull request Feb 19, 2025
## 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.
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.

3 participants