CN115047836A - Test case generation and loading method and system based on DCS system periodic test - Google Patents

Test case generation and loading method and system based on DCS system periodic test Download PDF

Info

Publication number
CN115047836A
CN115047836A CN202210736090.5A CN202210736090A CN115047836A CN 115047836 A CN115047836 A CN 115047836A CN 202210736090 A CN202210736090 A CN 202210736090A CN 115047836 A CN115047836 A CN 115047836A
Authority
CN
China
Prior art keywords
test
test case
data
dcs
generating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210736090.5A
Other languages
Chinese (zh)
Inventor
叶佩鑫
韩文兴
陈智
李庆
刘明星
蒋维
卢宗健
黄�俊
李晓龙
黄素林
许光俊
何捷
党丽君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nuclear Power Institute of China
Original Assignee
Nuclear Power Institute of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nuclear Power Institute of China filed Critical Nuclear Power Institute of China
Priority to CN202210736090.5A priority Critical patent/CN115047836A/en
Publication of CN115047836A publication Critical patent/CN115047836A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • G05B19/41845Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by system universality, reconfigurability, modularity
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/33Director till display
    • G05B2219/33273DCS distributed, decentralised controlsystem, multiprocessor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a test case generating and loading method and a test case generating and loading system based on a DCS (distributed control system) periodic test, which are applied to the DCS, wherein the method comprises the steps of acquiring a request for generating a test case template in the test case generating process, and outputting a selection interface on a display interface of the DCS according to the request for generating the test case template; receiving input conditions of a user on the selection interface by the DCS, wherein the input conditions comprise test types, test purposes, test sites, variables set for test initialization, variable names, test allowable conditions, variable conditions and test case variables; and the DCS calls an Excel operation interface according to the input conditions to generate test conditions and a test case template table. The method also comprises a test case compiling process and a test case importing process. The invention enables a user to conveniently compile and modify a large batch of test cases, and ensures the correctness of the compiled cases while having high flexibility.

Description

Test case generation and loading method and system based on DCS system periodic test
Technical Field
The invention relates to the field of nuclear power station security level DCS, and the method is used for verifying the correctness of the operation of logic configuration in a real scene; in particular to a test case generation and loading method and a test case generation and loading system based on a DCS periodic test.
Background
In the security level DCS system, the logic configuration is transmitted to the lower computer device by way of downloading, and the logic should be able to operate completely and correctly, and needs to be tested to verify. In the prior art, a basic test can be performed on logic through an algorithm monitoring and variable forcing mode, but an operator needs to manually force the logic once and again, the logic cannot be performed in a large batch for a long time, and a test result can only be observed by naked eyes and cannot be automatically recorded and stored.
Disclosure of Invention
The invention aims to solve the technical problem that the correctness test verification of the logic in the existing security level DCS system can perform a basic test on the logic in a mode of algorithm monitoring and variable forcing, but an operator needs to manually force the logic once and again, and the generation and the use of test cases can not be performed for a long time in large batch. The invention aims to provide a test case generation and loading method and a test case generation and loading system based on a DCS periodic test, because the DCS needs to perform a test on the correctness of the algorithm logic operation regularly and quantitatively, software of the periodic test is designed to realize the function; the invention considers and designs a mode for generating and loading the test cases of the periodic test, the test cases have high flexibility, a user can write and modify a large quantity of test cases conveniently, the high flexibility can ensure the correctness of the written cases, and the capability of checking the test cases is also provided.
The invention is realized by the following technical scheme:
in a first aspect, the present invention provides a test case generation and loading method based on a DCS system periodic test, applied to a DCS system, and characterized in that the method includes a test case generation process, specifically:
acquiring a request for generating a test case template, and outputting a selection interface on a display interface of the DCS according to the request for generating the test case template;
receiving input conditions of a user on the selection interface by the DCS, wherein the input conditions comprise test types, test purposes, test sites, variables of test initialization setting, variable names, test permission conditions, variable conditions and test case variables;
and the DCS calls an Excel operation interface according to the input conditions to generate test conditions and a test case template table.
Further, the DCS system calls an Excel operation interface according to the input condition to generate a test condition and a test case template table, and specifically includes:
the DCS calls an Excel operation interface according to the input condition to create an Excel table;
performing corresponding write operation on the Excel table one by one according to a key value pairing principle;
dividing the Excel table into a plurality of sheet partitions according to test requirements and the input conditions to generate test conditions and a test case template table; wherein the content of the first and second substances,
the multiple sheet partitions are used for storing data which are initialized and set before testing, testing recovery data, testing allowable condition data and testing case data.
Further, after generating the test conditions and the test case template table, the method further includes:
and limiting the editing area of the Excel table by calling an Excel operation interface, so as to realize that the non-editing area is prohibited to write data.
Furthermore, the method also comprises a test case compiling process, wherein the test case compiling process is used for compiling the test case according to the generated test conditions and the test case template table, and specifically comprises the following steps:
when a user selects a non-editing area, the Excel table cannot be edited;
when a user selects an editable area, the Excel table can be edited;
when a user writes a use case, each item of data needs to be consistent with a preset type.
Further, the method also comprises a test case importing process, which specifically comprises the following steps:
acquiring a test case import request, and outputting an import interface on a display interface of the DCS according to the test case import request;
the DCS receives a file path selected by a user for the import interface, and reads the file content of the Excel table according to the file path; wherein:
in the process of reading the file content of the Excel table, reading and verifying the file content of the Excel table at the same time, reading the content of each piece of data in a test case and performing data validity verification; if the data verification is illegal, immediately stopping reading the content of the Excel table, and prompting an error of importing a test case; if the data is not verified to be unqualified, storing the data in a memory;
the case that the data verification is illegal is as follows: and when the data type is not matched with the preset data type, judging that the data is wrong.
Further, if the situation that the data verification is unqualified does not exist and a test case with an incomplete format exists, automatic identification and completion are performed; the method comprises the following steps:
when the data of the test case is empty, completing the default value of the data to realize the fault-tolerant processing of the software; wherein, the rule of completion is: when the data type of the test case is an Int type, the complement value is 0; when the data type of the test case is the Float type, the complement value is 0.0; and when the data type of the test case is the Bool type, the complement value is false.
In a second aspect, the invention also provides a test case generating and loading system based on the periodic test of the DCS, which supports the test case generating and loading method based on the periodic test of the DCS, and the system comprises a test case generating module, wherein the test case generating module comprises a first obtaining unit, a first selection interface unit, an input condition unit and a generating unit;
the first obtaining unit is used for obtaining a request for generating a test case template;
the first selection interface unit is used for outputting a selection interface on a display interface of the DCS according to the request for generating the test case template;
the input condition unit is used for receiving the input conditions of the selection interface by the DCS, wherein the input conditions comprise test types, test purposes, test sites, variables of test initialization setting, variable names, test permission conditions, variable conditions and test case variables;
and the generating unit is used for calling an Excel operation interface by the DCS according to the input conditions to generate test conditions and a test case template table.
Further, the execution process of the generating unit is as follows:
the DCS calls an Excel operation interface according to the input condition to create an Excel table;
performing corresponding write operation on the Excel table one by one according to a key value pairing principle;
dividing the Excel table into a plurality of sheet partitions according to test requirements and the input conditions to generate test conditions and a test case template table; wherein the content of the first and second substances,
the multiple sheet partitions are used for storing data which are initialized and set before testing, testing recovery data, testing allowable condition data and testing case data.
Furthermore, the system also comprises a test case compiling module, wherein the test case compiling module is used for compiling the test cases according to the generated test conditions and the test case template table; the method comprises the following steps:
when a user selects a non-editing area, the Excel table cannot be edited;
when a user selects an editable area, the Excel table can be edited;
when a user writes a use case, each item of data needs to be consistent with a preset type.
Furthermore, the system also comprises a test case import module, wherein the test case import module comprises a second acquisition unit, a second import interface unit and a reading unit;
the second obtaining unit is used for obtaining a request for importing the test case;
the second import interface unit is used for outputting an import interface on a display interface of the DCS according to the import request of the test case;
the reading unit is used for receiving a file path selected by a user on the import interface by the DCS and reading the file content of the Excel table according to the file path; wherein:
in the process of reading the file content of the Excel table, reading and verifying the file content of the Excel table at the same time, reading the content of each piece of data in a test case and performing data validity verification; if the data verification is illegal, immediately stopping reading the content of the Excel table, and prompting an error of importing a test case; if the data is not verified to be unqualified, storing the data in a memory;
the case that the data verification is illegal is as follows: and when the data type is not matched with the preset data type, judging that the data is wrong.
Compared with the prior art, the invention has the following advantages and beneficial effects:
the invention relates to a test case generation and loading method and a test case generation and loading system based on a DCS (distributed control system) periodic test, which designs a mode to enable the periodic test to generate and load test cases, wherein the test cases have high flexibility, a user can conveniently compile and modify a large batch of test cases, and the accuracy of the compiled cases can be ensured while the high flexibility is realized, so that the test cases also have the capability of checking the test cases.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention. In the drawings:
FIG. 1 is a flowchart of a test case generation and loading method based on a DCS system periodic test.
FIG. 2 is a sheet partition of test case data according to the present invention.
FIG. 3 is a schematic structural diagram of a test case generation and loading system based on a DCS periodic test.
FIG. 4 is a schematic structural diagram of a test case generation module according to the present invention.
FIG. 5 is a schematic structural diagram of a test case import module according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to examples and accompanying drawings, and the exemplary embodiments and descriptions thereof are only used for explaining the present invention and are not meant to limit the present invention.
Example 1
In the security level-based DCS system, a logic configuration is transmitted to a lower computer device by means of downloading, and the logic of the logic configuration should be able to operate completely and correctly, and needs to be tested and verified. In the prior art, a basic test can be performed on logic through algorithm monitoring and variable forcing, but an operator needs to manually force the logic once and again, the logic cannot be performed in a large batch for a long time, and a test result can only be observed by naked eyes and cannot be automatically recorded and stored.
The DCS system needs to test the correctness of the algorithm logic operation regularly and quantitatively, so that DCS system software for regular test is designed to realize the function; the invention considers and designs a mode for generating and loading the test cases of the periodic test, the test cases have high flexibility, a user can write and modify a large quantity of test cases conveniently, the high flexibility can ensure the correctness of the written cases, and the capability of checking the test cases is also provided.
In order to ensure that the test case can meet the requirements of writing and modifying by a user conveniently, an Excel form file form is adopted as a medium for storing and filling the test case. Excel forms, a widely used file format well known to the public, have a sophisticated and convenient editing function.
Based on Excel, a function of generating a test case template is provided in DCS system software. When the test case template is generated, a user needs to select variables needing to be generated in the test case template, software can generate the test case template which meets the selected variable content according to the selected variable name and the type of the variable name, variable information is automatically filled in the template, the trouble that the user manually fills in the variable name is omitted, and the user directly compiles a test case on the test case template.
When the test case template is generated, the table modifiable area is limited in a mode of protecting the worksheet, a user opens the table, only partial table area of the test case in the table can be written or modified, and the table format beyond the effective range of the table or the table format cannot be modified, so that the table cannot be modified into an invalid format accidentally or maliciously.
The invention designs a transversely-unfolded test case table format, one row represents one test case, and one column represents values of different cases of the same variable, so that the method is convenient for subsequent test case data reading and inspection.
The DCS system software provides a function for importing the test case. When the test case is imported, the user selects the test case table file to be imported, and after the file is selected, the software can check the format of the test case and the legality of the data content so as to ensure that the case data are all the content conforming to the rules.
During validity check, dividing check errors into different error levels according to the characteristics of the test case, determining a check sequence according to the error levels, wherein the high-level errors are checked preferentially, and the low-level errors are checked later; meanwhile, because different error types are mutually involved, one error may cause another error, and therefore, a verification strategy of reading while verifying and immediately stopping when the error is found is adopted, all errors are not required to be completely checked, high-level errors are encountered, subsequent low-level error checking is not required, and checking efficiency and accuracy are improved.
As shown in fig. 1, the test case generation and loading method based on the periodic test of the DCS system of the present invention is applied to the DCS system, and is characterized in that the method includes a test case generation process, specifically:
acquiring a request for generating a test case template, and outputting a selection interface on a display interface of the DCS according to the request for generating the test case template;
receiving input conditions of a user on the selection interface by the DCS, wherein the input conditions comprise test types, test purposes, test sites, variables of test initialization setting, variable names, test permission conditions, variable conditions and test case variables;
the DCS calls an Excel operation interface according to the input conditions to generate a test condition and a test case template table, and the method specifically comprises the following steps:
the DCS calls an Excel operation interface according to the input condition to create an Excel table;
performing corresponding write operation on the Excel table one by one according to a key value pairing principle;
dividing the Excel table into a plurality of sheet partitions according to test requirements and the input conditions to generate test conditions and a test case template table; wherein the content of the first and second substances,
the multiple sheet partitions are used for storing data which are initialized and set before testing, testing recovery data, testing allowable condition data and testing case data. Fig. 2 shows a sheet partition diagram of test case data.
In this embodiment, after generating the test conditions and the test case template table, the method further includes:
and limiting the editing area of the Excel table by calling an Excel operation interface, so as to realize that the non-editing area is prohibited to write data.
In a further implementation, the method further includes a test case compiling process, where the test case compiling process is to compile a test case according to the generated test conditions and the test case template table, and specifically includes:
when a user selects a non-editing area, the Excel table cannot be edited;
when a user selects an editable area, the Excel table can be edited;
when a user writes a use case, each item of data needs to be consistent with a preset type. Otherwise, when the test case is imported, the import of error information is prompted, and the import of the time is terminated.
As a further implementation, the method further includes a test case importing process, specifically:
acquiring a test case import request, and outputting an import interface on a display interface of the DCS according to the test case import request;
the DCS receives a file path selected by a user for the import interface, and reads the file content of the Excel table according to the file path; wherein:
in the process of reading the file content of the Excel table, reading and verifying the file content of the Excel table at the same time, reading the content of each piece of data in a test case and performing data validity verification; if the data verification is illegal, immediately stopping reading the content of the Excel table, and prompting an error of importing a test case; if the data is not verified to be unqualified, storing the data in a memory;
the case that the data verification is illegal is as follows: and when the data type is not matched with the preset data type, judging that the data is wrong.
Specifically, if the situation that the data verification is not qualified does not exist and a test case with an incomplete format exists, automatic identification and completion are performed; the method comprises the following steps:
when the data of the test case is empty, completing the default value of the data to realize the fault-tolerant processing of the software; wherein, the rule of completion is: when the data type of the test case is an Int type, the complement value is 0; when the data type of the test case is the Float type, the complement value is 0.0; and when the data type of the test case is the Bool type, the complement value is false.
The method is already put into use in the DCS system periodic test software, and engineering personnel can generate the use cases meeting the requirements through the method and import the use cases into the software. The invention realizes the functions of generating and importing the test cases with high flexibility and capable of ensuring the correctness.
Example 2
As shown in fig. 3, the present embodiment is different from embodiment 1 in that the present embodiment further provides a test case generating and loading system based on a DCS system periodic test, the system supports the test case generating and loading method based on the DCS system periodic test, the system includes a test case generating module, as shown in fig. 4, the test case generating module includes a first obtaining unit, a first selecting interface unit, an input condition unit, and a generating unit;
the first obtaining unit is used for obtaining a request for generating a test case template;
the first selection interface unit is used for outputting a selection interface on a display interface of the DCS according to the request for generating the test case template;
the input condition unit is used for receiving the input conditions of the selection interface by the DCS, wherein the input conditions comprise test types, test purposes, test sites, variables of test initialization setting, variable names, test permission conditions, variable conditions and test case variables;
and the generating unit is used for calling an Excel operation interface by the DCS according to the input conditions to generate test conditions and a test case template table.
As a further implementation, the generating unit performs the following steps:
the DCS calls an Excel operation interface according to the input condition to create an Excel table;
performing corresponding write operation on the Excel table one by one according to a key value pairing principle;
dividing the Excel table into a plurality of sheet partitions according to test requirements and the input conditions to generate test conditions and a test case template table; wherein the content of the first and second substances,
the multiple sheet partitions are used for storing data which are initialized and set before testing, testing recovery data, testing allowable condition data and testing case data.
In a further implementation, the system also comprises a test case compiling module, wherein the test case compiling module is used for compiling the test cases according to the generated test conditions and the test case template table; the method comprises the following steps:
when a user selects a non-editing area, the Excel table cannot be edited;
when a user selects an editable area, the Excel table can be edited;
when a user writes a use case, each item of data needs to be consistent with a preset type.
As a further implementation, the system further includes a test case importing module, as shown in fig. 5, where the test case importing module includes a second obtaining unit, a second importing interface unit, and a reading unit;
the second obtaining unit is used for obtaining a request for importing the test case;
the second import interface unit is used for outputting an import interface on a display interface of the DCS according to the import request of the test case;
the reading unit is used for receiving a file path selected by a user on the import interface by the DCS and reading the file content of the Excel table according to the file path; wherein:
in the process of reading the file content of the Excel table, reading and verifying the file content of the Excel table at the same time, reading the content of each piece of data in a test case and performing data validity verification; if the data verification is illegal, immediately stopping reading the content of the Excel table, and prompting an error of importing a test case; if the data is not verified to be unqualified, storing the data in a memory;
the case that the data verification is illegal is as follows: when the data type is not matched with the preset data type, judging that the data is wrong
The execution process of each unit is executed according to the flow steps of the test case generation and loading method based on the DCS periodic test described in embodiment 1, and details are not repeated in this embodiment.
The excel is used as a medium for storing the test case, the function of generating the test case template is provided in software, the convenience design of firstly selecting variables and then generating the test case template is adopted, and a corresponding template form can be automatically generated according to the selection of a user; when the table is generated, the table modification range is limited in a mode of protecting the working table, so that the correctness of the table format is ensured; after editing the form case, a user can load the test case into software by importing the test case function, and when importing, the content of the form case is verified, so that the format of the case and the correctness of data are ensured.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may 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 stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may 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 which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A test case generation and loading method based on a DCS system periodic test is applied to the DCS system and is characterized by comprising a test case generation process, and specifically comprises the following steps:
acquiring a request for generating a test case template, and outputting a selection interface on a display interface of the DCS according to the request for generating the test case template;
receiving input conditions of a user on the selection interface by the DCS, wherein the input conditions comprise test types, test purposes, test sites, variables set for test initialization, variable names, test allowable conditions, variable conditions and test case variables;
and the DCS calls an Excel operation interface according to the input conditions to generate test conditions and a test case template table.
2. The method for generating and loading test cases based on the periodic test of the DCS system of claim 1, wherein the DCS system calls an Excel operation interface according to the input conditions to generate the test conditions and the test case template table, and specifically comprises:
the DCS calls an Excel operation interface according to the input condition to create an Excel table;
performing corresponding write operation on the Excel table one by one according to a key value pairing principle;
dividing the Excel table into a plurality of sheet partitions according to test requirements and the input conditions to generate test conditions and a test case template table; wherein the content of the first and second substances,
the multiple sheet partitions are used for storing data which are initialized and set before testing, testing recovery data, testing allowable condition data and testing case data.
3. The method of claim 2, wherein the step of generating the test conditions and the test case template table further comprises:
and limiting the editing area of the Excel table by calling an Excel operation interface, so as to realize that the non-editing area is prohibited to write data.
4. The method for generating and loading test cases based on periodic tests of DCS system as claimed in claim 2, wherein the method further comprises a test case authoring process, said test case authoring process is for authoring test cases according to the generated test conditions and the test case template table, and specifically comprises:
when a user selects a non-editing area, the Excel table cannot be edited;
when a user selects an editable area, the Excel table can be edited;
when a user writes a use case, each item of data needs to be consistent with a preset type.
5. The method for generating and loading test cases based on the periodic test of the DCS system of claim 4, wherein the method further comprises a test case importing process, specifically:
acquiring a test case import request, and outputting an import interface on a display interface of the DCS according to the test case import request;
the DCS receives a file path selected by a user for the import interface, and reads the file content of the Excel table according to the file path; wherein:
in the process of reading the file content of the Excel table, reading and verifying the file content of the Excel table at the same time, reading the content of each piece of data in a test case and performing data validity verification; if the data verification is illegal, immediately stopping reading the content of the Excel table, and prompting an error of importing a test case; if the data is not verified to be unqualified, storing the data in a memory;
the case that the data verification is illegal is as follows: and when the data type is not matched with the preset data type, judging that the data is wrong.
6. The method for generating and loading test cases based on the DCS system periodic test according to claim 5, wherein if the data verification is not qualified and the test cases with incomplete formats exist, automatic identification and completion are performed; the method comprises the following steps:
when the data of the test case is empty, completing the default value of the data to realize the fault-tolerant processing of the software; wherein, the rule of completion is: when the data type of the test case is an Int type, the complement value is 0; when the data type of the test case is the Float type, the complement value is 0.0; and when the data type of the test case is Bool type, the complement value is false.
7. The test case generating and loading system based on the DCS periodic test is characterized by supporting the test case generating and loading method based on the DCS periodic test, comprising a test case generating module, wherein the test case generating module comprises a first obtaining unit, a first selection interface unit, an input condition unit and a generating unit;
the first obtaining unit is used for obtaining a request for generating a test case template;
the first selection interface unit is used for outputting a selection interface on a display interface of the DCS according to the request for generating the test case template;
the input condition unit is used for receiving the input conditions of the selection interface by the DCS, wherein the input conditions comprise test types, test purposes, test sites, variables of test initialization setting, variable names, test permission conditions, variable conditions and test case variables;
and the generating unit is used for calling an Excel operation interface by the DCS according to the input conditions to generate test conditions and a test case template table.
8. The system of claim 7, wherein the generation unit performs the following steps:
the DCS calls an Excel operation interface according to the input condition to create an Excel table;
performing corresponding write operation on the Excel table one by one according to a key value pairing principle;
dividing the Excel table into a plurality of sheet partitions according to test requirements and the input conditions to generate test conditions and a test case template table; wherein the content of the first and second substances,
the multiple sheet partitions are used for storing data which are initialized and set before testing, testing recovery data, testing allowable condition data and testing case data.
9. The DCS system periodic test-based test case generation and loading system of claim 8, further comprising a test case authoring module for authoring a test case based on the generated test conditions and the test case template table; the method comprises the following steps:
when a user selects a non-editing area, the Excel table cannot be edited;
when a user selects an editable area, the Excel table can be edited;
when a user writes a use case, each item of data needs to be consistent with a preset type.
10. The system for generating and loading test cases based on the periodic test of the DCS system of claim 9, further comprising a test case import module, wherein the test case import module comprises a second acquisition unit, a second import interface unit, and a reading unit;
the second obtaining unit is used for obtaining a request for importing the test case;
the second import interface unit is used for outputting an import interface on a display interface of the DCS according to the import request of the test case;
the reading unit is used for receiving a file path selected by a user on the import interface by the DCS and reading the file content of the Excel table according to the file path; wherein:
in the process of reading the file content of the Excel table, reading and verifying the file content of the Excel table at the same time, reading the content of each piece of data in a test case and performing data validity verification; if the data verification is illegal, immediately stopping reading the content of the Excel table, and prompting an error of importing a test case; if the data is not verified to be unqualified, storing the data in a memory;
the case that the data verification is illegal is as follows: and when the data type is not matched with the preset data type, judging that the data is wrong.
CN202210736090.5A 2022-06-27 2022-06-27 Test case generation and loading method and system based on DCS system periodic test Pending CN115047836A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210736090.5A CN115047836A (en) 2022-06-27 2022-06-27 Test case generation and loading method and system based on DCS system periodic test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210736090.5A CN115047836A (en) 2022-06-27 2022-06-27 Test case generation and loading method and system based on DCS system periodic test

Publications (1)

Publication Number Publication Date
CN115047836A true CN115047836A (en) 2022-09-13

Family

ID=83163425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210736090.5A Pending CN115047836A (en) 2022-06-27 2022-06-27 Test case generation and loading method and system based on DCS system periodic test

Country Status (1)

Country Link
CN (1) CN115047836A (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102338854A (en) * 2010-07-27 2012-02-01 迈普通信技术股份有限公司 Circuit board test case generation system and method thereof
CN108345288A (en) * 2017-01-23 2018-07-31 长城汽车股份有限公司 Automatic generation method, system and the vehicle of CAN signal interface software
CN108984388A (en) * 2018-06-01 2018-12-11 平安壹钱包电子商务有限公司 A kind of method and terminal device generating automatic test cases
CN109002391A (en) * 2018-06-28 2018-12-14 西南电子技术研究所(中国电子科技集团公司第十研究所) The method of automatic detection embedded software interface testing data
CN109491917A (en) * 2018-11-13 2019-03-19 北京车和家信息技术有限公司 A kind of test case processing method and its device
CN110147402A (en) * 2019-05-22 2019-08-20 北大方正集团有限公司 Excel file introduction method and equipment, deriving method and equipment
CN111459814A (en) * 2020-03-30 2020-07-28 上海依图网络科技有限公司 Automatic test case generation method and device and electronic equipment
CN111459812A (en) * 2020-03-30 2020-07-28 招商局金融科技有限公司 Interface test case generation method, electronic device and storage medium
CN112199302A (en) * 2020-12-07 2021-01-08 望海康信(北京)科技股份公司 Test data generation method and system, corresponding equipment and storage medium
CN112256558A (en) * 2020-09-17 2021-01-22 苏宁云计算有限公司 Test case generation method and device, computer equipment and storage medium
CN112367220A (en) * 2020-10-27 2021-02-12 深圳市优必选科技股份有限公司 Interface testing method and device, storage medium and electronic equipment
CN112527630A (en) * 2020-11-18 2021-03-19 平安消费金融有限公司 Test case generation method and device, computer equipment and storage medium
CN113642308A (en) * 2021-08-30 2021-11-12 重庆允成互联网科技有限公司 Data import method, system, equipment and storage medium based on data variability
CN113704095A (en) * 2021-08-08 2021-11-26 中国航空工业集团公司沈阳飞机设计研究所 Automatic generation method and device for automatic interface test case
CN113868210A (en) * 2021-09-09 2021-12-31 重庆锐云科技有限公司 Validity verification method, system, equipment and storage medium for imported data
CN114443468A (en) * 2021-12-21 2022-05-06 上海金仕达软件科技有限公司 Excel table-based test comparison method and system

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102338854A (en) * 2010-07-27 2012-02-01 迈普通信技术股份有限公司 Circuit board test case generation system and method thereof
CN108345288A (en) * 2017-01-23 2018-07-31 长城汽车股份有限公司 Automatic generation method, system and the vehicle of CAN signal interface software
CN108984388A (en) * 2018-06-01 2018-12-11 平安壹钱包电子商务有限公司 A kind of method and terminal device generating automatic test cases
CN109002391A (en) * 2018-06-28 2018-12-14 西南电子技术研究所(中国电子科技集团公司第十研究所) The method of automatic detection embedded software interface testing data
CN109491917A (en) * 2018-11-13 2019-03-19 北京车和家信息技术有限公司 A kind of test case processing method and its device
CN110147402A (en) * 2019-05-22 2019-08-20 北大方正集团有限公司 Excel file introduction method and equipment, deriving method and equipment
CN111459814A (en) * 2020-03-30 2020-07-28 上海依图网络科技有限公司 Automatic test case generation method and device and electronic equipment
CN111459812A (en) * 2020-03-30 2020-07-28 招商局金融科技有限公司 Interface test case generation method, electronic device and storage medium
CN112256558A (en) * 2020-09-17 2021-01-22 苏宁云计算有限公司 Test case generation method and device, computer equipment and storage medium
CN112367220A (en) * 2020-10-27 2021-02-12 深圳市优必选科技股份有限公司 Interface testing method and device, storage medium and electronic equipment
CN112527630A (en) * 2020-11-18 2021-03-19 平安消费金融有限公司 Test case generation method and device, computer equipment and storage medium
CN112199302A (en) * 2020-12-07 2021-01-08 望海康信(北京)科技股份公司 Test data generation method and system, corresponding equipment and storage medium
CN113704095A (en) * 2021-08-08 2021-11-26 中国航空工业集团公司沈阳飞机设计研究所 Automatic generation method and device for automatic interface test case
CN113642308A (en) * 2021-08-30 2021-11-12 重庆允成互联网科技有限公司 Data import method, system, equipment and storage medium based on data variability
CN113868210A (en) * 2021-09-09 2021-12-31 重庆锐云科技有限公司 Validity verification method, system, equipment and storage medium for imported data
CN114443468A (en) * 2021-12-21 2022-05-06 上海金仕达软件科技有限公司 Excel table-based test comparison method and system

Similar Documents

Publication Publication Date Title
CN112306855B (en) Interface automation test method, device, terminal and storage medium
CN109815680B (en) Application authority management method and device, terminal equipment and storage medium
CN111209206B (en) Automatic test method and system for software products
CN107832059A (en) A kind of code Static Analysis Method and device based on Makefile
CN109871312B (en) Interface testing method, device, equipment and readable storage medium
CN109933521A (en) Automated testing method, device, computer equipment and storage medium based on BDD
CN111324591B (en) Block chain bifurcation detection method and related device
CN103365772B (en) Software test automatic evaluation device and method
CN113535141A (en) Database operation code generation method and device
CN112667521B (en) Thermal restoration method and device
CN115047836A (en) Test case generation and loading method and system based on DCS system periodic test
CN111625225A (en) Program specified data output method and device
CN115470141A (en) Fault simulation method, device and related equipment
CN112463042B (en) Data volume import data verification method, device, terminal and storage medium
CN115987821A (en) Gateway routing test method and device
CN114218032A (en) Hardware design verification method and device, electronic equipment and storage medium
CN113515452A (en) Automatic test method and system for application, electronic equipment and storage medium
CN112860585A (en) Test script assertion generation method and device
CN111859833A (en) Configurable system level verification environment construction method, system and medium
CN111625586A (en) Method and system for importing general service data
CN109446091B (en) Business entity object testing method and device
CN114138588B (en) Method, system, equipment and medium for deriving debug information of controller
CN116932412B (en) Sharing platform and method capable of generating test excitation files with different formats
CN114564230B (en) One-key uploading realization method and device of hong Monte-go system, electronic equipment and medium
CN111625463B (en) Program state detection method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination