Reaches a shared asset by climbing to the output root
All 3 scenarios hold
A report is a tree of files that link to each other. Every one of those links is relative to the page that holds it. One report therefore works from three places: a local folder, the root of a web server, and a subpath such as a project's GitHub Pages. You do not generate it again for each.
The rules below read a report of two test classes in sibling packages, com.example.orders.OrderTest and com.example.products.ProductTest, with one table each. The report root is the package example. Below it sit the packages orders and products, each above one class page, and each class page sits above its one table — items or price. A page of that report therefore lies up to two directories below the root.
The reporter writes the stylesheet and the search index once, at the root of the report. Every page reaches them from where it sits. A page therefore climbs as many steps as it lies deep. You can then move the whole tree as one.
The asset below is the search index. HTML alone carries it, because a text format has no page chrome to load it from.
| Scenario | Page URL | Path to the search index? |
|---|---|---|
| The root index | / | tabletest-search-index.js |
| A package index below it | /orders | ../tabletest-search-index.js |
| A table two levels down | /orders/order-test/items | ../../tabletest-search-index.js |