Microsoft.Net 2008/2010 的源代码控制、TDD 和 CI 入门最简单的工具集是什么

发布于 2024-08-24 00:40:08 字数 1539 浏览 5 评论 0原文

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

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

发布评论

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

评论(7

揽月 2024-08-31 00:40:08

我不建议立即将所有这些工具和方法扔给您的团队,采取小步骤。一次介绍一个。有些会自然而然地发生。

I wouldn't recommend dumping all these tools and methodologies on your team at once, take baby steps. Introduce one at a time. Some will come naturally.

场罚期间 2024-08-31 00:40:08

有很多不错的选择,但我个人可以推荐这些:

这些很容易上手,因为它们都是很好的产品,有合理到非常详细的记录,并且被广泛使用(因此很容易获得帮助)。

There are many good choices, but I can personally recommend these:

These are easy to get started with because they're all good products, reasonably to very well-documented, and widely-used (so it's easy to get help).

自演自醉 2024-08-31 00:40:08

如果不能达成共识,那么引入新工具总是很困难。专注于建立共识,而不是工具。

SVN 非常好(与 Ankh 和 TSVN 一起),但对于习惯 SourceSafe 的人来说可能有点令人惊讶。

TDD 是一种技术,而不是一个工具集,因此您需要书籍、博客等。要获得支持它的工具,可以是 NUnit 或 MSTest。持续集成是必须具备的。 CruiseControl.Net 非常好(尽管最初配置有点困难)。另请考虑 TeamCity。

你们有错误跟踪系统吗?

哦,如果你的管理团队那么冷漠,请考虑退出。

更新:你说过他们与其说是“冷漠”,不如说是“不干涉”。问题:他们真的不干涉吗?他们会让你继续前进吗?或者他们是“现状”——“它没有坏,所以不要修复它,也不要破坏现状”?

It's always going to be difficult to introduce new tools if you can't build a consensus. Focus on building the consensus, rather than on the tools.

SVN is very good (with Ankh and TSVN), but it can be a bit surprising to people used to SourceSafe.

TDD is a technique, rather than a toolset, so you need books, blogs, etc. For tools to support it, NUnit or MSTest. Continuous Integration is a must-have. CruiseControl.Net is pretty good (though a bit difficult to configure initially). Consider also TeamCity.

Do you have a bug-tracking system?

Oh, and if your management team is that apathetic, consider quitting.

Update: you've said that they're not so much "apathetic" as "hands-off". Question: are they really hands-off, and will they let you move things along? Or are they "status quo" -- "it ain't broke, so don't fix it, and don't rock the boat"?

时间海 2024-08-31 00:40:08

我认为你可以举出一个非常非常好的例子,在过去的两年里,敏捷已经完全被微软所接受。我知道 Codeplex、MEF 和 ASP.NET MVC 团队对此非常投入。我还认为 Visual Studio 和 Windows 7 团队的部分人员是敏捷的。还要考虑到 Visual Studio 2010 包含开箱即用的重构,这些重构在 TDD 环境之外并没有多大意义,而且敏捷是 TFS 的默认项目管理模板,并且是完全不同的企业文化图景从过去的一年开始出现。

至于具体的工具。 TFS 对于源代码控制来说还可以,但我发现它非常重量级且挑剔。其他人提到了 Subversion,但如果您担心 MS 的祝福,那么直接跳到 Mercurial 可能会有更好的运气。它是一种更先进的 SCM,但现在由 Codeplex 原生支持,并且具有出色的 Windows 集成。我从未使用过它,但我非常喜欢它的表弟 git。

测试驱动开发:从 MSTest 开始,它不像任何人想要的那么光滑,但也不是世界上最糟糕的事情。我还推荐 MbUnit,它具有 NUnit 的所有功能以及对集成测试的良好支持,您在开始测试时可能会偶然编写这些集成测试。哦,如果您有定制狂,我会敦促他看看 XUnit.Net。

Mocking:选择基本上是Rhino Mocks 或MoQ。 这是我为 Rhino Mocks 编写的快速介绍,涵盖了所有基础知识。话虽如此,权衡似乎是 RM 的更多文档与 MoQ 的不太容易出错的语法。

测试运行器:如果您开始使用 MSTest,您会发现通过使用 TestDriven.Net、resharper 或 coderush 而不是内置的测试运行器,您可以在测试运行中获得显着的速度提升。话虽如此,不要低估独立的测试运行程序。他们偶尔会表现得很好。我强烈推荐 MbUnit 附带的 Gallio Icarus runner。

I think you can make a really really good case that within the last two years Agile has become completely and totally embraced by Microsoft. I know for a fact that the Codeplex, MEF, and ASP.NET MVC teams are quite steeped in it. I also think that visual studio and parts of the windows 7 team are Agile. Also consider that Visual Studio 2010 includes out-of-the-box refactorings that don't really make much sense outside the context of TDD and that Agile is the default project management template for TFS and a picture of a corporate culture that is quite different from the one of years past starts to emerge.

As for specific tools. TFS is OK for source control but I find it very heavyweight and finicky. Others have mentioned Subversion but if you're worried about MS blessings you might have better luck jumping straight to Mercurial. Its a more advanced SCM but it is now supported natively by Codeplex and has excellent windows integration. I've never used it but I am in deep tool-love with it's cousin git.

