Method, system, and device for editing excel (r) test case

By enabling the editing and execution of test scripts in Excel files, the method addresses the inefficiencies in modifying test logic and parameters in traditional test systems, enhancing development efficiency and reducing dependency on programming skills.

JP2025061454AActive Publication Date: 2025-04-10SHANGHAI TOSUN TECH LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2025007098
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-11-29
Filing Date
2025-01-17
Publication Date
2025-04-10
Estimated Expiration
2042-09-05

AI Technical Summary

Technical Problem

Existing test systems require specialized engineers to modify test scripts, leading to inefficient modification of test logic and test parameters.

Method used

A method and system for testing by loading Excel files, where Excel test cases are edited and executed, allowing testers to modify test scripts directly in Excel without needing to understand programming languages.

Benefits of technology

This approach decouples test system development from test script development, improving efficiency and reducing the complexity of modifying test scripts, while also reducing the dependence on programming proficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025061454000001_ABST
    Figure 2025061454000001_ABST
Patent Text Reader

Abstract

To provide a method of automatically reading / writing an automobile calibration signal.SOLUTION: A method includes: using a test case viewing and editing device to create an Excel file; loading the Excel file; displaying detailed information of the test case; and editing the test case. When an Excel program is started, the Excel file created by using the test case viewing and editing device is opened. Each sheet of the Excel file is a test case, and each test case includes at least one of a test step, a name, a description, an execution action, an operation content, a parameter, and an annotation.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the technical field of automobile test systems, and more particularly to a test method, system and device by loading an Excel file. [Background technology]

[0002] A typical test system is divided into two components: the operating environment of the test system and the test script, among which the tester can edit the test script according to the test requirements. A typical test script is implemented in a specific programming language such as C, C#, Python, VB Script, etc.

[0003] In the test script, the tester can define the test logic and test parameters. These two are created based on the test requirements. If there is a need to change them, the test system developer generally needs to be involved and they will be dealt with by editing and compiling the test script. Therefore, editing the test script involves modifying the program code written as the script, which shows that the development of the test system and the development of the program are closely linked. In addition, the modification of the script depends on the professional engineers, which causes the problem that the efficiency of modifying the test logic and test parameters is low. In order to solve the above technical problems, it is necessary to design a new testing method, system and device by loading Excel files. Summary of the Invention

[0004] An object of the present invention is to provide a method, system and device for testing by loading an Excel file.

[0005] In order to solve the above technical problems, the present invention provides a testing method by loading an Excel file, which includes: Editing Excel test cases, and Test against the above Excel test cases.

[0006] In addition, the methods for editing the above Excel test case include: A test case viewing and editing device creates an Excel file, loads the Excel file, displays detailed information of the test case to a tester, and edits the test case. When the Excel program is launched, the Excel file created by the test case viewing and editing device is opened, and each sheet of the Excel file is one of the test cases, and each of the test cases includes test steps, names, descriptions, execution operations, operation contents, parameters and annotations.

[0007] Furthermore, the Excel test step column in the Excel file defines information for identifying steps of the test case in the order of steps. The Excel Name column in the Excel file defines the display name of the step. An Excel description column in the Excel file defines the description of the step, which is displayed in the test case viewing and editing device. The Excel Execute Actions column in the Excel file defines the specific actions that the test system will perform in that step. The Excel operation content column in the Excel file defines the content of the operation that the step performs. The Excel parameters column in the Excel file defines the parameter information required to execute the steps. The Excel Annotation column in the Excel file defines the annotation information for the step.

[0008] In addition, the testing methods based on the above Excel test case include: The Excel test case is executed by the actuator of the test case, and in the process of executing the Excel test case, a test result is written into an Excel result file to generate a test report. During the operation process, the actuator of the above test cases (1) loads and displays the content of the Excel file, (2) executes the test cases one by one, and (3) displays the test results and generates the above test report. After the test of the Excel test case is completed, the Excel program is launched to display the test report. The test report file includes a number of sheets, each of which corresponds to a report of one of the test cases. Each of the reports includes the test result, the test step, the name, the description, the performed action, the operation content, the parameters, and the annotations.

