Skip to content

Comment on Ask HN: How do you discover features in unknown code bases?

Comments

Read the tests.

First you may need to find the appropriate tests, which is essentially the same problem OP describes.

I would say it's a related, but much simpler problem. Often, codebases will have some sort of command (sometimes in a Makefile, or similar) to run the tests, which you can use to track down where the tests live. Failing that, tests are often found in files, functions, and directories containing the string 'test' in their names. Simple use of shell tools can accomplish the task of looking for those things in a semi-automated way.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.