CORDET Framework - C2 Implementation
CrPsTestSuite.c
Go to the documentation of this file.
1 
27 #include <stdio.h>
28 #include <stdlib.h>
29 #include <string.h>
30 
32 #define NOF_TESTS 23
33 
34 /* Include framework files */
35 #include "CrFwConstants.h"
36 #include "Aux/CrFwAux.h"
37 
38 /* Include test suite files for tShe PUS extension */
39 #include "CrPsDataPoolTestCases.h"
40 #include "CrPsPcktGetSetTestCases.h"
41 #include "CrPsServiceTestCases.h"
43 #include "CrPsHkTestCases.h"
44 #include "CrPsEvtTestCases.h"
45 #include "CrPsLptTestCases.h"
46 
47 
55 int main() {
56  uint32_t i;
57  CrFwBool_t testOutcome;
58  CrFwConfigCheckOutcome_t configCheckOutcome;
59  char* testNames[NOF_TESTS];
60  typedef CrFwBool_t (*testCase_t)();
61  testCase_t testCases[NOF_TESTS]; /* array of pointers to SM test case functions */
62 
63  /* Check consistency of configuration parameters */
64  configCheckOutcome = CrFwAuxConfigCheck();
65  if (configCheckOutcome != crConsistencyCheckSuccess) {
66  if (configCheckOutcome == crOutRegistryConfigParInconsistent)
67  printf("Consistency check of OutRegistry parameters failed\n");
68  if (configCheckOutcome == crOutFactoryConfigParInconsistent)
69  printf("Consistency check of OutFactory parameters failed\n");
70  if (configCheckOutcome == crInFactoryInCmdConfigParInconsistent)
71  printf("Consistency check of InCommand parameters in InFactory failed\n");
72  if (configCheckOutcome == crInFactoryInRepConfigParInconsistent)
73  printf("Consistency check of InRepot parameters in InFactory failed\n");
74  return EXIT_SUCCESS;
75  }
76  printf("Consistency check of configuration parameters ran successfully...\n");
77 
78  /* Set the names of the SM tests and the functions executing the tests */
79  i=0;
80 
81  /*Getter and Setter*/
82  testNames[i] = "Pusext_PacketGetterSetter_TestCase1";
83  testCases[i] = &CrPsPcktGetSetTestCase1;
84  i+=1;
85  testNames[i] = "Pusext_PacketGetterSetter_TestCase2";
86  testCases[i] = &CrPsPcktGetSetTestCase2;
87  i+=1;
88  testNames[i] = "Pusext_PacketGetterSetter_TestCase3";
89  testCases[i] = &CrPsPcktGetSetTestCase3;
90  i+=1;
91  testNames[i] = "Pusext_PacketGetterSetter_TestCase4";
92  testCases[i] = &CrPsPcktGetSetTestCase4;
93  i+=1;
94 
95  /*Service 1*/
96  testNames[i] = "Pusext_ServVeri_TestCase1";
97  testCases[i] = &CrPsServVeriTestCase1;
98  i+=1;
99  /*Servuce 17*/
100  testNames[i] = "Pusext_ServTestConn_TestCase1";
101  testCases[i] = &CrPsServTestConnTestCase1;
102  i+=1;
103  testNames[i] = "Pusext_ServTestConn_TestCase2";
104  testCases[i] = &CrPsServTestConnTestCase2;
105  i+=1;
106  testNames[i] = "Pusext_ServTestConn_TestCase3";
107  testCases[i] = &CrPsServTestConnTestCase3;
108  i+=1;
109 
110  /*DataPool*/
111  testNames[i] = "Pusext_DataPool_TestCase1";
112  testCases[i] = &CrPsDataPoolTestCase1;
113  i+=1;
114  testNames[i] = "Pusext_DataPool_TestCase2";
115  testCases[i] = &CrPsDataPoolTestCase2;
116  i+=1;
117  testNames[i] = "Pusext_DataPool_TestCase3";
118  testCases[i] = &CrPsDataPoolTestCase3;
119  i+=1;
120  testNames[i] = "Pusext_DataPool_TestCase4";
121  testCases[i] = &CrPsDataPoolTestCase4;
122  i+=1;
123  testNames[i] = "Pusext_DataPool_TestCase5";
124  testCases[i] = &CrPsDataPoolTestCase5;
125  i+=1;
126  testNames[i] = "Pusext_DataPool_TestCase6";
127  testCases[i] = &CrPsDataPoolTestCase6;
128  i+=1;
129 
130  /*Service 3*/
131  testNames[i] = "Pusext_Housekeeping_TestCase1";
132  testCases[i] = &CrPsHkTestCase1;
133  i+=1;
134  testNames[i] = "Pusext_Housekeeping_TestCase2";
135  testCases[i] = &CrPsHkTestCase2;
136  i+=1;
137  testNames[i] = "Pusext_Housekeeping_TestCase3";
138  testCases[i] = &CrPsHkTestCase3;
139  i+=1;
140  testNames[i] = "Pusext_Housekeeping_TestCase4";
141  testCases[i] = &CrPsHkTestCase4;
142  i+=1;
143 
144  /*Service 5*/
145  testNames[i] = "Pusext_EventReporting_TestCase1";
146  testCases[i] = &CrPsEvtTestCase1;
147  i+=1;
148 
149  /*Service ยน3*/
150  testNames[i] = "Pusext_LargePacketTransfer_TestCase1";
151  testCases[i] = &CrPsLptTestCase1;
152  i+=1;
153  testNames[i] = "Pusext_LargePacketTransfer_TestCase2";
154  testCases[i] = &CrPsLptTestCase2;
155  i+=1;
156  testNames[i] = "Pusext_LargePacketTransfer_TestCase3";
157  testCases[i] = &CrPsLptTestCase3;
158  i+=1;
159  testNames[i] = "Pusext_LargePacketTransfer_TestCase4";
160  testCases[i] = &CrPsLptTestCase4;
161  i+=1;
162 
163  /* Run test cases in sequence */
164  for (i=0; i<NOF_TESTS; i++) {
165  testOutcome = testCases[i]();
166  if (testOutcome == 1)
167  {
168  printf("Test case %s ran successfully ...\n", testNames[i]);
169  }
170  else
171  {
172  printf("Test case %s failed!\n", testNames[i]);
173  }
174  }
175 
176  return EXIT_SUCCESS;
177 }
178 
CrFwBool_t CrPsHkTestCase2()
Test the Service 3 Housekeeping Service Test all the 3,3 3,4 3,5 3,6 3,7 and 3,8 actions and procedur...
CrFwCounterU4_t i
CrPsCmd5EidStart function definitions.
CrFwBool_t CrPsServTestConnTestCase2()
Test the Service 17 On-Board Connection Test.
int main()
Main program for the test suite.
Definition: CrPsTestSuite.c:55
Declaration of the test cases for the Large Packet Transfer Service components.
InFactory configuration parameters for InCommands are inconsistent (see CrFwAuxInFactoryInCmdConfigCh...
Definition: CrFwAux.h:51
Implementation of the test cases for the Housekeepint Service components.
Auxiliary module to check the static part of an application&#39;s configuration.
CrFwBool_t CrPsEvtTestCase1()
Test the Service 5 EventReporting Service.
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
Definition: CrFwConstants.h:30
Header file to define all invariant publicly available constants and types for the CORDET Framework...
CrFwBool_t CrPsLptTestCase3()
Test the Service 13 EventReporting Service Down-Transfer.
CrFwBool_t CrPsDataPoolTestCase5()
Test the Service 5 Event reporting.
CrFwConfigCheckOutcome_t CrFwAuxConfigCheck()
Check the configuration of an application.
Definition: CrFwAux.c:55
CrFwBool_t CrPsDataPoolTestCase3()
Test the Service 1 Request Verificationl.
CrFwBool_t CrPsServTestConnTestCase1()
Test the Service 17 Are-You-Alive Test Connection.
CrFwConfigCheckOutcome_t
Type for the outcome of the consistency check on the configuration parameters.
Definition: CrFwAux.h:43
Declaration of the test cases for the Request Verification Service Components.
Declaration of the test cases for the Test Service Components.
CrFwBool_t CrPsServVeriTestCase1()
Test the Service 1 Request Verification.
OutFactory configuration parameters are inconsistent (see CrFwAuxOutFactoryConfigCheck.h)
Definition: CrFwAux.h:49
All configuration consistency checks have been passed.
Definition: CrFwAux.h:45
CrFwBool_t CrPsHkTestCase4()
Test the Service 3 Housekeeping service Test all the 3,10 3,12 3,25 and 3,26 actions and procedures...
#define NOF_TESTS
The number of tests in the test suite.
Definition: CrPsTestSuite.c:32
CrFwBool_t CrPsDataPoolTestCase1()
Test the generic Datapool Getter an Setter.
InFactory configuration parameters for InReports are inconsistent (see CrFwAuxInFactoryInRepConfigChe...
Definition: CrFwAux.h:53
CrFwBool_t CrPsServTestConnTestCase3()
Test the Service 17 exceptional cases.
CrFwBool_t CrPsHkTestCase1()
Test the Service 3 Housekeeping Service Part 1 Test all the 3,1 and 3,2 actions and procedures...
CrFwBool_t CrPsDataPoolTestCase6()
Test the Service 13 Large Packet Transfer.
CrFwBool_t CrPsLptTestCase2()
Test the Service 13 EventReporting Service Up-Transfer.
CrFwBool_t CrPsHkTestCase3()
Test the Service 3 Housekeeping service Test all the 3,9 3,11 3,27 and 3,28 actions and procedures...
CrFwBool_t CrPsDataPoolTestCase2()
Test the Service 17 Are-You-Alive Test Connection.
Declaration of the test cases for the Datapool Component.
CrFwBool_t CrPsDataPoolTestCase4()
Test the Service 3 Housekeeping.
Declaration of the test cases for the Event Reporting Service components.
CrFwBool_t CrPsLptTestCase1()
Check Service 13 (all standard functions to return outcome = 1)
OutRegistry configuration parameters are inconsistent (see CrFwAuxOutRegistryConfigCheck.h)
Definition: CrFwAux.h:47
CrFwBool_t CrPsLptTestCase4()
Test the Service 13 EventReporting Service other stuff.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved