Create test mapping dynamically
Generate test mapping for test_file_finder dynamically, part of #222369 (closed).
After spiking a few approaches listed below, the chosen approach is to use crystalball with coverage. This is implemented in !44968 (merged)
There are a few options to do this:
-
rotoscope- spike !44886 (closed) -
TracePoint-rotoscopeuses tracepoint C API internally. -
Coverage-crystalballhas a Coverage strategy -
crystalball- spike: !44968 (merged)
The mapping should list all the test files for each source file in the codebase, to be used with test_file_finder gem:
{
"app/models/project.rb": ["spec/models/project_spec.rb", ...],
"app/models/project_feature.rb": ["spec/models/project_spec.rb", ...]
}
Edited by Albert Salim