Pergunta

I recently installed the SQL Test plug-in on a virtual machine (VMWare 8) running SSMS for SQL Server 2008 R2. This is a front end for tSQLt. I enabled CLR on the server. I installed the tSQLt sample database. I hit the Run button. I expect all the sample tests to pass. I observe that all but one pass.

The first test, titled [AcceleratorTests].[test ready for experimentation if 2 particles] failed: Expected: <1> but was <0>.

I have read the SQL involved and it all looks like it should pass. As near as I can tell, the code delivered by Red Gate is the same as the code offered by tSQLt for the sample database. There are a couple new layers of stuff on the machine, now, the SQL Test runner and the tSQLT set of scripts. I am kind of lost trying to find out where the error is. Any advice on what I should look at first?

TIA

Foi útil?

Solução

I was on the Red Gate half of the SQL Test/tSQLt team who worked on this project. This test you refer to was actually supposed to fail, and the idea was for you to be directed to a tutorial that would explain how to correct it and how to write your own. The tutorial can be found here:

http://tsqlt.org/after-running-the-examples-smss/

As you found out, the tool didn't direct you to the tutorial! Thanks for drawing this to our attention. We should at the very least put the above URL in the output text of the failing test so that you weren't left in an 'unsatisfactory' state where you've got a failing test with no guidance on what to do next.

Thanks for drawing this to our attention. We'll definitely look at improving this in an upcoming release. Now that you have the link to the tutorial, it would be great if you could post a comment to this answer and let us know whether it made sense to you!

Outras dicas

The initial install of the sample tests intentionally has a failing test. You can see how to fix it here.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top