Search code examples
testingprojectrepo

Why many repos have a test folder in the root directory?


Why many repos have a test folder in it?

https://github.com/openstack/swift
https://github.com/openstack/openstack-helm

what's the test folder's function? how it works?


Solution

  • A folder named test has no special connotation within Git or GitHub. However, it is a common and descriptive name for folders housing unit tests. Unit tests are of course not the only thing you can put there. One might store tests of an entire program or anything at all.

    In terms of function, a number of programs provide test drivers to run each program and report what does and doesn’t fail. For example, autotools uses the check target of make to run tests. It’s just a folder, so you can do anything with it.