[0009] Additionally, the Test Result column in the report includes a verdict for the current test step, which may include OK, NOK, or COK. The Excel Test Step column in the report defines information identifying the step of the current test case in step order. The Excel Name column in the report defines the display name of the step. In the report, the Excel Description column defines the description of the step that is displayed in the test case viewing and editing tool. In the report, the Excel Perform Action column defines the specific action that the test system performs at that step. In the report, the Excel operation content column defines the content of the operation that the step performs. In the report, the Excel parameters column defines the parameter information required to perform the step. In the report, the Excel Annotation column defines the annotation information for the step.

[0010] Furthermore, the execution classification of the test case includes an execution operation classification, an operation content classification, and a parameter classification. The execution operation categories include: defining the test step, defining a test variable, calling a function and returning an error code, checking the previous error code, and checking a variable range and returning an error code. The contents in the operation content classification and the parameter classification correspond one-to-one to the items in the execution action classification.

[0011] Furthermore, the definition of the test step is expressed as a single character string, and when the character string is read, if the content is the same as the preset character string of the step, the row corresponding to the step is determined to be the definition of the test step, and at this time the content of the three columns "test step column", "name column", and "explanation column" becomes valid. If the content is different from the preset character string, the content of the three columns "test step column", "name column", and "explanation column" becomes invalid and is treated as if they were blank. The operation contents corresponding to the actions defining the above test steps include a general step and a test end step. The general steps are the conventional test steps. If the test process is terminated early due to an error or other reasons, all the general steps are skipped and the test termination step is directly executed, which is the last of all the test steps. If the above parameter does not exist corresponding to the action that defines the above test step, it is treated as if it were blank. The operation of defining the test variable is a string. When the string is read, if its content is the same as a preset variable string, it is determined that the line corresponding to the string is a variable definition, and a new variable is obtained based on other information of the line. The operation content corresponding to the operation of defining the test variable is a variable name, and an arbitrary character string that identifies the characteristics of the operation content is input and used as the defined variable name. The parameter corresponding to the action of defining the test variable is a string containing two fields: the variable type and the initial value, separated by the character "|". The function call and the error code return operation are a string, and when the string is read, if its content is the same as a predefined function string, the test system recognizes the line corresponding to the string as a function call, and the test system searches for the corresponding function based on the function name and calls the function based on the parameters defined in the line. The operation content corresponding to the function call and the error code return is the function name. The parameter corresponding to the function call and error code return operation is a string containing zero or more of the fields, each of which corresponds to a parameter value, and separated from each other by the character "|". The previous error code check operation is a string. When the string is read, if the read content is the same as the preset check string, the line corresponding to the string is identified as the error code detection operation. After an error is detected, according to the definition of the operation content of the line, select whether to write error information into a specific variable or to stop the test process. The operations corresponding to the previous error code checking operation include setting a variable and aborting the test. The set variable indicates that after the test encounters an error, the error information is written to the corresponding variable and the test continues.The abort test indicates that after the test encounters an error, the test is immediately terminated and goes to the test termination step to continue. The parameter corresponding to the previous error code check operation is only valid if the operation is to set a variable, and indicates the variable name that needs to be written in. If the operation is to abort a test, this parameter cell is treated as blank. The above variable range checking and the above error code returning operation are a string, when the string is read, if the read content is the same as a preset variable string, the row corresponding to the string is identified as a test judgment of a detection variable, and the upper and lower detection limits and the corresponding variable are defined in other columns of the row. The operation content corresponding to the variable range checking and the error code returning is the detected variable name. The parameter corresponding to the variable range checking and error code returning operations is a string including two of the above fields, each of which corresponds to a low threshold and a high threshold, each of which corresponds to a parameter value, and each of the fields is separated by the character "|".

[0012] In a second aspect, the present invention further provides a testing system by loading an Excel file, comprising: an editing module for editing Excel test cases; and A test module that performs testing against Excel test cases.

[0013] In a third aspect, the present invention further provides a testing device by loading an Excel file, comprising: An Excel test case editing module, an Excel test case execution module, and an Excel test case execution behavior classification module. The above-mentioned Excel test case editing module is suitable for editing the above-mentioned Excel test case. The above-mentioned Excel test case execution behavior classification module is suitable for defining the test operations executed by the Excel test case execution module. The Excel test case execution module is suitable for performing testing on the Excel test case according to the defined test operation.

