Ian Boyd
Ian Boyd

Reputation: 256581

Web-based NUnit test runner for ASP.net?

Is there any web-based test runner; to run a web-site's unit tests from the web-site?


i know this is runs afoul of some people's dogma, but i want to be able to run unit tests from inside the product i'm testing. Whether this be from inside the native Win32 executable, or from within a .NET executable.

A guy has already written a web-based AJAX test runner for UnitTest++.

In the past i had to rip apart NUnit, so i could tests embedded in the executable without having to ship NUnit dlls. This required me to also write my own graphical test-runner for Windows/WinForms.

Has anyone already done the work of creating runnable unit-tests for ASP.net?


Note: The usual response by people: "Unit tests are not supposed to be in the final product, and definitely not accessible by testers, support, or developers, when on-site."


Note: You may disagree with my desire to run unit tests, but don't let that affect your answer. If there is no web-based nunit test runner for ASP.net then that's the answer. Don't be afraid to answer the question. i won't bite.

Upvotes: 2

Views: 1530

Answers (2)

Doug Domeny
Doug Domeny

Reputation: 4470

Found NUnitWebRunner on github https://github.com/tonyx/NUnitWebRunner

Upvotes: 1

Jupaol
Jupaol

Reputation: 21355

I think the reasons why you want to do this kind of thing is because of the lack of a Continuous Integration server, I cannot think another justification, so instead of trying to patch your design by doing this, it would be cleaner if you evaluate the implementation of a CI server (which it's not so difficult, for instance you could look at: NCastor)

So in my opinion what you need is to setup a continuous integration server in order to run unit tests and integration tests automatically as part of your automated build process.

You would be deploying your application to the next 'stage' only when the build process and the tests are valid, you can also configure the CI server to perform:

  • run tests
  • run static analysis
  • run non-static analysis
  • generate tests-reports
  • run tests with test coverage
  • calculate and set application version
  • create packages of your application
  • modify config files according to the target stage
  • minify your scripts
  • send emails when a build fails

Among others

And as you mentioned, you wouldn't need to deploy the tests to your production servers

I strongly recommend you to read the next article:

http://misko.hevery.com/2008/07/16/top-10-things-i-do-on-every-project/

And this is a list of some CI servers

  • Jenkins - Free & Easy configuration
  • Hudson - Free & Easy configuration
  • TeamCity - Free for Open Source projects
  • Cruise Control - Free (however, this has decreased in popularity because configuration is only available through XML files, it's annoying...)

Upvotes: 2

Related Questions