Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error if running zero tests #102

Open
RubenVerborgh opened this issue Aug 10, 2024 · 5 comments
Open

Error if running zero tests #102

RubenVerborgh opened this issue Aug 10, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@RubenVerborgh
Copy link

In SPARQL.js, running npm run spec-base-query now silently fails with ”0/0 tests”:

> sparqljs@3.7.1 spec-base-query
> rdf-test-suite spec/parser.js http://w3c.github.io/rdf-tests/sparql/sparql11/manifest.ttl -s http://www.w3.org/TR/sparql11-query/ -c .rdf-test-suite-cache/

Error: Could not parse the query result with content type text/tab-separated-values at http://w3c.github.io/rdf-tests/sparql/sparql11/csv-tsv-res/csvtsv01.tsv
Error: Could not parse the query result with content type text/tab-separated-values at http://w3c.github.io/rdf-tests/sparql/sparql11/csv-tsv-res/csvtsv02.tsv
Error: Could not parse the query result with content type text/tab-separated-values at http://w3c.github.io/rdf-tests/sparql/sparql11/csv-tsv-res/csvtsv03.tsv
Error: Could not parse the query result with content type text/tab-separated-values at http://w3c.github.io/rdf-tests/sparql/sparql11/csv-tsv-res/csvtsv01.tsv
Error: Could not parse the query result with content type text/tab-separated-values at http://w3c.github.io/rdf-tests/sparql/sparql11/csv-tsv-res/csvtsv02.tsv
Error: Could not parse the query result with content type text/tab-separated-values at http://w3c.github.io/rdf-tests/sparql/sparql11/csv-tsv-res/csvtsv03.tsv
✔ 0 / 0 tests succeeded!
@rubensworks
Copy link
Owner

In comunica we use http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-all.ttl, could you try that one?

I'm guessing some breaking changes were introduced in http://w3c.github.io/rdf-tests/sparql/sparql11/manifest.ttl for the RDF 1.2 tests.

@RubenVerborgh
Copy link
Author

Thanks! That's indeed quite confusing, especially given that they broke URIs repeatedly (RubenVerborgh/SPARQL.js@0ef0d4c).

With npx rdf-test-suite spec/parser.js http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-all.ttl -s http://www.w3.org/TR/sparql11-query/ -c .rdf-test-suite-cache/, I get: ✔ 301 / 301 tests succeeded! (skipped 198). The 198 still seems like a lot, but perhaps that's okay?

For npx rdf-test-suite spec/parser.js http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-sparql11-update.ttl -s http://www.w3.org/TR/sparql11-update/ -c .rdf-test-suite-cache/, I unfortunately still have ✔ 0 / 0 tests succeeded!.

Suggestion: still error on 0/0?

@rubensworks
Copy link
Owner

I get: ✔ 301 / 301 tests succeeded! (skipped 198). The 198 still seems like a lot, but perhaps that's okay?

That should be fine indeed, since the passed runner is configured to skip all non-parsing tests: https://github.com/RubenVerborgh/SPARQL.js/blob/main/spec/parser.js#L4-L15

For npx rdf-test-suite spec/parser.js http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-sparql11-update.ttl -s http://www.w3.org/TR/sparql11-update/ -c .rdf-test-suite-cache/, I unfortunately still have ✔ 0 / 0 tests succeeded!.

http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-all.ttl should also work here.
At least it does in comunica: https://github.com/comunica/comunica/blob/master/engines/query-sparql/package.json#L54-L56

@RubenVerborgh
Copy link
Author

Thanks, LGTM. Maybe just consider if you want the suite to error if it finds 0 tests.

@rubensworks
Copy link
Owner

Maybe just consider if you want the suite to error if it finds 0 tests.

Good idea, we should add that.

In addition, we may also want to add a flag that does not error in such cases, as there may be cases where zero tests are valid.

@rubensworks rubensworks changed the title Silent test failures after TSV errors Error if running zero tests Aug 10, 2024
@rubensworks rubensworks added the enhancement New feature or request label Aug 10, 2024
RubenVerborgh added a commit to RubenVerborgh/SPARQL.js that referenced this issue Aug 10, 2024
RubenVerborgh added a commit to RubenVerborgh/SPARQL.js that referenced this issue Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants