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
{{ message }}
Repository navigation
Rename regression tests with descriptive file names #19105
(I vaguely remember there was a similar issue but could not find it..if it is a duplicate, please leave a pointer, thanks!)
There are currently a couple of tests named test-regress-* and many of them are referring to really old regressions in the v0.x repo. I think it's time to rename them with something more descriptive now.
BTW: I am not sure if they count as good first contributions, but this is what I would usually do to find out how to rename an existing test
Look for the test description in the top of the file, if it has one
Take a look at the history of the file (click the "history" button on the top right of the file's page in Github UI), and trace back to the earliest commit to find out what it is testing. Notice that there are a lot of test being moved from test/simple to test/parallel/test-sequential during 0e19476, in that case, search the test using "find file" in the commit prior to that, then look at the history in the original test again.
When you find the commit that created the file, look at the commit log for issue links to read about the context.
Optionally, look at the git blame of the test to find out more about the test.
Of course one can always just look at the code to guess what the test is doing, but I usually find discussions in issues and PRs more informative, and you are less likely to guess wrong with those context.
Unfortunately some (most?) of these originate from before we started writing metadata into the commit messages linking back to pull requests and issues.
Activity
BridgeAR commentedon Mar 3, 2018
+1 from me.
BridgeAR commentedon Mar 3, 2018
It is especially good to rename them with the appropriate subsystem. It is much easier to run all tests from one subsystem if the names are right.
mcollina commentedon Mar 3, 2018
+1
joyeecheung commentedon Mar 3, 2018
BTW: I am not sure if they count as good first contributions, but this is what I would usually do to find out how to rename an existing test
test/simpletotest/parallel/test-sequentialduring 0e19476, in that case, search the test using "find file" in the commit prior to that, then look at the history in the original test again.Of course one can always just look at the code to guess what the test is doing, but I usually find discussions in issues and PRs more informative, and you are less likely to guess wrong with those context.
richardlau commentedon Mar 3, 2018
#17948?
richardlau commentedon Mar 3, 2018
Also can see if the matching issue/pull request in the archived v0.x repository looks relevant.
e.g., test/sequential/test-regress-GH-1697.js is testing nodejs/node-v0.x-archive#1697.
Unfortunately some (most?) of these originate from before we started writing metadata into the commit messages linking back to pull requests and issues.
juggernaut451 commentedon Mar 5, 2018
@joyeecheung working on it
tniessen commentedon Mar 5, 2018
@joyeecheung I don't remember an issue, but there was #17948 with a similar intention.
Edit: Oops, missed @richardlau's #19105 (comment).
78 remaining items
test: name test files appropriately
test: use descriptive names for regression tests
test: rename test-regress-GH-1726
test: rename test-regress-GH-1697
test: rename test-regress-GH-4015
test: rename test-regress-GH-4027
test: rename tests to remove "regress" keyword
test: address nits and rename the corresponding fixture
test: rename test-regress-GH-784.js
test: rename test-regress-GH-877.js
test: name test files appropriately
test: rename regression tests file names
test: rename regression tests more expressively
test: rename regression tests file names