@@ -220,10 +220,41 @@ Note that you can clone these repositories into any location you wish; however,
220220if you do not clone them into the default ``specifications/ `` folder, you will
221221need to provide the paths to the test runner as arguments when running the tests, as explained below
222222
223- ## Running the tests
223+ ## Running the sample test suites and unittests using pytest
224224
225225If the suites repositories are available in the `specifications/ ` folder of the PyLD
226- source directory, then all the tests can be run with the following:
226+ source directory, then all unittests, including the sample test suites, can be run with pytest _:
227+
228+ .. code-block :: bash
229+
230+ pytest
231+
232+ If you wish to store the test suites in a different location than the default
233+ ``specifications/ `` folder, or you want to test individual manifest ``.jsonld `` files or directories
234+ containing a ``manifest.jsonld ``, then you can supply these files or
235+ directories as arguments:
236+
237+ .. code-block :: bash
238+
239+ # use: pytest --tests=TEST_PATH [--tests=TEST_PATH...]
240+ pytest --tests=./specifications/json-ld-api/tests
241+
242+ The test runner supports different document loaders by setting ``--loader requests ``
243+ or ``--loader aiohttp ``. The default document loader is set to Requests _.
244+
245+ .. code-block :: bash
246+
247+ pytest --loader=requests --tests=./specifications/json-ld-api/tests
248+
249+ An EARL report can be generated using the ``--earl `` option.
250+
251+ .. code-block :: bash
252+
253+ pytest --earl=./earl-report.json
254+
255+ ## Running the sample test suites using the original test runner
256+
257+ You can also run the JSON-LD test suites using the original test runner script provided:
227258
228259.. code-block :: bash
229260
@@ -241,8 +272,16 @@ directories as arguments:
241272 The test runner supports different document loaders by setting ``-l requests ``
242273or ``-l aiohttp ``. The default document loader is set to Requests _.
243274
275+ .. code-block :: bash
276+
277+ python tests/runtests.py -l requests ./specifications/json-ld-api/tests
278+
244279 An EARL report can be generated using the ``-e `` or ``--earl `` option.
245280
281+ .. code-block :: bash
282+
283+ python tests/runtests.py -e ./earl-report.json
284+
246285
247286 .. _Digital Bazaar : https://digitalbazaar.com/
248287
0 commit comments