[0014] The beneficial effects of the present invention are as follows: The present invention realizes that a test script is implemented by an Excel file by editing an Excel test case and executing a test based on the Excel test case. To modify a test script, one only needs to modify the Excel file. This avoids frequent program modification when modifying a script, and improves the parameter controllability of the test system.

[0015] Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention. The objectives and other advantages of the invention will be realized and obtained by the structure particularly pointed out in the specification and drawings. In order to make the above-mentioned objectives, features and advantages of the present invention more clearly comprehensible, preferred embodiments are specified below and described in detail in conjunction with the drawings. [Brief description of the drawings]

[0016] In order to more clearly describe the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings that need to be used in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without creative efforts. [Figure 1] 1 is a flowchart of a testing method by loading an Excel file according to the present invention. [Diagram 2] FIG. 2 is a schematic diagram of the editing principle of Excel test cases according to the present invention; [Diagram 3] FIG. 2 is a schematic diagram of the working principle of the Excel test case of the present invention; [Figure 4] FIG. 2 is a schematic diagram of the execution behavior classification of the Excel test case of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0017] In order to make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions of the present invention with reference to the drawings. Obviously, the described embodiments are only a part of the embodiments included in the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without any creative effort are all included in the protection scope of the present invention.

[0018] As shown in FIG. 1, this embodiment provides a test method by loading an Excel file, including editing an Excel test case and performing a test on the Excel test case. The technical problem of low readability and editability of the conventional test program is solved, and the test script is realized by an Excel file. When modifying a test script, only the Excel file needs to be modified, so that frequent modification of the program during the process of modifying the script can be avoided, and the parameter controllability of the test system can be improved. The cumbersome script development and modification work in the conventional test system is generalized to the reference and editing work of an Excel file, and the tester can create and modify the test script on Excel. Therefore, the tester does not need to understand a specific programming language, which can decouple the development of the test system and the development of the test script, improve the development efficiency of the test script, and reduce the difficulty of developing the test script. The test system of the present invention can reduce the dependency on the programming level of the tester.

[0019] As shown in FIG. 2, in this embodiment, the method for editing the Excel test cases includes: (1) creating an Excel file by a test case viewing and editing device; (2) loading the Excel file, displaying detailed information of the test case to the tester, and editing the test case. The Excel program is used by the tester to edit the test case; (3) opening the Excel file created by the test case viewing and editing device when the Excel program is started, and each sheet in the Excel file is a test case. Each test case includes test steps, names, descriptions, execution actions, operation contents, parameters, and annotations.

[0020] In this embodiment, the Excel test step column in the Excel file defines information for identifying the steps of the test case in the order of steps, such as "1", "2", "1.1", "1.2", etc. The Excel name column in the Excel file defines the display name of the step, such as "Test Step 1", "Power Up", etc. The Excel description column in the Excel file defines the description of the step, which is displayed on the test case viewing and editing device. The Excel execution action column in the Excel file defines the specific action performed by the test system in the step, and the specific content of this action is shown in FIG. 4. The Excel operation content column in the Excel file defines the content of the operation performed by the step, and the specific content of this information is shown in FIG. 4. The Excel parameter column in the Excel file defines the parameter information required to execute the step, and the specific content of this information is shown in FIG. 4. The Excel annotation column in the Excel file defines the annotation information of the current step.

[0021] As shown in FIG. 3, in this embodiment, the method for performing a test based on the Excel test case includes: executing the Excel test case through the actuator of the test case, and writing the test result into an Excel result file during the execution of the Excel test case to generate a test report. After the test is completed, the user can open the Excel program to view the test report. During the operation process of the actuator of the test case, the following process is performed: (1) load and display the content of the Excel file, (2) execute the test cases one by one, (3) display the test result, and generate a test report. After the test of the Excel test case is completed, the Excel program is launched and then the test report is displayed. The test report file includes multiple sheets, and each sheet corresponds to a report of one test case. Each report includes: test result, test step, name, description, execution operation, operation content, parameters, and remarks.

[0022] In this embodiment, the Test Result column in the report includes a judgment for the current test step, and the judgment contents include OK, NOK, COK, etc. The Excel Test Step column in the report defines information for identifying the current step of the test case in the order of steps, such as "1", "2", "1.1", "1.2", etc. The Excel Name column in the report defines the display name of the step, such as "Test Step 1", "Power Up", etc. The Excel Description column in the report defines the description of the current step, and the description is displayed on the test case viewing and editing device. The Excel Execution Action column in the report defines a specific action performed by the test system in the step, and the specific content of this action is shown in FIG. 4. The Excel Operation Content column in the report defines the content of the operation performed by the step, and the specific content of this action is shown in FIG. 4. The Excel Parameter column in the report defines the information of the parameters required to execute the step, and the specific content of this information is shown in FIG. 4. The Excel Annotation column in the report defines the annotation information of the step.

[0023] 4, in this embodiment, the execution classification of a test case includes an execution behavior classification, an operation content classification, and a parameter classification. The execution behavior classification includes: defining a test step, defining a test variable, calling a function and returning an error code, checking the previous error code, checking the variable range, and returning an error code. The contents of the operation content classification and parameter classification correspond one-to-one to the items in the execution behavior classification.

[0024] In this embodiment, the test step definition is expressed as a string, including but not limited to the string "define_test_step". When the test system reads the cell in which the string is stored, if the read content is the same as the preset step string "define_test_step", it is determined that this row is a test step definition, and the contents of the three columns "test step column", "name column", and "description column" become valid. If the content of this cell is different from the string, the contents of the three columns "test step column", "name column", and "description column" are invalid and are treated as if they were blank.

[0025] The operation contents corresponding to the above test step definition actions include, but are not limited to, two types: normal step (normal_step) and test teardown step (test_tear_down). A normal step is a conventional test step. When the test process is terminated early due to an error or other reasons, all normal steps are skipped and the test teardown step is executed directly, and the test teardown step is at the end of all test steps. If there is no parameter corresponding to the above test step definition action, it is treated as blank.

[0026] The above operation for defining a test variable is a string, including but not limited to the string "define_variable". When the test system reads the cell in which the string is stored, if the read content is the same as the preset variable string "define_variable", it determines that this line defines a variable, and the test system obtains a new variable based on other information of the line.

[0027] The operation content corresponding to the action of defining the above test variable is the variable name, and here, any character string that identifies the characterization of the operation content can be input and used as the defined variable name.

[0028] The parameter for the above action to define a test variable is a string containing two fields: the variable type and the initial value. The fields are separated by the character "|". For example, for a variable of type double with an initial value of 3.5, the parameter here would be "double|3.5".

[0029] The above function call and error code return operation is a string, including but not limited to the string "call_function". When the test system reads the cell in which the string is stored, if the read content is the same as the predefined function string "call_function", the test system knows that the row corresponding to the string is a test system function call, and the test system searches for the corresponding function based on the function name and calls the function based on the parameters defined in the row.

[0030] The operation content corresponding to the above function call and error code return operation is the function name, where the name of a function already existing in the test system can be input.

[0031] The parameters for the above function calls and error code return operations are a string containing zero or more fields, each corresponding to a parameter value, and separated by the character "|". For example, if a function has two double type parameters (3.5 and 5.6), the parameters here are "3.5|5.6".

[0032] The operation of checking the last error code is a string, including but not limited to the string "check_last_error". When the test system reads the cell storing the string, if its content is the same as the preset checking string "check_last_error", it knows that the row corresponding to the string is an error code detection operation. After an error is detected, it selects whether to write the error information to a specific variable or to abort the test process according to the definition of the operation content of the row.

[0033] There are two types of operations corresponding to the previous error code check operation mentioned above, including but not limited to (1) setting a variable (set_variable) and (2) aborting the test (exit_on_fail). Setting a variable indicates that after the test encounters an error, the error information will be written to the corresponding variable and the test will continue. Aborting the test indicates that after the test encounters an error, the test will immediately end and proceed to the test termination step (test_tear_down) to continue.

[0034] The parameter corresponding to the previous error code check operation described above is valid only when the operation content is to set a variable, and indicates the name of the variable that needs to be written. If the operation content is to abort the test, the cell for this parameter is treated as blank.

[0035] The above variable range checking and error code return operation is a string, including but not limited to the string "check_var_range". When the test system reads the cell storing the string, if its content is the same as the predefined variable string "check_var_range", it knows that the row corresponding to the string is a test judgment of a detection variable, and the upper and lower detection limits and the corresponding variable are defined in other columns of the row.

[0036] The operation content corresponding to the above variable range checking and error code return operation is the detected variable name.

[0037] The parameter corresponding to the above variable range checking and error code return operation is a string containing two fields, the two fields respectively corresponding to a low threshold and a high threshold, the threshold and the high threshold respectively corresponding to a parameter value, and the fields are separated by the character "|". For example, if the judgment variable needs to be between 3.5 and 5.6, the parameter here is "3.5|5.6". If the judgment variable needs to be equal to 3.5, the parameter here is "3.5|3.5". This divides the task of building a test system into two, allowing professional developers to focus on designing the test system architecture and API, while allowing testers to focus on setting test scripts and parameters. As a result, these two tasks can be performed simultaneously, which simplifies the design of the test system, improves the development efficiency of the test system, and reduces the development difficulty of the test system.

[0038] This embodiment provides a message sending test case and system by loading an Excel file, where the Excel file includes a test step column, a name column, a description column, an execution action column, an operation content column, a parameter column, and an annotation column. The message sending test case and system includes an Excel file, a test case viewing and editing device that loads the Excel file, and a test case actuator that executes the Excel file.

[0039] As shown in Table 1, the Excel file contains one test case, and the purpose of the test is to connect to the bus tool, send one frame of a CAN message to the system under test, determine whether the message transmission is successful, and finally disconnect the bus tool. As shown in Table 1, the execution action of the first line is "define_test_step", which defines a test step. The step number of this line is 1. The step name is "Connect". The description is "Connect hardware", which connects the bus tool. The operation content is "normal_step", which indicates that this step is a normal step. As shown in Table 1, the execution action in the second line is "define_variable", that is, a variable is defined. The operation content is the variable name "vTransmitResult". The parameters are the variable type and the initial value "double|0", that is, the type is double and the initial value is 0. As shown in Table 1, the execution action of the third line is "call_function", that is, call the system function. The operation content is the function name "app.connect", that is, connect the bus tool. This function does not require parameters, so the parameter is blank, and if the execution of this function is successful, it returns 1, otherwise it returns 0. As shown in Table 1, the execution action in the fourth line is "check_last_error", which means that it detects the last error. The operation content is "exit_on_fail", which means that if the last operation fails, it immediately stops the test. This action does not require any parameters because the operation content is "exit_on_fail". As shown in Table 1, the execution action of the 5th line is "define_test_step", that is, a test step is defined, and the step number of this line is 2. The step name is "Transmit". The description is "Msg.Transmit", that is, a message is sent. The operation content is "normal_step", which means that this step is a normal step. As shown in Table 1, the execution action in line 6 is "call_function", i.e. calling a system function. The operation is the function name "com.transmit_can", i.e. sending a CAN message. This function requires one parameter, i.e. a CAN message pointer, so the required message MSG1 is given in the parameter column. As shown in Table 1, the execution action of line 7 is "check_last_error", i.e., the last error is detected. The action is "set_variable", i.e., if an error is detected, the error information is written to a variable. The parameter is "vTransmitResult", i.e., the name of the variable that needs to be written. As shown in Table 1, the execution action of line 8 is "check_var_range", that is, to check whether the variable is within the range. The operation content is "vTransmitResult", that is, the variable name to be checked is "vTransmitResult". The parameter is "1|1", that is, to check whether this variable is 1. As shown in Table 1, the execution action of line 9 is "define_test_step", which defines a test step, and the step number of this line is 3. The step name is "Disconnect". The step description is "Disconnect Hardware", which disconnects the bus tool. The operation content is "test_tear_down", which indicates that this is a test termination step, and if the test is stopped while the previous step is running, this step will be executed unconditionally. This step does not require any parameters. As shown in Table 1, the execution action of line 10 is "call_function", which means calling a system function. The operation content is the function name "app.disconnect", which means disconnecting the bus tool. This function does not require any parameters. After loading this file, the test case viewing and editing device provides users with the function of viewing the test script, as shown in Table 1. After loading this file, the test case actuator executes the test line by line from top to bottom according to the contents defined in the Excel file. As shown in Table 1, if the tester needs to modify the content of the outgoing message, he only needs to open the Excel file and modify the content of the cell where MSG1 is located. If the tester needs to add a new outgoing message, he only needs to open the Excel file, add a new line in step 2, and edit this line according to the execution behavior of "call_function". Table 1: Execution Action Classification Table JPEG2025061454000002.jpg66170

