@@ -227,11 +227,46 @@ if you do not clone them into the default ``specifications/`` folder, you will
227227need to provide the paths to the test runner as arguments when running the
228228tests, as explained below
229229
230- Running the tests
231- ####################
230+ Running the sample test suites and unittests using pytest
231+ #########################################################
232232
233233If the suites repositories are available in the `specifications/ ` folder of the
234- PyLD source directory, then all the tests can be run with the following:
234+ PyLD source directory, then all unittests, including the sample test suites,
235+ can be run with pytest _:
236+
237+ .. code-block :: bash
238+
239+ pytest
240+
241+ If you wish to store the test suites in a different location than the default
242+ ``specifications/ `` folder, or you want to test individual manifest ``.jsonld ``
243+ files or directories containing a ``manifest.jsonld ``, then you can supply
244+ these files or directories as arguments:
245+
246+ .. code-block :: bash
247+
248+ # use: pytest --tests=TEST_PATH [--tests=TEST_PATH...]
249+ pytest --tests=./specifications/json-ld-api/tests
250+
251+ The test runner supports different document loaders by setting
252+ ``--loader requests `` or ``--loader aiohttp ``. The default document loader is
253+ set to Requests _.
254+
255+ .. code-block :: bash
256+
257+ pytest --loader=requests --tests=./specifications/json-ld-api/tests
258+
259+ An EARL report can be generated using the ``--earl `` option.
260+
261+ .. code-block :: bash
262+
263+ pytest --earl=./earl-report.json
264+
265+ Running the sample test suites using the original test runner
266+ #############################################################
267+
268+ You can also run the JSON-LD test suites using the original test runner script
269+ provided:
235270
236271.. code-block :: bash
237272
@@ -249,8 +284,16 @@ these files or directories as arguments:
249284 The test runner supports different document loaders by setting ``-l requests ``
250285or ``-l aiohttp ``. The default document loader is set to Requests _.
251286
287+ .. code-block :: bash
288+
289+ python tests/runtests.py -l requests ./specifications/json-ld-api/tests
290+
252291 An EARL report can be generated using the ``-e `` or ``--earl `` option.
253292
293+ .. code-block :: bash
294+
295+ python tests/runtests.py -e ./earl-report.json
296+
254297
255298 .. _Digital Bazaar : https://digitalbazaar.com/
256299
0 commit comments