[GSoC-PortA] PortfolioAnalytics Testing

Brian G. Peterson brian at braverock.com
Sun Dec 1 21:46:46 CET 2013


As you say, both approaches have merit.

I would suggest starting with the demos, as this will test a broad set 
of functionality, and provides 'integration testing' for the entire 
package.  It also minimizes test code to write at first.

I agree that testing specific functions and inputs may be 'more robust', 
but it will also take (significantly) more time to design a test plan 
and suite of separate tests.  I don't want to discourage that by any 
means, but I would want to get test coverage for the functionality in 
the demos first.

Regards,

Brian

On 12/01/2013 02:29 PM, Ross Bennett wrote:
> With the optimization I've been doing in constrained_objective and now
> with the ROI changes, I am really starting to appreciate a more formal
> testing process instead of running demos and seeing what fails. I've
> started playing with the testthat package and really like it.
>
> I've had a look at quantstrat and plyr to see how the testthat package
> is used. The main difference is that quantstrat uses the demo files
> whereas plyr uses manually written test files. There are pros and cons
> to both approaches... using the demos as the tests minimizes duplicate
> code, but manual tests allow us to test specific things we may not
> need/want in the demos.
>
> I want to write some tests using testthat to include in
> PortfolioAnalytics, but would like your guidance on what framework or
> approach to use before I begin.


More information about the GSoC-PortA mailing list