Hi guys, am new to Katalon Studio and am trying to follow the various tutorials out there but am struggling to figure it all out as they seem a bit too incomplete for a newbie.
I basically want to have Katalon Studio automatically connect to the SQL Server database, run a script, then close the connection.
So far under keywords I have added this, I changed âmysqlâ to âsqlserverâ - SEE keyword.txt attachment.
And for the test script see the attached testscript.txt file.
The error I get is:
Test Cases/demo FAILED because (of) org.codehaus.groovy.runtime.InvokerInvocationException: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host 10.62.xx.xxxx/databasename, port 1433 has failed. Error: ânull. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.â.
I have tried disabling firewalls on both desktop and server, I can ping the server and connect to it from my local desktop.
Hi David, thank you ever so much for the reply! I got it working with your example. The database connection was working as you suggested. Just a missing single quote after âpasswordâ in your above example.
Now need to read up on printing an output to screen.
Just wondering if you have followed any useful tutorials for Katalon itself? I am tempted with the Udemy course that seems to be advertised.
Ah excellent! I have looked at the tutorials. I have not done that Udemy course. I found the solution for the database connection by watching a youtube video. they need some better tutorials but you canât really complain when they have provided such a great product for free!
That is true to some extent.
I have purchased the course so will try it out, then maybe see what I can find on YouTube and go from there. Hopefully by then I can start building up some usable tests.
@David Rysz said:
Ah excellent! I have looked at the tutorials. I have not done that Udemy course. I found the solution for the database connection by watching a youtube video. they need some better tutorials but you canât really complain when they have provided such a great product for free!
Hi David, I completed the Udemy course and can recommend it. It was definitely worth ÂŁ10 and I learnt a lot from it.
Only issue I now have is that some of my scripts seem to have stopped working, for example the above database connection/sql query. I believe I was using Katalon Studio v4.61 and jumped to v5+ which has caused this, have you found the same issue at all?
For more information about SQL Database Connection & Input - visit here & if want to know advanced concepts of Microsoft SQL Server then find out our well curated SQL Server Course
Start SQL Server Management Studio. The first time you run SSMS, the Connect to Server window opens. If it doesnât open, you can open it manually by selecting Object Explorer > Connect > Database Engine.
The Connect link in Object Explorer
In the Connect to Server window, follow the list below:
For Server type, select Database Engine (usually the default option).
For Server name, enter the name of your SQL Server instance. (This article uses the instance name SQL2016ST on the hostname NODE5 [NODE5\SQL2016ST].) If youâre unsure how to determine your SQL Server instance name, see Additional tips and tricks for using SSMS.
For Authentication, select Windows Authentication. This article uses Windows Authentication, but SQL Server login is also supported. If you select SQL Login, youâre prompted for a username and password. For more information about authentication types, see Connect to the server (database engine).
âServer nameâ field with option of using SQL Server instance
You can also modify additional connection options by selecting Options. Examples of connection options are the database youâre connecting to, the connection timeout value, and the network protocol. This article uses the default values for all the options.
After youâve completed all the fields, select Connect.
Thanks Lewis for your reply
No luck with the above steps and below are the errors in console
eason:
org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: sqlConnection.QueryInSQL.connectDB() is applicable for argument types: (java.lang.String, java.lang.String, java.lang.String) values: