Skip to content
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

Run All Related Tests from Context Menu #50

Open
Christopher-C-Robinson opened this issue Nov 20, 2024 · 0 comments
Open

Run All Related Tests from Context Menu #50

Christopher-C-Robinson opened this issue Nov 20, 2024 · 0 comments

Comments

@Christopher-C-Robinson
Copy link

Enhancement Request: Run All Related Tests from Context Menu

Description

Currently, the extension allows users to right-click within a test or class and run individual tests. However, when right-clicking on a method or class, the extension responds that there are no tests in the file, even though the method or class may be used by multiple tests across the project.

The desired enhancement is to allow users to right-click on a method or class and select to run all tests in the project that reference that method or class. This will provide greater flexibility and efficiency when testing methods that are shared across multiple test files.

Expected Behavior

  • Right-clicking on a method: Runs all tests across the project that reference the method.
  • Right-clicking on a class: Runs all tests across the project that reference any method within the class.

Steps to Reproduce Current Behavior

  1. Open a TypeScript or JavaScript file with a class that contains methods referenced by multiple test files.
  2. Right-click on the method or class and select TestCafe: Run Test(s) in....
  3. Observe that the extension says there are no tests in the file, rather than running all tests that reference the method or class.

Suggested Solution

Enhance the context menu functionality to identify all tests in the project that reference the selected method or class and run them accordingly.

Benefits

  • Improved Developer Workflow: Saves time by running all relevant tests for a method or class without needing to locate and trigger individual tests manually.
  • Enhanced Test Coverage Verification: Allows developers to ensure that all relevant tests for a method or class have been run when making changes.

Acceptance Criteria

  • Right-clicking a method should provide an option to run all tests across the project that reference it.
  • Right-clicking a class should provide an option to run all tests across the project that reference any of its methods.
  • Tests are correctly identified and run without false positives or negatives.

Additional Context

This enhancement will be especially useful for projects with shared utility classes or commonly reused methods, improving both productivity and confidence in code quality.

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

No branches or pull requests

1 participant