# Relative paths in nf-test

**URL:** <https://community.seqera.io/t/relative-paths-in-nf-test/2261>\
**Category:** Ask for help\
**Tags:** nf-test\
**Created:** [July 4, 2025, 5:25am UTC](https://community.seqera.io/t/relative-paths-in-nf-test/2261 "2025-07-04T05:25:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bskubi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/bskubi/32/545_2.png) [@bskubi](https://community.seqera.io/u/bskubi)\
**Post date:** [July 4, 2025, 5:25am UTC](https://community.seqera.io/t/relative-paths-in-nf-test/2261/1 "2025-07-04T05:25:46Z")

</div>

My pipeline uses a sample file that stores relative paths to resource files. Running the pipeline with nextflow itself works fine, but with nf-test, it can’t find the resource files. I have tried a few things that did not work:

- Specifying $baseDir/[relative path] in the sample file for the resource file paths
- Using stage {symlink “.”} in the nextflow\_pipeline closure to try and stage the base directory (which is what the resource file paths are with respect to)

Using absolute paths to the resource files works. But this is not compatible with permitting other users to run unit tests on their machines.

---

<div class="post-metadata">

**Author:** ![mahesh.binzerpanchal](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/mahesh.binzerpanchal/32/253_2.png) [@mahesh.binzerpanchal](https://community.seqera.io/u/mahesh.binzerpanchal)\
**Post date:** [July 11, 2025, 10:51am UTC](https://community.seqera.io/t/relative-paths-in-nf-test/2261/2 "2025-07-11T10:51:37Z")

</div>

Do any of the global variables defined in nf-test help?

> **[Global Variables - nf-test](https://www.nf-test.com/docs/testcases/global_variables/)**

Can you provide some code of what you’ve tried?
