Skip to content

Commit 1d143ab

Browse files
pinin4fjordsclaude
andcommitted
Add illustrations to nf-test side quest
Add two diagrams to improve understanding of nf-test concepts: - nf_test_levels.jpg: Shows the three levels of testing (Module, Workflow, Pipeline) - nf_test_snapshot.jpg: Illustrates how nf-test compares outputs against snapshots 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent e4a63d6 commit 1d143ab

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed
71.5 KB
Loading
55 KB
Loading

docs/side_quests/nf-test.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Testing individual processes is analogous to unit tests in other languages. Test
2727

2828
[**nf-test**](https://www.nf-test.com/) is a tool that allows you to write module, workflow and pipeline level test. In short, it allows you to systematically check every individual part of the pipeline is working as expected, _in isolation_.
2929

30+
![nf-test testing levels](img/nf_test_levels.jpg)
31+
_Figure 1: The three levels of testing in nf-test: Module (Process), Workflow, and Pipeline._
32+
3033
In this part of the training, we're going to show you how to use nf-test to write module-level tests for the three processes in our pipeline.
3134

3235
---
@@ -764,6 +767,9 @@ We won't print it here, but you should see a JSON file containing details of the
764767

765768
This represents the outputs created by the `sayHello` process, which we are testing explicitly. If we re-run the test, the program will check that the new output matches the output that was originally recorded. This is a quick, simple way of testing that process outputs don't change, which is why nf-test provides it as a default.
766769

770+
![nf-test snapshot comparison](img/nf_test_snapshot.jpg)
771+
_Figure 3: How nf-test compares the current run output against the stored snapshot._
772+
767773
!!!warning
768774

769775
That means we have to be sure that the output we record in the original run is correct!

0 commit comments

Comments
 (0)