2024-05-20 10:30:30 +00:00
created: 20240507221902644
2024-07-29 11:19:44 +00:00
modified: 20240729083054531
2024-05-20 10:30:30 +00:00
tags: Concepts
2024-07-29 11:19:44 +00:00
title: TestCaseTiddlers
type: text/vnd.tiddlywiki
2024-05-20 10:30:30 +00:00
2024-07-29 11:19:44 +00:00
Test case tiddlers encapsulate one or more tiddlers that can be displayed as a <<.wlink TestCaseWidget>>: an independent embedded wiki that can be used for testing or learning purposes.
2024-05-20 10:30:30 +00:00
Test case tiddlers are formatted as CompoundTiddlers, allowing them to contain multiple tiddlers packed into one.
2024-07-29 11:19:44 +00:00
Test case tiddlers have the following ''fields'':
2024-05-20 10:30:30 +00:00
|!Field |!Description |
2024-07-29 11:19:44 +00:00
|<<.field type>> |Needs to be set to `text/vnd.tiddlywiki-multiple` |
|<<.field tags>> |Test cases are tagged [[$:/tags/wiki-test-spec]]. Test cases that intentionally fail are tagged [[$:/tags/wiki-test-spec-failing]] |
2024-05-20 10:30:30 +00:00
|<<.field description>> |Descriptive heading for the test, intended to make it easy to identify the test |
|<<.field display-format>> |Optional, defaults to `wikitext`. Set to `plaintext` to cause the output to be rended as plain text |
2024-07-29 11:19:44 +00:00
|<<.field import-compound>> |<<.from-version "5.3.6">> A filter string, that defines a list of compound tiddlers, that should be imported. See: <<.wlink DataWidget>> widget |
2024-05-20 10:30:30 +00:00
2024-07-29 11:19:44 +00:00
Test case tiddlers with the appropriate tag are shown in the $:/ControlPanel ''-> Advanced -> Test Cases ''
2024-05-20 10:30:30 +00:00
2024-07-29 11:19:44 +00:00
Some ''payload ''tiddlers are set aside for special purposes:
2024-05-20 10:30:30 +00:00
|!Tiddler |!Description |
|''Narrative'' |Narrative description of the test, intended to explain the purpose and operation of the test |
|''Output'' |The tiddler that produces the test output |
|''~ExpectedResult'' |HTML of expected result of rendering the ''Output'' tiddler |
2024-07-29 11:19:44 +00:00
|''Description'' |Set to the text of the <<.field description>> field, if the field exists |
Also see: TestCaseWidget, DataWidget