compairing the result

  • Hi there!

    I am working on Automated Testing for the web application. After each batch run from the test suite I am saving the results in SQL database, where I want to generate the report after comparing the results. I create two views one is holding the master test results and other holding the recent test results where the result type value  = NULL, If someone can help me to correct my query for comparison b/w the two results. It’s working but giving me some data back even there is no difference in the results. if you look the results the first result should be compaired with the sixeth one then there is no diffrence between those two results

     

     Here is my query


    Select a.plan_name,

                b.plan_name,

                a.testrun_id,

                b.testrun_id,

                a.result_id as NULL_result_id,

                b.result_id,

    --a.ver_no,

                a.response_code as Null_result_code,

                b.response_code,

                b.response_time,

                a.response_time as N_R_time,

                b.response_size,

                a.response_size as N_R_Size,

                a.url,

            b.url

    from bsingh.vwtest_result_Null a

    inner join bsingh.vwtest_result_M b

    on a.plan_name = b.plan_name

    and a.url = b.url

    and a.application_name = b.application_name

     

    where (a.response_code <> b.response_code)

      and (a.response_size <> b.response_size) and (a.response_size / IsNull(NullIf(b.response_size,0),1)

      not between 0.90 and 1.10 ) and (a.response_time/IsNull(NullIf(b.response_time,0),1)

      not between 0.90 and 1.10) 


     

    Below is the result snap shot i ommit some of the coulmns

     

    Testrun_Id.b

    ResponseCode.a

    ResponseCode.b

    responseTime.a

    ResponseTime.b

    ResponseSize.a

    ResponseSize.b

    11

    200

    404

    98450

    1999

    0

    42028

    11

    304

    200

    31

    15

    6505

    127

    11

    200

    304

    0

    46

    127

    1420

    11

    304

    200

    46

    15

    1420

    127

    11

    304

    200

    46

    0

    1420

    127

    11

    404

    200

    1999

    98450

    42028

    0

    11

    304

    200

    46

    15

    272

    127

     Any help will be Appreciated.

    Regards Barinder

     

     

     

     

     

  • The trick is that you have to give the connecting field on primary / unique key. I hope it is the test id. Rest is ok..

     

    Select a.plan_name,

                b.plan_name,

                a.testrun_id,

                b.testrun_id,

                a.result_id as NULL_result_id,

                b.result_id,

    --a.ver_no,

                a.response_code as Null_result_code,

                b.response_code,

                b.response_time,

                a.response_time as N_R_time,

                b.response_size,

                a.response_size as N_R_Size,

                a.url,

            b.url

    from bsingh.vwtest_result_Null a , bsingh.vwtest_result_M b

     

    where

    a.plan_name = b.plan_name

    and a.url = b.url

    and a.application_name = b.application_name

    and a.testrun_id = b.testrun_id

     

    and (a.response_code <> b.response_code)

    and (a.response_size <> b.response_size)

    and (a.response_size / IsNull(NullIf(b.response_size,0),1)

      not between 0.90 and 1.10 )

    and (a.response_time/IsNull(NullIf(b.response_time,0),1)

      not between 0.90 and 1.10)

  • Thaks Rosh, I figure out later that i need a counter for each record to compare, I add one extra feild in my Test Result table and its working fine.

    Thanks for your time to Look at the Problem,

    Regards

    barinder singh

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply