-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
[Testing] continuous run integration issues #210848
Comments
Autorun is a modality of a profile, it's not its own type of profile. I would recommend letting the user configure their mode/trigger under the "configure test profile" action.
That's present if there are multiple available continuous runs. I could make a change to allow passing a profile and/or TestItem to this command |
@connor4312, thanks for the reply.
To ensure I fully understand your suggestion, are you advising against creating separate Additionally, I am curious why "coverage" isn't treated as just another "modality" like
That would be great. 👍 |
@connor4312, notice a new issue with autoRun, adding to the original post:
thoughts? |
@connor4312, I'm encountering another issue related to the display of the continuous run button at the test item level, which might be connected to #178973: In our configuration, initiating auto-run for each test item isn't practical. Ideally, I'd like to disable this for all items except possibly the root item. Initially, I assumed these settings were driven by runTag, similar to other TestItem buttons, so I attempted to create a new auto-run profile with a different runTag. Unfortunately, this method was ineffective as the buttons were automatically applied to all items once any auto-run profile was created. This underscores the need for more granular control. Moreover, I'm uncertain if using a profile tag to manage the TestItem's continuous buttons is advisable, particularly since you've indicated that auto-run is not a separate profile but rather a modality of an existing profile. Under this assumption, we would have a single run profile marked continuous=true that is applicable to all test items via matching tags. Therefore, it seems we might need a different mechanism to specify continuous run eligibility for each TestItem...? I've added this issue to the original post above (4). As the issue list grows, I'm starting to worry if I have misunderstood the continuous run design. Your insights would be highly valuable and greatly appreciated. |
@connor4312, is there any traction on passing a profile and/or TestItem to the 'testing.startContinuousRun' command? If not, are you open for a PR? |
Yes, exactly. I'm curious whether the two modes of auto-run can be served by a configuration property that would let the user pick they want in user/workspace settings.
Technically someone could debug with coverage (in some systems) but these are rather distinct actions a user tends to take. Most editors (e.g IntelliJ, Visual Studio, Eclipse) offer these as distinct actions, so that's the pattern I followed here. I think XCode is the only one that allows enabling coverage in arbitrary configurations. Though technically any test run type can emit coverage information in VS Code, we don't enforce either way, so an extension could have some user configuration to request this.
I will fix this.
I think that's covered by #228978 and it should now work for you since the October release. Please let me know if not.
Will add that today/tomorrow |
Commands are in the next Insiders, example usage: vscode.commands.registerCommand('test-provider-sample.startCR', () => {
const testItem = getOrCreateFile(ctrl, vscode.window.activeTextEditor!.document.uri).file;
vscode.commands.executeCommand('vscode.startContinuousTestRun', runProfile, [testItem]);
});
vscode.commands.registerCommand('test-provider-sample.stopCR', () => {
const testItem = getOrCreateFile(ctrl, vscode.window.activeTextEditor!.document.uri).file;
vscode.commands.executeCommand('vscode.stopContinuousTestRun', [testItem]);
}); |
(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:To support these, we added two new run profiles using
vscode.TestRunProfileKind.Run
withsupportsContinuousRun
set to true. TheonSave
profile also includes aconfigureHandler
to let users choose file types. This setup, however, has resulted in some unexpected behaviors: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.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?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.
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!
The text was updated successfully, but these errors were encountered: