# Using Artifacts for test data

**URL:** https://discourse.julialang.org/t/using-artifacts-for-test-data/46783
**Category:** General Usage
**Tags:** question
**Created:** [September 17, 2020, 2:48pm UTC](https://discourse.julialang.org/t/using-artifacts-for-test-data/46783 "2020-09-17T14:48:01Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![NicholasWMRitchie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nicholaswmritchie/32/22449_2.png) [@NicholasWMRitchie](https://discourse.julialang.org/u/NicholasWMRitchie)
#### Post date: [September 17, 2020, 2:48pm UTC](https://discourse.julialang.org/t/using-artifacts-for-test-data/46783/1 "2020-09-17T14:48:01Z")

</div>

Before 1.5, I’d used Artifacts quite successfully to make a large data set (10’s of MB) available for testing. I don’t want to include the test data in the main package because many users will never use it. The Artifact mechanism seemed ideal.

However, recently the scheme has broken. It seems that since Julia is now caching the artifacts on its own server, it no longer looks to the URL specified in the Artifact.toml file for the data. I notice this as errors on Travis

```julia
Downloading artifact: rplraw
Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."
At line:12 char:1
+ $webclient.DownloadFile("https://pkg.julialang.org/artifact/bfa36c455 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

```

How do I make the Artifact data available through the cache site? Am I supposed to use PkgBuilder for non-executables?

Thanks!

---

<div class="post-metadata">

### Author: ![Brad\_Carman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brad_carman/32/17631_2.png) [@Brad\_Carman](https://discourse.julialang.org/u/Brad_Carman)
#### Post date: [August 12, 2022, 5:42pm UTC](https://discourse.julialang.org/t/using-artifacts-for-test-data/46783/2 "2022-08-12T17:42:57Z")

</div>

I know this is old, but this is a great idea! I have the same problem, my unit tests require a large dataset, I don’t want this to live in the project, so artifacts seems like the perfect solution.

Did you find a solution?

---

<div class="post-metadata">

### Author: ![NicholasWMRitchie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nicholaswmritchie/32/22449_2.png) [@NicholasWMRitchie](https://discourse.julialang.org/u/NicholasWMRitchie)
#### Post date: [August 12, 2022, 5:50pm UTC](https://discourse.julialang.org/t/using-artifacts-for-test-data/46783/3 "2022-08-12T17:50:20Z")

</div>

Yes, I use DataDeps.jl - It works really nicely on local computers and is relatively transparent. However, it doesn’t work so well for CI.

---

<div class="post-metadata">

### Author: ![Brad\_Carman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brad_carman/32/17631_2.png) [@Brad\_Carman](https://discourse.julialang.org/u/Brad_Carman)
#### Post date: [August 12, 2022, 5:53pm UTC](https://discourse.julialang.org/t/using-artifacts-for-test-data/46783/4 "2022-08-12T17:53:44Z")

</div>

OK, CI is what I’m currently trying to figure out. If I don’t have control over the computer that is used for testing, it’s hard to figure out how to quickly make large datasets available. And of course these datasets shouldn’t live inside the package. And I have several separate packages that all use this same data for testing. Something I can deal with on my local PC, but challenging in the cloud!

---

<div class="post-metadata">

### Author: ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)
#### Post date: [October 25, 2022, 10:28am UTC](https://discourse.julialang.org/t/using-artifacts-for-test-data/46783/5 "2022-10-25T10:28:38Z")

</div>

Any updates on this issue? Perhaps this is related to Github artifact cache?

I’m getting the following error from CI (locally tests work fine):

```julia
ERROR: LoadError: Artifact "MyArtifact" was not installed correctly.
Try `using Pkg; Pkg.instantiate()` to re-install all missing resources.

```
