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
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Let's imagine you're developing a workflow. One of the first things you will do
9
9
10
10
Maybe you add a simple true or false parameter such as `--skip_process`, now you must run the pipeline twice, once with each parameter to make sure it works as expected. But wait, how do we check if the `--skip_process` actually skips the process? We have to dig into the outputs or check the log files! This is a pain and prone to error.
11
11
12
-
As you develop your pipeline, it will quickly become so complex that manually testing every iteration is slow and error prone. Furthermore, if you do find an error it will be very difficult to pin down exactly where in your pipeline the error is coming from. This is where unit testing comes in.
12
+
As you develop your pipeline, it will quickly become so complex that manually testing every iteration is slow and error prone. Furthermore, if you do find an error it will be very difficult to pin down exactly where in your pipeline the error is coming from. This is where testing comes in.
13
13
14
14
Testing allows you to systematically check that every part of your pipeline is working as expected. The benefits to a developer are huge:
15
15
@@ -60,17 +60,17 @@ Let's run the workflow to make sure it's working as expected.
60
60
nextflow run main.nf
61
61
```
62
62
63
-
CONGRATULATIONS! You just ran a unit test!
63
+
CONGRATULATIONS! You just ran a test!
64
64
65
-
"Wait, what? I just ran the workflow and it worked! How is that a unit test?"
65
+
"Wait, what? I just ran the workflow and it worked! How is that a test?"
66
66
67
67
Good question!
68
68
69
69
Let's break down what just happened.
70
70
71
-
You ran the workflow with the default parameters, you confirmed it worked and you're happy with the results. This is the essence of unit testing. As you go through this course you will notice we always run the workflow at the start to confirm everything is set up correctly. This gives us the confidence to continue with the training, knowing the code started in a working state.
71
+
You ran the workflow with the default parameters, you confirmed it worked and you're happy with the results. This is the essence of testing. As you go through this course you will notice we always run the workflow at the start to confirm everything is set up correctly. This gives us the confidence to continue with the training, knowing the code started in a working state.
72
72
73
-
Unit testing software essentially does this process for us. Let's replace our simple `nextflow run main.nf` with a standardised test provided by nf-test.
73
+
Testing software essentially does this process for us. Let's replace our simple `nextflow run main.nf` with a standardised test provided by nf-test.
0 commit comments