Skip to content

Commit 9e35a49

Browse files
Separate document for test runner building (#519)
1 parent 78226ae commit 9e35a49

File tree

5 files changed

+67
-33
lines changed

5 files changed

+67
-33
lines changed

building/config.json

+22-16
Original file line numberDiff line numberDiff line change
@@ -632,17 +632,29 @@
632632
"path": "building/tracks/new/add-first-exercise.md",
633633
"title": "Add the first exercise"
634634
},
635+
{
636+
"uuid": "975a3a67-5d5e-4022-b363-a40661095c93",
637+
"slug": "tracks/new/setup-continuous-integration",
638+
"path": "building/tracks/new/setup-continuous-integration.md",
639+
"title": "Setup Continuous Integration"
640+
},
635641
{
636642
"uuid": "c8f1ff4d-55f8-447e-b5e7-4a87f1e341f7",
637643
"slug": "tracks/new/add-initial-exercises",
638644
"path": "building/tracks/new/add-initial-exercises.md",
639645
"title": "Add initial exercises"
640646
},
641647
{
642-
"uuid": "975a3a67-5d5e-4022-b363-a40661095c93",
643-
"slug": "tracks/new/setup-continuous-integration",
644-
"path": "building/tracks/new/setup-continuous-integration.md",
645-
"title": "Setup Continuous Integration"
648+
"uuid": "ae9c8c65-2c39-48d5-b647-4189cff77862",
649+
"slug": "tracks/new/build-test-runner",
650+
"path": "building/tracks/new/build-test-runner.md",
651+
"title": "Build test runner"
652+
},
653+
{
654+
"uuid": "0113174d-314d-4255-a300-32150dc32179",
655+
"slug": "tracks/new/configure-tooling",
656+
"path": "building/tracks/new/configure-tooling.md",
657+
"title": "Configure tooling"
646658
},
647659
{
648660
"uuid": "3bc94082-8fa3-4129-bca7-c1892cba3ed4",
@@ -662,24 +674,18 @@
662674
"path": "building/tracks/new/launch.md",
663675
"title": "Launch!"
664676
},
677+
{
678+
"uuid": "f697a7c1-ad33-460c-8458-18cd6d149920",
679+
"slug": "tracks/new/implement-tooling",
680+
"path": "building/tracks/new/implement-tooling.md",
681+
"title": "Implement additional tooling"
682+
},
665683
{
666684
"uuid": "65fe2eb3-bd67-4312-9e9d-d7334cdcbdcf",
667685
"slug": "tracks/new/prepare-for-contributions",
668686
"path": "building/tracks/new/prepare-for-contributions.md",
669687
"title": "Prepare for open source contributions from strangers"
670688
},
671-
{
672-
"uuid": "0113174d-314d-4255-a300-32150dc32179",
673-
"slug": "tracks/new/configure-tooling",
674-
"path": "building/tracks/new/configure-tooling.md",
675-
"title": "Configure tooling"
676-
},
677-
{
678-
"uuid": "f697a7c1-ad33-460c-8458-18cd6d149920",
679-
"slug": "tracks/new/implement-tooling",
680-
"path": "building/tracks/new/implement-tooling.md",
681-
"title": "Implement tooling"
682-
},
683689
{
684690
"uuid": "11894561-be89-471f-ac4e-581449add2bd",
685691
"slug": "tracks",

building/tracks/new/README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ Once you've completed that step, the next steps are:
1010
- [Select programming language variant](/docs/building/tracks/new/select-programming-language-variant) (if applicable)
1111
- [Select testing framework](/docs/building/tracks/new/select-testing-framework)
1212
- [Add the first exercise](/docs/building/tracks/new/add-first-exercise)
13-
- [Add initial exercises](/docs/building/tracks/new/add-initial-exercises)
1413
- [Setup Continuous Integration](/docs/building/tracks/new/setup-continuous-integration)
14+
- [Add initial exercises](/docs/building/tracks/new/add-initial-exercises)
15+
- [Build test runner](/docs/building/tracks/new/build-test-runner)
16+
- [Configure tooling](/docs/building/tracks/new/configure-tooling)
1517
- [Prepare for launch](/docs/building/tracks/new/prepare-for-launch)
1618
- [Find Maintainers](/docs/building/tracks/new/find-maintainers)
1719
- [Launch!](/docs/building/tracks/new/launch)
18-
- [Configure tooling](/docs/building/tracks/new/configure-tooling)
19-
- [Implement tooling](/docs/building/tracks/new/implement-tooling)
20+
- [Implement additional tooling](/docs/building/tracks/new/implement-tooling)
2021
- [Prepare for open source contributions from strangers](/docs/building/tracks/new/prepare-for-contributions)
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Build test runner
2+
3+
The test runner is an essential bit of tooling that allows:
4+
5+
- The website to automatically verify if an iteration passes all the tests.
6+
- Students to solve exercises using the [in-browser editor](/docs/using/solving-exercises/using-the-online-editor) ([no CLI needed](/docs/using/solving-exercises/working-locally)).
7+
8+
To get started building a Test Runner, check the [Creating a Test Runner from scratch](/docs/building/tooling/test-runners/creating-from-scratch) document.
9+
10+
## Implementation
11+
12+
Track tooling is usually (mostly) written in the track's language.
13+
14+
```exercism/caution
15+
While you're free to use other languages, each additional language will make it harder to maintain or contribute to the track.
16+
Therefore, we recommend using the track's language where possible, because it makes maintaining or contributing easier.
17+
```
18+
19+
## Deployment
20+
21+
The test runner is packaged and run as a [Docker container](/docs/building/tooling/docker).
22+
Test runner Docker images are deployed automatically using a [GitHub Actions workflow](https://github.com/exercism/generic-test-runner/blob/main/.github/workflows/docker.yml).
23+
24+
## Testing
25+
26+
Once a test runner has been built, you could use its Docker image in your track's CI setup to verify the track's exercises.
27+
The main benefit of this approach is that it better mimics the production setup; in other words, you can be more confident that things also work in production.
28+
A possible downside is that it might slow down the CI workflow.
29+
It is up to you, the maintainer, to decide which approach works best for your track.
+8-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# Configure tooling
22

3-
There are three bits of tooling that you can optionally tweak for your track:
3+
There are three bits of tooling that you should tweak for your track:
44

5-
- The **[Lines of Code Counter](/docs/building/tooling/lines-of-code-counter)**
6-
- The **[Snippet Extractor](/docs/building/tooling/snippet-extractor)**
7-
- The **[Exercism CLI](/docs/building/tooling/cli)**
5+
- The **[Lines of Code Counter](/docs/building/tooling/lines-of-code-counter)**: this tool is tasked with counting the lines of code for each submitted iteration.
6+
- The **[Snippet Extractor](/docs/building/tooling/snippet-extractor)**: this tool extracts a snippet for each iteration, which is shown on the website.
7+
- The **[Exercism CLI](/docs/building/tooling/cli)**: this tool is used by students to work on a track locally, on their own machine.
88

9-
While tweaking these tools is optional, doing so can make your track's integration into the website just _that_ bit better.
9+
```exercism/note
10+
Even though tweaking these tools is optional, it'll make your track's integration into the website _much_ better.
11+
Therefore, we highly recommend you tweak all three tools.
12+
```

building/tracks/new/implement-tooling.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Implement tooling
22

3-
After launching the track with the first 20+ exercises, the focus should shift to implementing the [track tooling](/docs/building/tooling).
3+
After launching the track with the first 20+ exercises and a test runner, the focus should shift to implementing [additional track tooling](/docs/building/tooling).
44

55
There are two types of track tooling:
66

@@ -24,14 +24,9 @@ To help with track maintenance, one can also build:
2424
## Which tool to implement?
2525

2626
The production tools are more important than maintenance tools.
27-
Of the three production tools, the Test Runner should be implemented first as it enables:
27+
At this point, you should have implemented a Test Runner (if not, check the [Build a test runner docs](/docs/building/tracks/new/build-test-runner)).
2828

29-
- Students to solve exercises using the [in-browser editor](/docs/using/solving-exercises/using-the-online-editor) ([no CLI needed](/docs/using/solving-exercises/working-locally)).
30-
- The website to automatically verify if an iteration passes all the tests.
31-
32-
To get started building a Test Runner, check the [Creating a Test Runner from scratch](/docs/building/tooling/test-runners/creating-from-scratch) document.
33-
34-
Once a test runner has been built, the next tool to work on is the Representer.
29+
Having built a test runner, the next tool to work on is the Representer.
3530
There is some overlap between the goals of the Representer and the Analyzer, but we recommend building the Representer first for the following reasons:
3631

3732
- Representers are usually (far) easier to implement
@@ -58,6 +53,6 @@ Therefore, we recommend using the track's language where possible, because it ma
5853
## Deployment
5954

6055
Production tools are packaged and run as a [Docker container](/docs/building/tooling/docker).
61-
Tooling images are deployed automatically using a [Docker workflow](https://github.com/exercism/generic-test-runner/blob/main/.github/workflows/docker.yml).
56+
Tooling Docker images are deployed automatically using a [GitHub Actions workflow](https://github.com/exercism/generic-test-runner/blob/main/.github/workflows/docker.yml).
6257

6358
Maintenance tools are _not_ deployed.

0 commit comments

Comments
 (0)