e828acf175
CI / lint (push) Successful in 1m32s
CI / typecheck (push) Successful in 1m38s
CI / lint (pull_request) Successful in 1m30s
CI / typecheck (pull_request) Successful in 1m30s
CI / behave (3.11) (pull_request) Successful in 1m39s
CI / behave (3.12) (pull_request) Successful in 1m39s
CI / build (pull_request) Successful in 1m29s
CI / behave (3.13) (pull_request) Successful in 1m39s
CI / behave (3.11) (push) Successful in 1m39s
CI / behave (3.12) (push) Successful in 1m41s
CI / behave (3.13) (push) Successful in 1m37s
CI / build (push) Successful in 1m30s
ISSUES CLOSED: #1
131 lines
5.5 KiB
Gherkin
131 lines
5.5 KiB
Gherkin
Feature: OWL Validation
|
|
As a developer using CleverRDFLib
|
|
I want to validate OWL ontologies
|
|
So that I can ensure they conform to OWL specifications
|
|
|
|
Background:
|
|
Given I have a test data directory
|
|
And I have a loaded ontology for validation
|
|
And I have an OWLValidator instance
|
|
|
|
Scenario: Validate a valid OWL ontology
|
|
Given I have a valid OWL ontology
|
|
When I validate the ontology
|
|
Then the validation should succeed
|
|
And there should be no validation errors
|
|
And the validation result should indicate success
|
|
|
|
Scenario: Validate ontology with undefined classes
|
|
Given I have an ontology with undefined class references
|
|
When I validate the ontology
|
|
Then the validation should complete
|
|
And there should be validation errors
|
|
And the errors should indicate undefined classes
|
|
|
|
Scenario: Validate ontology with undefined properties
|
|
Given I have an ontology with undefined property references
|
|
When I validate the ontology
|
|
Then the validation should complete
|
|
And there should be validation errors
|
|
And the errors should indicate undefined properties
|
|
|
|
Scenario: Validate ontology with deprecated resources
|
|
Given I have an ontology with deprecated resources
|
|
When I validate the ontology
|
|
Then the validation should complete
|
|
And there should be validation warnings
|
|
And the warnings should indicate deprecated resources
|
|
|
|
Scenario: Validate ontology with invalid cardinality
|
|
Given I have an ontology with invalid cardinality values
|
|
When I validate the ontology
|
|
Then the validation should complete
|
|
And there should be validation errors
|
|
And the errors should indicate invalid cardinality
|
|
|
|
Scenario: Access validation result information
|
|
Given I have a validation result with errors
|
|
When I request the validation errors
|
|
Then I should receive a list of validation error instances
|
|
And each error should contain error type, message, and resource
|
|
When I check if validation has errors
|
|
Then I should receive True if errors exist
|
|
When I request the error count
|
|
Then I should receive the number of errors
|
|
And the count should match the number of error entries
|
|
Given I have a validation result with warnings
|
|
When I request the validation warnings
|
|
Then I should receive a list of validation warning instances
|
|
And each warning should contain warning type, message, and resource
|
|
When I check if validation has warnings
|
|
Then I should receive True if warnings exist
|
|
When I request the warning count
|
|
Then I should receive the number of warnings
|
|
And the count should match the number of warning entries
|
|
|
|
Scenario: Validate ontology with standard namespaces (OWL, RDFS, RDF)
|
|
Given I have an ontology using standard OWL classes
|
|
When I validate the ontology
|
|
Then the validation should succeed
|
|
And standard OWL classes should not be flagged as undefined
|
|
Given I have an ontology using standard RDFS classes
|
|
When I validate the ontology
|
|
Then the validation should succeed
|
|
And standard RDFS classes should not be flagged as undefined
|
|
Given I have an ontology using standard RDF properties
|
|
When I validate the ontology
|
|
Then the validation should succeed
|
|
And standard RDF properties should not be flagged as undefined
|
|
|
|
Scenario: Validate ontology with individuals in class checks
|
|
Given I have an ontology with individuals that are not classes
|
|
When I validate the ontology
|
|
Then the validation should complete
|
|
And individuals should not be flagged as undefined classes
|
|
|
|
Scenario: Validate ontology with properties used in domain and range
|
|
Given I have an ontology with properties used in domain and range
|
|
When I validate the ontology
|
|
Then the validation should complete
|
|
And properties used in domain should be checked
|
|
And properties used in range should be checked
|
|
|
|
Scenario: Access OWLValidationError properties
|
|
Given I have a validation result with errors
|
|
When I access the error severity property
|
|
Then I should receive the severity level
|
|
When I access the error resource property
|
|
Then I should receive the resource URI or None
|
|
When I access the error count property
|
|
Then I should receive the number of errors from property
|
|
When I access the warning count property
|
|
Then I should receive the number of warnings from property
|
|
|
|
Scenario: Validate ontology with missing ontology declaration
|
|
Given I have an ontology with OWL constructs but no ontology declaration
|
|
When I validate the ontology
|
|
Then the validation should complete
|
|
And there should be validation warnings
|
|
And the warnings should indicate missing ontology declaration
|
|
|
|
Scenario: Validate ontology with circular class definitions
|
|
Given I have an ontology with circular subclass relationships
|
|
When I validate the ontology
|
|
Then the validation should complete
|
|
And there should be validation warnings
|
|
And the warnings should indicate circular definitions
|
|
|
|
Scenario: Validate ontology with deprecated resources that are not Literal True
|
|
Given I have an ontology with deprecated resources as non-Literal or non-True
|
|
When I validate the ontology
|
|
Then the validation should complete
|
|
And deprecated resources should not be flagged when not Literal True
|
|
|
|
Scenario: Validate ontology with invalid cardinality non-integer values
|
|
Given I have an ontology with cardinality as non-integer values
|
|
When I validate the ontology
|
|
Then the validation should complete
|
|
And there should be validation errors
|
|
And the errors should indicate non-integer cardinality values
|
|
|