File tree Expand file tree Collapse file tree 6 files changed +120
-0
lines changed
side-quests/solutions/nf-test/tests Expand file tree Collapse file tree 6 files changed +120
-0
lines changed Original file line number Diff line number Diff line change 1+ nextflow_process {
2+
3+ name "Test Process convertToUpper"
4+ script "main.nf"
5+ process "convertToUpper"
6+
7+ test("Should run without failures") {
8+
9+ when {
10+ params {
11+ // define parameters here. Example:
12+ // outdir = "tests/results"
13+ }
14+ process {
15+ """
16+ input[0] = "${projectDir}/greetings.csv"
17+ """
18+ }
19+ }
20+
21+ then {
22+ assert process.success
23+ assert snapshot(process.out).match()
24+ }
25+
26+ }
27+
28+ }
Original file line number Diff line number Diff line change 1+ {
2+ " Should run without failures" : {
3+ " content" : [
4+ {
5+ " 0" : [
6+ " UPPER-greetings.csv:md5,f36624b0e040fa880e61fb1304b4b6b9"
7+ ]
8+ }
9+ ],
10+ " meta" : {
11+ " nf-test" : " 0.9.2" ,
12+ " nextflow" : " 24.10.0"
13+ },
14+ " timestamp" : " 2025-02-19T11:57:20.215132756"
15+ }
16+ }
Original file line number Diff line number Diff line change 1+ nextflow_pipeline {
2+
3+ name "Test Workflow main.nf"
4+ script "main.nf"
5+
6+ test("Should run without failures") {
7+
8+ when {
9+ params {
10+ input_file = "${projectDir}/greetings.csv"
11+ }
12+ }
13+
14+ then {
15+ assert workflow.success
16+ assert workflow.trace.tasks().size() == 6
17+ assert file("$launchDir/results/Bonjour-output.txt").exists()
18+ assert file("$launchDir/results/Hello-output.txt").exists()
19+ assert file("$launchDir/results/Holà-output.txt").exists()
20+ assert file("$launchDir/results/UPPER-Bonjour-output.txt").exists()
21+ assert file("$launchDir/results/UPPER-Hello-output.txt").exists()
22+ assert file("$launchDir/results/UPPER-Holà-output.txt").exists()
23+ }
24+
25+ }
26+
27+ }
Original file line number Diff line number Diff line change 1+ nextflow_process {
2+
3+ name "Test Process sayHello"
4+ script "main.nf"
5+ process "sayHello"
6+
7+ test("Should run without failures") {
8+
9+ when {
10+ params {
11+ // define parameters here. Example:
12+ // outdir = "tests/results"
13+ }
14+ process {
15+ """
16+ input[0] = "hello"
17+ """
18+ }
19+ }
20+
21+ then {
22+ assert process.success
23+ assert snapshot(process.out).match()
24+ }
25+
26+ }
27+
28+ }
Original file line number Diff line number Diff line change 1+ {
2+ " Should run without failures" : {
3+ " content" : [
4+ {
5+ " 0" : [
6+ " hello-output.txt:md5,b1946ac92492d2347c6235b4d2611184"
7+ ]
8+ }
9+ ],
10+ " meta" : {
11+ " nf-test" : " 0.9.2" ,
12+ " nextflow" : " 24.10.0"
13+ },
14+ " timestamp" : " 2025-02-19T11:52:09.690504479"
15+ }
16+ }
Original file line number Diff line number Diff line change 1+ /*
2+ ========================================================================================
3+ Nextflow config file for running tests
4+ ========================================================================================
5+ */
You can’t perform that action at this time.
0 commit comments