This page (revision-34) was last changed on 26-Nov-2015 17:52 by Albrecht Striffler

This page was created on 26-Oct-2012 10:15 by unknown

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
34 26-Nov-2015 17:52 7 KB Albrecht Striffler to previous
33 26-Nov-2015 17:52 7 KB Albrecht Striffler to previous | to last
32 26-Nov-2015 17:49 7 KB Albrecht Striffler to previous | to last
31 26-Nov-2015 17:49 7 KB Albrecht Striffler to previous | to last
30 26-Nov-2015 17:40 6 KB Albrecht Striffler to previous | to last
29 26-Nov-2015 16:34 6 KB Albrecht Striffler to previous | to last
28 26-Nov-2015 16:19 5 KB Albrecht Striffler to previous | to last
27 26-Nov-2015 16:14 5 KB Albrecht Striffler to previous | to last
26 26-Nov-2015 16:13 4 KB Albrecht Striffler to previous | to last
25 26-Nov-2015 16:11 4 KB Albrecht Striffler to previous | to last
24 26-Nov-2015 16:10 5 KB Albrecht Striffler to previous | to last
23 26-Nov-2015 16:10 5 KB Albrecht Striffler to previous | to last
22 26-Nov-2015 15:33 4 KB Albrecht Striffler to previous | to last
21 26-Nov-2015 15:33 4 KB Albrecht Striffler to previous | to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 removed 2 lines
!!!TestCaseTable
At line 3 added 10 lines
[{TableOfContents }]
!!Normal usage
The TestCaseTable markup allows to specify a test case in a tabular fashion. Each row specifies a set of values to be applied with a specified timestamp to the current problem solving session. Optionally we can define some checks to be performed after the current set of values was applied.\\
The first two columns of the TestCaseTable are ''Name'' and ''Time''. Both are optional. If both are present, ''Name'' must occure before ''Time''. In the column ''Name'' you can give a name or description for the different test rows. In the column ''Time'', you can specify the timestamp at which the values of the row will be applied and the checks will be tested. If there is no column ''Time'', the rows will just be executed sequentially.\\
Following, each column can specify one question or solution. The cells of these columns will define the value to be set to that question or solution in this row. If such a cell is empty, the value of the variable will not change in that row.\\
Again optionally, you can add the column ''Checks''. This column specifies checks to be executed in that row. All [conditions|Doc Conditions] from the rule markup can be used as checks.
At line 16 changed one line
[{Image src='TestCaseTable-screenshot.png' caption='Screenshot of a TestCaseTable markup' width='..' height='..' style='margin-left: 50px' class='..' }]
[{Image src='TestCaseTable-screenshot.png' caption='Screenshot of a TestCaseTable markup' width='..' height='..' style='margin-left: 20px' class='..' }]
At line 18 removed 2 lines
It is possible to specify a name and a time for each row of the line in the first two columns (name must occur before time). If a column header is named "Checks" this column specifies checks being executed in that line. All conditions from the rule markup can be used as checks. On all other columns a question must be referenced in the header cell and a compatible value in the table cells.
At line 32 changed one line
!Example for usage of prefixes:
!Example for Usage of Prefixes
At line 34 changed one line
First, we define our prefix test case where we initialize some variables like weight, height, and age. They will not change during the test case, so they can easily be extracted to the prefix. We add a second line, where we set the time stamp to 5 min. In the screenshot below, you will see, that all the time stamps will be shifted by 5 minutes because of this. (Since this is a simple example, the 5 minutes are not really necessary for this test case. They are for demonstration purposes only.)
First, we define our prefix test case where we initialize some variables like weight, height, and age. They will not change during the test case, so they can easily be extracted to the prefix. We add a second line, where we set the time stamp to 5 min. In the screenshot below, you will see, that all the time stamps of the test case the prefix is prepended to will be shifted by 5 minutes because of this. (Since this is a simple example, the 5 minutes are not really necessary for this test case. They are for demonstration purposes only.)
At line 42 added 2 lines
Note the annotation ''@name'', it will be referenced below.
At line 53 added 2 lines
Now we define the actual test case. It gets its own name and the prefix from above (using annotations @name and @prefix). We set the type of physical activity and a heart rate and then check in each row, if the knowledge base derives the correct value in the heart rate monitor.
At line 47 changed 4 lines
|| Name || Time || Checks || Heart rate || Physical activity of last 5 minutes
| Being at rest for 5 minutes | 0s | Heart rate monitor = Normal | 65 | Non
|   | 1s | Heart rate monitor = Too high | 110 |  
|   | 2s | Heart rate monitor = Too low | 45 |  
|| Name || Time || Checks || Heart rate || Physical activity of last 5 minutes
| Being at rest for 5 minutes | 0s | Heart rate monitor = Normal | 65 | Non
|   | 1s | Heart rate monitor = Too high | 110 |  
|   | 2s | Heart rate monitor = Too low | 45 |  
At line 66 added 2 lines
We define another test case, where we again use the same prefix. In the test case, we again check the correctness of the output of the Heart rate monitor for different heart rates, considering hard physical activity.
At line 69 changed one line
[{Image src='PrefixedTestCases.png' caption='Screenshot of test cases using prefixes' width='900' height='..' style='..' class='..' }]
[{Image src='PrefixedTestCases.png' caption='Screenshot of test cases using prefixes' width='900' height='..' style='margin-left: 10px' class='..' }]
At line 84 added 33 lines
!!TimeDB TestCases
%%information
The functionalities described on this sections are only available using a commercial extension. Please contact info@denkbares.com for more information.
/%
Using the d3web and KnowWE plugin ''TimeDB'', the TestCaseTable markup gets some additional functionality. With the TimeDB plugin, it is possible reason within a temporal context in a d3web knowledge base. You can for example check, whether a certain value has increased or decreased over the last 5 minutes (also see [Doc Expressions] for more information about this).
Due to the importance of the temporal progression of values in a TimeDB knowledge bases, the TestCaseTable markup was extended in the plugin.
!Specifying Insertion Timestamps
Using the TimeDB plugin on an api level, it is possible to set values to the session with a timestamp in the past (to represent a value being measured at a certain time being added to the session later). To represent this in the TestCaseTable markup, the column ''Time'' was extended to be able to represent a second ''insertion'' time stamp using brackets.
It looks like this:
{{{
%%TestCaseTable
|| Time || Temperature
| 0s | 36.8
| 33min | 36.7
| 1h |
| 1h 5min (56min) | 37.8
%
}}}
In the last row, you see two time stamps. One is ''1h 5min'', the other on in brackets is ''56 min''. The semantic is, that at the session time ''1h 5 min'' the values of this row (Temperature = 37.8) will be added to the session's TimeDB with the time stamp 56 minutes. In the other rows, the timestamps at which the values are written and the timestamps with which the values are added to the TimeDB are the same.
The test case rendered in the TestCasePlayer markup would look like this (note that the columns ''Name'' and ''Checks'' are omitted in the source code example above to keep it readable):
[{Image src='TimeDBTestCase.png' width='900' height='..' style='margin-left: 20px' class='..' }]