Test specific test sets in Julia v0.5

In Julia v0.5 we can group tests with

@testset "Group 1" begin
  @test ...
  @test ...
end

@testset "Group 2" begin
  ...
end

Is there any way to only test a specific group like Pkg.test("Foo", "Group 1")? This is particularly convenient for when we are designing tests and do not want to rerun the entire test suite.

P.S.: Discourse is a major improvement over Google Groups, I liked it! How to create new tags for a topic? I couldn’t tag this post as “testing” for instance.

You need to have a trust level of 3 or higher to create a new tag.

What are trust levels?

1 Like

testsets argument to Pkg.test() · Issue #15404 · JuliaLang/julia · GitHub is probably what you’re looking for.

1 Like

OFF-TOPIC: For a description of how Discourse trust levels apply specifically to Julia community, read Roles.

It might not be quite what you’re looking for, but I’ve implemented something similar in the TestSetExtensions package. If you split up your tests into files the @includetests macro takes an argument for which tests to run. This is more useful when running your tests from the command line than the REPL though.

2 Likes

@mike that is exactly it, thank you.