Parse Student Code
Often you just want to make sure students successfully used a particular function/command/structure. The simplest way I have found to do this is just parse the student's code file and make sure what you are looking for is there.
For example, maybe you want to make sure the student used println()
at least 2 times. We can parse the student's code file and count how many times "System.out.println("
is present in their code.
This test assumes the student's file name is Example.java
.
Last updated