Need help with executing DB query in two different places in a test

Tim Roberts timr at probo.com
Tue May 20 01:34:04 EDT 2014


Sunitha Byju <sunitha_byju at hotmail.com> wrote:
>
>I am trying to automate an ecom website. I need to run DB query after
>placing each order.  I don't know how to run different queries after
>each order.  Can someone help me out with having queries after each
>order submission or test?  

Well, what's your primary key?  After each test, you need to fetch the
record that should have been created, and verify that the fields contain
the information you provided.  For example, if you're doing a shopping
cart, then you must have some kind of key associated with this session. So,
you could just fetch all of the record for the session after each
transaction, and make sure the contents match what you expect.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list