The Internet has recently encouraged the society to convert almost all its needs to electronic resources such as e-libraries, e-cultures, e-entertainment as well as e-learning, which has become a radical idea to increase the effectiveness of learning services in most schools, colleges and universities. E-learning can not be completely featured and met without e-testing. However, in many cases e-testing tools are suitable just for traditional/theoretical knowledge testing, covered by such items as questions, quizzes, matching boxes and other. The article ``A Method for Automated Program Code Testing'' tackles the lack of functions in e-testing systems and suggests e-assessment possibilities for students who study computer science, especially programming. The article analyzes the method that allows freely entering answers to questions, checking program syntax during the testing and enables automatic written code checking and evaluation.