# Ad-hoc tests of many tests

**URL:** <https://discourse.julialang.org/t/ad-hoc-tests-of-many-tests/61955>\
**Category:** New to Julia\
**Created:** [May 27, 2021, 7:11pm UTC](https://discourse.julialang.org/t/ad-hoc-tests-of-many-tests/61955 "2021-05-27T19:11:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [May 27, 2021, 7:11pm UTC](https://discourse.julialang.org/t/ad-hoc-tests-of-many-tests/61955/1 "2021-05-27T19:11:42Z")

</div>

I have a bunch of random scripts that I’ve accumulated over the course of a few months. These are small things that I wrote to illustrate a half-baked idea while making meetings with my advisor.

I want to make sure these scripts work, in case I ever need to return to these ideas, but I don’t want to put in the effort to turn all of these ideas into a cohesive package. The scripts are all roughly

```julia
struct Economy
    r
    s
end

function solve_for_equilibrium(e::Economy)
...
end

function main()
    r = .05; s = .2;
    e = Economy(r, s)
    solve_for_equilibrium(r, s)
end

```

Given that they all share a `Project.toml` , I want an easy way to make sure I don’t break anything when I `] up`. I definitely don’t want to put in the effort to make each tiny script have their own package structure.

So I created a `test/runtests.jl` and it looks like this

```julia
module jan_31
    include("../src/jan_31.jl")
    main()
end

module feb_18
    include("../src/feb_18.jl")
    # no functions, al in global scope
end

module feb_25
    include("../src/feb_25.jl")
    main()
end

module march_10
    include("../src/march_10.jl")
    # no functions, all in global scope
end

module march_18
    include("../src/jan_31.jl")
    # no functions, all in global scope
end

module march_25
    include("../src/march_25.jl")
    main()
end

```

I put everything in their own module to avoid name clashes and redefinitions of structs like `Economy`. I don’t want the scripts themselves to be `module ... end` because they are just sketches and meant to be used interactively.

Does anyone have any ideas for good patterns / best practices here?
