<p>Will do. Thanks for the suggestion.</p>
<p>Ross<br>
</p>
<div class="gmail_quote">On Dec 1, 2013 4:32 PM, "Joshua Ulrich" <<a href="mailto:josh.m.ulrich@gmail.com">josh.m.ulrich@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
While you're working on unit testing, also think about performance<br>
benchmarking. I've wanted to write something like Wes McKinney's<br>
(Python pandas author) vbench package for R ever since I was able to<br>
make large performance improvements to quantstrat. I'm not suggesting<br>
you work on building that functionality, but rather than you keep<br>
notes on which functions should be monitored for performance<br>
regressions.<br>
--<br>
Joshua Ulrich | <a href="http://about.me/joshuaulrich" target="_blank">about.me/joshuaulrich</a><br>
FOSS Trading | <a href="http://www.fosstrading.com" target="_blank">www.fosstrading.com</a><br>
<br>
<br>
On Sun, Dec 1, 2013 at 6:21 PM, Ross Bennett <<a href="mailto:rossbennett34@gmail.com">rossbennett34@gmail.com</a>> wrote:<br>
> Sounds good, I'll get started with tests for the demos and add tests for<br>
> specific functions only as needed. I like the idea of 'integrated testing'<br>
> using the demo files. It will also be a good opportunity to look closer at<br>
> the demos to make sure each demo is comprehensive and serves a specific<br>
> purpose.<br>
><br>
> Thanks for the guidance!<br>
><br>
> Ross<br>
><br>
><br>
><br>
> On Sun, Dec 1, 2013 at 2:46 PM, Brian G. Peterson <<a href="mailto:brian@braverock.com">brian@braverock.com</a>><br>
> wrote:<br>
>><br>
>> As you say, both approaches have merit.<br>
>><br>
>> I would suggest starting with the demos, as this will test a broad set of<br>
>> functionality, and provides 'integration testing' for the entire package.<br>
>> It also minimizes test code to write at first.<br>
>><br>
>> I agree that testing specific functions and inputs may be 'more robust',<br>
>> but it will also take (significantly) more time to design a test plan and<br>
>> suite of separate tests. I don't want to discourage that by any means, but<br>
>> I would want to get test coverage for the functionality in the demos first.<br>
>><br>
>> Regards,<br>
>><br>
>> Brian<br>
>><br>
>><br>
>> On 12/01/2013 02:29 PM, Ross Bennett wrote:<br>
>>><br>
>>> With the optimization I've been doing in constrained_objective and now<br>
>>> with the ROI changes, I am really starting to appreciate a more formal<br>
>>> testing process instead of running demos and seeing what fails. I've<br>
>>> started playing with the testthat package and really like it.<br>
>>><br>
>>> I've had a look at quantstrat and plyr to see how the testthat package<br>
>>> is used. The main difference is that quantstrat uses the demo files<br>
>>> whereas plyr uses manually written test files. There are pros and cons<br>
>>> to both approaches... using the demos as the tests minimizes duplicate<br>
>>> code, but manual tests allow us to test specific things we may not<br>
>>> need/want in the demos.<br>
>>><br>
>>> I want to write some tests using testthat to include in<br>
>>> PortfolioAnalytics, but would like your guidance on what framework or<br>
>>> approach to use before I begin.<br>
>><br>
>> _______________________________________________<br>
>> GSoC-PortA mailing list<br>
>> <a href="mailto:GSoC-PortA@lists.r-forge.r-project.org">GSoC-PortA@lists.r-forge.r-project.org</a><br>
>> <a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta" target="_blank">http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> GSoC-PortA mailing list<br>
> <a href="mailto:GSoC-PortA@lists.r-forge.r-project.org">GSoC-PortA@lists.r-forge.r-project.org</a><br>
> <a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta" target="_blank">http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta</a><br>
><br>
_______________________________________________<br>
GSoC-PortA mailing list<br>
<a href="mailto:GSoC-PortA@lists.r-forge.r-project.org">GSoC-PortA@lists.r-forge.r-project.org</a><br>
<a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta" target="_blank">http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta</a><br>
</blockquote></div>