SP

  • Hi,

    I have a sp. I alter stored procedure by adding some logic to that. How can I test that is there any functional impact by altering that stored procedure? How to prove to the team that the modifications doesn't impact any functionality?

    Thanks

  • Use a test environment.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Hi Luis,

    Thanks for the reply. Yes, I can do it in the test env but let me know what kind of tests we have to do?

  • I can't give more advice on this, unless you post more details. I don't know what kind of modifications you did or what are the change policies on your company.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Hi Luis,

    I have a parent stored procedure which is executing the child stored procedure without any condition. Before calling the child sp, I want to put the check that If the data is available in that variable then only execute that child sp.

    I have a parent sp name saveproduct_QP

    and it is calling savepricing_QP

    for that child sp, they assign some table valued parameters

    exec savepricing_QP

    @productdetails = @productdetails

    @Orderdetails = @orderdetails

    @customerId = @customerid output

    In the sp I added that

    Alter saveproduct_QP

    IF EXISTS (SELECT 1 FROM @ProductDetails)

    begin

    exec savepricing_QP

    End

    Now, I want to test sp that it doesn't have any functional changes

  • So run the original, run the changed and make sure that behaviours are the same. Basic unit testing.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 6 posts - 1 through 5 (of 5 total)

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