Test driven development: Start with MSTest, its not as slick as anyone would like but its not the worst thing in the world. I would also recommend MbUnit which has all of NUnit's features along with some good support for the integration tests that you will probably be writing by accident as you are starting out with testing. Oh, and if you have customization freak I would urge him to look at XUnit.Net.

Mocking: The choice is basically Rhino Mocks or MoQ. Here's a quick intro I wrote for Rhino Mocks that goes over all the basics. That being said, the trade off seems to be more documentation for RM versus a very mildly less error prone syntax for MoQ.

Test Runners: If you start out with MSTest you'll notice that you can get a significant speed boost in your test runs by using TestDriven.Net, resharper or coderush rather than the built in test runner. That being said, don't underestimate the standalone test-runners. They can be quite good every once in a while. I heavily recommend Gallio Icarus runner which comes with MbUnit.

迎风吟唱 2024-08-31 00:40:08

我想回应 George Mauer 所说的话,并建议从 MSTest 开始进行单元测试。它就在 Visual Studio 开始的包装盒中,这将有助于您的事业,因为它是“MS 有福”。

我会从单元测试开始,然后从那里开始,几个月后“看看我们的生活现在变得多么容易,我们已经自动化了这些测试”,我会更上一层楼。考虑添加像 Selenium 或 WatiN 这样的东西。一旦你开始使用它,就可以启动你的 CI 服务器。 “如果我们不必手动开始所有这些测试,那不是很好吗?...”

我想一个像样的 SCM 可能是一个症结所在。 SourceSafe 总比没有好。也许自己开始使用 Mercurial 或 Git?向那些愿意改变的人展示其好处,最终当你周围的其他人想要改变时,你顽固的开发人员就会改变。希望如果他属于少数派,他会发现更难大声喊叫。

查看 http://www.viget.com/extend/ effectively -using-git-with-subversion/ 混合不同 SCM 的想法。

我还想+1 mxmissile 说要慢慢来。我想你会发现一次性引入所有这些变化是非常困难的。如果你不习惯的话,一开始要接受的东西很多。尝试选择你最薄弱的部分,或者会增加最大价值并从那里开始积累。

祝你好运!

I want to echo what George Mauer has said and suggest starting with MSTest for your unit testing. It's right there in the box to begin with Visual Studio, this will help in your cause as it's "MS blessed".

I would start with unit testing and take it from there, after a few months of "look how easier our life is now we have these tests automated" I'd take it up a notch. Consider adding something like Selenium or WatiN to the mix. Once you're rolling with that, get your CI server up. "Wouldn't it be great if we didn't have to start off all these tests manually?..."

I guess a decent SCM might be a sticking point. SourceSafe is better than nothing. Perhaps start using Mercurial or Git yourself? Show those open to the change the benefits, eventually your stubborn dev will come around when others around him are wanting to switch. Hopefully, he'll find it harder to shout if he's in the minority.

Check out http://www.viget.com/extend/effectively-using-git-with-subversion/ for ideas with mixing up different SCMs.

I also want to +1 mxmissile for saying to take things slowly. I think you'll find it very difficult to introduce all these changes in one go. It's a lot to take in at first if you're not used to it. Try to pick the part you're weakest on, or will add the most value and build up from there.

Good luck!

缘字诀 2024-08-31 00:40:08

让我着迷于 TDD 的一个工具是 TestDriven.Net ,它将测试结果放在“输出”窗口中。我将其映射到 F8 键,工作效率得到了极大的提高;编写一个测试,按 F8 并在输出窗口中查看结果。

我还必须区分单元测试和 TDD 的一个建议。我发现 TDD 很难推广到团队中,而;单元、集成或功能测试更容易销售。进行大量测试可以节省日复一日进行手动测试的时间,这是一个巨大的胜利。

一段时间后,人们会开始欣赏一些新想法,如果它对他们的日常生活有帮助的话。然后您将能够引入构建服务器,并摆脱 SourceSafe。

One tool that got me hocked on TDD is TestDriven.Net which puts the test results in the Output window. I mapped this to the F8 key and the productivity gain is superb; write a test, press F8 and see this results in the output window.

One suggestion I also have to differentiate between having Unit Tests and doing TDD. I have found that TDD can be hard to push on to a team, while; unit, integration or functional tests are an easier sell. Having a bunch of tests that saves an hour going through a manual test day after day is a big win.

After a while people will start to appreciate some new ideas if it is helping them in their daily life. Then you'll be able to introduce a build server, and move away from SourceSafe.

画尸师 2024-08-31 00:40:08

在 .NET 环境中,最常使用 Microsoft Visual SourceSafe。 (但需要付费)。接下来,您可以选择 SVN 或 GIT。 Git 是最近出现的(并且越来越流行)。一旦获得它,它比 SVN 更容易使用。

http://git.wiki.kernel.org/index.php/GitSvnComparison 可能有助于您的决定。

In .NET environments, Microsoft Visual SourceSafe is most frequently used. (but it costs). Next to that you can opt for SVN or GIT. Git is more recent (and gaining popularity). It's easier to work with than SVN once you get it.

http://git.wiki.kernel.org/index.php/GitSvnComparison might help with your decision.

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