System and method for testing computer software
First Claim
Patent Images
1. A computer automated method for testing a program code fragment, comprising the steps of:
- receiving a computer program code fragment;
automatically forming a concatenated computer program by performing at least one of pre-pending the computer program code fragment with a first computer program code block and appending the program code fragment with a second program code block;
automatically compiling the concatenated program;
automatically testing the compiled program; and
displaying an error message if the tested program is not correct.
0 Assignments
0 Petitions
Accused Products
Abstract
A system and method is provided in which the correctness of computer code fragments may be tested. In an example embodiment, a web-based automatic code correctness checking tool is provided for distance learning. A student may submit to the system a solution to a selected exercise. The solution is processed and verified by a server system, which may provide hints and/or error messages to the student if the solution in incorrect. A system and method for setting up exercises for distance learning courses is also provided.
-
Citations
20 Claims
-
1. A computer automated method for testing a program code fragment, comprising the steps of:
-
receiving a computer program code fragment;
automatically forming a concatenated computer program by performing at least one of pre-pending the computer program code fragment with a first computer program code block and appending the program code fragment with a second program code block;
automatically compiling the concatenated program;
automatically testing the compiled program; and
displaying an error message if the tested program is not correct. - View Dependent Claims (2, 3, 4, 5)
executing the compiled program; and
comparing output of the executed program to expected output.
-
-
3. The method according to claim 1, wherein the automatically testing step includes the steps of:
-
executing the compiled program; and
comparing an exit code of the executed program to an expected exit code.
-
-
4. The method according to claim 1, further comprising the steps of:
automatically linking the compiled program with at least one of functions and subroutines of an auxiliary library.
-
5. The method according to claim 1, wherein the automatically testing step includes the steps of:
-
detecting if the concatenated program was successfully compiled; and
if a compilation error is detected, determining that the tested program is not correct.
-
-
6. A computer automated method for testing program code fragments, comprising the steps of:
-
receiving at least two computer program code fragments;
automatically forming a concatenated computer program by concatenating together the at least two computer program code fragments and at least three code blocks, each of the at least two computer program code fragments being positioned between at least two of the at least three code blocks;
automatically compiling the concatenated program;
automatically testing the compiled program; and
displaying an error message if the tested program is not correct.
-
-
7. A computer based system for automatically testing a program code fragment, comprising:
-
a server system, the server system receiving a program code fragment from a client system;
a memory coupled to the server system; and
at least one of a prepend computer program code block and an append computer program code block stored in the memory, the server system automatically retrieving the at least one of the prepend computer program code block and the append computer program code block from the memory and forming a concatenated program from the program code fragment and the at least one of the prepend computer program code block and the append computer program code block upon receiving the program code fragment, the server system testing the concatenated program and transmitting results of the testing to the client system for display at the client system. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A computer automated method for testing a program code fragment, comprising:
-
receiving a computer program source code fragment;
automatically forming a concatenated computer program by performing at least one of pre-pending the computer program source code fragment with a first computer program source code block and appending the program code fragment with a second program source code block;
automatically compiling the concatenated program to form object code;
automatically testing for a compilation error; and
providing an indication of an error if a compilation error is detected. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20)
executing the compiled program; and
comparing output of the executed program to expected output.
-
-
15. The method according to claim 13, wherein the automatically testing step includes:
-
executing the compiled program; and
comparing an exit code of the executed program to an expected exit code.
-
-
16. The method according to claim 13, further comprising:
automatically linking the compiled program with at least one of functions and subroutines of an auxiliary library.
-
17. The method according to claim 13, wherein the computer program source code fragment is received from a remote client by a server, and the server performs at least the forming and compiling steps.
-
18. The method according to claim 17, further comprising:
displaying an error message at the remote client if the tested program is not correct.
-
19. The method according to claim 18, wherein the error message indicates a compilation error.
-
20. The method according to claim 13, wherein in the forming step, a plurality of lines of source code are pre-pended or appended to the computer program source code fragment.
Specification