How to get the output of sql queries in FitNesse + DbFit?
2 answers
First, the execution device is typically used for actions that do not return data, such as:
!|Execute|insert into tablename values (…)|
or
!|Execute|update tablename st... where...|
However, even some actions without data have more specific commands. The above update can be done, for example, with
!|Update|tablename |
|field_to_change=|field_to_select|
|new value |matching value |
Use the query tool to return data
!|query|select Id, BatchNum from tablename|
|Id |BatchNum? |
|1 |>>Bat1 |
|2 |<<Bat1 |
As shown, just put your field names on the line below the fixture and then your data lines below that.
+3
source to share