Best way to run unit tests after each commit? - svn - branch for each function

What is the best way to run your unit test suite after each commit?

I am especially interested in the fact that you are doing all your functions / changes in branches and keep your chest stable.

My source of control is SVN, and I use tortoise SVN as my client.

Is there an SVN event or something else along these lines that I can call a .cmd / .bat file?

If the answer is cruisecontrol, how do you check all branches using cruise control?

+4
source share
4 answers

I would think that you probably should run your unit tests before committing. If you intend to test with each commit, you must do this early enough to reject the violation.

You can do this with subversion hooks . If you add a pre-commit hook, you can build / test before committing. The crane script will be executed on the server.

+9
source

You need a continuous integration server such as CruiseControl. This will track the svn for changes, the fire builds on the commit, tracks it with the launch of the test suite and puts any errors directly into your tray (or email or any other notification that suits you) You need to configure CruiseControl by writing a small script (mainly XML) that defines your project needs. Recommended .. you will not return as soon as you try it. Here is the one that I installed on this day

Update . I do not think that there is a global check of all types of branches. Each branch must have a different trunk address ... which means a different project for CruiseControl. If you follow the recommended subversion branch path ( see here ), since CruiseControl itself seems to use the branches in Subversion .. this seems to be the way to go.

+2
source

I would also set up an automatic build / deployment process. Check Cruise Control - It can run unit tests before deployment.

http://cruisecontrol.sourceforge.net/

0
source

Use buildbot .

This utility has svn_buildbot.py, which can be called from your disruptive post-commit script.

Buildbot is a shutdown (as well as a number of other VC systems), so you can configure it to pull new versions from the branches that you joined. It also provides email notifications and a web interface for checking the status and forcing assemblies in a specific revision / branch.

0
source

Source: https://habr.com/ru/post/1276915/


All Articles