I have system of:
- svn – control version
- cc.net – as ci server
- msbuild – as a build system
- nunit – for launch test
- webdriver – for web-testing.
Now my tests are run automatically after each commit. But i want that my test run if commit has comment #runautotest (or another).
I investigated triggers of cc.net but its are for another goals.
I try to found some information about cc.net parse logs but this was don’t has positive result.
What kind of ways i should use for resolve my issue?
In the ccnet config, in the project, at the top of the tasks block:
This will write the SVN modifications to a file.
Next in the tasks block:
This will run a Nant task after the modificationwriter task.
In conditionally_run_nunit_tests, search the file c:\modsdir\svn_mods.xml for #runautotest. If you find it, run the tests. If you don’t find it then do nothing. There are various ways to parse the mods file. You could use C# script to read the entire file into a string and then call Contains passing in #runautotest.
The below code is an example of using C# script in Nant. SearchFile opens a file, reads it into a string and checks if a value is in the string. It returns “yes” or “no”. The below script is untested.