• Solomon Rutzky (11/13/2008)


    Alexander Kuznetsov (11/13/2008)


    Solomon Rutzky (11/13/2008)


    Alexander Kuznetsov (11/13/2008)


    How would you test the following cases:

    - my stored procedure modifies two tables and returns a result set;

    3) To test any result set, use either the "Query" or "Ordered Query" operations. It does not matter what else the Stored Procedure does.

    IMO yes it does - how do you verify that the modifications are exactly as you expect?

    Ok, sorry, I misunderstood the intent of that question. To test both the modifications made in the Stored Procedure and the result set returned, you would do the following all within the same page:

    a) use the "Query" operation calling EXEC on the Stored Procedure to test the result set

    b) use the "Query" operation again calling SELECT * FROM Table1 to test that change

    c) use the "Query" operation again calling SELECT * FROM Table2 to test that change

    Solomon, in my experience the "SELECT * FROM Table1 to test that change" approach is very inefficient. Come to think of it, next month or next year you will have to add some more test data for some other requirement, and that will break your "test that change" piece. It is much better to test exactly the change - the difference between the original and the modified states.