A keyword-driven spaceflight TT&C software automatic testing method and system
By adopting a keyword-driven automated testing method for aerospace telemetry and control software, the problem of low automation in aerospace telemetry and control software system testing has been solved. It enables the synchronous writing of test scripts and documents and universal testing of multiple software, thereby improving testing efficiency and the accuracy of document generation.
Patent Information
- Application Number
- CN202411672118.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-11-21
Smart Images

Figure CN119621557B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the field of spaceflight measurement and control, and in particular to a keyword-driven spaceflight measurement and control software automatic testing method and system. BACKGROUND
[0002] Spaceflight measurement and control software testing verifies whether the software system meets the design requirements in a real system working environment, and plays an important role in ensuring the quality of spaceflight measurement and control software. According to GJB5000A and the requirements of spaceflight measurement and control software development units on the testing process, spaceflight measurement and control software system testing generally needs to complete testing planning, testing design, testing execution and testing summary and the like. Specifically, in the testing planning stage, the tester performs testing planning according to the software system design specification and other design documents, and clearly defines the testing object, testing strategy, testing environment, progress plan and the like. The tester needs to complete the writing of the software testing plan in the testing planning stage; in the testing design stage, the tester writes the testing specification and testing program according to the software system design document and the testing plan. The testing specification contains the testing case, which needs to clearly define the testing step, expected result, evaluation standard and testing case termination condition and passing criterion and the like. The tester needs to complete the writing of the software testing specification in the testing design stage; in the testing execution stage, the tester executes the testing case according to the testing specification, records the testing result, determines whether the testing case passes according to the evaluation standard, and forms the testing report; for the testing case that is not completely executed or has defects, the testing design can be adjusted according to the software change, and regression testing is performed. In the testing execution stage, the tester needs to analyze the testing data, record the testing result and write the software testing record; after the testing execution stage is completed, the tester needs to classify and summarize the testing result and testing defects, identify the software functions and non-functional characteristics that do not meet the requirements, analyze the defect causes and correction suggestions and the like. In the testing summary stage, the tester needs to write the software testing report.
[0003] Spaceflight measurement and control software is generally composed of hundreds of processes of multiple specialties such as real-time data processing, control and calculation, data storage and monitoring display, and has the characteristics of large scale, different structures and multiple programming languages. Therefore, in the spaceflight measurement and control software system testing process, the current spaceflight measurement and control software system testing mostly needs the tester to use multiple user interfaces to perform manual testing and write various documents in the testing process. Due to frequent changes in the technical state, the regression testing frequency is high, and the tester needs to perform a large number of repeated selection, clicking and submission operations on the user page manually; in the case of parallel development, testing, training and task execution of multiple models of spaceflight task software, the same set of software needs to be deployed and tested in different environments; the manual testing method needs the tester to spend a lot of time in analyzing and recording various testing data, testing results and testing problems and the like in the testing process and writing the testing report.
[0004] Therefore, the traditional spaceflight TT&C software system testing method has the following shortcomings:
[0005] The automation degree is not high, and the testers need to manually perform a large amount of repetitive selection, clicking, submission and other repetitive work on multiple test pages. The same software needs to perform the same test operation in multiple different environments, and the test efficiency is not high.
[0006] The test scripts are difficult to use, and the test of software written in different programming languages often needs to use test tools or test scripts written in the corresponding language. Test scripts implemented in different languages are difficult to use. Each time a new software is developed, a new test script and a new test case need to be designed, and the workload for managing and maintaining various test scripts and test cases is large.
[0007] The test execution and test document writing are not synchronized. The traditional test method needs to execute the test case first and then write the document to record the test execution. It takes a lot of time to write the test document and backtrack the test process. The content of the document and the actual test execution may not correspond or be inconsistent.
[0008] The quality standards are not uniform. Due to differences in personnel ability, quality awareness, etc., the test documents written by different testers for the same project have large differences in quality. It is difficult to avoid quality problems such as incomplete content and inconsistent format.
[0009] The test document content is not comprehensive. The spaceflight TT&C software system test involves various software, and the user interface and test tools used are diverse. The information and data sources need to be recorded, and manual collection and summary are prone to incomplete information and missing content.
[0010] Collaboration is difficult. The same test document is written by different testers, and a lot of time is spent on summarizing and adjusting. There may be multiple interactions in between. This offline interaction method is time-consuming and inefficient. SUMMARY
[0011] The application provides a keyword-driven spaceflight TT&C software automated testing method and system, which solves the problems of low automation degree and difficult test script interoperability in the prior art.
[0012] The keyword-driven spaceflight TT&C software automated testing method provided in the application comprises the following steps:
[0013] Forming keywords based on the spaceflight TT&C software operation process. The spaceflight TT&C software operation process uses multiple programming languages. The keywords use a unified programming language.
[0014] configuring a test case template, defining template elements based on the test case template and forming a test case; wherein the template elements are defined by at least one of natural language, keywords and test data; the test case comprises a test case name, a test case review and test steps, the test steps comprise test input, execution condition, expected result and evaluation criteria;
[0015] filtering the test cases according to attributes of test types and packing the filtered test cases into a test suite; the attributes of test types comprise at least test category attribute, quality attribute, task attribute and sequence attribute;
[0016] executing the test cases in the test suite and collecting execution conditions, filling the execution conditions into corresponding test document templates according to mapping rules to form test documents.
[0017] Optionally, the forming of the keywords based on the operation process of the spaceflight TT&C software comprises:
[0018] acquiring the operation process of the spaceflight TT&C software implemented in multiple programming languages;
[0019] decomposing the operation process into functional modules and encapsulating the functional modules using programming languages to form the keywords.
[0020] Optionally, the method further comprises:
[0021] combining multiple keywords to form a keyword object library;
[0022] invoking the keyword object library when executing the test cases.
[0023] Optionally, the method comprises:
[0024] generating test cases according to test categories, test tasks, test qualities and / or execution sequences; the test categories comprise at least system test, configuration item test, component test and unit test; the test qualities comprise at least function test, performance test, security test and reliability test;
[0025] generating an identification of the test cases;
[0026] automatically filtering the test cases meeting the conditions from a test case set according to test categories, test tasks and / or test qualities, copying the test cases and generating a test suite;
[0027] when executing a test task, filtering the test suite corresponding to the identification according to the test categories, test tasks and / or test qualities.
[0028] Optionally, before executing the test cases in the test suite, the method further comprises:
[0029] Configure the execution method;
[0030] The test program loads the test suite according to the execution method described above;
[0031] Generate the test scripts corresponding to the test cases in the test suite;
[0032] The test script is executed according to the execution method specified in the test suite.
[0033] Optionally, filling the execution information into the corresponding test document template according to the mapping rules to form the test document includes:
[0034] A document configuration file is generated based on the mapping relationship between data types and document templates. The document configuration file includes at least: test plan, test description and records, and test report; the document configuration file is used to represent the document configuration.
[0035] Filter the corresponding execution status according to the data type in the document configuration file;
[0036] Select the document type in the document configuration file, read the specified document configuration, and read the test cases and corresponding execution status based on the document configuration.
[0037] Optionally, the method further includes:
[0038] Create a document chapter object, which must contain at least: text to be populated into the document template, tables, and calculation results;
[0039] The document chapter objects are populated into the document template using the location information to output a test document.
[0040] Optionally, the method includes: outputting test results after the test cases are executed, analyzing the test results and writing them into a database for storage.
[0041] This invention discloses a keyword-driven automated testing system for aerospace telemetry and control software, the system comprising:
[0042] A keyword generation unit is used to generate keywords based on the operation process of aerospace telemetry and control software; the operation process of aerospace telemetry and control software uses multiple programming languages; the keywords use a unified programming language;
[0043] A template configuration unit is used to configure a test case template, define template elements based on the test case template, and form test cases; wherein, the template elements are defined by at least one of natural language, keywords, and test data; the test cases include: test case name, test case summary, and test steps, and the test steps include: test input, execution conditions, expected results, and evaluation criteria;
[0044] The test suite generation unit is used to filter the test cases according to the test type and package the filtered test cases into a test suite; the test type includes at least: test category attribute, quality attribute, task attribute, and sequence attribute;
[0045] The execution unit is used to execute the test cases in the test suite and collect the execution status, and fill the execution status into the corresponding test document template according to the mapping rules to form a test document.
[0046] The present invention also provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps of the method as described in any of the above.
[0047] The present invention provides a keyword-driven automated testing method and system for aerospace telemetry and control software, which can automatically execute test cases, support automatic execution of test cases by manual or timed methods, enable parallel execution of multiple tests, use a unified programming language to complete the testing of various complex aerospace telemetry and control software, and realize a single test script applicable to multiple aerospace telemetry and control software. Attached Figure Description
[0048] Figure 1 This is a flowchart of the keyword-driven automated testing method for aerospace telemetry and control software in an embodiment of the present invention;
[0049] Figure 2 This is a schematic diagram of keyword definition in an embodiment of the present invention;
[0050] Figure 3 This is a schematic diagram of the test case identifier and its attributes in an embodiment of the present invention;
[0051] Figure 4 This is a schematic diagram of the keyword-driven automated testing system for aerospace telemetry and control software in an embodiment of the present invention. Detailed Implementation
[0052] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0053] It should be understood that the size of the sequence number of each process described above in various embodiments herein does not mean the order of execution, and the execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments herein.
[0054] The embodiment of the application provides a kind of key driven spaceflight TT&C software automation test method, as shown in Figure 1 The method comprises the following steps:
[0055] Step 100, form a key based on the spaceflight TT&C software operation process;The spaceflight TT&C software operation process adopts multiple programming languages;The key adopts a unified programming language.Specifically, spaceflight TT&C software generally contains multiple function modules realized by different programming languages, which jointly complete complex spaceflight TT&C tasks.Most of the traditional spaceflight TT&C software test methods need to write test scripts for each software according to the language and implementation mode of the tested software, and the test scripts used by different tested software are often implemented in different programming languages, which are difficult to use together or integrate together.For the purpose of solving the unified scheduling control of heterogeneous spaceflight TT&C software, realizing the separation of test data and test script, and making the test script universal to multiple spaceflight TT&C software, the embodiment of the application decomposes spaceflight TT&C software operation into functions, encapsulates them using a unified programming language, and forms a key in a unified programming language.The embodiment of the application uses a unified programming language (which can be selected according to user needs, such as python, java, etc.) to encapsulate the interfaces or services exposed by spaceflight software, and the object of encapsulation is a software product, such as interface library, program, service, etc.Spaceflight TT&C software operation process.Because software testing does not involve modifying the code of the tested software, it does not care about the machine language in which the tested product is written, i.e., it is independent of the programming language of the specific spaceflight software, and it does not involve understanding different machine languages.The need is a service or library calling method.
[0056] Preferably, basic service functions such as message service, file service and log service are encapsulated to form basic service keys, which provide basic services such as message receiving and sending and file receiving and sending.On the basis of the basic service keys, the functions involved in typical business of spaceflight TT&C software system are considered, the basic service keys are combined according to business logic, and general function keys are encapsulated to realize typical functions of spaceflight TT&C software system such as channel switch state setting, plan monitoring and execution, instruction sending and execution state monitoring, and return execution results in a unified data format for subsequent data processing.The above basic service keys and general service keys can refer to corresponding key function definition files through test scripts for calling by test scripts.
[0057] Step 200: Configure a test case template, define template elements based on the template, and form test cases. The template elements are defined using at least one of natural language, keywords, and test data. Each test case includes: a test case name, a test case summary, and test steps. The test steps include: test inputs, execution conditions, expected results, and evaluation criteria. In addition, test cases also include textual descriptions such as test case identifiers, test case names, and test case summaries, as well as test steps. Test cases are written to verify the software under test and specifically include: at least one set of test inputs, execution conditions, and expected results. Based on the keywords, the test case template can be used to write computer-executable test scripts, which is the foundation for automated testing of aerospace telemetry and control software. For aerospace telemetry and control software testing, the software testing process also includes writing software test documents, such as software test instructions, software test records, and software test reports. In software testing documentation, a test case should generally include elements such as test case name identifier, test case summary, test case initialization, test steps, and execution status. In manual testing, test documentation writing and the actual testing process are separated; test cases need to be run first, and then the test results written into the test document. This post-test documentation method is time-consuming and labor-intensive. To achieve simultaneous writing of test scripts and test documents, this invention employs a test case design architecture that combines natural language and code. For example, based on the test case template, template elements are defined using natural language, keywords, and test data, and test cases are generated based on these template elements.
[0058] Step 300: Filter the test cases according to the attributes of the test type and package the filtered test cases into a test suite; the attributes of the test type include at least: test category attribute, quality attribute, task attribute, and sequence attribute. Specifically, in the aerospace telemetry and control software testing process, different test cases are often used to test different quality attributes such as the functionality and performance of the aerospace telemetry and control software; test cases can also be applied to different tasks; test cases often need to be executed in a certain order. Preferably, this embodiment of the invention uses a test suite to combine different test cases together, and determines the quality attribute, task attribute, and sequence attribute of a certain test case through a test case identifier. For example, the test case packaging process mainly involves filtering the test case set T' required for this test from the complete test case set T according to certain rules. The specific filtering method is: 1) Define a test case identifier for each test case in the test case set T, see [link to relevant documentation]. Figure 3 As shown; 2) Set test case attributes according to test requirements, such as MISA task functional testing. 3) Filter test cases according to the following rules: For the complete set of test cases T, according to the set rule f, find a T' belonging to T such that the identifier of any test case C in T' satisfies the set rule f. The obtained T' is the test suite.
[0059] Step 400, executing the test cases in the test suite and collecting the execution conditions, filling the execution conditions into the corresponding test document templates according to the mapping rules to form the test document. Specifically, the embodiment of the application prepares the test document template according to the writing requirements of the test document content format, etc. The chapters of the test document template mainly include: fixed filling content and positioning information, the execution conditions such as test cases and test results are formed into a mapping relationship with the positioning information according to the mapping rules through document configuration, and the execution conditions are filled to form the final test document. After the embodiment of the application executes the test cases and collects the execution conditions, the execution conditions are filled into the corresponding test document templates according to the mapping rules, the style is unified, and the standard is specified.
[0060] The application designs a method of decomposing the operation process of spaceflight TT&C software, encapsulating it using a unified programming language, and forming a keyword, by compatible keywords and test case design of multiple programming languages, aiming at the problems of multiple programming languages of spaceflight TT&C software and difficult maintenance and management of test scripts, multiple complex spaceflight TT&C software tests can be completed by calling the keyword, and the unified programming language of test script writing and the general operation of multiple spaceflight TT&C software are realized. In order to solve the problem of synchronous writing of test documents and test scripts, a test case writing method based on a test case template is designed, a test case writing method combining natural language and code is designed, and the content of the test document and the test script is one-to-one corresponding.
[0061] The keyword-driven spaceflight TT&C software automatic test method in the embodiment of the application, preferably, the keyword based on the operation process of spaceflight TT&C software includes:
[0062] Obtaining the operation process of the spaceflight TT&C software implemented by multiple programming languages;
[0063] Decomposing the operation process into functional modules and encapsulating it using a programming language to form the keyword.
[0064] Specifically, as Figure 2As shown, the keywords can be defined in common programming languages, such as Python, Java, C++, etc., which can be selected according to actual conditions of an organization or a project. Taking Python as an example, by writing a keyword function, an interface library and an interface function provided by the software under test are called by using a Python program, so that the software under test can be driven to complete the functions defined by the keywords; different software under test can be defined as multiple keywords; in a test case or a test script, the keywords can be called to complete various operations on the software under test defined in a test step. Taking a software parameter query function test as an example, an operator needs to open a query software login page, input a username and a password, click a button to log in, input a parameter name, click a button to send a query request during manual testing. The above operations can be divided into the following function modules:
[0065] 1) opening a specified page;
[0066] 2) inputting data into an input box;
[0067] 3) clicking a button.
[0068] The above functions are encapsulated by using the method described in this section to form the keywords, as shown in Table 1:
[0069] Table 1: Correspondence table of query test functions and keywords
[0070]
[0071] In a specific embodiment of the present application, a natural language and code combined test case design architecture is shown in Table 2:
[0072] Table 2: Test case design example
[0073]
[0074]
[0075] In Table 2, various elements in the test case can be organized by various arrangements, for example, by a table manner, the table can be configured according to different organization specified test document writing standard specification, forming a test case template. The test case template is mainly composed of various template elements, and different templates can contain various template elements. The template elements in Table 2 are marked in black bold, and the types of template elements mainly include two types of test attributes and test steps. The content filled in the test attribute element is mainly natural language for human reading, such as test case name, test case review and the like; the content of the test step element includes two parts, one part is written in natural language for human reading, such as natural language, and the other part is written in code form, such as test code. The element content of the test attribute can be filled by the test personnel when writing the test case, or can be automatically filled by the test program when the test script is running; the code line can use keywords such as Open_url; the code line can also use test data such as data=Open_file(‘testdatat.csv’). The test case uses the test case writing method combining natural language and code, realizes synchronous writing of test document and test script, the test steps in the test document correspond to the actual test execution situation, the accuracy is high, and the problems such as content omission, inconsistency between document and actual situation and the like existing in manual test document writing can be effectively avoided.
[0076] The keyword-driven spaceflight TT&C software automatic test method provided in the embodiment of the application, preferably, the method further comprises:
[0077] Combining a plurality of keywords to form a keyword object library;
[0078] The keyword object library is called when the test case is executed. Specifically, as shown in the figure, the keywords are centrally managed in the keyword object library. Figure 2
[0079] The keyword-driven spaceflight TT&C software automatic test method provided in the embodiment of the application, preferably, the method comprises: generating a test case according to a test category, a test task, a test quality and / or an execution order; the test category at least comprises: system test, configuration item test, component test and unit test; the test quality at least comprises: function test, performance test, security test and reliability test.
[0080] Generating an identifier of the test case;
[0081] According to the test category, the test task and / or the test quality, the test case meeting the condition is automatically filtered from the test case set, copied and a test suite is generated;
[0082] When executing a test task, the test case corresponding to the identification is filtered according to the test category, test task and / or test quality. Specifically, in the process of testing space TT&C software, different test cases are often used to test the functions, performance and other quality attributes of space TT&C software; test cases can also be applicable to different model tasks; and test cases often need to be executed in a certain order. Therefore, the embodiments of the present application use test suites to combine different test cases together, and then determine the test category attribute, quality attribute, task attribute and order attribute of a certain test case through the identification of the test case, as shown in Figure 3 The test case identification is composed of letters, numbers and special symbols, and is divided into five fields by _.
[0083] Field 1 represents the test category attribute of the test case, such as STS representing system testing, STC representing software configuration item testing, etc.
[0084] Field 2 represents the task attribute, and MISA is the task code.
[0085] Field 3 represents the quality attribute, such as F representing function and P representing performance, etc.
[0086] Field 4 represents the quality attribute number, which is used to distinguish test cases that are the same in fields 1, 2 and 3.
[0087] Field 5 represents the order attribute, which is used to distinguish the execution order of different test cases.
[0088] When a new test project or test suite is established, test cases that meet the conditions can be automatically filtered from the test case set according to the test task, and the test cases are automatically copied and a test suite is generated, realizing efficient reuse of test cases. For example, if the configuration is set to “MISA task function system test”, test cases whose identification starts with “STS_MISA_F” can be automatically filtered to generate a test suite according to the test task; or test cases can be manually selected according to test requirements to generate a test suite.
[0089] Specifically, in the process of testing space TT&C software, in order to improve the execution efficiency of test cases, it is often necessary to execute multiple test cases in batches, so it is necessary to solve the problems of test case selection and batch execution. In actual software testing work, a single tester often needs to carry out multiple model task testing in parallel, and in order to save manpower, it is also necessary to solve the problem of test case timing execution. Therefore, the keyword-driven automatic testing method of space TT&C software of the embodiments of the present application can set the execution mode to automatic execution or manual execution, realizing convenient switching between automatic and manual execution. Preferably, before executing the test cases in the test suite, the method further comprises:
[0090] Setting execution mode. The execution mode can be set to timed execution, manual execution, etc. According to the execution mode, the test program drives the test suite. The test program can automatically extract the code in the test case in the test suite, generate the test script corresponding to the test case in the test suite, and automatically or manually execute all test scripts according to the execution order and other properties specified by the test suite.
[0091] To realize automatic generation of test documents, the test documents such as the test plan, test description and record, and test report of the space TT&C software system are automatically output according to the specified template. The keyword-driven automatic test method of the space TT&C software fills the execution conditions into the corresponding test document template according to the mapping rule to form the test document.
[0092] The document configuration file is generated based on the mapping relationship between the data type and the document template, and at least contains: test plan, test description and record, test report; The document configuration file is used to represent the document configuration.
[0093] According to the corresponding data type in the document configuration file, the corresponding execution condition is screened;
[0094] The document type in the document configuration file is selected, and the specified document configuration is read. According to the document configuration, the test case and the corresponding execution condition are read, which are used for subsequent automatic output. The test document is automatically generated, a test task can be completed by multiple people, and the test document generation time is shortened to several minutes. Compared with the previous manual test document writing, the test document writing quality and efficiency are greatly improved.
[0095] The keyword-driven automatic test method of the space TT&C software according to the embodiment of the application, preferably, the method further comprises:
[0096] Creating a document chapter object, the document chapter object at least contains: text, table, calculation result to be filled into the document template;
[0097] The document chapter object is filled into the document template through the positioning information to output the test document.
[0098] Specifically, the prerequisite for automatic generation of test documents is to make a document template according to the writing requirements of the organization on the content format of the test document, etc. The chapters of the document template mainly include fixed filling content and positioning information. The test case, test result and other data are formed into a corresponding relationship with the positioning information through the document configuration, as shown in Table 3:
[0099] Table 3 Corresponding relationship between test data and test document template
[0100]
[0101]
[0102] According to the mapping relationship between the data types and the document templates described in Table 3, a document configuration file is formed, which contains multiple document configurations such as a test plan, test description and records, and a test report. When a test document is generated by using a program, corresponding data is filtered from a database and test cases according to the corresponding document type in the document configuration file. When the test document is automatically generated, a user selects a document type in the document configuration, a document generation module reads the document configuration specified by the user, and reads test cases and corresponding execution information according to the document configuration. Subsequently, corresponding document section objects are created, which contain content such as text, tables, and calculation results to be filled into the document template. Next, the document section objects are filled into the document template by the program through positioning information. Finally, the test document is saved and output.
[0103] Preferably, the font styles, colors, and sizes used in different sections in the automatic generation process of the test document are uniform, which meets the format requirements defined by the document template and avoids the problems of inconsistent formats and non-compliance in manually written documents.
[0104] The automatic test method of the spaceflight TT&C software supports multi-person collaborative operation, and the test execution is not limited by time and space. Compared with the traditional method of multi-person test post-hoc document compilation, the flexibility and efficiency are greatly improved.
[0105] Preferably, the method comprises: outputting test results after the execution of the test cases, analyzing the test results, and writing the test results into a database for storage.
[0106] The embodiment of the application further provides a keyword-driven automatic test system of spaceflight TT&C software, as shown in Figure 4 The system comprises:
[0107] A keyword generation unit 401 is configured to form keywords based on a spaceflight TT&C software operation process; the spaceflight TT&C software operation process adopts multiple programming languages; and the keywords adopt a unified programming language.
[0108] A template configuration unit 402 is configured to configure a test case template, define template elements based on the test case template, and form test cases; at least one of natural language, keywords, and test data is used to define the template elements; and the test cases comprise a test case name, a test case review, and test steps, and the test steps comprise test input, execution conditions, expected results, and evaluation standards.
[0109] The test case packaging unit 403 is configured to filter the test cases according to test types, and package the filtered test cases into test suites; the test types at least include test category attributes, quality attributes, task attributes, and sequence attributes;
[0110] The execution unit 404 is configured to execute the test cases in the test suites and collect execution conditions, and fill the execution conditions into corresponding test document templates according to mapping rules to form test documents.
[0111] The method provided by the embodiment of the application encapsulates basic service functions such as electric text service, file service, and log service, forms basic service keywords, and provides basic services such as electric text receiving and sending and file receiving and sending. On the basis of the basic service keywords, considering functions related to typical businesses of a space measurement and control software system, the basic service keywords are combined according to business logic to encapsulate into general function keywords, to realize typical functions of the space measurement and control software system such as channel switch state setting, plan monitoring and execution, and instruction sending and execution state monitoring, and return execution results in a unified data format for subsequent data processing. The above basic service keywords and general service keywords can refer to corresponding keyword function definition files by test scripts, for calling by the test scripts.
[0112] The embodiment of the application further provides a computer readable storage medium, the computer readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method in any one of the above.
[0113] Those skilled in the art should understand that embodiments of the application can be provided as a method, a system, or a computer program product. Therefore, the application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the application can adopt a computer program product in the form of being implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.
[0114] The application is described with reference to flowcharts and / or block diagrams according to the method, device (system), and computer program product of the embodiments of the application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks can be implemented by computer program instructions. The computer program instructions can be provided to a general purpose computer, a special purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The flow or the combination of flows and / or blocksFigure 1 means for performing the function specified by the block or blocks.
[0115] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions Figure 1 one or more flows and / or blocks Figure 1 means for performing the function specified by the block or blocks.
[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions Figure 1 one or more flows and / or blocks Figure 1 means for performing the function specified by the block or blocks.
[0117] The foregoing description of specific exemplary embodiments of the application has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the application to the precise form disclosed, and various modifications and variations are possible in light of the above teachings. It is intended that the scope of the application be limited not with the specific examples, but rather by the claims appended hereto.
Claims
1. A method for automatically testing a key-driven TT&C software, characterized in that, The method comprises: forming keywords based on spaceflight TT&C software operation processes; the spaceflight TT&C software operation processes adopt multiple programming languages; the keywords adopt a unified programming language; configuring a test case template, defining template elements based on the test case template, and forming test cases; wherein the template elements are defined by at least one of natural language, keywords, and test data; the test cases comprise a test case name, a test case review, and test steps, and the test steps comprise test input, execution conditions, expected results, and evaluation criteria; filtering the test cases according to the attributes of test types and packaging the filtered test cases into test suites; the attributes of test types at least comprise test category attributes, quality attributes, task attributes, and sequence attributes; executing the test cases in the test suites and collecting execution conditions, filling the execution conditions into corresponding test document templates according to mapping rules to form test documents; wherein filling the execution conditions into corresponding test document templates according to mapping rules to form test documents comprises: generating a document configuration file based on the mapping relationship between data types and document templates; the document configuration file at least contains a test plan, test instructions and records, and a test report; the document configuration file is used to represent document configuration; filtering corresponding execution conditions according to the corresponding data types in the document configuration file; selecting a document type in the document configuration file, reading a specified document configuration, and reading test cases and corresponding execution conditions according to the document configuration.
2. The keyword-driven spaceflight TT&C software automated test method according to claim 1, characterized in that, Forming keywords based on spaceflight TT&C software operation processes comprises: obtaining the spaceflight TT&C software operation processes implemented in multiple programming languages; decomposing the operation processes into functional modules and encapsulating them using programming languages to form the keywords.
3. The keyword-driven spaceflight TT&C software automated test method according to claim 2, characterized in that, The method further comprises: combining multiple keywords to form a keyword object library; calling the keyword object library when executing the test cases.
4. The keyword-driven spaceflight TT&C software automated test method according to claim 1, characterized in that, The method comprises: generating test cases according to test categories, test tasks, test qualities, and / or execution sequences; the test categories at least comprise system testing, configuration item testing, component testing, and unit testing; the test qualities at least comprise functional testing, performance testing, security testing, and reliability testing; generating the identification of the test cases; automatically filtering the test cases that meet the conditions from a test case set according to test categories, test tasks, and / or test qualities, copying them, and generating test suites; when executing test tasks, filtering the test suites corresponding to the identification according to the test categories, test tasks, and / or test qualities.
5. The keyword-driven spaceflight TT&C software automated test method according to claim 1, characterized in that, Before executing the test cases in the test suites, the method further comprises: setting an execution mode; driving a test program to load the test suites according to the execution mode; generating test scripts corresponding to the test cases in the test suites; executing the test scripts according to the execution mode specified by the test suites.
6. The keyword-driven spaceflight TT&C software automated test method according to claim 1, characterized in that, The method further comprises: creating a document chapter object, which at least contains text, tables, and calculation results to be filled into a document template; The document section object is populated into the document template by the positioning information to output a test document.
7. The keyword-driven spaceflight TT&C software automated test method according to claim 5, characterized in that, The method comprises: outputting test results after test case execution, analyzing the test results and writing them into a database for storage.
8. A key-driven TT&C software automation test system, characterized in that, The system comprises: A keyword generation unit is configured to generate keywords based on a spaceflight TT&C software operation process; the spaceflight TT&C software operation process adopts multiple programming languages; and the keywords adopt a unified programming language. A template configuration unit is configured to configure a test case template, define template elements based on the test case template and form test cases; at least one of natural language, keywords and test data is used to define the template elements; and the test cases comprise a test case name, a test case review and test steps, the test steps comprising test input, execution conditions, expected results and evaluation standards. A suite generation unit is configured to filter the test cases according to test types and pack the filtered test cases into test suites; the test types at least comprise test category attributes, quality attributes, task attributes and sequence attributes. An execution unit is configured to execute the test cases in the test suites and collect execution conditions, fill the execution conditions into corresponding test document templates according to mapping rules to form test documents; and filling the execution conditions into the corresponding test document templates according to the mapping rules to form the test documents comprises: Generating a document configuration file based on a mapping relationship between data types and document templates, the document configuration file at least comprising test plans, test descriptions and records and test reports; and the document configuration file is used to represent document configuration. Filtering corresponding execution conditions according to corresponding data types in the document configuration file; Selecting a document type in the document configuration file and reading a specified document configuration, reading test cases and corresponding execution conditions according to the document configuration.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Test case configuration system and method and automatic test system and method
CN110888818A
Pressure testing method and device and computing equipment
CN112445708A
Automatic test method, device and equipment for universal actuator and storage medium
CN118916293A