Skip to content

Commit 764e88b

Browse files
committed
Revert "Reset heading levels to try and fix mkdocs numbering"
This reverts commit 41255b0.
1 parent 41255b0 commit 764e88b

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

docs/side_quests/nf-test.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ In this part of the training, we're going to show you how to use nf-test to writ
3131

3232
---
3333

34-
# Warmup
34+
## Warmup
3535

3636
Let's move into the project directory.
3737

@@ -110,7 +110,7 @@ workflow {
110110

111111
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).
112112

113-
## Run the workflow
113+
### Run the workflow
114114

115115
Let's run the workflow to make sure it's working as expected.
116116

@@ -140,17 +140,17 @@ You ran the workflow with the default parameters, you confirmed it worked and yo
140140

141141
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.
142142

143-
## Takeaway
143+
### Takeaway
144144

145145
You should be able to 'test' a pipeline by manually running it.
146146

147-
## What's next?
147+
### What's next?
148148

149149
Initialize `nf-test`.
150150

151151
---
152152

153-
# Initialize `nf-test`
153+
## Initialize `nf-test`
154154

155155
The `nf-test` package provides an initialization command that sets up a few things in order for us to start developing tests for our project.
156156

@@ -170,7 +170,7 @@ Project configured. Configuration is stored in nf-test.config
170170

171171
It also creates a `tests` directory containing a configuration file stub.
172172

173-
# Generate a pipeline-level nf-test
173+
## Generate an nf-test
174174

175175
`nf-test` comes with a set of tools for building nf-test files, saving us the majority of the work. These come under the subcommand `generate`. Let's generate a test for the pipeline:
176176

@@ -238,7 +238,7 @@ In plain English, the logic of the test reads as follows:
238238

239239
This isn't a functional test, we will demonstrate how to turn it into one in the next section.
240240

241-
## A Note on Test Names
241+
### A Note on Test Names
242242

243243
In the example above, we used the default name "Should run without failures" which is appropriate for a basic test that just checks if the pipeline runs successfully. However, as we add more specific test cases, we should use more descriptive names that indicate what we're actually testing. For example:
244244

@@ -556,21 +556,21 @@ Success! The tests pass because the pipeline completed successfully, the correct
556556

557557
This is just the surface, we can keep writing assertions to check the details of the pipeline, but for now let's move on to testing the internals of the pipeline.
558558

559-
## Takeaway
559+
### Takeaway
560560

561561
You know how to write an nf-test for a pipeline.
562562

563-
## What's next?
563+
### What's next?
564564

565565
Learn how to test a Nextflow process.
566566

567567
---
568568

569-
# Test a Nextflow process
569+
## Test a Nextflow process
570570

571571
We don't have to write tests for every part of the pipeline, but the more tests we have the more comprehensive we can be about the pipeline and the more confident we can be that it's working as expected. In this section we're going to test both processes in the pipeline as individual units.
572572

573-
## Test the `sayHello` process
573+
### Test the `sayHello` process
574574

575575
Let's start with the `sayHello` process.
576576

@@ -888,7 +888,7 @@ Test Process sayHello
888888
SUCCESS: Executed 1 tests in 7.208s
889889
```
890890

891-
## Test the `convertToUpper` process
891+
### Test the `convertToUpper` process
892892

893893
Let's open the `tests/main.converttoupper.nf.test` file and take a look at the contents:
894894

@@ -1034,23 +1034,23 @@ Test Process convertToUpper
10341034
SUCCESS: Executed 1 tests in 1.811s
10351035
```
10361036

1037-
## Takeaway
1037+
### Takeaway
10381038

10391039
You know how to write tests for a Nextflow process and run them.
10401040

1041-
## What's next?
1041+
### What's next?
10421042

10431043
Learn how to run tests for everything at once!
10441044

1045-
# Run tests for the entire repository
1045+
## Run tests for the entire repository
10461046

10471047
Running nf-test on each component is fine, but laborious and error prone. Can't we just test a test on everything at once?
10481048

10491049
Yes we can!
10501050

10511051
Let's run nf-test on the entire repo.
10521052

1053-
## Run nf-test on the entire repo
1053+
### Run nf-test on the entire repo
10541054

10551055
We can run nf-test on the entire repo by running the `nf-test test` command.
10561056

@@ -1087,7 +1087,7 @@ SUCCESS: Executed 3 tests in 5.007s
10871087

10881088
Check that out! We ran 3 tests, 1 for each process and 1 for the whole pipeline with a single command. Imagine how powerful this is on a large codebase!
10891089

1090-
# Summary
1090+
## Summary
10911091

10921092
In this side quest, we've learned:
10931093

@@ -1111,7 +1111,7 @@ Testing is a critical part of pipeline development that helps ensure:
11111111
- Problems can be identified and fixed quickly
11121112
- Output content matches expectations
11131113

1114-
## What's next?
1114+
### What's next?
11151115

11161116
Check out the [nf-test documentation](https://www.nf-test.com/) for more advanced testing features and best practices. You might want to:
11171117

0 commit comments

Comments
 (0)