Final answer:
Test code runs the code being tested, should be in a different directory, written in parallel with the code being tested, and finds bugs in the code.
Step-by-step explanation:
Test code runs the code we are testing. Test code is written to test the functionality and behavior of the code being tested. It runs the code and checks if the expected results match the actual results.
Test code should be in a different directory than the code being tested. This is done to maintain separation and prevent any interference between the test code and the code being tested. It also helps in organizing the files and makes it easier to manage the test code.
Test code should be written in parallel with the code being tested. Test code is typically written alongside the code being developed. It helps in identifying and fixing any issues or bugs as the development progresses. Writing test code in parallel ensures that the code is thoroughly tested.
One purpose of test code is to find bugs in code being tested. Test code is specifically written to find and identify bugs or errors in the code being tested. It helps in improving the quality and correctness of the code.