Testing


On this page

    Since code stability is one of the main goals of Comunica, we spend a lot of effort on testing our code. For this, we continuously execute different kinds of tests in our continous integration setup. This means that every changes to the codebase always goes through a large number of tests to make sure that no existing logic breaks.

    Unit tests

    Using the Jest testing framework, we test each actor in isolation. The code requires a code and branch coverage of 100%.

    All unit tests can be executed in the development environment using the following command:

    $ yarn run test

    Integration tests

    Using rdf-test-suite-ldf.js, we check the correctness of a collection of SPARQL queries over the different default Comunica configurations. This tool makes use of declarative test manifest that are inspired by the SPARQL 1.1 test suite.

    All integration tests can be executed in the development environment using the following command:

    $ npx lerna run integration

    Specification tests

    To ensure the compliance to specifications, we continuously execute their test suites using rdf-test-suite.js.

    All specification tests can be executed in the development environment using the following command:

    $ npx lerna run spec

    Sanity checks

    Certain things such as browser builds are not fully tested yet. In order to at least check if they succeed during building, we check these steps as well.

    For example:

    $ npx lerna run browser

    Next steps

    There's still a lot more we want regarding testing to improve stability. Interested in helping out? Have a look at this issue.