redgatetsqlt

Is Red Gate SQL Test tSQLt version the same as in GitHub?


Part 1 of my question is: I'm trying to find the benefits in buying Red Gate SQL Test VS simply using the free tSQLt on its own. I already saw 2 similar questions that were answered by Red Gate who basically said that the UI to organize the tests is the main benefit.

I was also thinking that maybe since SQL Test is a paid tool, its tSQLt version will be better or with good maintenance/features but then I saw this post (https://forum.red-gate.com/discussion/18049/sql-test-is-over-a-year-behind-tsqlt) in the Red Gate forum where a user was complaining that the tSQLt version of SQL Test was 2 versions behind the tSQLt open-source code...so even that is not an advantage, and it seems like using the SQL Test might be even a disadvantage on this aspect of having the latest version.

Does anyone know of any reason why to buy SQL Test tool? Is there anyone that uses tSQLt on its own in an environment where there are many developers that might want to add unit tests?

Part 2 of my question is: After stating the above, I'm considering using the open-source tSQLt on its own. What I am thinking of doing is -

  1. when a developer creates a DB replica in order to develop SQL code on it, that replica will already have tSQLt on it.
  2. the developer will create his test SPs and then push them into the repository under a new "tests" folder (that will not be deployed as part of the version)
  3. when he will create a PR to add his code, a new task that we will create in the pipeline, will deploy the committed tests that are in "tests" folder into the DB that we already raise for the SQL code to run on (that DB will already have tSQLt on it and instead of running only the code from the "product" folder, we will also run the code from "tests" folder)
  4. the task will also call tSQLt.RunAll

(I'm not a DevOps specialist but this is basically the plan and of course our DevOps will implement and make sure that the tests results will be diaplayed clearly using SP tSQLt.XmlResultFormatter)

what do you think? did anyone do something similar? I'll appreciate any help thanks in advance


Solution

  • Part one: I asked Redgate to write SQL Test to get the point and click integration other unit testing frameworks have in their respective gui(s). Besides the interface, sql test does not add anything to tSQLt. (Though, it integrates with sql cover, which is a separate project. ) if you are looking for enterprise support for tSQLt, talk to me. I’m in the process of creating an offer along that line.

    Part two: that is a good basic outline for a CI pipeline. I would consider adding a step to recreate the database from scratch instead of deploying the changes to an existing DB. That way you don’t need to worry about things getting messed up in your DB and then impacting the test run negatively.