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

前端 未结 8 1276
独厮守ぢ
独厮守ぢ 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 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.

提交回复
热议问题