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

WIP Prepare chunk documentation #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions v2.0/Developer_manuals/BaseX_ETS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,17 @@ Once the listener is implemented, the whole generation of the
`etf:TestTaskResult` document will be done by the ETF test driver.
======================================

[[the-prepare-chunk-document]]
=== The prepare-chunk document
A prepare-chunk.xq document is optional but can be used to preprocess testdata.

Example usage: Prepare a spatial index and extract all objects with erroneous geometry before executing the tests.
[NOTE]
======================================
* For every given chunk, prepare-chunk.xq will be executed.
* The name of the chunk is passed to the document through the variable `$dbName`.
======================================

[[spatial-tests]]
=== Testing spatial aspects

Expand Down
7 changes: 7 additions & 0 deletions v2.0/Developer_manuals/BaseX_ETS_GUI.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ declare variable $etsFile external := $projDir || file:dir-separator() || "ets-t

Executing the XQuery should now execute the test suite.

There are additional steps, in case the testproject uses a prepare-chunk document (see link:#the-prepare-chunk-document[below] for more information):

* Set the external variable `$dbName` to the name of your database in BaseX.
* Open and run the prepare-chunk document.

Executing the XQuery document should now execute the test suite.

==== Best practices

During the development of a test suite, it may be handy to compile a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ include::../General/Document-metadata.adoc[]
| 2017-11-25 | Jon Herrmann | Spatial indexing section updated
| 2017-12-06 | Jon Herrmann | Message template bundles section updated
| 2018-07-10 | Jon Herrmann | Links updated
| 2020-05-06 | Christoph Spalek | Add prepare-chunk section
|===


Expand Down
Loading