为什么 Red Gate SQL 测试的第一个 tSQLt 示例测试在我的系统上失败?

发布于 2024-12-19 06:27:38 字数 551 浏览 2 评论 0原文

我最近在虚拟机上安装了 SQL Test 插件运行 SQL Server 2008 R2 的 SSMS 的计算机 (VMWare 8)。这是 tSQLt 的前端。我在服务器上启用了 CLR。我安装了 tSQLt 示例数据库。我按下了“运行”按钮。我希望所有样本测试都能通过。我观察到,除了一个之外,所有的都通过了。

标题为 [AcceleratorTests] 的第一个测试。[如果有 2 个粒子,测试准备好进行实验] 失败:预期:<1>但为<0>。

我已经阅读了涉及的 SQL,看起来一切都应该通过。据我所知,Red Gate 提供的代码与 tSQLt 为示例数据库提供的代码相同。现在,机器上有几个新的层,即 SQL 测试运行器和 tSQLT 脚本集。我有点迷失了试图找出错误所在。对我应该首先看什么有什么建议吗?

TIA

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

意犹 2024-12-26 06:27:38

我是 SQL Test/tSQLt 团队 Red Gate 的一员,负责这个项目。您提到的这个测试实际上应该会失败,我们的想法是让您参考一个教程,该教程将解释如何纠正它以及如何编写自己的测试。该教程可以在这里找到:

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

正如您所发现的,该工具并未将您引导至教程!感谢您提请我们注意这一点。我们至少应该将上面的 URL 放在失败测试的输出文本中,这样您就不会处于“不满意”的状态,即您的测试失败而没有下一步操作的指导。

感谢您提请我们注意这一点。我们肯定会在即将发布的版本中考虑改进这一点。现在您已经有了本教程的链接,如果您可以对此答案发表评论并让我们知道它对您是否有意义,那就太好了!

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!

神经大条 2024-12-26 06:27:38

示例测试的初始安装故意有一个失败的测试。您可以在此处查看如何修复该问题。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文