[0040] This embodiment further provides a testing system by loading an Excel file, which includes an editing module and a testing module, the editing module edits the Excel test cases, and the testing module performs testing on the Excel test cases. In this embodiment, the test system by loading Excel files further includes an Excel test case editing method, an Excel test case execution method, and an Excel test case execution classification. The Excel test case editing method is composed of two parts, a test case viewing and editing device, and an Excel program. The Excel test case execution method is composed of two parts, a test case actuator, and an Excel program. The above test case execution classification is composed of three parts, an execution action classification, an operation content classification, and a parameter classification. In this embodiment, the specific process of each module and each method has been described in detail in the above test method by loading an Excel file.

[0041] This embodiment further provides a test device that loads an Excel file, and includes an Excel test case editing module, an Excel test case execution module, and an Excel test case execution behavior classification module. The Excel test case editing module is suitable for editing Excel test cases. The Excel test case execution operation classification module is suitable for defining test operations to be executed by the Excel test case execution module. The Excel test case execution module is suitable for testing the Excel test cases according to the defined test operations.

[0042] In this embodiment, the testing device by loading Excel files is suitable for testing Excel test cases using the above-mentioned testing method by loading Excel files.

[0043] In summary, the present invention achieves the realization of a test script by an Excel file through editing an Excel test case and testing the Excel test case. When modifying a test script, only the Excel file needs to be modified. This avoids frequent program modifications during the process of modifying the script, and improves the parameter controllability of the test system.

[0044] In some embodiments provided by the present application, the disclosed apparatus and method may of course be realized in other manners. The above-described apparatus embodiments are merely illustrative, and for example, the flowcharts and block diagrams in the drawings illustrate the architecture, functions, and operations that may be realized in the apparatus, method, and computer program product according to several embodiments of the present invention. In this regard, each block in the flowchart or block diagram is realized as a module, program segment, or part of code that includes one or more executable instructions for performing a certain logical function. It should be noted that in some alternative implementations, the functions shown in the blocks may be executed in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and may sometimes be executed in a reverse order depending on the functions involved. It should also be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts may be implemented in a dedicated hardware-based system that executes a certain function or operation, or may be implemented in a combination of dedicated hardware and computer instructions.

[0045] In addition, each functional module in each embodiment of the present invention may be integrated together to form a single independent part, each module may exist independently, or two or more modules may be integrated together to form a single independent part. The above functions can be realized in the form of software functional modules and stored in a computer readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention or a part contributing to the prior art can be provided in the form of a software product. The computer software product is stored in a storage medium and includes a number of commands, which causes a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to each embodiment of the present invention. The aforementioned storage medium includes: U disk, removable disk, read-only memory (ROM), random access memory (RAM), magnetic disk, optical disk, and other media capable of storing various program codes.

[0046] Based on the above-mentioned preferred embodiment of the present invention, and from the above-mentioned description, a person skilled in the art may make various changes and modifications without departing from the technical spirit of the present invention. The technical scope of the present invention is not limited to the contents of the specification, but should be determined based on the claims.

Claims

1. 1. A method for editing Excel test cases executed by a computing device, comprising: Creating an Excel file by a test case viewing and editing device, loading the Excel file, displaying detailed information of the test case, and editing the test case; When an Excel program is started, the Excel file created by the test case viewing and editing device is opened, and each sheet of the Excel file is one of the test cases, and each of the test cases includes one or more of the following: a test step, a name, a description, an execution operation, an operation content, a parameter, and an annotation; an Excel test step sequence in the Excel file defines information for identifying steps of the test case in a step order; an Excel name column in the Excel file defines a display name of the step; an Excel description column in the Excel file defining a description of the step that is displayed on the test case viewing and editing device; an Excel execution action sequence in the Excel file defining a particular action that the test system will perform at the step; an Excel operation content column in the Excel file defines the content of the operation to be performed in the step; an Excel parameter column in the Excel file defines parameter information required to execute the step; A method for editing an Excel test case, wherein an Excel annotation column in the Excel file defines annotation information for the step.

2. How to test based on Excel test cases: executing the Excel test case by the test case execution device; and writing a test result into an Excel result file in the process of executing the Excel test case to generate a test report; The test case execution device, in the course of operation, (1) Load and display the contents of the Excel file. (2) Run the test cases one by one, (3) Display the test results and generate a test report. After the test of the Excel test case is completed, display the test report after an Excel program is launched, and a test report file includes a plurality of the sheets, each of the sheets corresponding to a report of one of the test cases; 2. The method for editing Excel test cases according to claim 1, wherein each of the test reports includes one or more of the following: test result, test step, name, description, execution action, operation content, parameter, and annotation.

3. The test result column in the test report includes a judgment for the current test step, and the judgment content includes one or more of OK, NOK, and COK; The Excel test step column in the test report defines information for identifying a step of a current test case in a step order; an Excel name column in the test report defines a display name of the step; an Excel description column in the test report defining a description of the step that is displayed on a test case viewing and editing device; an Excel execution action column in the test report defining a particular action that the test system performs at the step; The Excel operation content column in the test report defines the content of the operation performed in the step; an Excel parameter column in the test report defining parameter information required to execute the step; 3. The method of editing an Excel test case of claim 2, wherein an Excel annotation column in the test report defines annotation information for the step.

4. The execution classification of the test case includes one or more of an execution operation classification, an operation content classification, and a parameter classification; The execution operation classification includes one or more of the following: definition of the test step, definition of a test variable, calling a function and returning an error code, checking the previous error code, checking a variable range and returning the error code; 4. The method for editing Excel test cases according to claim 3, wherein the contents in the operation content classification and the parameter classification correspond one-to-one to the items in the execution action classification.

5. The definition of the test step is expressed by one character string, and when the character string is read, if the content is the same as the preset character string of the step, the row corresponding to the character string is determined to be the definition of the test step, and at this time, the contents of the "test step column", "name column", and "explanation column" are valid, and if the content is different from the preset character string, the contents of the "test step column", "name column", and "explanation column" are invalid and treated as blanks, The operation content corresponding to the operation defining the test step includes a general step and a test end step; The general steps are conventional test steps, and if the test process is terminated early due to an error or other reasons, all the general steps are skipped and the test termination step is directly executed, and the test termination step is at the end of all the test steps; 5. The method of claim 4, wherein if a parameter does not exist that corresponds to an action that defines a test step, it is treated as blank.

6. The operation of defining the test variable is represented by a string, and when the string is read, if its content is the same as a preset variable string, the line corresponding to the string is determined to be a variable definition, and a new variable is applied according to other information of the line; The operation content corresponding to the operation of defining the test variable is a variable name, and an arbitrary identifier character string is input as the defined variable name, 5. The method of claim 4, wherein a parameter corresponding to an operation of defining a test variable is a string including two fields, a variable type and an initial value, the two fields being separated by the character "|".

7. The function call and the error code return operation are expressed by a string, and when the string is read, if the content is the same as a preset function string, the line corresponding to the string is determined to be a function call of a test system, and the test system searches for a corresponding function based on the function name and calls the function based on parameters defined in the line; The operation content corresponding to the function call and the error code return operation is a function name; 5. The method of claim 4, wherein the parameters corresponding to the function invocation and error code return operations are strings containing zero or more fields, each of which corresponds to a parameter value, and the fields are separated by the character "|".

