Exam >
On this page

Failures

Missing record

Log File
Missing recordExpectedToFail

Given


Empty table:
ANDROIDS_TABLE
EMPTY

Then


Expected 1 record:
The following markup:
<e:db-check table="ANDROIDS_TABLE" cols="name">
  <e:row>Adam</e:row>
</e:db-check>
will be rendered as:
row count (table=ANDROIDS_TABLE) expected:<1> but was:<0>
Expected:
ANDROIDS_TABLE
name
Adam
but was:
ANDROIDS_TABLE
EMPTY

Surplus record

Log File
Surplus recordExpectedToFail

Given


Table has the following records:
ANDROIDS_TABLE
idname
1Adam

Then


Expected empty table:
The following markup:
<e:db-check table="ANDROIDS_TABLE"/>
will be rendered as:
row count (table=ANDROIDS_TABLE) expected:<0> but was:<1>
Expected:
ANDROIDS_TABLE
EMPTY
but was:
ANDROIDS_TABLE
IDNAMEHEIGHTWEIGHTMANUFACTURED
1Adam(null)(null)(null)

Wrong fields

Log File
Wrong fieldsExpectedToFail

Given


Table has the following records:
ANDROIDS_TABLE
idnameheightmanufactured
1Adam102021-01-01
2Bob202021-02-02
3Carl302021-03-03

Then


Expected table:
The following markup:
<e:db-check table="ANDROIDS_TABLE" cols="name, height, manufactured">
  <!--all correct-->
  <e:row>Adam, 10, 2021-01-01</e:row>
  <!--wrong manufactured-->
  <e:row> Bob, 20, 2021-01-01</e:row>
  <!--wrong height and manufactured-->
  <e:row>Carl, 10, 2021-01-01</e:row>
</e:db-check>
will be rendered as:
table content mismatch:
"HEIGHT" in row 3: Actual value='3E+1' is not equal to expected value='10'
"MANUFACTURED" in row 2: Actual value='2021-02-02 00:00:00.0' is not equal to expected value='2021-01-01'
"MANUFACTURED" in row 3: Actual value='2021-03-03 00:00:00.0' is not equal to expected value='2021-01-01'
Expected:
ANDROIDS_TABLE
nameheightmanufactured
Adam102021-01-01
Bob202021-01-012021-02-02 00:00:00.000
Carl103E+12021-01-012021-03-03 00:00:00.000