Best way to do TDD in express versions of visual studio(eg VB Express)

前端 未结 8 1235
独厮守ぢ
独厮守ぢ 2020-12-16 16:18

I have been looking in to doing some test driven development for one of the applications that I\'m currently writing(OLE wrapper for an OLE object). The only problem is tha

相关标签:
8条回答
  • 2020-12-16 16:57

    Unfortunately Jamie Cansdale, main proponent of TestDriven.NET and NUnit, ran into a lot of legal trouble when he put up TestDriven.NET that works with Visual Studio Express 2005 edition.

    VS 2008 Express's EULA has been modified to lock TestDriven.NET out of the IDE.

    I think the only way you can run your tests would be to explicitly open the compiled DLLs with the NUnit client outside of Visual Studio.

    0 讨论(0)
  • 2020-12-16 17:01

    for tdd, there's been some development for vs express 2008, and you can find more info in this site. it's called unit express gui

    0 讨论(0)
  • 2020-12-16 17:02

    Also tried to integrate Unit Testing into Visual Studio 2008 Express and found this site: link. Works great - and without leaving Visual Studio :)

    0 讨论(0)
  • 2020-12-16 17:04

    Microsoft won't allow 3rd party extensions for the express editions for visual studio. As Jon Limjap already mentioned Testdriven.Net won't work for visual studio. Other test-runners that integrate with visual studio like the one in resharper won't work either.

    Luckilly most unit-testing frameworks like Xunit.Net, Nunit and MBUnit have their own stand-alone testrunner. You can compile your tests with visual studio express then load the test-assemblies in the testrunner and execute the tests.

    You can't test code in web-projects this way. You need to put the tests and the code you want to test in separate class-libraries. Web projects are compiled on demand by the webserver and this makes testing difficult.

    A useful addition by Marc Gravell: Web site projects are compiled on demand. Web application projects are pre-compiled.

    So you should be able to run tests in a web-application project with an external test-runner.

    0 讨论(0)
  • 2020-12-16 17:04

    For unit testing you can use NUnit.

    For code completion you can use NCover and NCoverExplorer.

    All the above don't plug into Visual Studio Express but they do have their own UI. I normally run my tests using a batch script.

    0 讨论(0)
  • 2020-12-16 17:09

    You might also want to consider ExpressUnit as a light weight testing framework for VS 2008 Express. The framework integrates into your solution in the form of a class library which means you don't need an external test runner to run your tests. This gives you the advantage of running your tests in-process which means you can debug your tests directly. Since VS 2008 Express is not able to attach third pary tools running out of process, this might be helpful. ExpressUnit is available as a WPF app.

    Read more here http://torgeirhelgevold.wordpress.com/2008/05/31/unit-testing-in-visual-studio-express-2008/

    Tor

    0 讨论(0)
提交回复
热议问题