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

Tests cases specification #120

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Tests cases specification #120

wants to merge 5 commits into from

Conversation

pietercolpaert
Copy link
Member

Working on a proposal to add tests cases in the spec

Copy link

@smessie smessie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just leaving some thoughts here while going through the current draft.


## Initialization ## {#1}

Purpose: Ensuring that it is unambiguous yet user friendly way of knowing the identifier of the collection, as well as the current page of the collection’s view.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Purpose: Ensuring that it is unambiguous yet user friendly way of knowing the identifier of the collection, as well as the current page of the collection’s view.
Purpose: Ensuring that there is an unambiguous yet user friendly way of knowing the identifier of the collection, as well as the current page of the collection’s view.


Purpose: Ensuring that it is unambiguous yet user friendly way of knowing the identifier of the collection, as well as the current page of the collection’s view.

This test is about a function `initialization(url)`. The function will return a the collection and the URL of the root node.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This test is about a function `initialization(url)`. The function will return a the collection and the URL of the root node.
This test is about a function `initialization(url)`. The function will return the URL of the collection and the URL of the root node.


We’ll test this with various URLs containing different contents.

### The URL to a rootnode without redirects ### {#1.1}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like it could improve clarity to describe more extensively what the test should be testing. One way we could do that is by leveraging the test or it keywords commonly used by test frameworks:

Suggested change
### The URL to a rootnode without redirects ### {#1.1}
### Test if initializing with the URL to a rootnode without redirects returns the Collection URL and Root node URL ### {#1.1}

or

Suggested change
### The URL to a rootnode without redirects ### {#1.1}
### It should return the Collection URL and Root node URL when initialising with the URL to a rootnode without redirects ### {#1.1}

However we might not like it that the subtitles become very long, so an alternative idea could be to always include such a clear description right under the subtitle:

Suggested change
### The URL to a rootnode without redirects ### {#1.1}
### The URL to a rootnode without redirects ### {#1.1}
**Test:** Initializing with the URL to a rootnode without redirects returns the Collection URL and Root node URL

I think this might make things clearer for people that want to implement the test suite.


### The URL to a rootnode without redirects ### {#1.1}

File url `test1.1.ttl`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would consistently go for the uppercase URL throughout the spec

Suggested change
File url `test1.1.ttl`
File URL `test1.1.ttl`


```turtle
@prefix tree: <https://w3id.org/tree#> .
<test1.2.ttl#collection> tree:view <test1.2.ttl> .
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is necessarily wrong, but wouldn't it be an idea to improve clarity by always using the uppercased<testX.X.ttl#Collection> for a Collection, instead of once <Collection> and the other time <test1.2.ttl#collection>. Similarly we could opt for <testX.X.ttl#Node> as Node URL, then we also test that it correctly returns the URL to the Node, and not just the URL to the RDF Document (as I think this is the intended behaviour).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants