Quantitative finance collector
C++ Matlab VBA/Excel Java Mathematica R/Splus Net Code Site Other
Feb 25

Automatic Code Testing

Posted by abiao at 17:37 | Code » Other | Comments(0) | Reads(6606)
Everyday you write your quantitative finance code, test the code, crash; then modify it, test it, maybe crash again, and so on. Is there an automatic testing tool doing these boring, repetitive procedures for you? YES. Automatic Testing is a great tool to increase productivity and save time. It helps you catch bugs early by allowing frequent retesting of your code as you develop. This prevents code "regressing" in the sense of reintroducing previously identified and fixed bugs in later updates to your code.

Automatic Testing is made simple and quick through the use of unit testing frameworks, the most popular amongst these is xUnit which has implementations in most modern programming languages. For Matlab we have a version of mlUnit available for your use. In python, pyUnit is part of the standard library and is available as a standard package unittest. For R there is RUnit.

Main Benefits:  

much less time spent chasing bugs and debugging;
higher quality of code and software;
provides documentation of which functionality has been tested;
greater confidence to make changes to existing code since unit tests will catch incompatibilities early.

Sounds nice? Downloading packages at:
http://mlunit.dohmke.de/Main_Page for Matlab
http://docs.python.org/library/unittest.html for Python
http://cran.r-project.org/web/packages/RUnit/index.html for R.

Tags: ,
Add a comment
Enable HTML
Enable UBB
Enable Emots
Nickname   Password   Optional
Site URI   Email   [Register]