Selective Loading to speed up execution
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 234
- Forks
- 163
- Avg merge
- 13h 32m
- Merged PRs (30d)
- 25
Description
This issue came up on SO: https://stackoverflow.com/questions/49195224/testcasesource-attribute-reads-all-the-test-datas-of-existing-tests-even-if-we
If you run the console with a filter, the ideal result would be to only load those test that will be selected by the filter, avoiding running any TestCaseSource code for those that will not be selected. However, this is not possible in general because some filters may only be applied after the test has been loaded. We would have to analyze the filters to determine which ones may be applied before loading, using the elements available through reflection. For example, a class filter would be easy enough to do while a test filter that included the names of method arguments would not be.
For this issue, I suggest we do the low-hanging fruit first. We could use the test argument but limit it to values that specify namespace or class, not method name. The framework already supports the LOAD package setting, which will cause only those items in a list of names to be loaded in the first place.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the console filter handling and the existing LOAD package setting, then trace how TestCaseSource data is loaded. Limit preloading to filters that identify namespaces or classes, and verify that tests excluded by those filters never execute their TestCaseSource code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100