Slim .net:如何使用 Visual Studio 调试测试装置?

发布于 2024-09-06 16:19:57 字数 431 浏览 3 评论 0原文

我已经弄清楚如何使用命令行运行我的测试:

java -jar fitnesse.jar -c MyFixturePage?test&format=text -d "c:/utils/fitnesse/" -r "FitNesseRoot"

使用它作为 Visual Studio 中的 Fixture 装配项目的启动参数不起作用。我在我的装置中使用 Slim 运行器和执行器: http://github.com/jediwhale/fitsharp /downloads

有人知道如何在 Visual Studio 中使用 Slim 进行调试吗?

I've figured out how to run my tests from the commandline using:

java -jar fitnesse.jar -c MyFixturePage?test&format=text -d "c:/utils/fitnesse/" -r "FitNesseRoot"

Using this as the startup parameters for my Fixture assembly project in visual studio does not work. I'm using the Slim runner and executor in my fixtures : http://github.com/jediwhale/fitsharp/downloads

Has any one worked out how to get debugging with Slim working in Visual Studio?

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

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

发布评论

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

评论(3

想挽留 2024-09-13 16:19:57

问题是 java 生成另一个进程,您的 .NET 代码将在其中执行,然后该进程立即关闭。以下是掌握 .NET 代码运行进程的方法:

http://www.asoftwarecraft.com/2010/01/troubleshooting-with-fitsharp-and.html

The problem is that java spawns another process where your .NET code gets executed and then that process shuts down right away. Here's a way to get a hold of the process where the .NET code runs:

http://www.asoftwarecraft.com/2010/01/troubleshooting-with-fitsharp-and.html

烟雨凡馨 2024-09-13 16:19:57

另一个好方法是简单地引入启动调试器的断言。在我们的代码中,我们的所有固定装置都源自一些简单的自定义基本固定装置,其中包含一些实用程序,例如 |debug|

这个断言只是像这样启动调试器:

 public void Debug()
    {
        System.Diagnostics.Debugger.Launch();
    }

一旦断言被击中,调试器就会启动。

这样做的优点是您可以快速将其弹出到您喜欢的任何位置。有时,您可能会进行一次很长的测试,一遍又一遍地使用相同的断言,在这种情况下,这很好,因为您可以在出现问题的断言之前进行测试。

Another good way is to simply introduce a assertion that launches the debugger. In our code all of our fixtures derive from some simple custom base fixtures with some utilities in them like |debug|

this assertion just launches the debugger like so:

 public void Debug()
    {
        System.Diagnostics.Debugger.Launch();
    }

as soon as the assertion is hit the debugger launches.

this has the advantage in that you can quickly pop it in wherever you like. Sometimes you might have a long test that uses the same assertions over and over, in which case this is nice because you can do it right before the one that's the problem.

盛夏尉蓝 2024-09-13 16:19:57

我创建了一个简单的实用程序,可以调用 Debbuger.Launch,而无需更改代码或 FitNesse 脚本。如果您的代码和fitnesse脚本驻留在源代码管理中,这非常有用。请参阅此博文< /a> 了解更多详细信息。

I created a simple utility that calls Debbuger.Launch without needing to change the code or the FitNesse script. This is very useful if your code and fitnesse scripts reside in source-control. See this blog post for more details.

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