This page (revision-18) was last changed on 01-Feb-2013 15:57 by Tim Baier-Loewenstein

This page was created on 28-Jan-2013 13:38 by Albrecht Striffler

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
18 01-Feb-2013 15:57 3 KB Tim Baier-Loewenstein to previous
17 01-Feb-2013 15:27 3 KB Tim Baier-Loewenstein to previous | to last
16 28-Jan-2013 15:59 3 KB Albrecht Striffler to previous | to last
15 28-Jan-2013 15:53 3 KB Albrecht Striffler to previous | to last
14 28-Jan-2013 15:24 3 KB Albrecht Striffler to previous | to last
13 28-Jan-2013 15:14 3 KB Albrecht Striffler to previous | to last
12 28-Jan-2013 15:12 3 KB Albrecht Striffler to previous | to last
11 28-Jan-2013 15:10 3 KB Albrecht Striffler to previous | to last
10 28-Jan-2013 15:06 3 KB Albrecht Striffler to previous | to last
9 28-Jan-2013 15:06 3 KB Albrecht Striffler to previous | to last
8 28-Jan-2013 14:51 3 KB Albrecht Striffler to previous | to last
7 28-Jan-2013 14:49 3 KB Albrecht Striffler to previous | to last
6 28-Jan-2013 14:48 3 KB Albrecht Striffler to previous | to last
5 28-Jan-2013 14:39 2 KB Albrecht Striffler to previous | to last
4 28-Jan-2013 14:37 2 KB Albrecht Striffler to previous | to last
3 28-Jan-2013 14:07 994 bytes Albrecht Striffler to previous | to last
2 28-Jan-2013 13:48 432 bytes Albrecht Striffler to previous | to last
1 28-Jan-2013 13:38 64 bytes Albrecht Striffler to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 4 removed 2 lines
TestCases or SequentialTestCases in particular allow to verify that derived solution states and abstract questions match the expectations defined in the respective TestCase.\\
This article describes how to create and a SequentialTestCase in your Java workspace. If you want to know how to use and define a TestCase in KnowWE, you can learn more on the following wiki article: [Doc TestCase]
At line 5 added 3 lines
TestCases or SequentialTestCases in particular allow to verify that derived solution states and abstract questions match the expectations defined the respective TestCase.\\
This article describes how to create a SequentialTestCase in your Java workspace. If you want to know how to use and define a TestCase in KnowWE, you can learn more on the following wiki article: [Doc TestCase]
At line 26 changed 3 lines
# __Finding__: Contains a Question and a Value that will be set in the testing session
# __ExpectedFinding__: Contains a Question and a Value that will be check after the findings are set in the testing session
# __RatedSolution__: Contains a Solution and a Rating or State for this Solution to be checked after the findings are set in the testing session
# __Finding__: Contains a Question and a Value that will be set in the testing session.
# __ExpectedFinding__: Contains a Question and a Value that will be checked after the findings are set in the testing session.
# __RatedSolution__: Contains a Solution and a Rating or State for this Solution to be checked after the findings are set in the testing session.
At line 34 changed one line
rtc.addFinding(new Finding(question, value));
rtc.add(new Finding(question, value));
At line 36 changed one line
rtc.addDerived(new RatedSolution(solution, rating));
rtc.addExpected(new RatedSolution(solution, rating));
At line 47 changed one line
As the value a Finding expects an object of the type QuestionValue. In most cases this will be a ChoiceValue or a NumValue which can be instantiated with a simple String or double.
As the value a Finding expects an object of the type QuestionValue. In most cases this will be a ChoiceValue or a NumValue, which can be instantiated with a simple String or double.
At line 54 changed 3 lines
/%RatedSolutions expect an object with the interface {{de.d3web.empiricaltesting.Rating}}. There are two classes implementing this Interface:
# ScoreRating
# StateRating
/%
At line 58 changed one line
If you want to check a very specific score for the derived solution you can just instantiate ScoreRating with a double or an actual {{de.d3web.scoring.Score}}\\
The persistence of SequentialTestCases allows to write multiple SequentialTestCases into one repository inside one XML file. Therefore the persistence methods expect and return lists of SequentialTestCases.\\
The boolean needed in the method to export SequentialTestCases should be set to {{false}}.
At line 60 added 5 lines
%%prettify
{{{
TestPersistence.getInstance().writeCases(outputSteam, stcs, false)
}}}
/%
At line 66 added one line
Export SequentialTestCases with the following code:
At line 64 changed one line
ScoreRating scoreRating = new ScoreRating(10);
List<SequentialTestCase> stcs = TestPersistence.getInstance().loadCases(inputStream, knowledgebase);
At line 66 changed one line
/%If you just want to more generally check if a solution is for example established, you can instantiate a StateRating which either expects String with the verbalization one of the possible States for d3web solutions ({{EXCLUDED, UNCLEAR, SUGGESTED or ESTABLISHED}}) or an actual {{de.d3web.core.knowledge.terminology.Rating}}.
/%Import SequentialTestCases with the following code:
At line 75 added one line
SequentialTestCases have an easy to use XML persistence.
At line 77 added one line
!!Importing and exporting SequentialTestCase from and to XML
At line 79 added one line
At line 75 changed one line
/%
/%If you just want to more generally check if a solution is for example established, you can instantiate a StateRating which either expects a String with the verbalization of one of the possible States for d3web solutions ({{EXCLUDED, UNCLEAR, SUGGESTED or ESTABLISHED}}) or an actual {{de.d3web.core.knowledge.terminology.Rating}}.
At line 77 removed 2 lines
!!Importing and exporting SequentialTestCase from and to XML
SequentialTestCases have an easy to use XML persistence.
At line 80 removed one line
Import SequentialTestCases with the following code:
At line 85 changed one line
List<SequentialTestCase> stcs = TestPersistence.loadCases(inputStream, knowledgebase);
ScoreRating scoreRating = new ScoreRating(10);
At line 87 changed one line
/%
/%If you want to check a very specific score for the derived solution you can just instantiate ScoreRating with a double or an actual {{de.d3web.scoring.Score}}\\
At line 89 removed 6 lines
Export SequentialTestCases with the following code:
%%prettify
{{{
TestPersistence.writeCases(outputSteam, stcs, true)
}}}
/%
At line 96 removed 2 lines
The persistence of SequentialTestCases allows to write multiple SequentialTestCases into one repository inside one XML file. Therefore the persistence methods expect and return lists of SequentialTestCases.\\
The boolean needed in the method to export SequentialTestCases should be set to true.
At line 97 added 4 lines
RatedSolutions expect an object with the interface {{de.d3web.empiricaltesting.Rating}}. There are two classes implementing this Interface:
# ScoreRating
# StateRating