Databases Reference
In-Depth Information
step in
SOAPUI
, a testing tool to send XML data to EMS,
and then create a JDBC test step to verify the content in
the BAM repository database.
Testing calculated and lookup fields
Validating calculated fields and lookup fields are two critical tasks in testing Data
Objects. Unlike Data Object fields, whose data accuracy and validity are primar-
ily determined by upstream data sources, the data quality of calculated fields
and lookup fields are determined by expressions defined in the Data Object
level.
Testing calculated fields
A
calculated field
is a field whose value is derived from other Data Object fields.
Calculation expression sometimes produces unexpected or invalid results. For
example, the expression
Sum (Field A) /Sum (Field B)
may potentially
cause a typical
divided by zero
error, and the expression
Field A/Field
B
may produce
unexpected data precision
issues (for example, the cal-
culation of
4/3
is
1
, instead of
1.3333)
.
So, it is a best practice to build test cases that cover all realistic boundary value
conditions, based on the existing formulas for calculated fields.
In the
Bookstore Demo
application, we use the following formula to calculate
the order processing time:
if ((OrderProcessedDate == NULL) || (OrderReceivedDate == NULL))
then (0)
else ((OrderProcessedDate - OrderReceivedDate)/3600)