-
Notifications
You must be signed in to change notification settings - Fork 744
docs(amazonq): Documentation for setting up and running new UI E2E Tests w/ vscode-extension-tester #7750
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
docs(amazonq): Documentation for setting up and running new UI E2E Tests w/ vscode-extension-tester #7750
Conversation
|
LGTM |
Hweinstock
left a comment
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.
Great start on the docs! Very clear instructions. Left a few small comments.
docs/TESTPLAN.md
Outdated
| - Do not use mocks. | ||
| - E2E Tests: **slow** tests | ||
| - Live in `src/testE2E` | ||
| - Live in `packages/amazonq/test/e2e_new` |
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.
wow these docs are outdated, it doesn't even reference the separate packages.
Also, I think there might be a few tests in the old directory that are still active. For example https://github.com/aws/aws-toolkit-vscode/tree/master/packages/amazonq/test/e2e/lsp, won't be replaced with UI tests AFAIK.
docs/TESTPLAN.md
Outdated
| - Live in `packages/amazonq/test/e2e_new` | ||
| - These tests are heavier than Integration tests. | ||
| - Some E2E tests have a more complicated architecture, described in [TEST_E2E](./TEST_E2E.md) | ||
| - Some E2E tests have a more complicated architecture, described in [UI_E2E_Test](./UI_E2E_Test.md) |
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.
do we want to distinguish between e2e and e2e ui tests? We may want to write e2e tests for things like the language server, but not rely on UI tests.
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.
Good point
docs/UI_E2E_Test.md
Outdated
| - Compiles test files with `npm run testCompile` | ||
| - Runs tests matching `packages/amazonq/dist/test/e2e_new/amazonq/tests/*.js` | ||
|
|
||
| #### Directory Structure |
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.
I would honestly remove this because its tedious to update as the code evolves.
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.
Sounds good, thanks for pointing it out
| 3. Use helpers from `../helpers/` | ||
| 4. Follow existing patterns for setup/cleanup | ||
|
|
||
| #### Example Test Structure |
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.
nice, this is super helpful.
| @@ -0,0 +1,134 @@ | |||
| ## UI Testing | |||
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.
is it worth mentioning the manual auth details?
docs/UI_E2E_Test.md
Outdated
|
|
||
| #### Authentication | ||
|
|
||
| Currently, authentication is not configured to be automatically logged into AmazonQ due to issues with Authentication credentials and the VET setup running in a new VSCode instance through a packaged VSIX. To bypass this for now (as of July 24th, 2025), you must click the approve/open button that redirects you to a browser in order for tests to be run in an authenticated environment at the start of a new. |
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.
Can we make this more concise? Maybe just drop due to issues with Authentication credentials and the VET setup running in a new VSCode instance through a packaged VSIX?
|
|
||
| 1. Create test files in `packages/amazonq/test/e2e_new/amazonq/tests/` | ||
| 2. Import utilities from `../utils/` | ||
| 3. Use helpers from `../helpers/` |
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.
Mention about add helpers to .... also. Tell them how to extend the package in future.
|
|
||
| ### Individual Commands | ||
|
|
||
| #### `test:ui:prepare` |
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.
Can we also mention why would we need this?
| npm run test:ui:prepare | ||
| ``` | ||
|
|
||
| #### `test:ui:install` |
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.
Same for this too.
|
|
||
| Note: All of these commands must be run at the root level aws-toolkit-vscode directory. | ||
|
|
||
| ### Individual Commands |
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.
need some context regarding why are these commands here in the first place.
|
/retryBuilds |
…sts w/ vscode-extension-tester (aws#7750) ## Problem The AWS Toolkit repository lacks documentation for the UI testing commands (test:ui:prepare, test:ui:install, test:ui:run, test:ui) and the new e2e_new testing suite. Contributors need clear guidance on how to run UI tests and understand the testing framework structure. ## Solution Added comprehensive UI testing documentation covering: - Command usage and workflow for the complete UI test suite - Directory structure and organization of the e2e_new testing framework - Guidelines for writing new UI tests with example code - Troubleshooting common issues and debug techniques - Prerequisites and setup requirements --- - 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
The AWS Toolkit repository lacks documentation for the UI testing commands (test:ui:prepare, test:ui:install, test:ui:run, test:ui) and the new e2e_new testing suite. Contributors need clear guidance on how to run UI tests and understand the testing framework structure.
Solution
Added comprehensive UI testing documentation covering:
Command usage and workflow for the complete UI test suite
Directory structure and organization of the e2e_new testing framework
Guidelines for writing new UI tests with example code
Troubleshooting common issues and debug techniques
Prerequisites and setup requirements
feature/xbranches will not be squash-merged at release time.