# How to add "build step" and "tests" in a new julia package?

**URL:** https://discourse.julialang.org/t/how-to-add-build-step-and-tests-in-a-new-julia-package/21058
**Category:** General Usage
**Created:** [February 21, 2019, 8:28pm UTC](https://discourse.julialang.org/t/how-to-add-build-step-and-tests-in-a-new-julia-package/21058 "2019-02-21T20:28:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Mahbubar06](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@Mahbubar06](https://discourse.julialang.org/u/Mahbubar06)
#### Post date: [February 21, 2019, 8:28pm UTC](https://discourse.julialang.org/t/how-to-add-build-step-and-tests-in-a-new-julia-package/21058/1 "2019-02-21T20:28:42Z")

</div>

Hello,  
I wanted to create a julia package. For that i followed the following steps:

```nohighlight
(v1.1) pkg> generate HelloWorld
shell> cd HelloWorld
(v1.1) pkg> activate .
julia> import HelloWorld
julia> HelloWorld.greet()

```

The output shows: “Hello World!”. So far is good. The project has been activated and package has been loaded. I also added dependencies successfully:

```nohighlight
(HelloWorld) pkg> add Random JSON

```

Now I am getting error when trying to add build step:

```nohighlight
shell> cat deps/build.log
ERROR: IOError: could not spawn `cat deps/build.log`: no such file or directory (ENOENT)

```

I am also getting error when trying to add tests:

```nohighlight
shell> cat test/runtests.jl
ERROR: IOError: could not spawn `cat test/runtests.jl`: no
such file or directory (ENOENT)

```

Could you let me know whats going wrong here?

---

<div class="post-metadata">

### Author: ![00vareladavid](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00vareladavid/32/23521_2.png) [@00vareladavid](https://discourse.julialang.org/u/00vareladavid)
#### Post date: [February 21, 2019, 8:51pm UTC](https://discourse.julialang.org/t/how-to-add-build-step-and-tests-in-a-new-julia-package/21058/2 "2019-02-21T20:51:47Z")

</div>

`generate` does not create those files by default, you have to create them yourself.

A barebones `runtests.jl` will look like:

```julia
module HelloWorldTests
import HelloWorld
HelloWorld.greet()
end

```

---

<div class="post-metadata">

### Author: ![Mahbubar06](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@Mahbubar06](https://discourse.julialang.org/u/Mahbubar06)
#### Post date: [February 21, 2019, 9:51pm UTC](https://discourse.julialang.org/t/how-to-add-build-step-and-tests-in-a-new-julia-package/21058/3 "2019-02-21T21:51:27Z")

</div>

Thank you @00vareladavid for letting me know what was wrong with my approach.
