Slim .net:如何使用 Visual Studio 调试测试装置?
我已经弄清楚如何使用命令行运行我的测试:
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
问题是 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
另一个好方法是简单地引入启动调试器的断言。在我们的代码中,我们的所有固定装置都源自一些简单的自定义基本固定装置,其中包含一些实用程序,例如 |debug|
这个断言只是像这样启动调试器:
一旦断言被击中,调试器就会启动。
这样做的优点是您可以快速将其弹出到您喜欢的任何位置。有时,您可能会进行一次很长的测试,一遍又一遍地使用相同的断言,在这种情况下,这很好,因为您可以在出现问题的断言之前进行测试。
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:
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.
我创建了一个简单的实用程序,可以调用 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.