To advance Java programming studies, we have developed the Java Programming Learning Assistant System (JPLAS). The test code plays a critical role in verifying the correctness of the source code from a student automatically at the server in the code writing problem in JPLAS. Previously, we proposed the test code generation tool that automatically generates the test code from the given source code containing standard inputs/outputs that novice students are expected to study in advance. In this paper, we extend this tool to handle the source code with file inputs/outputs. By applying the extended tool to three codes containing file inputs/outputs, the correctness of the generated test codes is confirmed.