I am new to both (Java) FitNesse and SQL Server, I want to have a basic SQL test working with DbFit,
I have the following in root:
!path c:\fitnesse\lib\dbfit.jar
!path c:\fitnesse\lib\fitlibrary.jar
!path c:\fitnesse\lib\sqljdbc4.jar
|Import|
|dbfit.SqlServerTest|
I have the following in my HelloWorldTest,
!contents -R2 -g -p -f -h
!|dbfit.SqlServerTest|
|Connect|LOCALSQLEXPRESS|sa|Password|somePassword:|
|eg.Division|
|numerator|denominator|quotient?|
|10 |2 |5 |
|12.6 |3 |4.2 |
|100 |4 |33 |
What I have tried:
- I have double checked my SQLExpress username and password and the SqlServer instance is at localhost.I doubt this is a firewall issue. (My understaning of firewall is quite weak admittedly.)
- Looking at Sql Server Configuration Manager (SSCM),
- I see that "SQL Server (SQLEXPRESS) is running as Process with ID 2316,
- Using the PowerShell command "nestat -a -no | Select-String 2316", I see that the process on port 55618.
- In SSCM, I then create alias called "LOCALSQLEXPRESS" in both "SQL Native Client 11.0 Configuration (32bit)" and "SQL Native Client 11.0 Configuration" as I have no idea what my JDBC is using. (Apparently, JDBC for SQL Server does not support named instance, I got an exception telling me so when I was trying to connect to \localhost\SQLEXPRESS directly) I have also enabled "TCP/IP" and "Shared Memory" in "Protocols for SQLEXPRESS".
I am getting the following error when I run the test:
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host LOCALSQLEXPRESS, 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.".
(Note the port number of 1433, despite my alias point to port 55618.)
This is my first post at StackOverflow, please excuse any silliness. Can anyone shed any light?