How to test plot recipes?



Plot recipes can reduce the test coverage considerably. For example, my coverage is currently at 76% and a big part of the remaining 24% is due to a plot recipe:

How should I go about testing plot recipes? Is there any way to design meaningful tests without human interaction?


Or you could just call RecipesBase.apply_recipe with arguments that will
dispatch to your recipe.


@tbreloff I really like the idea of VisualRegressionTests.jl, but apparently I am missing something about how it works. As you can see, the recipe itself is not covered by the tests that I wrote:


It’s not clear to me how to use this way of testing. Should the first argument to RecipesBase.apply_recipe be an empty dictionary Dict{Symbol,Any}()?


As a side comment, this coverage issue doesn’t exist anymore. It was fixed somewhere in Plots.jl or VisualRegressionTests.jl.