Scheduled Automate execution of test in nunit
How could I automatically execute the test in Nunit at a specific time. For instance I want to run the tests on a 开发者_C百科nightly build basis
You could use an CI system like hudson or Cruisecontrol.NET, these systems have support for most of the .NET unit testing frameworks. We use MSTest for the newer projects and NUnit and build these with Hudson.
You could just setup a scheduled task to run the nunit-console.exe application and point it to your unit test project.
Just a side note, continuous integration would say you'd build your software after every check-in and as part of that build you'd run your unit test. But running/building your code nightly is a good system too.
You could look at Cruise Control.
http://cruisecontrol.sourceforge.net/
I once worked for a client who used cruise control and nant/nunit for building checked in code automatically and then deploying it for automatic updates to their desktop application.
I think you should have a look to TeamCity, this is a very nice tool to automate all sort of test, and in particular case those with NUnit,
we use TeammCity for:
- Nunit : test code base of 3 000 tests
- NCover: to measure coverage
- Documentation generation
- Web Test (with NUnit and WatiN)
- Code sanity checks
We used to have Cruise Control 3 years ago and I have to say that it is less stable then TeamCity (or it was).
EDIT:
And TeamCity is a distributed architecture that let you have 3 agents (if you take the free license) that runs every sort of build you've configured.
All the Answers sounds good but we found out another way using MSBuild with Nunit for TeamBuild. Here is a detailed step by step procedure for it.
http://blog.drorhelper.com/2010/06/how-to-run-your-unit-tests-as-part-of.html
http://nunit4teambuild.codeplex.com/releases/view/45765
精彩评论