Use case StRS-MDOKFSTUDIO-DIAG-009
PlantUML diagrams use local include files and PUML files
As a writer, I split a diagram into include files or keep it in a separate puml file, and the preview shows the assembled picture and follows my edits to those files.
Use case diagram
How it is split
This use case (StRS) is reached by 2 paths, one per coloured line. A path goes from one situation (circle) to the next; each step (pill) is a behaviour (SwRS) with its own tests.
path 1: Include a local file in a diagram path 2: Keep a diagram in a PUML file other outcomeone dot = one scenario checked: nominal boundary refusal
Path 1: Include a local file in a diagram
- A diagram includes a local fileSwRS-MDOKFSTUDIO-DIAG-046 a refused include gives its reason to the engine onceSwRS-MDOKFSTUDIO-DIAG-054 a name that is never read is refused with a reasonSwRS-MDOKFSTUDIO-DIAG-061 an include cycle stops with a reason on the diagramSwRS-MDOKFSTUDIO-DIAG-046 · 3 tests the page asks the extension for the file and draws the diagram with the text it returns
- The assembled picture is drawnSwRS-MDOKFSTUDIO-DIAG-053 while a block editor is open the message is sent after it closesSwRS-MDOKFSTUDIO-DIAG-053 · 4 tests the included file changes on disk and the page draws the diagrams that read files again
- The diagram is drawn again with the new file text
Path 2: Keep a diagram in a PUML file
- A uml directive names a PUML fileSwRS-MDOKFSTUDIO-DIAG-068 a missing file shows a message in place of the diagramSwRS-MDOKFSTUDIO-DIAG-068 · 4 tests the preview renders the diagram stored in the file
- The diagram of the file is drawn
This map has 68 different ways through it in 8 steps or fewer. Instead of testing each one end to end, the 5 behaviours on the map are tested one by one, with 30 scenarios.
Behaviours of this use case
SwRS-MDOKFSTUDIO-DIAG-039Built-in pictures are kept by source and drawn one at a time not on the map3 testsSwRS-MDOKFSTUDIO-DIAG-046PlantUML includes are read through the extension and refusals reach the diagram 3 testsSwRS-MDOKFSTUDIO-DIAG-050The host accepts only well-formed include requests not on the map1 testSwRS-MDOKFSTUDIO-DIAG-053Served include files are watched and redraw their diagrams 4 testsSwRS-MDOKFSTUDIO-DIAG-054The host reads an include only next to the including file in allowed folders 1 testSwRS-MDOKFSTUDIO-DIAG-061Includes nest at most 8 deep, 64 files and 1 MiB 1 testSwRS-MDOKFSTUDIO-DIAG-068A {uml} directive renders a PUML file as a render dependency 4 tests
SwRS-MDOKFSTUDIO-DIAG-042The built-in engine draws one diagram at a time superseded superseded by SwRS-MDOKFSTUDIO-DIAG-039 Markdown file
SwRS-MDOKFSTUDIO-DIAG-045A changed included file redraws the diagrams that read files superseded superseded by SwRS-MDOKFSTUDIO-DIAG-053 Markdown file
SwRS-MDOKFSTUDIO-DIAG-047Include answers are matched by their edit id superseded superseded by SwRS-MDOKFSTUDIO-TRUST-090 Markdown file
SwRS-MDOKFSTUDIO-DIAG-048A host refusal of an include reaches the diagram as its reason superseded superseded by SwRS-MDOKFSTUDIO-DIAG-046 Markdown file
SwRS-MDOKFSTUDIO-DIAG-049Malformed include requests are ignored superseded superseded by SwRS-MDOKFSTUDIO-DIAG-046 Markdown file
SwRS-MDOKFSTUDIO-DIAG-051Include requests are handled for the current document superseded superseded by SwRS-MDOKFSTUDIO-TRUST-065 Markdown file
SwRS-MDOKFSTUDIO-DIAG-052The host answers an include request with the same edit id superseded superseded by SwRS-MDOKFSTUDIO-TRUST-090 Markdown file
SwRS-MDOKFSTUDIO-DIAG-055A forged relative from is refused superseded superseded by SwRS-MDOKFSTUDIO-DIAG-054 Markdown file
SwRS-MDOKFSTUDIO-DIAG-056Includes resolve next to the including file superseded superseded by SwRS-MDOKFSTUDIO-DIAG-054 Markdown file
SwRS-MDOKFSTUDIO-DIAG-057The trust state sets the folders an include may read superseded superseded by SwRS-MDOKFSTUDIO-DIAG-054 Markdown file
SwRS-MDOKFSTUDIO-DIAG-058A missing include file is refused and watched superseded superseded by SwRS-MDOKFSTUDIO-DIAG-054 Markdown file
SwRS-MDOKFSTUDIO-DIAG-059An include file over 5 MiB is refused superseded superseded by SwRS-MDOKFSTUDIO-DIAG-054 Markdown file
SwRS-MDOKFSTUDIO-DIAG-060A symlink leaving the allowed folders is refused superseded superseded by SwRS-MDOKFSTUDIO-DIAG-054 Markdown file
SwRS-MDOKFSTUDIO-DIAG-062A diagram includes at most 64 files superseded superseded by SwRS-MDOKFSTUDIO-DIAG-061 Markdown file
SwRS-MDOKFSTUDIO-DIAG-063A diagram and its includes hold at most 1 MiB of text superseded superseded by SwRS-MDOKFSTUDIO-DIAG-061 Markdown file
SwRS-MDOKFSTUDIO-DIAG-064An include cycle stops with a message superseded superseded by SwRS-MDOKFSTUDIO-DIAG-061 Markdown file
SwRS-MDOKFSTUDIO-DIAG-065A changed include file tells the page superseded superseded by SwRS-MDOKFSTUDIO-DIAG-053 Markdown file
SwRS-MDOKFSTUDIO-DIAG-066The include watch holds at most 1024 files superseded superseded by SwRS-MDOKFSTUDIO-DIAG-053 Markdown file
SwRS-MDOKFSTUDIO-DIAG-067The include watch is cleared when the preview follows another document superseded superseded by SwRS-MDOKFSTUDIO-DIAG-053 Markdown file
SwRS-MDOKFSTUDIO-DIAG-069A diagram file is a dependency of the render superseded superseded by SwRS-MDOKFSTUDIO-DIAG-068 Markdown file
SwRS-MDOKFSTUDIO-DIAG-070An unreadable diagram file shows its refusal superseded superseded by SwRS-MDOKFSTUDIO-DIAG-068 Markdown file
SwRS-MDOKFSTUDIO-DIAG-071A missing diagram file is reported and watched superseded superseded by SwRS-MDOKFSTUDIO-DIAG-068 Markdown file
SwRS-MDOKFSTUDIO-DIAG-072An exhausted include budget stops diagram files superseded superseded by SwRS-MDOKFSTUDIO-DIAG-068 Markdown file
SwRS-MDOKFSTUDIO-DIAG-073A {uml} directive without file or body says so superseded superseded by SwRS-MDOKFSTUDIO-DIAG-068 Markdown file
SwRS-MDOKFSTUDIO-DIAG-074Nested diagrams resolve includes next to their own file superseded superseded by SwRS-MDOKFSTUDIO-DIAG-068 Markdown file
SwRS-MDOKFSTUDIO-DIAG-113Include silence and malformed answers reach the diagram as reasons superseded superseded by SwRS-MDOKFSTUDIO-DIAG-046 Markdown file
SwRS-MDOKFSTUDIO-DIAG-114A non-string from is sent as null superseded superseded by SwRS-MDOKFSTUDIO-DIAG-046 Markdown file