-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When comparing result-sets, identify columns by name (and not only by index) #241
Comments
|
at the difference of comparison based on index, the comparison based on name will ignore all the columns that are not explicitly listed as keys or values. To define the keys and values, you can use the equalTo element <equalTo keys-names="Key" values-names="Value1, Value2">
...
</equalTo> You can also use the column element <equalTo>
<column name="Key" role="key" type="text"/>
<column name="Value" role="value" type="numeric"/>
</equalTo> In a result-set you can assign a name to a column by using the new attribute <resultSet>
<row>
<cell column-name="Value">2016-12-10</cell>
<cell column-name="KeyField">10</cell>
</row>
<row>
<cell>2016-02-02</cell>
<cell>12</cell>
</row>
</resultSet> |
Preview available at https://ci.appveyor.com/project/Seddryck/nbi/build/1.15.0-ci.14 |
… feature/Display_column_name_(#105)
Available in beta: https://github.com/Seddryck/NBi/releases/tag/v1.15-beta |
Currently, when comparing result-sets, the first column of system-under-test is always compared to the first column of the assertion. This is relatively intuitive but is not always suitable. With the support of NoSQL database returning result-set in JSON, it's a huge limitation. Indeed, seralization doesn't guaratee the ordering of the members and missing members on the first row can screw up all your table.
NBi should support to define that the comparison should be done on the column'name and not on the column index.
The text was updated successfully, but these errors were encountered: