Property-based Testing of SPARQL queries Jess M. Almendros-Jimnez - - PowerPoint PPT Presentation

property based testing of sparql queries
SMART_READER_LITE
LIVE PREVIEW

Property-based Testing of SPARQL queries Jess M. Almendros-Jimnez - - PowerPoint PPT Presentation

Property-based Testing of SPARQL queries Jess M. Almendros-Jimnez Antonio Becerra-Tern University of Almera, SPAIN 16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany Type Checking and Testing of


slide-1
SLIDE 1

Property-based Testing

  • f SPARQL queries

Jesús M. Almendros-Jiménez Antonio Becerra-Terón University of Almería, SPAIN

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-2
SLIDE 2

Type Checking and Testing of SPARQL

  • SPARQL program bugs: debugging and testing
  • Type Checking
  • Wrongly typed

(empty answers

  • Testing
  • Disagreement between expected behavior and

answers (

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-3
SLIDE 3

Type Checking

SELECT ?Person ?Paper ?University WHERE { ?Person ?Person ?Person ?Paper ?Paper FILTER (

Query: Universities of Invited Talks of 2- authors papers

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-4
SLIDE 4

Type Checking

SELECT ?Person ?Paper ?University WHERE { ?Person :attends :DBPL . ?Person :affiliation FILTER (?na >= 2) }

Wrong typing: has not type :University Wrong typing: ?University has not type :Person Wrong typing: has not type :Paper

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-5
SLIDE 5

Testing

SELECT ?Person ?Paper ?University WHERE { ?Person :attends :DBPL . ?Person :affiliation ?University . ?Paper rfd:type :Invited_talk . ?Paper :numberofAuthors ?na . FILTER (?na >= 2) }

Missing Triple!

  • Unexpected behavior!

Wrong answers!!

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-6
SLIDE 6

Testing

SELECT ?Person ?Student ?University WHERE { ?Person :author :Paper . ?Student :author Paper . ?Paper rfd:type :Student_Paper . FILTER (?age <= 30) }

Wrong Triple!

?Person :age ?age

  • Unexpected behavior!

Wrong answers!!

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-7
SLIDE 7

Testing

SELECT ?Person ?Paper ?University { ?Person :attends :DBPL . ?Person :affiliation ?University . ?Paper rfd:type :Invited_talk ?Paper :numberofAuthors ?na FILTER (?na >= 2) }

Property: is ?Person the author of ?Paper ?

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-8
SLIDE 8

Testing

SELECT ?Person ?Student ?University WHERE { ?Person :author :Paper . ?Student :author Paper . ?Paper rfd:type :Student_paper . ?Person :age ?age. FILTER (?age <= 30) }

Property: is ?Student younger than 30?

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-9
SLIDE 9

Type System for SPARQL

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-10
SLIDE 10

Testing of SPARQL

Ontology to XML Schema Mapping Test Case Generation

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-11
SLIDE 11

Type Checking and Testing of SPARQL

  • Type Checking using an Ontology Reasoner

(Hermit) for

  • Testing using an Ontology Reasoner (Hermit) for

test cases consistence

  • Testing using

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-12
SLIDE 12

Type Checking and Testing of SPARQL

Type Checking Tool results:

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-13
SLIDE 13

Type Checking and Testing of SPARQL

Randomly generated test cases Problem => Inconsistent Test Cases Example: :coauthor is irreflexive

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-14
SLIDE 14

Type Checking and Testing of SPARQL

Testing success

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-15
SLIDE 15

Type Checking and Testing of SPARQL

Testing fail

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-16
SLIDE 16

Type Checking and Testing Tool

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

http://minerva.ual.es:8080/SPARQL

slide-17
SLIDE 17

Type Checking and Testing Tool

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

Pruning and Customization

  • f Test Cases
slide-18
SLIDE 18

Benchmarks

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-19
SLIDE 19

Benchmarks

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-20
SLIDE 20

Conclusions and Future Work

  • Testing tool based on Test Case Generation from

XML Schema

  • Detection of Buggy SPARQL Queries
  • Extending the output property set
  • White-Box Testing: Constraint Solving

16th International Symposium on Database Programming Languages (DBPL 2017), Munich, Germany

slide-21
SLIDE 21

Thanks for your Attention

Jesús M. Almendros-Jiménez Antonio Becerra-Terón University of Almería SPAIN