Keyword-driven aerospace measurement and control software automatic test method and system
Through the keyword-driven automated testing method, the problem of low test automation and poor interoperability of test scripts in traditional aerospace measurement and control software systems is solved, and the synchronization of automated testing and document generation is achieved, which improves the testing efficiency and quality.
Patent Information
- Application Number
- CN202411672118.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-21
AI Technical Summary
The test automation level of traditional aerospace measurement and control software systems is not high, the test scripts are difficult to use each other, the test execution and document writing are not synchronized, the quality standards are not unified, the content of the test documents is not comprehensive, and it is difficult to work collaboratively.
Adopt keyword-driven automated testing methods, by forming a unified programming language keyword, configuring test case templates, filtering and packaging test cases, executing test suites, and automatically filling test document templates based on execution.
It realizes automatic execution of test cases, supports manual and timed execution, and executes multiple tests in parallel, and completes complex tests using a unified programming language. It realizes that a set of test scripts are universal to multiple software, improving testing efficiency and document writing quality.
Smart Images

Figure CN119621557A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of aerospace measurement and control, and in particular to a keyword-driven automatic testing method and system for aerospace measurement and control software. Background Art
[0002] Aerospace measurement and control software testing plays an important role in ensuring the quality of aerospace measurement and control software by verifying whether the software system meets the design requirements in a real system working environment. According to the requirements of GJB5000A and aerospace measurement and control software development units for the testing process, aerospace measurement and control software system testing generally requires the completion of test planning, test design, test execution and test summary. Specifically, in the test planning stage, testers carry out test planning based on the software system design description and other design documents, and clarify the test object, test strategy, test environment, schedule plan, etc. In the test planning stage, testers need to complete the preparation of the "Software Test Plan"; in the test design stage, testers write test instructions and test procedures based on the software system design documents and test plans. The test description contains test cases, and the test cases must clearly define the test steps, expected results, evaluation criteria, and test case termination conditions and pass criteria. During the test design phase, testers need to complete the writing of the "Software Test Description"; during the test execution phase, testers execute test cases according to the test description, record test results, determine whether the test cases pass according to the evaluation criteria, and form a test report; for test cases that are not fully executed or have defects, the test design can be adjusted according to the software changes to perform regression testing. During the test execution phase, testers need to analyze test data, record test results, and write the "Software Test Record"; after the test execution phase is completed, testers need to classify and summarize test results and test defects, identify software functions and non-functional features that do not meet requirements, analyze the causes of defects and provide correction suggestions, etc. During the test summary phase, testers need to write the "Software Test Report".
[0003] Aerospace measurement and control software generally consists of hundreds of processes in various disciplines such as real-time data processing, control and calculation, data storage, and monitoring and display. It is characterized by large scale, different structures, and diverse programming languages. Therefore, in the process of aerospace measurement and control software system testing, the current aerospace measurement and control software system testing mostly requires testers to use multiple user interfaces for manual testing and write various documents in the testing process. Due to frequent changes in technical status and high frequency of regression testing, testers need to manually perform a large number of repeated selections, clicks, submissions, and other operations on the user page; in the case of parallel development, testing, training, and task execution of multiple models of aerospace mission software, the same set of software needs to be deployed and tested in different environments; manual testing requires testers to spend a lot of time analyzing and recording various test data, test results, and test problems generated during the test process and writing test reports.
[0004] It can be seen that the above-mentioned traditional aerospace measurement and control software system testing method has the following shortcomings:
[0005] The automation level is low. Testers need to manually perform a large number of repetitive tasks such as selection, clicking, and submission on multiple pages under test. The same set of software needs to repeat the same test operations in multiple different environments, which results in low test efficiency.
[0006] Test scripts are difficult to use with each other. Testing software written in different programming languages often requires the use of test tools or test scripts written in the corresponding languages. Test scripts implemented in different languages are difficult to use with each other. Every time a new software is developed, a new set of test scripts and new test cases need to be developed. The workload required to manage and maintain various test scripts and test cases is high.
[0007] Test execution and test document writing are not synchronized. The traditional testing method requires executing the test cases first and then writing documents to record the test execution status. Writing test documents requires a lot of time to trace back the test process, and there may be problems such as mismatch and inconsistency between the document content and the actual test execution status.
[0008] The quality standards are not unified. Due to differences in personnel capabilities and quality awareness, the quality of test documents written by different testers in the same project varies greatly. Quality problems such as incomplete content and inconsistent formats are difficult to avoid.
[0009] The content of the test documents is not comprehensive. The aerospace measurement and control software system test involves a variety of software, and uses a wide variety of user interfaces and test tools. There are many sources of information and data that need to be recorded. Manual collection and summary are prone to incomplete information and missing content.
[0010] Collaborative work is difficult. The same test document is written by different testers. After writing separately, it takes a lot of time to summarize and adjust. Multiple interactions may occur in the middle. This offline interaction method is time-consuming and inefficient. Summary of the invention
[0011] The present invention provides a keyword-driven aerospace measurement and control software automated testing method and system, which are used to solve the problems in the prior art that the automation level of traditional aerospace measurement and control software system testing methods is low and the test scripts are difficult to be used interchangeably.
[0012] A keyword-driven automated testing method for aerospace measurement and control software in the present invention comprises:
[0013] The keywords are formed based on the operation process of the aerospace measurement and control software; the operation process of the aerospace measurement and control software adopts multiple programming languages; the keywords adopt a unified programming language;
[0014] Configure a test case template, define template elements based on the test case template and form a test case; wherein the template elements are defined by at least one of natural language, keywords and test data; the test case includes: a test case name, a test case summary and test steps, and the test steps include: test input, execution conditions, expected results and evaluation criteria;
[0015] 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 attributes, quality attributes, task attributes, and sequence attributes;
[0016] The test cases in the test suite are executed and the execution status is collected, and the execution status is filled into the corresponding test document template according to the mapping rule to form a test document.
[0017] Optionally, keywords formed based on the aerospace measurement and control software operation process include:
[0018] Obtaining the aerospace measurement and control software operation process implemented in multiple programming languages;
[0019] The operation process is decomposed into functional modules, and the functional modules are encapsulated using a programming language to form the keywords.
[0020] Optionally, the method further includes:
[0021] Combine multiple keywords to form a keyword object library;
[0022] The keyword object library is called when the test case is executed.
[0023] Optionally, the method comprises:
[0024] Generate test cases according to test categories, test tasks, test quality and / or execution order; the test categories include at least: system test, configuration item test, component test and unit test; the test quality includes at least: function test, performance test, security test and reliability test;
[0025] generating an identification of the test case;
[0026] Automatically select the test cases that meet the conditions from the test case set according to the test category, test task and / or test quality, copy them and generate a test suite;
[0027] When executing a test task, the test suite with the corresponding identifier is filtered according to the test category, test task and / or test quality.
[0028] Optionally, before executing the test cases in the test suite, the method further includes:
[0029] Set the execution mode;
[0030] Drive the test program to load the test suite according to the execution mode;
[0031] Generate test scripts corresponding to the test cases in the test suite;
[0032] The test script is executed according to the execution mode specified by the test suite.
[0033] Optionally, filling the execution status into a corresponding test document template according to a mapping rule to form a test document includes:
[0034] Generate a document configuration file based on the mapping relationship between the data type and the document template, the document configuration file at least including: a test plan, a test description and record, and a test report; the document configuration file is used to characterize the document configuration;
[0035] Filtering corresponding execution conditions according to corresponding data types in the document configuration file;
[0036] Select the document type in the document configuration file, read the specified document configuration, and read the test case and the corresponding execution status according to the document configuration.
[0037] Optionally, the method further includes:
[0038] Create a document chapter object, which at least contains: text, tables, and calculation results to be filled into the document template;
[0039] The document section object is filled into the document template through positioning information to output a test document.
[0040] Optionally, the method includes: outputting test results after the test case is executed, analyzing the test results and writing them into a database for storage.
[0041] A keyword-driven aerospace measurement and control software automatic test system in the present invention comprises:
[0042] A keyword generating unit, used for forming keywords based on the operation process of the aerospace measurement and control software; the operation process of the aerospace measurement and control software adopts multiple programming languages; the keywords adopt a unified programming language;
[0043] A template configuration unit, configured to configure a test case template, define template elements based on the test case template and form a test case; wherein the template elements are defined by at least one of natural language, keywords and test data; the test case includes: a test case name, a test case summary and test steps, and the test steps include: test input, execution conditions, expected results and evaluation criteria;
[0044] A suite generation unit is used to filter the test cases according to the test type and pack the filtered test cases into a test suite; the test type at least includes: 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 rule to form a test document.
[0046] The present invention also provides a computer-readable storage medium, wherein 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 any of the methods described above.
[0047] A keyword-driven aerospace measurement and control software automated testing method and system of the present invention can realize automatic execution of test cases, support automatic execution of test cases in manual and timed ways, realize parallel execution of multiple tests, use a unified programming language to complete multiple complex aerospace measurement and control software tests, and realize that a set of test scripts are universal for multiple aerospace measurement and control software. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a flow chart of a keyword-driven automated testing method for aerospace measurement and control software in an embodiment of the present invention;
[0049] Figure 2 is a schematic diagram of keyword definition in an embodiment of the present invention;
[0050] Figure 3 is a schematic diagram of a test case identifier and its attributes in an embodiment of the present invention;
[0051] Figure 4 The diagram is a schematic diagram of the structure of a keyword-driven aerospace measurement and control software automation test system in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0053] It should be understood that in the various embodiments of this document, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.
[0054] The embodiment of the present invention provides a keyword-driven aerospace measurement and control software automated testing method, such as Figure 1 As shown, the method includes:
[0055] Step 100, forming keywords based on the operation process of aerospace measurement and control software; the operation process of aerospace measurement and control software adopts multiple programming languages; the keywords adopt a unified programming language. Specifically, aerospace measurement and control software generally includes multiple functional modules implemented by different programming languages, which jointly complete complex aerospace measurement and control tasks. Most traditional aerospace measurement and control software testing methods require writing test scripts for each software according to the writing language and implementation method of the software under test. The test scripts used by different software under test are often implemented in different programming languages, which are difficult to be used interchangeably or integrated together. In order to solve the goals of unified scheduling and control of heterogeneous aerospace measurement and control software, separation of test data and test scripts, and commonality of test scripts for multiple aerospace measurement and control software, the specific embodiment of the present invention decomposes the operation of aerospace measurement and control software into functions, encapsulates them using a unified programming language, and forms keywords of a unified programming language. The specific embodiment of the present invention uses a unified programming language (which can be selected according to user needs, such as python, java, etc.) to encapsulate the interface or service exposed to the outside by the aerospace software. The encapsulated object is a software product, such as: interface library, program, service and other aerospace measurement and control software operation processes. Since software testing does not involve modifying the code of the software being tested, it does not matter what machine language the product being tested is written in. In other words, it has nothing to do with the specific aerospace software writing language and does not involve understanding different machine language issues. What is needed is the calling method of the service or library.
[0056] Preferably, basic service functions such as telegram service, file service, and log service are encapsulated to form basic service keywords, and basic services such as telegram reception and transmission, file reception and transmission, etc. are provided to the outside. On the basis of this basic service keyword, the functions involved in the typical business of the aerospace measurement and control software system are considered, and the basic service keywords are combined according to the business logic and encapsulated into general function keywords to realize the typical functions of the aerospace measurement and control software system such as channel switch status setting, plan monitoring execution, instruction sending execution status monitoring, and return the execution results in a unified data format for subsequent data processing. The above basic service keywords and general service keywords can reference the corresponding keyword function definition files through the test script for the test script to call.
[0057] Step 200, configure the test case template, define the template elements based on the test case template and form a test case; wherein the template elements are defined by at least one of natural language, keywords and test data; the test case includes: test case name, test case summary and test steps, and the test steps include: test input, execution conditions, expected results and evaluation criteria. In addition, the test case also includes textual descriptions and test steps such as test case identification, test case name, test case summary, etc. Among them, the test case is written to verify the software under test, and specifically includes: at least one set of test input, execution conditions and expected results. On the basis of forming keywords, the test case template can write a test script executed by a computer, which is the basis for realizing the automated testing of aerospace measurement and control software. For aerospace measurement 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 a software test document, a test case should generally include test case name identification, test case summary, case initialization, test steps, execution status and other elements. In the manual test process, the test document writing is separated from the actual test process. It is necessary to run the test case first and then write the test result into the test document. This post-writing document method is time-consuming and laborious. In order to achieve synchronous writing of test scripts and test documents, a specific embodiment of the present invention adopts a test case design architecture that combines natural language and code. For example, based on the test case template, the template elements are defined using one of natural language, keywords and test data, and test cases are generated based on the 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 attributes, quality attributes, task attributes, and sequence attributes. Specifically, in the process of testing aerospace measurement and control software, different test cases are often used to test different quality attributes such as the functions and performance of aerospace measurement and control software; test cases can also be applicable to different tasks; and test cases often need to be executed in a certain order. Preferably, the embodiment of the present invention uses a test suite to combine different test cases together, and determines the quality attributes, task attributes, and sequence attributes of a test case through a test case identifier. For example, the test case packaging process mainly filters out the test case set T' required for this test from the full set of test cases T according to certain rules. The specific screening method is: 1) Define a test case identifier for each test case in the test case set T, see Figure 3 2) Set the test case attributes according to the test requirements, such as MISA task function test. 3) Filter the test cases according to the following rules: For the full set of test cases T, according to the set rule f, find a T' that belongs to T, so that the identity of any test case C in T' satisfies the set rule f, and the obtained T' is the test suite.
[0059] Step 400, 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. Specifically, the embodiment of the present invention prepares a test document template according to the writing requirements such as the test document content format, and each chapter of the test document template mainly includes: fixed filling content and positioning information, through document configuration, the execution status of the test cases, test results and other execution status and the positioning information are mapped according to the mapping rules, and the execution status is filled to form the final test document. After executing the test case and collecting the execution status, the specific embodiment of the present invention fills the execution status into the corresponding test document template according to the mapping rules to achieve a unified style and standard specifications.
[0060] The present invention is compatible with keywords and test case designs of multiple programming languages. Aiming at the problem that the programming languages of aerospace measurement and control software are diverse and the maintenance and management of test scripts are difficult, a method for decomposing the operation process of aerospace measurement and control software and encapsulating it in a unified programming language to form keywords is designed. By calling keywords, multiple complex aerospace measurement and control software tests can be completed, and the test script writing language is unified and universal operations are formed for multiple aerospace measurement and control software. 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, which combines natural language and code to achieve one-to-one correspondence between test documents and test script contents.
[0061] The keyword-driven automated testing method for aerospace measurement and control software described in the embodiment of the present invention preferably forms keywords based on the operation process of the aerospace measurement and control software, including:
[0062] Obtaining the aerospace measurement and control software operation process implemented in multiple programming languages;
[0063] The operation process is decomposed into functional modules, and the functional modules are encapsulated using a programming language to form the keywords.
[0064] Specifically, Figure 2As shown, keywords can be defined in general programming languages, such as Python, Java, C++, etc., and can be selected according to the actual situation of the organization or project. Taking Python as an example, by writing keyword functions and using Python programs to call the interface library and interface functions provided by the software under test, 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 test cases or test scripts, keywords can be called to complete various operations on the software under test defined in the test steps. Taking the parameter query function test of a certain software as an example, during manual testing, the operator needs to open the query software login page, enter the username and password, click the button to log in, and then enter the parameter name and click the button to send the query request. The above operations can be decomposed into the following functional modules:
[0065] 1) Open the specified page;
[0066] 2) Enter data into the input box;
[0067] 3) Click the button.
[0068] Use the method described in this section to encapsulate the above functions to form keywords, as shown in Table 1:
[0069] Table 1 Query test function and keyword correspondence table
[0070]
[0071] In a specific embodiment of the present invention, a test case design architecture combining natural language and code 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 in various ways, for example, by organizing in a table, and the table can be configured according to the test document writing standard specifications stipulated by different organizations to form a test case template. The test case template is mainly composed of various template elements, and different templates can contain multiple template elements. The template elements in Table 2 are marked in black bold, and the types of template elements mainly include two types: test attributes and test steps. The content filled in the elements of the test attributes is mainly in natural language for human reading, such as the test case name, test case summary and other elements; the element content of the test step contains 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 in by the tester when writing the test case, or it can be automatically filled in by the test program when the test script is running; keywords can be used in the code line, such as Open_url, etc.; the code line can also use test data, such as data = Open_file ('testdatat.csv'). Test cases are written using a test case writing method that combines natural language and code, allowing test documents and test scripts to be written simultaneously. The test steps in the test documents correspond to the actual test execution status, with high accuracy. This can effectively avoid problems such as content omissions and inconsistencies between documents and actual situations that exist in manually written test documents.
[0076] The keyword-driven automated testing method for aerospace measurement and control software described in the embodiment of the present invention preferably further includes:
[0077] Combine multiple keywords to form a keyword object library;
[0078] The keyword object library is called when executing the test case. Specifically, Figure 2 As shown, keywords are organized into a keyword object library for centralized and unified management.
[0079] The keyword-driven automated testing method for aerospace measurement and control software described in the embodiment of the present invention preferably includes: generating test cases according to test categories, test tasks, test quality and / or execution order; the test categories include at least: system testing, configuration item testing, component testing and unit testing; the test quality includes at least: functional testing, performance testing, safety testing, reliability testing.
[0080] generating an identification of the test case;
[0081] Automatically select the test cases that meet the conditions from the test case set according to the test category, test task and / or test quality, copy them and generate a test suite;
[0082] When executing a test task, the test case with the corresponding identification is filtered according to the test category, test task and / or test quality. Specifically, in the process of testing aerospace measurement and control software, different test cases are often used to test different quality attributes such as the function and performance of aerospace measurement and control software; test cases can also be applicable to different model tasks; and test cases often need to be executed in a certain order. Therefore, a specific embodiment of the present invention uses a test suite to combine different test cases together, and then determines the test category attribute, quality attribute, task attribute and sequence attribute of a test case through the identification of the test case, see Figure 3 As shown in the figure, the test case identifier consists of letters, numbers and special symbols, and is divided into five fields with _. The meanings of each field are as follows:
[0083] Field 1 indicates the test category attribute of the test case, such as STS for system testing, STC for software configuration item testing, etc.
[0084] Field 2 indicates the task attributes, MISA is the task code;
[0085] Field 3 represents the quality attributes, such as F for function and P for performance;
[0086] Field 4 indicates the quality attribute serial number, which is used to distinguish test cases with the same fields 1, 2, and 3;
[0087] Field 5 represents the sequence attribute, which is used to distinguish the execution order of different test cases.
[0088] When creating a new test project or test suite, you can automatically filter out qualified test cases from the test case set according to the test task, automatically copy them and generate a test suite, so as to achieve efficient reuse of test cases. For example, if the configuration is set to "MISA task function system test", you can automatically filter out test cases with the identifier starting with "STS_MISA_F" according to the test task to generate a test suite; you can also manually select test cases and generate a test suite according to the test requirements.
[0089] Specifically, in the process of aerospace measurement and control software testing, in order to improve the efficiency of test case execution, it is often necessary to execute multiple test cases in batches. Therefore, 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 multi-model task testing in parallel. In order to save manpower, it is also necessary to solve the problem of timed execution of test cases. Therefore, the keyword-driven aerospace measurement and control software automation testing method described in the embodiment of the present invention can realize convenient switching between automatic and manual execution tests by setting the execution mode to automatic execution or manual execution. Preferably, before executing the test cases in the test suite, the method also includes:
[0090] Set the execution mode. The execution mode can be set to scheduled execution, manual execution, etc. Drive the test program to load the test suite according to the execution mode. 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] In order to realize the automatic generation of test documents, the test documents such as the test plan, test description and record, and test report of the aerospace measurement and control software system are automatically output according to the specified template. The keyword-driven aerospace measurement and control software automatic testing method described in the embodiment of the present invention fills the execution status into the corresponding test document template according to the mapping rule to form the test document, including:
[0092] Generate a document configuration file based on the mapping relationship between the data type and the document template, the document configuration file at least including: a test plan, a test description and record, and a test report; the document configuration file is used to characterize the document configuration;
[0093] Filtering corresponding execution conditions according to corresponding data types in the document configuration file;
[0094] Select the document type in the document configuration file, read the specified document configuration, and read the test case and the corresponding execution status according to the document configuration for subsequent automatic output. Automatic generation of test documents supports multiple people to collaborate on a test task, shortening the test document generation time to a few minutes. Compared with the previous manual writing of test documents, the quality and efficiency of test document writing have been greatly improved.
[0095] The keyword-driven automated testing method for aerospace measurement and control software described in the embodiment of the present invention preferably further includes:
[0096] Create a document chapter object, which at least contains: text, tables, and calculation results to be filled into the document template;
[0097] The document section object is filled into the document template through positioning information to output a test document.
[0098] Specifically, the prerequisite for automatic generation of test documents is to create a document template based on the organization's requirements for the test document content format and other writing requirements. Each chapter of the document template mainly includes fixed filling content and positioning information. Through document configuration, data such as test cases and test results are corresponding to the positioning information, as shown in Table 3:
[0099] Table 3 Correspondence between test data and test document templates
[0100]
[0101]
[0102] A document configuration file is formed according to the mapping relationship between the data type and the document template described in Table 3. The document configuration file includes various document configurations such as test plan, test instructions and records, and test report. When using the program to generate a test document, the corresponding data will be filtered from the database and test case according to the corresponding document type in the document configuration file. When the test document is automatically generated, the user selects the document type in the document configuration, and the document generation module reads the document configuration specified by the user, and reads the test case and corresponding execution status and other information based on the document configuration. Subsequently, the corresponding document chapter object is created. The document chapter object contains the text, table, calculation results and other content to be filled into the document template. Next, the program fills the document chapter object into the document template through the positioning information, and finally saves and outputs the test document.
[0103] Preferably, the font style, color, and size used in different chapters during the automatic generation of the test document are unified, conforming to the format requirements defined by the document template, thereby avoiding format inconsistencies and non-compliance problems that exist in manually written documents.
[0104] The aerospace measurement and control software automated testing method of the present invention supports multi-person collaborative operation, and test execution is not limited by time and space. Compared with the traditional multi-person test and subsequent document compilation method, flexibility and efficiency are greatly improved.
[0105] The keyword-driven automated testing method for aerospace measurement and control software described in the embodiment of the present invention preferably includes: outputting the test results after the test case is executed, analyzing the test results and writing them into a database for storage.
[0106] The embodiment of the present invention also provides a keyword-driven aerospace measurement and control software automatic testing system, such as Figure 4 As shown, the system comprises:
[0107] The keyword generating unit 401 is used to form keywords based on the operation process of the aerospace measurement and control software; the operation process of the aerospace measurement and control software adopts multiple programming languages; the keywords adopt a unified programming language;
[0108] The template configuration unit 402 is used to configure a test case template, define template elements based on the test case template and form a test case; wherein the template elements are defined by at least one of natural language, keywords and test data; the test case includes: a test case name, a test case summary and test steps, and the test steps include: test input, execution conditions, expected results and evaluation criteria;
[0109] The suite generation unit 403 is used to filter the test cases according to the test type and pack the filtered test cases into a test suite; the test type at least includes: test category attribute, quality attribute, task attribute, and sequence attribute;
[0110] The execution unit 404 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 rule to form a test document.
[0111] The method described in the embodiment of the present invention encapsulates basic service functions such as telegram service, file service, and log service to form basic service keywords, and provides basic services such as telegram reception and transmission, file reception and transmission, etc. On the basis of the definition of this basic service keyword, considering the functions involved in the typical business of the aerospace measurement and control software system, the basic service keywords are combined according to the business logic and encapsulated into general function keywords to realize the typical functions of the aerospace measurement and control software system such as channel switch status setting, plan monitoring execution, instruction sending execution status monitoring, and return the execution results in a unified data format for subsequent data processing. The above-mentioned basic service keywords and general service keywords can reference the corresponding keyword function definition files through the test script for the test script to call.
[0112] A specific embodiment of the present invention further provides a computer-readable storage medium, wherein 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 any of the methods described above.
[0113] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0114] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0115] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0117] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.
Claims
1. A keyword-driven automated testing method for aerospace measurement and control software, characterized in that: The method comprises: The keywords are formed based on the operation process of the aerospace measurement and control software; the operation process of the aerospace measurement and control software adopts multiple programming languages; the keywords adopt a unified programming language; Configure a test case template, define template elements based on the test case template and form a test case; wherein the template elements are defined by at least one of natural language, keywords and test data; the test case includes: a test case name, a test case summary and test steps, and the test steps include: test input, execution conditions, expected results and evaluation criteria; 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 attributes, quality attributes, task attributes, and sequence attributes; The test cases in the test suite are executed and the execution status is collected, and the execution status is filled into the corresponding test document template according to the mapping rule to form a test document.
2. The keyword-driven automated testing method for aerospace measurement and control software according to claim 1, characterized in that: Keywords formed based on the operation process of aerospace measurement and control software include: Obtaining the aerospace measurement and control software operation process implemented in multiple programming languages; The operation process is decomposed into functional modules, and the functional modules are encapsulated using a programming language to form the keywords.
3. The keyword-driven automated testing method for aerospace measurement and control software according to claim 2, characterized in that: The method further comprises: Combine multiple keywords to form a keyword object library; The keyword object library is called when the test case is executed.
4. The keyword-driven automated testing method for aerospace measurement and control software according to claim 1, characterized in that: The method comprises: Generate test cases according to test categories, test tasks, test quality and / or execution order; the test categories include at least: system test, configuration item test, component test and unit test; the test quality includes at least: function test, performance test, security test and reliability test; generating an identification of the test case; Automatically select the test cases that meet the conditions from the test case set according to the test category, test task and / or test quality, copy them and generate a test suite; When executing a test task, the test suite with the corresponding identifier is filtered according to the test category, test task and / or test quality.
5. The keyword-driven automated testing method for aerospace measurement and control software according to claim 1, characterized in that: Before executing the test cases in the test suite, the method further includes: Set the execution mode; Drive the test program to load the test suite according to the execution mode; Generate test scripts corresponding to the test cases in the test suite; The test script is executed according to the execution mode specified by the test suite.
6. The keyword-driven automated testing method for aerospace measurement and control software according to claim 1, characterized in that: Filling the execution status into the corresponding test document template according to the mapping rule to form a test document includes: Generate a document configuration file based on the mapping relationship between the data type and the document template, the document configuration file at least including: a test plan, a test description and record, and a test report; the document configuration file is used to characterize the document configuration; Filtering corresponding execution conditions according to corresponding data types in the document configuration file; Select the document type in the document configuration file, read the specified document configuration, and read the test case and the corresponding execution status according to the document configuration.
7. The keyword-driven automated testing method for aerospace measurement and control software according to claim 6, characterized in that: The method further comprises: Create a document chapter object, which at least contains: text, tables, and calculation results to be filled into the document template; The document section object is filled into the document template through positioning information to output a test document.
8. The keyword-driven automated testing method for aerospace measurement and control software according to claim 5, characterized in that: The method comprises: outputting the test result after the test case is executed, analyzing the test result and writing the result into a database for storage.
9. A keyword-driven aerospace measurement and control software automated testing system, characterized in that: The system comprises: A keyword generating unit, used for forming keywords based on the operation process of the aerospace measurement and control software; the operation process of the aerospace measurement and control software adopts multiple programming languages; the keywords adopt a unified programming language; A template configuration unit, configured to configure a test case template, define template elements based on the test case template and form a test case; wherein the template elements are defined by at least one of natural language, keywords and test data; the test case includes: a test case name, a test case summary and test steps, and the test steps include: test input, execution conditions, expected results and evaluation criteria; A suite generation unit is used to filter the test cases according to the test type and pack the filtered test cases into a test suite; the test type at least includes: test category attribute, quality attribute, task attribute, and sequence attribute; 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 rule to form a test document.
10. A computer-readable storage medium, characterized in that: 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 any one of claims 1 to 8.
Citation Information
Patent Citations
Method for automatically generating testing script
CN104484269A
Test case configuration system and method and automatic test system and method
CN110888818A
Pressure testing method and device and computing equipment
CN112445708A
Automatic testing method and device based on natural language, equipment and medium
CN116010280A
Vehicle-mounted terminal test method, device, upper computer, system and medium
CN116303069A