How can we help you today? How can we help you today?

automated test on sql code check in

We are using the  red gate to checking the code .I need to do a validation to verify that no print statements are hanging out there on the sql code .Please guide
jscaria
0

Comments

5 comments

  • Jon_Kirkwood

    Hi @jscaria


    Thank you for reaching out on the Redgate forums regarding your code validation request.

    Unfortunately, there isn't a way directly through SQL Change Automation to check for code like this.


    It may be possible using SQL Test / t-sqlt as a way to do these checks as part of a deployment pipeline.

    I had a look at their existing tests but couldn't see one specifically for your requirements however it may be a possibility to create your own custom test

    If wanting to investigate this angle further I would suggest the t-sqlt community site - https://groups.google.com/g/tsqlt or stackoverflow page - https://stackoverflow.com/questions/tagged/tsqlt

    Jon_Kirkwood
    0
  • Jonathan R
    Hi @jscaria - I'm Jonny - one of the PM's for our DevOps product. We're working on an improved code analysis capability so I'm interested to learn a bit more about what you're doing.

    Could you tell me a bit more about the use case around detecting print statements, please?
    Jonathan R
    0
  • jscaria
    some times we see that print statement are checked into the repository and want to put a check on the code  to find and replace it .Do we have some mechanism to do this validation
    jscaria
    0
  • Jonathan R
    Thanks - this might seem like a daft question, but I'm interested in how the print statements come to be added in the first place, and what problem occurs if they stay in there? 

    If we can understand this then it will help us design the best mechanism for solving the problem.
    Jonathan R
    0
  • jscaria
    in prod it created unnessory record and create issues to the product
    jscaria
    0

Add comment

Please sign in to leave a comment.