Generic API Test tool
Download
Report
Transcript Generic API Test tool
Generic API Test tool
By
Moshe Sapir
Almog Masika
Instructor
Zvika Berkovic
Automatic API Test Tool
Concept
Enable the developer to add
metadata to the modules code
Use .NET attributes to
represent the metadata
The metadata should contain
information which will enable
automatic testing of the
module
Create automatic test tool that
given the module and
attributes can generate tests
Tested
Module
Tested
Code
Generic API Test Tool
Test Results
Defining Attributes: Input Output
Assertion Attribute
Assertion is defined by three expressions:
<P, Q, L>
If P is true before the function is run, then
Q is true after the function is run, or one of
the exceptions in L is thrown during
execution
For double Sqrt(double x) the
developer will define:
P: x > 0
Q: ret ^ 2 = x
L = {DivisionByZero }
Selecting the tested method
After the
attributes
were defined
the user can
select the
method to test
The selection
is done using
a tree view
that describes
the assembly
structure
Defining test parameters
After tested
method was
selected the user
can define the test
parameters
The user is
prompted for tests
parameters
according to the
attributes defined
on the tested
method
Running the tests
After defining
the test
parameters,
the tests are
executed by
the generic
tool
The user can
examine the
test results in
the tools GUI