---- posted by Hong Zheng via private email ---
Dear SQLUnit Developers,
After playing with SQLUnit on MySQL Server for a while, I
found this a wonderful software that made my stored
procedure testing much easier and systematic.
Thank you for the compliments. SQLUnit has been quite well tested on Sybase which, afaik, should be similar to MS SQL Server since they come from the same code base. However, its possible that MS SQL Server 2000 may have some features which have not been tested. If you find some during your testing please let us know, I will be happy to give you credit for testing/porting SQLUnit against MS SQL Server 2000.
The "No Suitable Driver" may show up if the program cannot find the driver in its classpath. Things you can do to make sure that this is not the problem would be:
1) Check the SQLUnit connection configuration in your xml file, under the connection tag.
2) Check to see if the class name you have in the driver tag is found in the jar file for the driver, do a jar tvf on it and grep for the driver class name (replace . with /) and see if its there.
3) Finally you may want to check if a straight jdbc program runs with the setup you have given SQLUnit.
I dont use or have access to SQL Server myself. If you post more details about the connection values you are using and possibly a JDBC test program source, then there may be people on this forum who are using SQL Server 2000 and they may be able to spot something obvious. A JDBC test program source may also help me figure out what the URL should look like, perhaps SQLUnit is making a wrong assumption about the JDBC url.
Hope this helps.
Sujit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We have been using SQLUnit with SQL Server 2000 for several months now with no major problems. We are using a datasource to get our connections otherwise I would have sent you the connection xml we use. We don't (at the moment) test anything involving lobs or other advanced features but the basics all work fine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- posted by Hong Zheng via private email ---
Hi Everyone,
I just solved the SQL Server 2000 problem. It turned out the
problem is actually not with the JDBC Driver, but rather with
XML Parsing that reads my test file. What happened was that
the url to my SQL server is longer than that to MySQL Server, XML Editor of mine wraps the url to a new line. Then
everything just stopped working!!! Mysteriously & So so
painfully 2!
If I can make a suggestions here, maybe the future version
can relax requirements on the XML syntax at least things like
a newline will not break everything.
Once again, you guys created a beautiful beautiful software.
:)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
From Hong's feedback, it looks like it was a parsing problem, not sure if I want to put in a check to strip newlines out of xml text globally, but it does make sense to remove new lines out of the url. The fix is simple enough, so I will put it into cvs, and it should be available in the next release, with Mario's new tag, and hopefully the mock testing framework I am working on.
-sujit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
---- posted by Hong Zheng via private email ---
Dear SQLUnit Developers,
After playing with SQLUnit on MySQL Server for a while, I
found this a wonderful software that made my stored
procedure testing much easier and systematic.
However, when I tried to do unit testing with Microsoft SQL
Server 2000 using their JDBC driver from the following url:
http://www.microsoft.com/downloads/details.aspx?FamilyID=4F8F2F01-1ED7-4C4D-8F7B-3D47969E66AE&displaylang=en
I got a "No Suitable Driver" error message.
I came to suspect that maybe porting to SQL Server 2000 is
needed.
I need to run the same tests on SQL Servers urgently. Your
support would be greatly appreciated!!!
Hi Hong,
Thank you for the compliments. SQLUnit has been quite well tested on Sybase which, afaik, should be similar to MS SQL Server since they come from the same code base. However, its possible that MS SQL Server 2000 may have some features which have not been tested. If you find some during your testing please let us know, I will be happy to give you credit for testing/porting SQLUnit against MS SQL Server 2000.
The "No Suitable Driver" may show up if the program cannot find the driver in its classpath. Things you can do to make sure that this is not the problem would be:
1) Check the SQLUnit connection configuration in your xml file, under the connection tag.
2) Check to see if the class name you have in the driver tag is found in the jar file for the driver, do a jar tvf on it and grep for the driver class name (replace . with /) and see if its there.
3) Finally you may want to check if a straight jdbc program runs with the setup you have given SQLUnit.
I dont use or have access to SQL Server myself. If you post more details about the connection values you are using and possibly a JDBC test program source, then there may be people on this forum who are using SQL Server 2000 and they may be able to spot something obvious. A JDBC test program source may also help me figure out what the URL should look like, perhaps SQLUnit is making a wrong assumption about the JDBC url.
Hope this helps.
Sujit
We have been using SQLUnit with SQL Server 2000 for several months now with no major problems. We are using a datasource to get our connections otherwise I would have sent you the connection xml we use. We don't (at the moment) test anything involving lobs or other advanced features but the basics all work fine.
--- posted by Hong Zheng via private email ---
Hi Everyone,
I just solved the SQL Server 2000 problem. It turned out the
problem is actually not with the JDBC Driver, but rather with
XML Parsing that reads my test file. What happened was that
the url to my SQL server is longer than that to MySQL Server, XML Editor of mine wraps the url to a new line. Then
everything just stopped working!!! Mysteriously & So so
painfully 2!
If I can make a suggestions here, maybe the future version
can relax requirements on the XML syntax at least things like
a newline will not break everything.
Once again, you guys created a beautiful beautiful software.
:)
Hi Hong and King(?),
Thanks for the feedback.
From Hong's feedback, it looks like it was a parsing problem, not sure if I want to put in a check to strip newlines out of xml text globally, but it does make sense to remove new lines out of the url. The fix is simple enough, so I will put it into cvs, and it should be available in the next release, with Mario's new tag, and hopefully the mock testing framework I am working on.
-sujit