System and method for a common testing framework
AssigneeSap SE
InventorSrdjan Boskovic
Life of this patent
Estimating the term…
Abstract
In an embodiment, a method provides an input and an expected test output for a unit test. The unit test is executed using a module under test and the input, thereby generating an actual test output. The actual and expected test outputs are serialized into XML, so that comparison and extraction of differences between actual and expected test outputs can be performed using methods for comparisons and extraction of differences between XML documents, such as XML change detection or calculation of checksums.
Claims18
A method comprising:
- providing in a computer processor an input and an expected test output for a unit test;
- executing in the computer processor the unit test using a module under test and the input, thereby generating an actual test output;
- serializing the expected test output and the actual test output into an Extensible Markup Language(XML) format;
- comparing with the computer processor the XML expected test output and the XML actual test output;
- and
- comparing with the computer processor the XML actual test output and the XML expected test output when the checksum of the actual test output and the checksum of the expected test output are not equal;
- wherein the comparing of the XML of the actual test output and the XML of the expected test output comprises:
- submitting the XML actual test output to an XML parser;
- submitting the XML expected test output to the XML parser;
- examining the outputs of the XML parser to determine if the XML of the actual test output and the XML of the expected test output are equal;
- and
- identifying any differences between the XML of the actual test output and the XML of the expected test output.
A system comprising:
- an input and an expected test output for a unit test;
- a computer processor configured for executing the unit test using a module under test and the input, thereby generating an actual test output;
- a computer processor configured for serializing the expected test output and the actual test output into an Extensible Markup Language(XML) format;
- and
- a computer processor configured module for comparing the XML expected test output and the XML actual test output;
- and
- a computer processor configured for comparing the XML of the actual test output and the XML of the expected test output when the checksum of the actual test output and the checksum of the expected test output are not equal;
- wherein the computer processor configured for comparing the XML of the actual test output and the XML of the expected test output comprises:
- a computer processor configured for submitting the XML of the actual test output to an XML parser;
- a computer processor configured for submitting the XML of the expected test output to the XML parser;
- a computer processor configured for examining the outputs of the XML parser to determine if the XML of the actual test output and the XML of the expected test output are equal;
- and
- a computer processor configured for identifying any differences between the XML of the actual test output and the XML of the expected test output.
A tangible machine readable storage medium including instructions that when executed on a machine execute a process comprising:
- receiving an input and an expected test output for a unit test;
- executing the unit test using a module under test and the input, thereby generating an actual test output;
- serializing the expected test output and the actual test output into an Extensible Markup Language (XML) format;
- comparing the XML expected test output and the XML actual test output;
- and
- comparing the XML of the actual test output and the XML of the expected test output when the checksum of the actual test output and the checksum of the expected test output are not equal;
- wherein the instructions for comparing the XML of the actual test output and the XML of the expected test output comprise:
- submitting the XML of the actual test output to an XML parser;
- submitting the XML of the expected test output to the XML parser;
- examining the outputs of the XML parser to determine if the XML of the actual test output and the XML of the expected test output are equal;
- and
- identifying any differences between the XML of the actual test output and the XML of the expected test output.
Dependencies are inferred from the claim text.