How to connect with Ruby to MSSQL server

source: http://blogs.technet.com/
In this post, I explained how to test sql procedures created for Microsoft SQL server. As tSQLt is not true programming language, I found that fact as obstacle for my testing process. For example, integrating created test scripts into existing continuous integration system based on Jenkins was practically impossible.

Because of Ruby support for testing ecosystem, my goal was to access to Microsoft SQL procedures using Ruby. Using PlasticLizard gist example and IronRuby, I managed to do that.



Database and procedures that I tested were deployed on local Microsoft SQL server, Express version. Authentication mode to SQL server was windows authentication, which means that ruby test script automatically used my windows server 2012 credentials.

In that way, I managed to unlock Ruby testing ecosystem to the Microsoft SQL server world.

Labels: