The word ‘test’ originally referred to “a small vessel used in assaying precious metals”. This meant that testing was a method of ascertaining the quality of gold or silver. It was also used in the process of refining valuable alloys, such as tin.
Later, the term was adopted in other fields, and these days it’s common to find it in contexts such as education, medicine, or software development. Its essence, however, has not changed: testing is used to refine end value.
We use tests in software development to ensure that code works as expected. Tests can be manual or automated. Manual testing is similar to automobile manufacturers crashing cars to verify that they’re safe for the road. It works, but it’s far too expensive to do frequently, so it is typically done at the end of the production cycle. The trouble with this method is that problems found at this stage can delay a product’s launch by months.