8. The previous error code checking operation is represented by a string, and when the string is read, if the read content is the same as the preset checking string, the line corresponding to the string is determined to be an error code detection operation; after an error is detected, the operation content of the line is defined to select whether to write error information into a specific variable or to terminate the test process; The operation contents corresponding to the previous error code checking operation include setting a variable and stopping the test; setting the variable indicates that after the test encounters an error, the error information is written to a corresponding variable and the test continues; Aborting the test indicates immediately terminating the test after the test encounters an error and transitioning to the test termination step; 5. The method for editing an Excel test case according to claim 4, wherein the parameter corresponding to the previous error code inspection operation is valid only when the operation content is setting the variable, indicates the variable name that needs to be written, and when the operation content is aborting the test, the cell storing the parameter is treated as blank.

9. The variable range checking and the error code returning operation are represented by a string, and when the string is read, if the read content is the same as a preset variable string, the row corresponding to the string is identified as a test judgment of a detection variable, and the upper and lower detection limits and the corresponding variables are defined in other columns of the row; The operation content corresponding to the variable range check and the error code return operation is a detected variable name; 5. The method for editing an Excel test case according to claim 4, wherein the parameter corresponding to the variable range checking and the error code returning operation is a string including two fields, the two fields corresponding to low and high thresholds respectively, each threshold corresponding to one parameter value, and the two fields separated by a "|" character.

10. A system for testing by loading an Excel file, an editing module for editing Excel test cases; a test module for performing tests on Excel test cases, The method for editing the Excel test case is as follows: Creating an Excel file by a test case viewing and editing device, loading the Excel file, displaying detailed information of the test case, and editing the test case; When starting an Excel program, an Excel file created by the test case viewing and editing device is opened, each sheet of the Excel file is one test case, and each test case includes at least one and up to six of the following contents, including at least a test step: a test step, a name, a description, an execution operation, an operation content, a parameter, and a comment; an Excel test step sequence in the Excel file defines information for identifying steps of the test case in a step order; an Excel name column in the Excel file defines a display name of the step; an Excel description column in the Excel file defining a description of the step that is displayed on a test case viewing and editing device; an Excel execution action sequence in the Excel file defining a particular action that the test system will perform at the step; an Excel operation content column in the Excel file defines the content of the operation to be performed in the step; an Excel parameter column in the Excel file defines parameter information required to execute the step; an Excel annotation column in the Excel file defining annotation information for the step; The system is characterized in that testing is achieved by loading an Excel file.

11. An apparatus for performing testing by loading an Excel file, an Excel test case editing module for editing Excel test cases; an Excel test case execution module for executing tests on the Excel test cases based on the defined test operations; an Excel test case execution behavior classification module for defining test operations to be executed by the Excel test case execution module; The method for editing the Excel test case is as follows: Creating an Excel file by a test case viewing and editing device, loading the Excel file, displaying detailed information of the test case, and editing the test case; When starting an Excel program, an Excel file created by the test case viewing and editing device is opened, each sheet of the Excel file corresponds to one test case, and each test case includes at least one and up to six of the following contents, including at least a test step: a test step, a name, a description, an execution operation, an operation content, a parameter, and a comment; an Excel test step sequence in the Excel file defines information for identifying steps of the test case in a step order; an Excel name column in the Excel file defines a display name of the step; an Excel description column in the Excel file defining a description of the step that is displayed on a test case viewing and editing device; an Excel execution action sequence in the Excel file defining a particular action that the test system will perform at the step; an Excel operation content column in the Excel file defines the content of the operation to be performed in the step; an Excel parameter column in the Excel file defines parameter information required to execute the step; An Excel annotation column in the Excel file defines annotation information for the step.

12. A computer device configured to execute a program of the method for editing Excel test cases according to claims 1 to 9.

13. A computer-readable storage medium storing a program for the method of editing Excel test cases according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Application programming interface automatic test method, system, device and storage medium

    CN107729243A

  • Program testing system

    JP1995306801A

  • Method and program for testing application program and recording medium

    JP2010218496A

  • Test case generation system

    JP2014115884A

  • Testing method, system and device by loading Excel files

    JP2024509721A