@@ -100,6 +100,12 @@ You can display the utility's help with::
100100
101101 jote --help
102102
103+ Jote container network
104+ ----------------------
105+
106+ ``jote `` tests are executed on the network ``data-manager_jote ``. This is
107+ defined in the docker-compose file that it generates to run your tests.
108+
103109Built-in variables
104110------------------
105111
@@ -190,6 +196,81 @@ You should try and avoid creating too many long-running tests. If you cannot,
190196consider whether it's a appropriate to use ``run-level `` to avoid ``jote ``
191197running them by default.
192198
199+ Test groups
200+ -----------
201+
202+ Tests are normally executed and the environment torn-down between them.
203+ If you have tests that depend on the results from a prior test you can run
204+ tests as a **group **, which preserves the project directory between the tests.
205+
206+ To run a sequence of test (as a **group **) you need to define a ``test-group ``
207+ in your Job Definition file and then refer to that group in your test. Here,
208+ we define a test group called ``experiment-a ``, at the top of the
209+ definition file::
210+
211+ test-groups:
212+ - name: experiment-a
213+
214+
215+ We then place a test in that group with a ``run-group `` declaration
216+ in the corresponding test block::
217+
218+ jobs:
219+ job-a:
220+ [...]
221+ tests:
222+ test-1:
223+ run-groups:
224+ - name: experiment-a
225+ ordinal: 1
226+
227+ We need to provide an ``ordinal `` value. This numeric value (from 1 ..N)
228+ puts the test in a specific position in the test sequence. When tests are
229+ placed in a ``run-group `` you have to order your tests so that ``a `` follows
230+ ``b ``. This is done with unique ordinals for each test in each group. A test
231+ with ordinal ``1 `` will run before a test with ordinal ``2 ``.
232+
233+ You can run just the tests for a specific group by using the ``--run-group ``
234+ option::
235+
236+ jote --run-group experiment-a
237+
238+ Running additional containers (group testing)
239+ ---------------------------------------------
240+
241+ Test groups provide an ability to launch additional support containers during
242+ testing. You might want to start a background database for example, that can
243+ be used by tests in your ``test-group ``. To take advantage of this feature
244+ you just need to provide a ``docker-compose `` file (in the Job definition
245+ ``data-manager `` directory) and name that file in you r``test-groups``
246+ declaration.
247+
248+ Here we declare a docker-compose file called
249+ ``docker-compose-experiment-a.yaml ``::
250+
251+ test-groups:
252+ - name: experiment-a
253+ compose:
254+ file: docker-compose-experiment-a.yaml
255+
256+ The compose filename must begin ``docker-compose `` and end ``.yaml ``.
257+
258+ The compose file is run before any tests in the corresponding test group
259+ have been run and will be stopped after the last test in the group.
260+
261+ The compose file you provide is run in a *detached * state so ``jote `` does
262+ not wait for the containers to start (or initialise). As the first test
263+ in the test group can begin very soon after the compose file is started
264+ you can minimise the risk that your containers are not ready for the tests
265+ by adding a fixed delay between ``jote `` starting the compose file and
266+ running the first test::
267+
268+ test-groups:
269+ - name: experiment-a
270+ compose:
271+ file: docker-compose-experiment-a.yaml
272+ delay-seconds: 10
273+
193274Nextflow test execution
194275-----------------------
195276
@@ -208,7 +289,7 @@ constraints.
208289
209290When running nextflow jobs ``jote `` writes a ``nextflow.config `` to the
210291test's simulated project directory prior to executing the command, and
211- this is the curent-workign directory when the test starts.
292+ this is the current-working directory when the test starts.
212293``jote `` *will not * let you have a nextflow config in your home directory
213294as any settings found there would be merged with the file ``jote `` writes,
214295potentially disturbing the execution behaviour.
0 commit comments