npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rdf-test-suite-ldf

v1.5.0

Published

An engine testing suite

Downloads

836

Readme

rdf-test-suite-ldf.js

Build status Coverage Status npm version

This is a nodejs CLI-tool which executes integration-tests on query-engines such as the comunica-engines and is based on the rdf-test-suite.js written by Ruben Taelman.

It uses test-manifests (you can find examples on the manifest-ldf-tests repository) which are based on the ontology-query-testing to test the integration of your engine.

Installation

Either install it globally:

$ yarn global add rdf-test-suite-ldf

or locally (as a dev dependency):

$ yarn add --dev rdf-test-suite-ldf

Usage

When the rdf-test-suite-ldf script is installed you're good to go. You will need some kind of javascript-engine which follows the ILdfQueryEngine interface as first argument and an engine-test manifest URI as second argument.

Basic execution

The following command executes the sparql-manifest test suite on the engine: myengine.js:

$ rdf-test-suite-ldf myengine.js https://comunica.github.io/manifest-ldf-tests/sparql/sparql-manifest.ttl

This command will output something like this:

✔ SELECT - DBpedia TPF (https://comunica.github.io/manifest-ldf-tests/sparql/sparql-manifest.ttl#directors01)
✔ SELECT - DBpedia TPF (https://comunica.github.io/manifest-ldf-tests/sparql/sparql-manifest.ttl#software02)
✔ SELECT - DBPedia TPF & SPARQL (https://comunica.github.io/manifest-ldf-tests/sparql/sparql-manifest.ttl#simple03)
✔ 3 / 3 tests succeeded!

Start port for mocking

With the -r flag you can decide on which port mock-servers will spawn, e.g. 5000. If an invalid port is given an error will be thrown. If the port is in use rdf-test-suite-ldf will wailt for a specific amount of time if the port becomes available. If it doesn't it will throw an error.

$ rdf-test-suite-ldf myengine.js https://comunica.github.io/manifest-ldf-tests/sparql/sparql-manifest.ttl -r 6000

Extra details on HTTP caching

The -c flag inherited from rdf-test-suite.js does also work in rdf-test-suite-ldf, especially for HDT- and RDFJS-testing. All the files for HDT- and RDFJS-testing should and will be (temporarily) stored in the given local cache folder. These files are deleted by default but when the -c flag is given, all those files will be stored in the directory given with this flag. These files can be used the next time to avoid re-fetching files from servers.

$ rdf-test-suite-ldf myengine.js https://comunica.github.io/manifest-ldf-tests/sparql/sparql-manifest.ttl -c path/to/dir

Delay server termination

With the -v flag you can define the time to wait before stopping the server after each completed test. This is useful in case your engine could perform additional HTTP to the server, even after the query has been done.

$ rdf-test-suite-ldf myengine.js https://comunica.github.io/manifest-ldf-tests/sparql/sparql-manifest.ttl -v 100

Defaults to 10.

Extra options

A list of extra options, inherited from rdf-test-suite.js can be found here.

Some default test suites

I created and published some test-suites for the 4 engines of comunica which can be found here.

License

This software is written by Manu De Buck and based on software written by Ruben Taelman. This code is released under the MIT license.