nodejs / nodejs/node

support predictive test selection with test runner

Open
#54,173 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request never-stale stale test_runner
Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

What is the problem this feature will solve?

Very large projects that have a lot of tests take a very long time to run the full tests suite.
Running all of the tests can be avoided, by doing Predictive Test Selection to select only a subset of tests to run.
This enables speeding up the Continuous Integration turnaround time for users using Test Runner.

What is the feature you are proposing to solve the problem?

Some interface, whether programmatic API or CLI, to do predictive test selection.
If we look at Jest as an example (of a popular testing framework), they have:
--onlyChanged and --changedSince, which analyze the (transitive) source code dependencies of the tests and of the changes in Git/Hg, to select only tests that have a source dependency on the changes.

What alternatives have you considered?

Not sure we'll want to lock in users to Git/Hg, some may want to use a different version control solution, so perhaps the integration with the specific source control can be left up to the community. What Node needs IMO is some interface for such library author to use.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation files or tests are named. Start by reviewing Node's Test Runner API and CLI entry points, then compare the proposed interface with Jest's --onlyChanged and --changedSince behavior; done means an agreed design for predictive selection and its source-control integration boundary.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, cli, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.