Software testing is a major approach to software quality assurance, but it is relatively neglected in universities' computing curricula. For students majoring in computer science or software engineering, several basic testing methods need to be taught. These testing methods generate test cases based on either specifications or program code. When introducing the testing methods based on program code, it is not easy to let the students experience automated test case generation due to the lack of supporting tools and limited teaching hours. In this paper we report our experience in teaching this topic with limited resources. The evaluation result indicates that our teaching method is effective and can also be adopted in other computer science/software engineering subjects where similar constraints exist.