IMO, the need for testing, and the requirements of testing style/paradigm, depends much more on the type of project than on the language. Working with TDD/BDD etc is great for some kinds of projects, and not so great for others. For example, while I imagine BDD would be a great tool in core language development, it's really overkill if I'm using Julia just to hack together a small script for quick data analysis.
When it comes to packages, there is really a wide span in project size and complexity. Some packages are merely wrapped-up scripts that someone at some point figured would maybe be useful again, while others are full-fledged monsters to be used everywhere by everyone. The need for any testing at all is, naturally, much bigger in the latter type of projects. I think Iain's work with PackageEvaluator.jl, Coverage.jl etc has been a wonderful inspiration here, encouraging all package developers to put together at least a small suite of sanity tests for their packages, and there have been several occations when his systems picked up changes to the Julia core that broke a lot of stuff, allowing for quick fixing of those issues. Major kudos there! When it comes to testing tools, I did try out FactCheck a long time ago, when I was starting on a test suite for the ODE package and didn't find the output from Base.Test to my liking at the time. Then, I thought it was a great tool for testing. However, now that so many packages have CI hooks with Travis, I don't think the exact form of the output is so important anymore - I only ever have to look at it if the tests fail, and then I'd have to start digging after why anyway. After that I've written plenty of tests for things in other packages and found the Base.Test tools quite adequate. I'm all for testing - any code without a test-suite might already be broken with nobody knowing about it. And even if you only have a couple of really simple tests, it's way better than nothing at all - you can always add more tests when bugs are filed. But prescribing one way to test Julia code, that becomes a "testing style to rule them all", is probably never going to spread to the entire ecosystem - and I think that's a good thing. // T On Thursday, June 26, 2014 8:00:10 PM UTC+2, Aerlinger wrote: > > I don't hear too much discussion around techniques for testing in Julia so > I wanted to get other community members' take on how they test their code. > As I see it, there are two testing packages available: the built-in > functional and unit tests ( > http://docs.julialang.org/en/latest/stdlib/test/) and the Fact Check > package (https://github.com/zachallaun/FactCheck.jl). Most projects I see > either don't have tests or use the built-in libraries. > > The Javascript and Ruby communities have recently become very bullish on > testing, particularly on a behavior-driven development (BDD) style where > tests are written first to describe the requirements of the code and run > continuously as the code gets developed. As an example, the very popular > RSpec, Mocha, and Jasmine testing frameworks take this approach and seem to > have been well adopted and supported by their respective communities. > > My question is, would there be much value with a similar style of testing > in Julia? >
