Failures
Missing record
Log File
Empty table:
Expected 1 record:
Given
Empty 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:
but was:
| name |
|---|
| Adam |
| EMPTY |
Surplus record
Log File
Table has the following records:
Expected empty table:
Given
Table has the following records:
| id | name |
|---|---|
| 1 | Adam |
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:
but was:
| EMPTY |
| ID | NAME | HEIGHT | WEIGHT | MANUFACTURED |
|---|---|---|---|---|
| 1 | Adam | (null) | (null) | (null) |
Wrong fields
Log File
Table has the following records:
Expected table:
Given
Table has the following records:
| id | name | height | manufactured |
|---|---|---|---|
| 1 | Adam | 10 | 2021-01-01 |
| 2 | Bob | 20 | 2021-02-02 |
| 3 | Carl | 30 | 2021-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:
| name | height | manufactured |
|---|---|---|
| Adam | 10 | 2021-01-01 |
| Bob | 20 | |
| Carl |