Testing Transcripts

There are a variety of ways to create a transcript of your testing session, but this one allows you to interact with the program and record the results at the same time. Be sure to attach the testing transcript to your program submission as a plain text file. You may edit this transcript to make it more readable (using numbers to connect your test plan steps to the actual run is very helpful for grading), but you should otherwise leave it unformatted.

Using the script command

At a system prompt, enter

script <filename.txt> 

where you replace filename.txt with the name of the file you want to create. This will start your test run and copy everything you type .... and that the program outputs to the screen .... to the file named. Then, run your program according to your test plan. When done, end the script recording by typing exit.

Using I/O Redirection

Recall that in our first module, we learned that Linux allows for redirection of either input from or output to a file indicated on the command line. This technique will only work if you do not need to interact with the program in real time in order to give it commands as it runs.