Database testing with gwz

13 views
Skip to first unread message

dschulten

unread,
Mar 25, 2010, 1:07:39 PM3/25/10
to givwenzen_user
How would you approach database testing where you want to insert and
query tabular data. Is it possible to use a table with numerous rows
in the given and then section somehow?

Wes & Evie

unread,
Mar 25, 2010, 2:31:34 PM3/25/10
to givwenz...@googlegroups.com
With GivWenZen you can combine this with any of the 'normal' table styles of Slim or FitLibrary.  However, the first question I would do is ask is all the data in the table relevant to the test.  It is not that a table of data is bad, sometime it is the best way to represent some data, but many time I find people showing a lot of data in a table that is not relevant.

Can you describe the scenario? If so I will give my opinion of how I think it would be best to test it and why.

wes

To unsubscribe from this group, send email to givwenzen_user+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

dschulten

unread,
Mar 25, 2010, 3:04:04 PM3/25/10
to givwenzen_user
Thank you for the quick response. I need to cover a legacy app with
tests. My test case is comprised of imports with combinations of
filtering, cumulating of import lines, plausibility checks within rows
and across rows, parsing and splitting the content of import columns
etc.
The result should best be queried from the database, since it is
difficult to get the result from the application code. Also, the
import requires certain data in the db before it can run.
For this, dbfit is a nice fit. However, I am not sure how to combine
it with gwz, at least in the given and then section. I would expect
that the given part should hold the import data and the then part has
the expected output to the db. BTW the db performs lots of triggers
and stored procedures.

Looking forward to your advice :-)

On 25 Mrz., 19:31, "Wes & Evie" <wesande...@gmail.com> wrote:
> With GivWenZen you can combine this with any of the 'normal' table styles of
> Slim or FitLibrary.  However, the first question I would do is ask is all
> the data in the table relevant to the test.  It is not that a table of data
> is bad, sometime it is the best way to represent some data, but many time I
> find people showing a lot of data in a table that is not relevant.
>
> Can you describe the scenario? If so I will give my opinion of how I think
> it would be best to test it and why.
>
> wes
>

> On Thu, Mar 25, 2010 at 6:07 PM, dschulten <dietrich.schul...@googlemail.com

Wes & Evie

unread,
Mar 26, 2010, 12:15:09 AM3/26/10
to givwenz...@googlegroups.com
I still do not have a complete picture of the exact data so here is a really generic answer.

|given|data which meets plausibility check X|
|when|the data is imported|
|then|data X is available ????|
|and|data Y is available for ???|

Here is what I am thinking about in the above test.  First which check am I testing.  Do not try to test every check in one scenario.  The action I assume is know and based on your description I assumed it was import.  And lastly based on the specific check what is the expected results.  What does the user expect to happen.

My guess is you end up with a lot of these scenarios and so you would probably end up creating a scenario table that runs the above scenario with multiple inputs and out puts.

Maybe the data is better suited for the dbfit so keep that open as an option.  But if you decide to go that way ask yourself a few questions:

1) What data is important to understanding the scenario and affects the expected results?  Do not show all the data if you decide to use a table driven approach.  Show only the data that is affecting the tested change and is the data that should or should NOT change and make that clear.  Hide required but irrelevant data in side your fixture or step code.

2) How can you setup the scenarios such that you do not have duplication while still maintaining readability?

3) How can you keep the test fast?  I assume you are bound to a specific db since you are using trigger and stored procedures.

4) How can you make the test independent such that it has no external data dependencies and does not affect other test?

Send me a specific table definition of how you would like to write and explain it to me and I can give a better answer.

wes

To unsubscribe from this group, send email to givwenzen_user+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Reply all
Reply to author
Forward
0 new messages