In KnowWE, continuous integration facilitates the automated testing and building of knowledge bases. Since, we provide a distributed knowledge base development, it is important to install simple mechanisms to automatically control the quality of the knowledge base after every change or on demand.
The continuous integration plugin is installed by
%%CIDashboard @name: <dashboard name> @trigger: <onSave/onDemand> <article for onSave trigger> @test: <testname> <test object> <parameters (if required)...> %
Please use the annotations of the plugin as follows:
Annotation | Mandatory | Description |
---|---|---|
name | yes | Specify the name of the wiki article, where the knowledge base is defined |
trigger | yes | Controls the time, when the integration is executed: onSave executes a new integration after any save action in the wiki (recommended) and onDemand only executes the integration when the user explicitly starts it in the tool menu of the continuous integration plugin (only recommended for large knowledge bases and slower computers). |
test | optional | Specify the name of the test and its parameters. To define more than one test, you may use the test annotation multiple times. |
In this installation the following tests are available. However, new tests can be added by new plugins.
Name of Test | Test Object | Description |
---|---|---|
ArticleContains | Article | Synopsis: @test ArticleContains «Article» «SearchString» Checks, whether the articles contain the text defined by the search string. Parameter Details:
|
ArticleHasErrors | Article | Synopsis: @test ArticleHasErrors «Article» Checks, that the specified articles reports no compile errors. This test also allows to specify items to be ignored:
|
ArticleHasMarkupErrors | Article | Synopsis: @test ArticleHasMarkupErrors «Article» CI Test that tests whether an article consist of markup(s) with errors in it. This encompasses missing '%' at the beginning and end as well as nested markups This test also allows to specify items to be ignored:
|
ArticleHasWarnings | Article | Synopsis: @test ArticleHasWarnings «Article» Checks, that the specified articles reports no compile warnings. This test also allows to specify items to be ignored:
|
CompilerHasErrors | Object | Synopsis: @test CompilerHasErrors «Object» Checks, that the specified compiler reports no compile errors. This test also allows to specify items to be ignored:
|
CompilerHasWarnings | Object | Synopsis: @test CompilerHasWarnings «Object» Checks, that the specified compiler reports no compile warnings. This test also allows to specify items to be ignored:
|
DashboardMetaCheck | Article | Synopsis: @test DashboardMetaCheck «Article» Checks all other Dashboards for failed tests. |
DiaFlux:Abnormality | KnowledgeBase | Synopsis: @test DiaFlux:Abnormality «KnowledgeBase» «no-error-solution-name» [«timeout»] Checks whether paths with only normal (not abnormal) answers always lead to one of the given no-error solutions, as expected. Also checks that paths to error solution have at least one abnormal answer in them. Reports all flow paths that violate this check. Parameter Details:
|
DiaFlux:AmbiguousEdge | KnowledgeBase | Synopsis: @test DiaFlux:AmbiguousEdge «KnowledgeBase» If multiple outgoing edges of a node use the same choice, the edges of this node become ambiguous. In this case the flow may divert into two parallel paths which is often not desired. This test also allows to specify items to be ignored:
|
DiaFlux:CombinedFlowRuleAbstraction | KnowledgeBase | Synopsis: @test DiaFlux:CombinedFlowRuleAbstraction «KnowledgeBase» Checks whether there is an abstraction question, that is derived by an abstraction rule as well as by a DiaFLux action node - this may cause TMS conflicts. |
DiaFlux:CombinedFlowRuleSolution | KnowledgeBase | Synopsis: @test DiaFlux:CombinedFlowRuleSolution «KnowledgeBase» Checks, whether there is a solution for which states are assigned by a DiaFlux node AND a scoring rule as this might cause truth-maintenance problems. |
DiaFlux:ConflictingAssignment | KnowledgeBase | Synopsis: @test DiaFlux:ConflictingAssignment «KnowledgeBase» [«timeout»] Tries to find a path, where one question is first conditioned by a guard of an edge and later a new value is assigned to this question. The assignment of the new value will retract the path until the previous condition and consequently will yield a infinite reasoning cycle. For this reason, before setting a new value to a question, that was previously conditioned, a snapshot node has to be placed. Parameter Details:
This test also allows to specify items to be ignored:
|
DiaFlux:CyclicFlow | KnowledgeBase | Synopsis: @test DiaFlux:CyclicFlow «KnowledgeBase» [«timeout»] This cyclic flowchart test examines all DiaFlux flowcharts of a given knowledge base for any cyclic dependency. A cyclic dependency is available if there is any node form that you can follow the diagnostic path towards the node itself. If there is any snapshot in between, or any node that repeatedly asks a specified question, the path is not assumed to be cyclic, because after re-answering a question you may follow a different path. Thus you are not 'captured' in the cycle when performing the interview. Parameter Details:
This test also allows to specify items to be ignored:
|
DiaFlux:DuplicatePaths | KnowledgeBase | Synopsis: @test DiaFlux:DuplicatePaths «KnowledgeBase» [«min-path-size»] [«timeout»] This tests searches for duplicate sub-paths within the flowcharts of a knowledge base. A duplicate sub-path is a set of nodes and interconnection edges between the nodes of a flowchart, that is identically found at the same or an other flowchart. Parameter Details:
|
DiaFlux:InformationGain | KnowledgeBase | Synopsis: @test DiaFlux:InformationGain «KnowledgeBase» «min-gain-average» «min-gain-each» [«attach»] [«timeout»] The information gain test checks every flowchart node that asks a question for the information gain achieved by the particular question. The information gain for each question node is measured by all solutions that can be reached by following the flowchart(s) from the question node and how the number of these solutions is reduced by answering this particular question. Each information gain is compared against the maximum information gain of the node, calculated depending on the number of outgoing edges. You can compare both the average information gain and the particular information gain of each asking node against the specified limits. Parameter Details:
This test also allows to specify items to be ignored:
|
DiaFlux:InterviewLength | KnowledgeBase | Synopsis: @test DiaFlux:InterviewLength «KnowledgeBase» «max-cost-average» «max-cost-each» [«attach»] [«timeout»] The interview length test check the cost and number of questions asked during the interview until a solution is reached. You may specify the average interview cost that should not been exceeded in average and a maximum interview cost that should also not been exceeded by the longest interview path. If not specified otherwise using the property COST, the cost per question will default to 1. Parameter Details:
|
DiaFlux:MissingEdge | KnowledgeBase | Synopsis: @test DiaFlux:MissingEdge «KnowledgeBase» Searches for all nodes in the DiaFlux models of a knowledge base, where not all possible values or outgoing edges are connect to other nodes. In this case the flow may stop unexpectedly in between. This test also allows to specify items to be ignored:
|
DiaFlux:NoAutostart | KnowledgeBase | Synopsis: @test DiaFlux:NoAutostart «KnowledgeBase» Tests whether exists an autostart flow in the DiaFlux model. |
DiaFlux:StandardQuestionDerivedByAbstraction | KnowledgeBase | Synopsis: @test DiaFlux:StandardQuestionDerivedByAbstraction «KnowledgeBase» Checks whether there exists a standard question (not an abstraction question), that is derived by an abstraction rule or a DiaFlux action node. |
DiaFlux:UnusedFlow | KnowledgeBase | Synopsis: @test DiaFlux:UnusedFlow «KnowledgeBase» This test checks whether the knowledge base contains DiaFlux models, that are neither Autostart models nor are called by other DiaFlux models This test also allows to specify items to be ignored:
|
DiaFlux:UnusedNode | KnowledgeBase | Synopsis: @test DiaFlux:UnusedNode «KnowledgeBase» Looks for non-connected start or exit nodes in DiaFlux models. |
EmptyQuestionnaire | KnowledgeBase | Synopsis: @test EmptyQuestionnaire «KnowledgeBase» Tests whether the knowledge base has questionnaires that do not contain any questions or other questionnaires. This test also allows to specify items to be ignored:
|
FunctionalProperty | Object | Synopsis: @test FunctionalProperty «Object» Checks for all existing functional property whether they are indeed used as functional, i.e., for each subject node only one object exists. |
IncompleteChoiceQuestion | KnowledgeBase | Synopsis: @test IncompleteChoiceQuestion «KnowledgeBase» Looks for choice questions that have no choice alternatives defined yet. |
SingleAlternative | KnowledgeBase | Synopsis: @test SingleAlternative «KnowledgeBase» A simple test checking the knowledge base for choice question with only one alternative. You can specify a list of choices that are accepted to be the single alternative of a question, e.g. "ok" or "continue". This test also allows to specify items to be ignored:
|
SingleTermDefinition | Article | Synopsis: @test SingleTermDefinition «Article» This test checks, if each term is defined only once. This test also allows to specify items to be ignored:
|
SparqlAsk | Object | Synopsis: @test SparqlAsk «Object» «expected value» [«warning»] Checks the truth value of given sparql ask query against an expected value. Parameter Details:
|
SparqlResultSize | Object | Synopsis: @test SparqlResultSize «Object» «comparator» «expected size» [«warning»] Checks the size (amount of rows) of a given sparql query result against an expected value. Parameter Details:
|
SparqlResultTable | Object | Synopsis: @test SparqlResultTable «Object» [«comparator»] [«warning»] Test a expected sparql result set against the result set of the actually executed sparql query. Parameter Details:
|
TermnameConvention | Article | Synopsis: @test TermnameConvention «Article» «Naming convention pattern» Tests whether the objects names used on this article comply to the specified naming convention pattern. Parameter Details:
|
TestCase | TestCase | Synopsis: @test TestCase «TestCase» «KnowledgeBase» [«ValueOutOfRange»] This test executes test cases. It compares the expected findings defined in the test cases with the findings actually derived by the knowledge base. Parameter Details:
|
URIPatternTest | Object | Synopsis: @test URIPatternTest «Object» Checks for all Terms (URIs) whether they follow best practice URL patterns. This test also allows to specify items to be ignored:
|
%%CIDashboard @name: MyArticle CI Test @trigger: onSave MyArticle @test: EmptyQuestionnaireTest MyArticle @test: IsolatedInterfaceNodeInDiaFluxModel MyArticle @test: NoAutostartFlowCITest MyArticle @test: StandardQuestionDerivedByAbstraction MyArticle @test: CombinedDiaFluxRuleAbstraction MyArticle @test: StandardQuestionDerivedByAbstraction MyArticle @test: IncompleteChoiceQuestion MyArticle %
Looks like: