From 2c63a4e75e8c743cf3ccb0db2af0c745544c04ab Mon Sep 17 00:00:00 2001 From: slacourte Date: Mon, 23 Oct 2023 15:03:21 +0200 Subject: [PATCH] Fix FitNesse architecture and comments. --- .../MalTests/TestDocument/content.txt | 21 ++++--- .../AllExceptPubSubTestProcedure/content.txt | 41 +++++++++++-- .../AllExceptPubSubTestCase/content.txt | 24 +------- .../ElementParameterTestProcedure/content.txt | 56 +++++++++++++++++ .../properties.xml | 11 ++++ .../ExplicitTypesTestProcedure/content.txt | 60 +++++++++++++++++++ .../ExplicitTypesTestProcedure/properties.xml | 11 ++++ .../MoObjectTestProcedure/content.txt | 38 ++++++++++++ .../MoObjectTestProcedure/properties.xml | 11 ++++ .../MultiReturnTestProcedure/content.txt | 47 +++++++++++++++ .../MultiReturnTestProcedure/properties.xml | 11 ++++ .../PolymorphicTypesTestProcedure/content.txt | 48 +++++++++++++++ .../properties.xml | 11 ++++ .../DataTypeTestScenario/content.txt | 58 ++++-------------- .../TransportErrors/content.txt | 1 + .../EntityRequestTestProcedure/content.txt | 6 +- .../PublishRegisterTestProcedure/content.txt | 6 +- 17 files changed, 371 insertions(+), 90 deletions(-) create mode 100755 testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ElementParameterTestProcedure/content.txt create mode 100755 testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ElementParameterTestProcedure/properties.xml create mode 100755 testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ExplicitTypesTestProcedure/content.txt create mode 100755 testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ExplicitTypesTestProcedure/properties.xml create mode 100755 testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MoObjectTestProcedure/content.txt create mode 100755 testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MoObjectTestProcedure/properties.xml create mode 100755 testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MultiReturnTestProcedure/content.txt create mode 100755 testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MultiReturnTestProcedure/properties.xml create mode 100755 testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/PolymorphicTypesTestProcedure/content.txt create mode 100755 testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/PolymorphicTypesTestProcedure/properties.xml diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestDocument/content.txt b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestDocument/content.txt index bbd421eea..2a715aeaf 100644 --- a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestDocument/content.txt +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestDocument/content.txt @@ -36,16 +36,21 @@ !see TestScenarios.Section4Scenarios.PubSubTestCase.SubscriptionTestProcedure !see TestScenarios.Section4Scenarios.PubSubTestCase.MultiTypeTestProcedure !see TestScenarios.Section4Scenarios.DataTypeTestScenario +!see TestScenarios.Section4Scenarios.DataTypeTestScenario.ExplicitTypesTestProcedure +!see TestScenarios.Section4Scenarios.DataTypeTestScenario.ElementParameterTestProcedure +!see TestScenarios.Section4Scenarios.DataTypeTestScenario.MultiReturnTestProcedure +!see TestScenarios.Section4Scenarios.DataTypeTestScenario.PolymorphicTypesTestProcedure +!see TestScenarios.Section4Scenarios.DataTypeTestScenario.MoObjectTestProcedure !see TestScenarios.Section4Scenarios.ErrorTestScenario !see TestScenarios.Section4Scenarios.ErrorTestScenario.TransportErrors !see TestScenarios.Section4Scenarios.ErrorTestScenario.SecurityErrors !see TestScenarios.Section4Scenarios.AccessControlTestScenario -!see TestScenarios.Section4Scenarios.TransportTestScenario -!see TestScenarios.Section4Scenarios.TransportTestScenario.IsSupportedQosTestCase -!see TestScenarios.Section4Scenarios.TransportTestScenario.IsSupportedIpTestCase -!see TestScenarios.Section4Scenarios.TransportTestScenario.TransmitTestCase -!see TestScenarios.Section4Scenarios.TransportTestScenario.TransmitErrorTestCase -!see TestScenarios.Section4Scenarios.TransportTestScenario.TransmitMultipleTestCase -!see TestScenarios.Section4Scenarios.TransportTestScenario.ReceiveTestCase -!see TestScenarios.Section4Scenarios.TransportTestScenario.ReceiveMultipleTestCase +#!see TestScenarios.Section4Scenarios.TransportTestScenario +#!see TestScenarios.Section4Scenarios.TransportTestScenario.IsSupportedQosTestCase +#!see TestScenarios.Section4Scenarios.TransportTestScenario.IsSupportedIpTestCase +#!see TestScenarios.Section4Scenarios.TransportTestScenario.TransmitTestCase +#!see TestScenarios.Section4Scenarios.TransportTestScenario.TransmitErrorTestCase +#!see TestScenarios.Section4Scenarios.TransportTestScenario.TransmitMultipleTestCase +#!see TestScenarios.Section4Scenarios.TransportTestScenario.ReceiveTestCase +#!see TestScenarios.Section4Scenarios.TransportTestScenario.ReceiveMultipleTestCase !see TestScenarios.RegressionScenarios.FastProvider diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/AllExceptPubSubTestCase/AllExceptPubSubTestProcedure/content.txt b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/AllExceptPubSubTestCase/AllExceptPubSubTestProcedure/content.txt index 21ed46146..264986e8c 100644 --- a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/AllExceptPubSubTestCase/AllExceptPubSubTestProcedure/content.txt +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/AllExceptPubSubTestCase/AllExceptPubSubTestProcedure/content.txt @@ -25,18 +25,47 @@ |org.ccsds.moims.mo.mal.test.patterns| *******! -!4 Test procedure: /// -The test procedure does the following actions: - 1 Call the operation provided by the IPTest service with the parameters passed to the test procedures: 'ip', 'qos', 'session' and 'transition list id'. +!4 Test procedure: all patterns except Pub/Sub +The test procedure iterates over the following actions: + 1 Call the proper pattern type operation provided by the IPTest service with the parameters passed to the test procedure. 2 Wait for the expected transitions to be done, except the faulty ones that are ignored. 3 Check the message headers 4 Check the transitions It is necessary to go through all the transitions of the IP state charts, the faulty transitions are underlined. -In the faulty case, the field 'errorCode' of the IPTestTransition is set to the value INCORRECT_STATE otherwise it -is set to "-1". The field 'Transition list id' is used to identify the test procedure. +In the faulty case, the field 'errorCode' of the IPTestTransition is set to the value INCORRECT_STATE otherwise it is set to "-1". + +The test procedure relies on parameterized FitNesse sub scenarios in order to iterate through all the tested behaviours. + +The consumer initiates the patterns by calling the following operations provided by the service IPTest: + * testSubmit + * request + * invoke + * progress +Those operations accept a single IPTestDefinition parameter. This parameter is notably used by the provider to execute a predefined behaviour. +Variants of those operations are defined by the service IPTest, with an empty body for the OUT messages, or with an additional parameter in the body of the initial IN message: + * submitMulti + * testRequestEmptyBody, requestMulti + * testInvokeEmptyBody, invokeMulti + * testProgressEmptyBody, progressMulti +Those additional operations implement the same behaviour than the regular ones, with the same IPTestDefinition parameter. +All those operations shall be called in the FitNesse sub scenario named !-PatternWithSupplementsAndTransitionsAndBehaviourIdTest-!. +This sub scenario shall be executed several times for each tested behaviour, with additional environment parameters, in a sub scenario named !-TestInteractionPatternWithTransitionsAndBehaviourId-!. + +The possible values of the sub scenario parameters are: +-!|Comment| +|parameter|values|comment| +|interaction pattern|Submit, Request, Invoke, Progress|name of the tested IP| +|transitions|{_M_}*,{M}*,{_M_}*, with M in ACK, ACK_ERROR, UPDATE, UPDATE_ERROR, RESPONSE, RESPONSE_ERROR|list of expected messages to be sent by the provider according to the tested behaviour, starting with a list of initial faulty messages sent by the testbed, followed by the list of regular messages sent by the provider, followed by a list of final faulty messages sent by the testbed| +|behaviour id|numeric|numeric identifier used by the consumer and the provider to perform actions specific to the tested behaviour| +|supplements|Empty, Full|environment parameter used to set the supplements header field, either empty or with a full set of various attribute types| + +The 'transitions' parameter describes the MAL messages exchanged from the provider MAL to the consumer MAL. It is used by the consumer to check the correctness of the indications it receives according to the test procedure. +The 'behaviour id' parameter is used by the provider to actually send the messages expected by the test procedure. + +The transitions are checked by ensuring that the consumer receives proper indications, even when the consumer MAL receives faulty messages. + -The transitions are checked by ensuring that the faulty messages are not received by the consumer. !*> Sub scenario definitions |scenario| pattern | interaction | with supplements| supplements | and transitions | trans | and behaviour id | id | test | diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/AllExceptPubSubTestCase/content.txt b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/AllExceptPubSubTestCase/content.txt index 5b554f8c7..569730f86 100644 --- a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/AllExceptPubSubTestCase/content.txt +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/AllExceptPubSubTestCase/content.txt @@ -23,27 +23,5 @@ *******! !3 Test case: all patterns except Pub/Sub -The consumer initiates the patterns by calling the following operations provided by the service IPTest: - * send - * submit - * request - * invoke - * progress -Those operations shall be called once for each !-QoS-! level and session type. It is not necessary to test each combination of !-QoS-! and session. One call for each !-QoS-! level and session type is enough. - -The following parameters are used to make the calls: -|comment| -|authenticationId| {0x00, 0x01}| -|qos| Best Effort, Assured, Queued, Timely| -|priority| 1| -|domain| {"Test", "Domain"}| -|networkZone| "!-TestNetwork-!"| -|session| Live, Simulation, Replay| -|session name|!{Live:"LIVE", Replay:"R1", Simulation:"S1"}| - -The consumer has to execute the following test procedure for every possible header values (!-QoS-! and session fields) and every possible transitions. The name of the procedure is built from the parameters: - * ip: name of the tested IP - * qos: !-QoS-! level to be used - * session: session type to be used - * transition list id: identifier of the IPTestTransitionList that is expected by the consumer (see table above). +A single test procedure is defined and executed multiple times to cover all the tested behaviours. diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ElementParameterTestProcedure/content.txt b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ElementParameterTestProcedure/content.txt new file mode 100755 index 000000000..982bd75e4 --- /dev/null +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ElementParameterTestProcedure/content.txt @@ -0,0 +1,56 @@ +# ---------------------------------------------------------------------------- +# Copyright (C) 2013 European Space Agency +# European Space Operations Centre +# Darmstadt +# Germany +# ---------------------------------------------------------------------------- +# System : CCSDS MO MAL Test bed +# ---------------------------------------------------------------------------- +# Licensed under the European Space Agency Public License, Version 2.0 +# You may not use this file except in compliance with the License. +# +# Except as expressly set forth in this License, the Software is provided to +# You on an "as is" basis and without warranties of any kind, including without +# limitation merchantability, fitness for a particular purpose, absence of +# defects or errors, accuracy or non-infringement of intellectual property rights. +# +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------- + +!*< Hidden +!define TEST_SYSTEM {slim} + +|Import| +|org.ccsds.moims.mo.mal.test.datatype| + +*! +!4 Element parameter test procedure + +The test procedure does the following actions: + 1 Call the generic testData operation provided by the !-DataTest-! service provider with a statically defined value. + 2 Check that no error is raised by the provider, especially DATA_ERROR and BAD_ENCODING, meaning that the provider received the right value. + 3 Check the return value which must equal to the original value. + +The generic testData operation of the !-DataTest-! service is defined as: Element testData(Element). + +A list of MAL data structure instances is statically defined according to the following constraints: + * All the data types shall be instantiated at least once. + * Enumerations shall be instantiated once for each enumerated value. + * Abstract types need to be extended by a concrete type for the test + * The value Null shall belong to the list + * The value Null shall be inserted into a Composite structure + +This data list is statically known by the !-DataTest-! service provider and consumer. +The consumer takes the data from the list one by one, in the same order, and applies the test procedure. + +|script| data type scenario| +|note| Element parameter test| +|check| attribute types work| OK| +|check| enumerations work| OK| +|check| complete composites work | OK| +|check| abstract composites work | OK| +|check| lists work | OK| +|check| nulls work|OK| +|check| composites with null work| OK| +|check| polymorphic types work | OK| diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ElementParameterTestProcedure/properties.xml b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ElementParameterTestProcedure/properties.xml new file mode 100755 index 000000000..72aa2b6a6 --- /dev/null +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ElementParameterTestProcedure/properties.xml @@ -0,0 +1,11 @@ + + + true + true + true + true + true + true + true + true + diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ExplicitTypesTestProcedure/content.txt b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ExplicitTypesTestProcedure/content.txt new file mode 100755 index 000000000..1ddbe3a94 --- /dev/null +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ExplicitTypesTestProcedure/content.txt @@ -0,0 +1,60 @@ +# ---------------------------------------------------------------------------- +# Copyright (C) 2013 European Space Agency +# European Space Operations Centre +# Darmstadt +# Germany +# ---------------------------------------------------------------------------- +# System : CCSDS MO MAL Test bed +# ---------------------------------------------------------------------------- +# Licensed under the European Space Agency Public License, Version 2.0 +# You may not use this file except in compliance with the License. +# +# Except as expressly set forth in this License, the Software is provided to +# You on an "as is" basis and without warranties of any kind, including without +# limitation merchantability, fitness for a particular purpose, absence of +# defects or errors, accuracy or non-infringement of intellectual property rights. +# +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------- + +!*< Hidden +!define TEST_SYSTEM {slim} + +|Import| +|org.ccsds.moims.mo.mal.test.datatype| + +*! +!4 Explicit types test procedure + +The test procedure does the following actions: + 1 Call the proper data type operation provided by the !-DataTest-! service provider with a statically defined value. + 2 Check that no error is raised by the provider, especially DATA_ERROR and BAD_ENCODING, meaning that the provider received the right value. + 3 Check the return value which must equal to the original value. + +The test procedure is applied to all the MAL Attribute data types. + +The data values are statically known by the !-DataTest-! service provider and consumer. This allows the provider to check that the value he receives equals to the value sent by the consumer. +The test operation of the !-DataTest-! service is specific to the tested type T. It is defined as: testData(). + +|script| data type scenario| +|note| Explicit types test| +|check| explicit duration type works| OK| +|check| explicit Fine Time type works| OK| +|check| explicit Identifier type works| OK| +|check| explicit Time type works| OK| +|check| explicit URI type works| OK| +|check| explicit Blob type works| OK| +|check| explicit Boolean type works| OK| +|check| explicit Octet type works| OK| +|check| explicit Double type works| OK| +|check| explicit Float type works| OK| +|check| explicit Integer type works| OK| +|check| explicit Long type works| OK| +|check| explicit Short type works| OK| +|check| explicit String type works| OK| +|check| explicit UOctet type works| OK| +|check| explicit UInteger type works| OK| +|check| explicit ULong type works| OK| +|check| explicit UShort type works| OK| +|check| explicit Object Ref type works| OK| diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ExplicitTypesTestProcedure/properties.xml b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ExplicitTypesTestProcedure/properties.xml new file mode 100755 index 000000000..72aa2b6a6 --- /dev/null +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/ExplicitTypesTestProcedure/properties.xml @@ -0,0 +1,11 @@ + + + true + true + true + true + true + true + true + true + diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MoObjectTestProcedure/content.txt b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MoObjectTestProcedure/content.txt new file mode 100755 index 000000000..e8efbc266 --- /dev/null +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MoObjectTestProcedure/content.txt @@ -0,0 +1,38 @@ +# ---------------------------------------------------------------------------- +# Copyright (C) 2013 European Space Agency +# European Space Operations Centre +# Darmstadt +# Germany +# ---------------------------------------------------------------------------- +# System : CCSDS MO MAL Test bed +# ---------------------------------------------------------------------------- +# Licensed under the European Space Agency Public License, Version 2.0 +# You may not use this file except in compliance with the License. +# +# Except as expressly set forth in this License, the Software is provided to +# You on an "as is" basis and without warranties of any kind, including without +# limitation merchantability, fitness for a particular purpose, absence of +# defects or errors, accuracy or non-infringement of intellectual property rights. +# +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------- + +!*< Hidden +!define TEST_SYSTEM {slim} + +|Import| +|org.ccsds.moims.mo.mal.test.datatype| + +*! +!4 MO Object test procedure + +The test procedure does the following actions: + 1 Call the objectAssertionsAreChecked operation provided by the !-DataTest-! service provider. + 2 Let the provider check a list of assertions related to the MO Object concept. + 3 Check the return value which confirms the validation of those assertions. + + +|script| data type scenario| +|note| MO Object test| +|check| object assertions are checked | OK| diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MoObjectTestProcedure/properties.xml b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MoObjectTestProcedure/properties.xml new file mode 100755 index 000000000..72aa2b6a6 --- /dev/null +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MoObjectTestProcedure/properties.xml @@ -0,0 +1,11 @@ + + + true + true + true + true + true + true + true + true + diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MultiReturnTestProcedure/content.txt b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MultiReturnTestProcedure/content.txt new file mode 100755 index 000000000..c006dda1b --- /dev/null +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MultiReturnTestProcedure/content.txt @@ -0,0 +1,47 @@ +# ---------------------------------------------------------------------------- +# Copyright (C) 2013 European Space Agency +# European Space Operations Centre +# Darmstadt +# Germany +# ---------------------------------------------------------------------------- +# System : CCSDS MO MAL Test bed +# ---------------------------------------------------------------------------- +# Licensed under the European Space Agency Public License, Version 2.0 +# You may not use this file except in compliance with the License. +# +# Except as expressly set forth in this License, the Software is provided to +# You on an "as is" basis and without warranties of any kind, including without +# limitation merchantability, fitness for a particular purpose, absence of +# defects or errors, accuracy or non-infringement of intellectual property rights. +# +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------- + +!*< Hidden +!define TEST_SYSTEM {slim} + +|Import| +|org.ccsds.moims.mo.mal.test.datatype| + +*! +!4 Multi return test procedure + +The test procedure does the following actions: + 1 Call a specific operation provided by the !-DataTest-! service provider with a set of statically defined values. + 2 Check that no error is raised by the provider, especially DATA_ERROR and BAD_ENCODING, meaning that the provider received the right values. + 3 Check the return values which must equal to the original values. + +The test operation of the !-DataTest-! service declares 4 input parameters and 4 return parameters. The objective is not to test all data types, as this has already been done with the ExplicitTypesTestProcedure. The objective is to check various use cases when the data is not the single return parameter. A specific operation is defined for each use case as the type of the declared parameter is important. +The tested use cases include: + 1 a set of explicitely defined types + 2 a set of parameters with the last one declared as Element + 3 a set of parameters with the 2nd and 3rd ones declared as Element + 4 a set of parameters including a NULL value + +|script| data type scenario| +|note| Multi return test| +|check| explicit multi return works| OK| +|check| abstract multi return works | OK| +|check| inner abstract multi return works | OK| +|check| multi return with nulls work| OK| diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MultiReturnTestProcedure/properties.xml b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MultiReturnTestProcedure/properties.xml new file mode 100755 index 000000000..72aa2b6a6 --- /dev/null +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/MultiReturnTestProcedure/properties.xml @@ -0,0 +1,11 @@ + + + true + true + true + true + true + true + true + true + diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/PolymorphicTypesTestProcedure/content.txt b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/PolymorphicTypesTestProcedure/content.txt new file mode 100755 index 000000000..b5a4e7d0d --- /dev/null +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/PolymorphicTypesTestProcedure/content.txt @@ -0,0 +1,48 @@ +# ---------------------------------------------------------------------------- +# Copyright (C) 2013 European Space Agency +# European Space Operations Centre +# Darmstadt +# Germany +# ---------------------------------------------------------------------------- +# System : CCSDS MO MAL Test bed +# ---------------------------------------------------------------------------- +# Licensed under the European Space Agency Public License, Version 2.0 +# You may not use this file except in compliance with the License. +# +# Except as expressly set forth in this License, the Software is provided to +# You on an "as is" basis and without warranties of any kind, including without +# limitation merchantability, fitness for a particular purpose, absence of +# defects or errors, accuracy or non-infringement of intellectual property rights. +# +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------- + +!*< Hidden +!define TEST_SYSTEM {slim} + +|Import| +|org.ccsds.moims.mo.mal.test.datatype| + +*! +!4 Polymorphic types test procedure + +The test procedure does the following actions: + 1 Call a specific operation provided by the !-DataTest-! service provider with a statically defined value. + 2 Check that no error is raised by the provider, especially DATA_ERROR and BAD_ENCODING, meaning that the provider received the right value. + 3 Check the return value which must equal to the original value. + +The test procedure is similar to the Element parameter test procedure, except that it explores more complex polymorphic use cases allowed by the MAL type rules. +A complex set of abstract and concrete types are defined, with associated values. A number of specific test operations are defined in the !-DataTest-! service, which make use of those abstract types to declare their parameter. +The tested use cases include: + * multiple levels of Composite inheritance + * operation parameter type as an intermediate abstract level (i.e. not the top Element type and not the final concrete type) + * List of the various abstract types + * List of !-ObjectRef-![] with various abstract types for T + +|script| data type scenario| +|note| Polymorphic types test| +|check| polymorphic abstract composite lists work | OK| +|check| polymorphic mal composite lists work | OK| +|check| polymorphic mal element lists work | OK| +|check| polymorphic object ref types work | OK| diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/PolymorphicTypesTestProcedure/properties.xml b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/PolymorphicTypesTestProcedure/properties.xml new file mode 100755 index 000000000..72aa2b6a6 --- /dev/null +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/PolymorphicTypesTestProcedure/properties.xml @@ -0,0 +1,11 @@ + + + true + true + true + true + true + true + true + true + diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/content.txt b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/content.txt index 7f7633cae..7cc74432f 100644 --- a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/content.txt +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/DataTypeTestScenario/content.txt @@ -18,8 +18,6 @@ # limitations under the License. # ---------------------------------------------------------------------------- -!2 Data type test scenario - !*< Hidden !define TEST_SYSTEM {slim} @@ -27,50 +25,16 @@ |org.ccsds.moims.mo.mal.test.datatype| *! -A list of MAL data structure instances is statically defined according to the following constraints: - * All the data types shall be instantiated at least once. - * Enumerations shall be instantiated once for each enumerated value. - * Abstract types need to be extended by a concrete type for the test - * The value Null shall belong to the list - * The value Null shall be inserted into a Composite structure +!2 Data type test scenario + +A single test case is defined for all the procedures used to check the MAL data types related assertions. -This data list is statically known by the !-DataTest-! service provider and consumer. -The consumer takes the data from the list one by one, in the same order, and calls the operation 'testData'. It checks that no error is raised by the provider, especially DATA_ERROR and BAD_ENCODING. +!3 Data type test case -|script| data type scenario| -|check| explicit duration type works| OK| -|check| explicit Fine Time type works| OK| -|check| explicit Identifier type works| OK| -|check| explicit Time type works| OK| -|check| explicit URI type works| OK| -|check| explicit Blob type works| OK| -|check| explicit Boolean type works| OK| -|check| explicit Octet type works| OK| -|check| explicit Double type works| OK| -|check| explicit Float type works| OK| -|check| explicit Integer type works| OK| -|check| explicit Long type works| OK| -|check| explicit Short type works| OK| -|check| explicit String type works| OK| -|check| explicit UOctet type works| OK| -|check| explicit UInteger type works| OK| -|check| explicit ULong type works| OK| -|check| explicit UShort type works| OK| -|check| explicit Object Ref type works| OK| -|check| attribute types work| OK| -|check| enumerations work| OK| -|check| complete composites work | OK| -|check| abstract composites work | OK| -|check| lists work | OK| -|check| nulls work|OK| -|check| composites with null work| OK| -|check| explicit multi return works| OK| -|check| abstract multi return works | OK| -|check| inner abstract multi return works | OK| -|check| multi return with nulls work| OK| -|check| polymorphic types work | OK| -|check| polymorphic abstract composite lists work | OK| -|check| polymorphic mal composite lists work | OK| -|check| polymorphic mal element lists work | OK| -|check| polymorphic object ref types work | OK| -|check| object assertions are checked | OK| +Several test procedures are defined: + * the explicit types test procedure checks the basic exchange of data values from a consumer to a provider and back. The widest range of values are checked. + * the Element parameter test procedure checks the characteristics of all types to be a MAL Element. + * the multi return test procedure explores the use of data values in operation parameters, depending on the complexity of the operation body. + * the polymorphic types test procedure checks the extended polymorphic possibilities offered by the MAL type system. + * the MO Object test procedure checks assertions related to the MO Object concept. + \ No newline at end of file diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/ErrorTestScenario/TransportErrors/content.txt b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/ErrorTestScenario/TransportErrors/content.txt index c1fb8b47f..441317053 100644 --- a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/ErrorTestScenario/TransportErrors/content.txt +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/ErrorTestScenario/TransportErrors/content.txt @@ -38,6 +38,7 @@ |org.ccsds.moims.mo.mal.test.errors| *******! +!3 Test Case: Transport errors !4 Test procedure: transport errors This test checks that the error code are correctly defined at the MAL level. An !-ErrorTest-! consumer is created. Each operation raising a transport error is initiated. For each transport error, the test checks that the error raised by the provider is the one expected by the consumer. diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/PubSubTestCase/EntityRequestTestProcedure/content.txt b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/PubSubTestCase/EntityRequestTestProcedure/content.txt index c62dea2fe..aa26566e0 100644 --- a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/PubSubTestCase/EntityRequestTestProcedure/content.txt +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/PubSubTestCase/EntityRequestTestProcedure/content.txt @@ -67,7 +67,7 @@ The consumer does the following actions: The consumer checks that the expected keys are received and only them (see table below). !*> Sub scenario definitions -|scenario| entity request | with shared broker | +|scenario| entity request with shared broker | shared | |ensure |prepare test to use the following subscription key values | A.[null].[null].[null],A.2.[null].[null],A.2.3.[null],A.2.3.4,B.[null].[null].[null],Q.2.3.[null] | and shared broker | @shared | |ensure |subscribe to key values | A.[null].[null].[null] | and select keys | [null] | and expected key values | A.[null].[null].[null] | |ensure |subscribe to key values | A.*.[null].[null] | and select keys | [null] | and expected key values | A.[null].[null].[null],A.2.[null].[null] | @@ -85,5 +85,5 @@ The consumer checks that the expected keys are received and only them (see table ***********! |script| entity request test procedure | -|entity request | false | -|entity request | true | +|entity request with shared broker | false | +|entity request with shared broker | true | diff --git a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/PubSubTestCase/PublishRegisterTestProcedure/content.txt b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/PubSubTestCase/PublishRegisterTestProcedure/content.txt index a1925cae7..56a8b518d 100644 --- a/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/PubSubTestCase/PublishRegisterTestProcedure/content.txt +++ b/testbeds/testbed-mal/src/main/fitnesse/FitNesseRoot/MalTests/TestScenarios/Section4Scenarios/PubSubTestCase/PublishRegisterTestProcedure/content.txt @@ -49,7 +49,7 @@ This framework supports the use of a shared broker. However, this feature is rar Errors with encoding/transport may result from the shared broker configuration. !*> Sub scenario definitions -|scenario| publish register | with shared broker | +|scenario| publish register with shared broker | shared | |ensure |use shared broker | @shared | |ensure |publish with subscription key values | A | and expect error | true | |ensure |publish register with key names | K1 | @@ -96,5 +96,5 @@ Errors with encoding/transport may result from the shared broker configuration. ***********! |script| publish register test procedure | -|publish register | false | -|publish register | true | +|publish register with shared broker | false | +|publish register with shared broker | true |