Claims
- 1. A method for testing a computer code including Design by Contract (DbC) contracts, the method comprising:
parsing the computer code; analyzing the DbC contracts included in the parsed computer code; generating test cases from the analyzed DbC contracts; executing the generated test cases; and verifying proper functioning of the DbC contracts.
- 2. The method of claim 1, wherein the computer code comprises JAVA programming language.
- 3. The method of claim 1, wherein the computer code comprises Java Server Pages programming language.
- 4. The method of claim 1, further comprising reporting any violation in functioning of the DbC contracts in a monitor.
- 5. The method of claim 1, further comprising altering the program execution if any violation in functioning of the DbC contracts is found.
- 6. The method of claim 1, wherein the computer code includes a plurality of classes and components and the verifying step comprises verifying the proper functioning of the plurality of classes and components.
- 7. The method of claim 1, the step of generating test cases comprising generating automatic stubs.
- 8. The method of claim 1, further comprising regression testing of the computer code.
- 9. The method of claim 8, wherein the regression testing step comprises calculating first outcomes for the generated test cases;
re-testing the generated test cases; calculating second outcomes for the re-tested test cases; checking the second outcomes against the first outcomes; and reporting a regression error if the second outcomes do not match the first outcomes.
- 10. The method of claim 1, further comprising storing the generated test cases for future use.
- 11. The method of claim 1, further comprising a graphical user interface (GUI) for accepting user's input.
- 12. The method of claim 11, further comprising reporting any violation in functioning of the DbC contracts in the GUI.
- 13. The method of claim 11, wherein the reporting step comprises reporting only the portion of the computer code that violates proper functioning of the DbC contracts.
- 14. The method of claim 6, further comprising:
compiling the verified plurality of classes and components; analyzing DbC information of the computer code; responsive to the analyzing DbC information, generating a second plurality of classes each with extra bytecodes that describe how the respective class is expected to function; integrating the second plurality of classes into a system under test; running the system under test; monitoring the system under test while it is being run; and detecting any contract violation of the integrated plurality of classes.
- 15. A method for testing a class in a computer code including Design by Contract (DbC) contracts, the method comprising:
compiling the class; analyzing DbC information of the computer code; responsive to the analyzing DbC information, generating an instrumented class with extra bytecodes that describe how the class is expected to function; integrating the instrumented classes into a system under test; running the system with the instrumented class; monitoring the system while it is being run; and detecting any contract violation of the integrated class.
- 16. The method of claim 15, wherein the computer code comprises JAVA programming language.
- 17. The method of claim 15, wherein the computer code comprises Java Server Pages programming language.
- 18. The method of claim 15, further comprising reporting any violation in functioning of the class.
- 19. The method of claim 15, further comprising altering the program execution if any violation in functioning of the class is found.
- 20. A computer readable medium having stored thereon a set of instructions including instruction for testing a computer code including Design by Contract (DbC) contracts, the instructions, when executed by a computer, cause the computer to perform the steps of:
parsing the computer code; analyzing the DbC contracts included in the parsed computer code; generating test cases from the analyzed DbC contracts; executing the generated test cases; and verifying proper functioning of the DbC contracts.
- 21. The computer readable medium of claim 20, wherein the computer code comprises JAVA programming language.
- 22. The computer readable medium of claim 20, wherein the computer code comprises Java Server Pages programming language.
CROSS-REFERENCE TO RELATED APPLICATION
[0001] This patent application claims the benefit of the filing date of U.S. Provisional Patent Application Serial No. 60/311,473, filed Aug. 10, 2001 and entitled “METHOD AND SYSTEM FOR DYNAMICALLY INVOKING AND/OR CHECKING CONDITIONS OF A COMPUTER TEST PROGRAM”, the entire contents of which are hereby expressly incorporated by reference.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60311473 |
Aug 2001 |
US |