Skip to content

[Testing] continuous run integration issues #210848

Open

Description

(cc @connor4312)

In vscode-jest, we have started integrating the autoRun feature with VSCode's Continuous Testing API and have encountered a few issues that I hope you can help us resolve.

We offer two autoRun modes:

  • auto run (watch)
  • auto run (onSave) - This mode allows users to customize triggers, targeting either only test files or both test and source files.

To support these, we added two new run profiles using vscode.TestRunProfileKind.Run with supportsContinuousRun set to true. The onSave profile also includes a configureHandler to let users choose file types. This setup, however, has resulted in some unexpected behaviors:

  1. All three profiles appear in the dropdown menu of the top "Run" button, which is confusing as these additional profiles should be exclusive to the autoRun category and should not be visible under the regular run options.

    Screenshot of the dropdown menu

  2. Unlike the "Run" dropdown, the autoRun dropdown does not offer a menu for configuration or selecting a default profile, which seems inconsistent. Shouldn't the dropdown menus be consistent across all test action buttons?

  3. In a multi-root project with multiple TestControllers and autoRun profiles, there is currently no method to view the status of an individual autoRun profile or to stop one specifically. The autoRun status button attempts to stop all autoRuns collectively and indicates a 'running' status if any of the profiles are active.

  4. Lacking the ability to enable/disable continuous button on TestItem level. Not all test items can initiate auto-run.

Additionally, I have a question: Is there a way to programmatically trigger the autoRun with a specific profile? I tried using 'testing.startContinuousRun' and passing a profile to it, but it still pops up the profile chooser instead of executing the autoRun.

Any insights or suggestions you could provide would be greatly appreciated. Please let me know if there are adjustments or experiments you'd recommend to better integrate these features. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalitytestingBuilt-in testing support

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions