You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/side_quests/nf-test.md
+61-1Lines changed: 61 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,66 @@ nf-test
49
49
```
50
50
51
51
For a detailed description of the files, see the [warmup from Hello Nextflow](../hello_nextflow/00_orientation.md).
52
+
The workflow we'll be testing is part of the workflow built in [Hello Workflow](../hello_nextflow/03_hello_workflow.md), and is composed of two processes: `sayHello` and `convertToUpper`:
53
+
54
+
```bash title="Workflow code"
55
+
/*
56
+
* Pipeline parameters
57
+
*/
58
+
params.input_file = "greetings.csv"
59
+
60
+
/*
61
+
* Use echo to print 'Hello World!' to standard out
62
+
*/
63
+
process sayHello {
64
+
65
+
publishDir 'results', mode: 'copy'
66
+
67
+
input:
68
+
val greeting
69
+
70
+
output:
71
+
path "${greeting}-output.txt"
72
+
73
+
script:
74
+
"""
75
+
echo '$greeting' > '$greeting-output.txt'
76
+
"""
77
+
}
78
+
79
+
/*
80
+
* Use a text replace utility to convert the greeting to uppercase
We're going to assume an understanding of this workflow, but if you're not sure, you can refer back to [Hello Workflow](../hello_nextflow/03_hello_workflow.md).
52
112
53
113
### 0.1. Run the workflow
54
114
@@ -613,7 +673,7 @@ Test Process sayHello
613
673
FAILURE: Executed 1 tests in 4.884s (1 failed)
614
674
```
615
675
616
-
The test fails because the `sayHello` process declares 1 input channel but 0 were specified. Let's fix that by adding an input to the process. Remember from part 1, our `sayHello` process takes a single value input. We should also fix the test name to better reflect what we're testing.
676
+
The test fails because the `sayHello` process declares 1 input channel but 0 were specified. Let's fix that by adding an input to the process. Remember from [Hello Workflow](../hello_nextflow/03_hello_workflow.md) (and the warmup section above) that our `sayHello` process takes a single value input, which we will need to provide. We should also fix the test name to better reflect what we're testing.
0 commit comments