You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a Deno project and using BDD for testing. The project is structured with each feature and its slices in separate folders, each containing their own code and test cases.
The Issue
I recently updated a feature called "User Profile Management", which is a dependency for another feature, "Authentication". When I run deno test, it executes all the tests in the project, including unrelated ones like "Payment Processing", which takes a lot of time.
What I'm Looking For:
I want to run only the test cases for the User Profile Management feature and its dependents (like Authentication) after making changes. This way, I can save time and focus on relevant tests.
Attempts So Far:
Running Specific Tests: I tried deno test src/user_profile/, but it doesn't include tests from Authentication.
Manual Selection: Specifying multiple test files manually isn't practical as dependencies grow.
After changing profile.ts, I want to run profile_test.ts and auth_test.ts.
Avoid running unrelated tests like payment_test.ts.
Why It Matters
Efficiency: Saves time during development.
Focus: Helps concentrate on affected code areas.
Scalability: Important as the project grows.
Proposed Enhancements
Auto-Run Affected Tests Based on Changes:
Introduce a flag (e.g., --affected) that detects code modifications and automatically executes only the relevant tests, including those from dependent features. This would streamline the workflow by saving time and focusing on necessary tests.
CLI Integration for Including Dependent Tests:
Enhance the deno test command with a configuration option (e.g., --include-dependencies) to run tests for a modified feature along with its dependencies. This would improve testing efficiency by ensuring related tests are executed without manual selection.
The text was updated successfully, but these errors were encountered:
abhayraj-yadav-st4
changed the title
Running Only Modified Feature Tests and Their Dependencies in Deno with BDD
Running Only Modified Feature Tests and Their Dependencies
Nov 19, 2024
Hello everyone,
I'm working on a Deno project and using BDD for testing. The project is structured with each feature and its slices in separate folders, each containing their own code and test cases.
The Issue
I recently updated a feature called "User Profile Management", which is a dependency for another feature, "Authentication". When I run
deno test
, it executes all the tests in the project, including unrelated ones like "Payment Processing", which takes a lot of time.What I'm Looking For:
I want to run only the test cases for the User Profile Management feature and its dependents (like Authentication) after making changes. This way, I can save time and focus on relevant tests.
Attempts So Far:
deno test src/user_profile/
, but it doesn't include tests from Authentication.Project Structure Example:
Goal
profile.ts
, I want to runprofile_test.ts
andauth_test.ts
.payment_test.ts
.Why It Matters
Proposed Enhancements
Auto-Run Affected Tests Based on Changes:
--affected
) that detects code modifications and automatically executes only the relevant tests, including those from dependent features. This would streamline the workflow by saving time and focusing on necessary tests.CLI Integration for Including Dependent Tests:
deno test
command with a configuration option (e.g.,--include-dependencies
) to run tests for a modified feature along with its dependencies. This would improve testing efficiency by ensuring related tests are executed without manual selection.The text was updated successfully, but these errors were encountered: