# New script for uploading binary testing data

**URL:** <https://discourse.itk.org/t/new-script-for-uploading-binary-testing-data/1484>\
**Category:** Community\
**Tags:** contributing\
**Created:** [December 17, 2018, 8:46pm UTC](https://discourse.itk.org/t/new-script-for-uploading-binary-testing-data/1484 "2018-12-17T20:46:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)\
**Post date:** [December 17, 2018, 8:46pm UTC](https://discourse.itk.org/t/new-script-for-uploading-binary-testing-data/1484/1 "2018-12-17T20:46:26Z")

</div>

We now have a [new script](https://github.com/InsightSoftwareConsortium/ITK/blob/master/Utilities/UploadBinaryData.sh) for uploading ITK binary testing data such as input and baseline images!

To use the script, run ITK’s `./Utilities/SetupForDevelopment.sh` to configure an account on the [data.kitware.com](https://data.kitware.com) [Girder instance](https://girder.readthedocs.io/en/latest/) and set up a local `data-upload` Git alias.

The [_ITK/Utilities/UploadBinaryData.sh_](https://github.com/InsightSoftwareConsortium/ITK/blob/master/Utilities/UploadBinaryData.sh) script can also be invoked directly, without further configuration. In this case, it will prompt for your username and password to perform an authenticated upload.

The steps to upload new binary testing data are:

1. Place the binary file at the desired location in the Git repository.
2. Run the `git data-upload` alias, and pass in the binary file(s) as arguments. E.g.  
`cd ITK; git data-upload ./Modules/Core/Common/test/Input/cthead1.png`.
3. In the corresponding `test/CMakeLists.txt` file, use the  
`itk_add_test` macro and reference the relative file path with `DATA` and braces.  
E.g.: `DATA{Input/cthead1.png}`.
4. Re-build ITK, the `ITKData` target specifically, and the testing data will be  
downloaded into the build tree. The path in the build tree is used in test execution.

This script can also be invoked to upload binary testing data for [external ITK modules](https://github.com/InsightSoftwareConsortium/ITKModuleTemplate), for example.

More information can be found in the [Data](https://github.com/InsightSoftwareConsortium/ITK/blob/master/Documentation/Data.md) and [UploadBinaryData](https://github.com/InsightSoftwareConsortium/ITK/blob/master/Documentation/UploadBinaryData.md) documentation. Please let us know if there are any questions or issues.

---

<div class="post-metadata">

**Author:** ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)\
**Post date:** [December 18, 2018, 3:02pm UTC](https://discourse.itk.org/t/new-script-for-uploading-binary-testing-data/1484/2 "2018-12-18T15:02:15Z")

</div>

These scripts are really nice. Thanks, they’ll be a big timer saver ⏲
