Abstract: A DEVICE FOR AUTOMATIC GENERATION OF TEST CASES FOR AUTOSAR BASE SOFTWARE AND METHOD THEREOF Abstract The device 100, characterized in that, comprises a controller 110 configured to receive inputs 102 comprising a current configurations 112 and a desired configurations 114 of at least one module of the AUTOSAR base software. The desired configurations 114 are received from an Original Equipment Manufacturer (OEM) or a customer in a digital format such as AR xml, manifest or other files. The controller 110 identifies changes in the current configurations 112 in comparison to the desired configurations 114 through a change detection component 104. The controller 110 then determines affected at least one module of the AUTOSAR base software due to the identified changes, and generates new test cases 120 based on the identified changes. The controller 110 also configured to consider additional input comprising an AUTOSAR base software schema 116 which is used to selectively perform the comparison between the current configurations 112 and the desired configurations 114. Figure 1
Description:Complete Specification:
The following specification describes and ascertains the nature of this invention and the manner in which it is to be performed.
Field of the invention:
[0001] The present invention relates to a device for automatic generation of test cases for AUTOSAR base software (BSW) and method for the same.
Background of the invention:
[0002] An AUTomotive Open System Architecture (AUTOSAR) base software comprises many functions/modules. Each of the modules need to be tested. The test cases written manually or generated based on the configuration for specific component not on the requirement. As well, the test cases will be based on the current component. The data in the config is huge, thus to manage and select the test cases is difficult for specific config.
[0003] According to a patent literature CN102609357, a method for dynamically building test cases for automatic testing meeting AUTOSAR (automotive open system architecture) standards is disclosed. The invention provides a method for dynamically building test cases for automatic testing meeting AUTOSAR (automotive open system architecture) standards. Each test case includes a core code module and a peripheral test case code module, each core code module includes all functional modules except for a configuration code module of the test case, each peripheral test case code module includes the configuration code module of the test case and a test case user code module, all the peripheral test case code modules form a test case library, the modules are reasonably combined in step, and accordingly description files of configuration tools are stored and maintained instead of configuration case codes capable of being directly copied in a target project. The description files of the configuration tools are directly used by users, so that when configuration items of the test cases need to be adjusted, the user only needs to configure functions via a test tool meeting the AUTOSAR standards, configuration conditions of a user interface are directly amended and stored, and then the description files of the configuration tools can be updated without changing and replacing other content in the test case library.
Brief description of the accompanying drawings:
[0004] An embodiment of the disclosure is described with reference to the following accompanying drawings,
[0005] Fig. 1 illustrates a block diagram of the device for automatic generation of test cases for AUTOSAR base software, according to an embodiment of the present invention, and
[0006] Fig. 2 illustrates a method for automatically generating test cases for AUTOSAR base software, according to the present invention.
Detailed description of the embodiments:
[0007] Fig. 1 illustrates a block diagram of the device for automatic generation of test cases for AUTOSAR base software, according to an embodiment of the present invention. The device 100, characterized in that, comprises a controller 110 configured to receive inputs 102 comprising a current configurations 112 and a desired configurations 114 of at least one module of the AUTOSAR base software. The desired configurations 114 are received from an Original Equipment Manufacturer (OEM) or a customer in a digital format such as AR xml, manifest or other files. The controller 110 identifies changes in the current configurations 112 in comparison to the desired configurations 114 through a change detection component 104. The controller 110 then determines affected at least one module of the AUTOSAR base software due to the identified changes, and generates new test cases 120 based on the identified changes. The controller 110 also configured to consider additional input comprising an AUTOSAR base software schema 116 which is used to selectively perform the comparison between the current configurations 112 and the desired configurations 114. The at least one module of the AUTOSAR base software comprises but not limited to a Memory Management Module, a Diagnostic Modules, a Network Management Module, a Vehicle Interface Module, a Security Module and the like.
[0008] According to an embodiment of the present invention, the controller 110 of the device 100 is configured to create, by a Test Script generator (TSG) 106, test scripts 122 for the generated test cases 120, perform/conduct testing of the generated test cases 120 through at least one of a Hardware-in-Loop (HIL) 124 and a Software-in-Loop (SIL) tests 126, and generates a report on the conducted tests. The controller 110 decides which of the HIL 124, SIL 126 or both are required for testing the the generated test cases 120 / test scripts 122. In other words, the controller 110 or the TSG 106 identifies and decides which test scripts would run on at least one of the HIL 124 and the SIL 126. Accordingly, the automated tests are conducted, and report is created. The TSG 106 itself is adapted to make the decision or the controller 110 makes the decision.
[0009] According to an embodiment of the present invention, for the generation of test cases 120, the controller 110 configured to select, from a library 118, a list of test cases corresponding to the at least one affected module, and remove previous test cases from the selected list of test cases of the at least one affected module. The controller 110 configured to parameterize the generated test cases 120 based on the identified changes.
[0010] According to an embodiment of the present invention, the device 100 is at least one selected from a group comprising a cloud computer, a computer, a workstation, a mobile device and a virtual machine.
[0011] In accordance to an embodiment of the present invention, the controller 110 is provided with necessary signal detection, acquisition, and processing circuits. The controller 110 is the one which comprises input interface, output interfaces having pins or ports, the memory element 108 such as Random Access Memory (RAM) and/or Read Only Memory (ROM), Analog-to-Digital Converter (ADC) and a Digital-to-Analog Convertor (DAC), clocks, timers, counters and at least one processor (capable of implementing machine learning) connected with each other and to other components through communication bus channels. The memory element 108 is pre-stored with logics or instructions or programs or applications or modules/models and/or threshold values/ranges, reference values, predefined/predetermined criteria/conditions, lists, library 118, TSG 106, convertor component, change detection component 104, SIL 126 which is/are accessed by the at least one processor as per the defined routines. The memory element 108 also stores the generated test cases 120 and the generated test scripts 122. The internal components of the controller 110 are not explained for being state of the art, and the same must not be understood in a limiting manner. The controller 110 may also comprise communication units such as transceivers to communicate through wireless or wired means such as Global System for Mobile Communications (GSM), 3G, 4G, 5G, Wi-Fi, Bluetooth, Ethernet, serial networks, and the like. The controller 110 is implementable in the form of System-in-Package (SiP) or System-on-Chip (SOC) or any other known types. Examples of controller 110 comprises but not limited to, microcontroller, microprocessor, microcomputer, etc.
[0012] Further, the processor may be implemented as any or a combination of one or more microchips or integrated circuits interconnected using a parent board, hardwired logic, software stored in the memory element 108 and executed by a microprocessor, firmware, an application specific integrated circuit (ASIC), and/or a field programmable gate array (FPGA). The processor is configured to exchange and manage the processing of various Artificial Intelligence (AI) modules.
[0013] According to an embodiment of the present invention, a working of the device 100 is provided. Consider a request from the OEM is received in the xml file which indicates the desired configurations 114 in a first format. A user opens a tool in the device 100 and uploads the current configurations 112 and the desired configurations 114 through a Graphical User Interface (GUI) as received from the OEM. The device 100 is the computer or smartphone or the cloud connected to the same. Since the first format is different from a base format as needed to detect/identify the changes, a conversion component in the controller 110 converts the data in the first format to the base format. The conversion component is based on Artificial Intelligence (AI) or Machine Learning (ML) models. In another scenario, the desired configurations 114 are already in base format hence the conversion component is skipped. The user also inputs AUTOSAR base software schema 116 to indicate the structure of the modules of the AUTOSAR base software for optimal comparison process. The change detection component 104 identifies the changes between the current configuration 112 and the desired configurations 114, followed by determination of modules which are affected due to the identified changes. The controller 110 then selects from the library 118, the pre-stored templates of the test cases for the affected module and removes the previously conducted test cases, thereby generating the new test cases 120.
[0014] The controller 110 parameterizes the generated test cases 120, i.e. implements the identified changes in the test cases in the configurations and sends to TSG 106 for generation of test scripts 122. The TSG comprises the logic or program to generate the test scripts 122 for the affected modules of the AUTOSAR base software. The controller 110 then decides and conducts the tests either through HIL 124 or the SIL 126 based on requirement. Once tested, the controller 110 prepares the report of the testing. The report is then displayed to the use in the device 100. The report is shareable or usable as required.
[0015] According to the present invention and in simple words, based on the current configuration 112, the desired configurations 114 (i.e. OEM artifacts) and the AUTOSAR base software schema 116 of adaptive and classic AUTOSAR, the change detection component 104 identifies the functions/modules affected in the base software of the AUTOSAR as well EcuC parameters / data. Based on the affected functionality/modules, and test library 118 / testcase template is selected. Based on the test cases that are already executed, the delta list of test cases 120 is created. The delta list is used for parameterization of test cases for the EcuC parameters / data. The test cases connected to the TSG for the generation of test scripts 122, which is linked to the HIL 124 and the SIL 126. Based on target selection, the test cases separation done and execution performed. All the actions executed in workflow manner and the results are consolidated and reported in specific format.
[0016] Fig. 2 illustrates a method for automatically generating test cases for AUTOSAR base software, according to the present invention. The method comprises plurality of steps of which a step 202 comprises receiving, by the controller 110, inputs 102 comprising the current configurations 112 and the desired configurations 114 of at least one module of the AUTOSAR base software such as in a digital format such as AR xml, manifest or other files. A step 204 comprises identifying, by the controller 110, changes in the current configurations 112 in comparison to the desired configurations 114. A step 206 comprises determining, by the controller 110, affected modules of the AUTOSAR base software due to the identified changes. A step 208 comprises generating, by the controller 110, new test cases 120 based on the identified changes. The at least one module of the AUTOSAR base software comprises but not limited to the Memory Management Module, the Diagnostic Module, the Network Management Module, the Vehicle Interface Module, the Security Module and the like.
[0017] The method also comprises steps for testing the generated test cases 120. A step 210 comprises generating, by the Test Script Generator (TSG) 106, test scripts 122 for the generated test cases 120. A step 212 comprises conducting testing, by the controller 110, of the generated test cases 120 through at least one of the Hardware-in-Loop (HIL) 124 and the Software-in-Loop (SIL) 126 tests. A step 214 comprises creating, by the controller 110, the report of the conducted tests. As per the step 212, the method comprises deciding, either by the TSG 106 or the controller 110, which of the generated test cases 120 /test scripts 122, would run on or tested through at least one of the HIL 124 and the SIL 126, i.e. HIL 124 or SIL 126 or both. Accordingly, the tests are conducted, and the report is created. The TSG 106 itself is adapted to make the decision or the controller 110 makes the decision.
[0018] According to the method, the step 202 may also comprise receiving additional input comprising the AUTOSAR base software schema 116. Further, the step 208 of generation of test cases 120 comprises sub-steps, of which a step 216 comprises selecting by the controller 110, from the library 118, the list of test cases corresponding to the at least one affected module. A step 218 comprises removing, by the controller 110, previous test cases from the selected list of test cases of the at least one module. The generated test cases 120 are parametrized by the controller 110 based on the identified changes.
[0019] According to the present invention, the method is performed by at least one selected from the group of device 100 comprising the cloud computer, the computer, the workstation, the mobile device and the virtual machine.
[0020] According to the present invention, an automated data driven automotive artifact generator is disclosed. The present invention provides novel solution in the field of automotive base software testing. In the present invention, the test cases generation based on test library 118 and test library 118 having a linkage to configuration OEM requirement data. In the proposed approach, the test cases are generated based on the OEM requirement data along with the configuration values. The automated test case generation according to data changed based on the generic classic/adaptive AUTOSAR base software schema 116. The controller 110 and method identifies the changes in the data or the schema 116, based on which generation of the test cases 120 of modules/functionality, which are affected, is performed.
[0021] It should be understood that the embodiments explained in the description above are only illustrative and do not limit the scope of this invention. Many such embodiments and other modifications and changes in the embodiment explained in the description are envisaged. The scope of the invention is only limited by the scope of the claims.
, Claims:We claim:
1. A device (100) for automatic generation of test cases (120) for AUTOSAR base software (BSW), characterized in that, said device (100) comprises a controller (110) configured to:
receive inputs (102) comprising a current configurations (112) and a desired configurations (114) for at least one module of said AUTOSAR base software;
identify changes in said current configurations (112) in comparison to said desired configurations (114) through a change detection component (104);
determine affected modules of said AUTOSAR base software due to said identified changes, and
generate new test cases (120) based on said identified changes.
2. The device (100) as claimed in claim 1, wherein said controller (110) configured to
create test scripts (122), by a Test Script generator (TSG) (106), for said generated test cases (120);
conduct tests for said generated test cases (120) through at least one of a Hardware-in-Loop (HIL) (124) and a Software-in-Loop (SIL) (126), and
generate a report on conducted tests.
3. The device (100) as claimed in claim 1, configured to receive an additional input comprising an AUTOSAR base software schema (116).
4. The device (100) as claimed in claim 1, wherein for generation of test cases (120), said controller (110) configured to
select, from a library (118), a list of test cases corresponding to said at least one affected module, and
remove previous test cases from said selected list of test cases of said at least one module, wherein said controller (110) configured to parameterize the generated test cases (120) based on said identified changes.
5. The device (100) as claimed in claim 1 is at least one selected from a group comprising a cloud computer, a computer, a workstation, a mobile device and a virtual machine.
6. A method for automatically generating test cases (120) for AUTOSAR base software (BSW), characterized by, said method comprising the steps of:
receiving inputs (102) comprising a current configurations (112) and a desired configurations (114) of at least one module of said AUTOSAR base software;
identifying changes in said current configurations (112) in comparison to said desired configurations (114);
determining affected modules of said AUTOSAR base software due to said identified changes, and
generating new test cases (120) based on said identified changes.
7. The method as claimed in claim 6 comprises
generating, by a Test Script Generator (TSG) (106), test scripts (122) for said generated test cases (120);
conducting testing of said generated test cases (120) through at least one of a Hardware-in-Loop (HIL) (124) and a Software-in-Loop (SIL) (126), and
creating a report of said conducted tests.
8. The method as claimed in claim 6 comprises receiving additional input comprising an AUTOSAR base software schema (116).
9. The method as claimed in claim 6, wherein for generation of test cases (120), said method comprises the steps of:
selecting, from a library (118), a list of test cases corresponding to said at least one affected module, and
removing previous test cases from said selected list of test cases of said at least one module, wherein said generated test cases (120) are parametrized based on said identified changes.
10. The method as claimed in claim 6 is performed by at least one selected from a group comprising a cloud computer, a computer, a workstation, a mobile device and a virtual machine.
| # | Name | Date |
|---|---|---|
| 1 | 202341087198-POWER OF AUTHORITY [20-12-2023(online)].pdf | 2023-12-20 |
| 2 | 202341087198-FORM 1 [20-12-2023(online)].pdf | 2023-12-20 |
| 3 | 202341087198-DRAWINGS [20-12-2023(online)].pdf | 2023-12-20 |
| 4 | 202341087198-DECLARATION OF INVENTORSHIP (FORM 5) [20-12-2023(online)].pdf | 2023-12-20 |
| 5 | 202341087198-COMPLETE SPECIFICATION [20-12-2023(online)].pdf | 2023-12-20 |