Method, system, and device for editing Excel® test cases.

The use of Excel files for editing and executing test cases simplifies test script modifications, enhancing efficiency and reducing dependency on programming skills in test systems.

JP7852955B2Active Publication Date: 2026-04-28SHANGHAI TOSUN TECH LTD
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
SHANGHAI TOSUN TECH LTD
Filing Date
2025-01-17
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Conventional test systems require specialized engineers to modify test scripts, leading to low efficiency and high dependency on programming skills for changing test logic and parameters.

Method used

A test method, system, and device that utilize an Excel file for editing and executing test cases, allowing testers to define test steps, actions, and parameters directly in Excel, decoupling test system development from script development.

Benefits of technology

Enables testers to modify test scripts efficiently without programming knowledge, improving parameter controllability and reducing the complexity of test script development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007852955000002
    Figure 0007852955000002
  • Figure 0007852955000003
    Figure 0007852955000003
  • Figure 0007852955000004
    Figure 0007852955000004
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 belongs to the technical field of automotive test systems, and specifically relates to a test method, system, and device based on loading an Excel file.

Background Art

[0002] A general test system is roughly divided into two components: the operating environment of the test system and the test script. Among these, the test script can be arbitrarily edited by the tester according to the test requirements. A general 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 need to be created based on the test requirements and, if they need to be changed, generally the developer of the test system needs to be involved and it is handled by editing and compiling the test script. Therefore, editing the test script involves modifying the program code described as the script, indicating that the development of the test system and the development of the program are closely linked. Also, the modification of the script depends on specialized engineers, resulting in the problem of low efficiency in modifying the test logic and test parameters. In order to solve the above technical problems, it is necessary to design a new test method, system, and device based on loading an Excel file.

Summary of the Invention

[0004] The object of the present invention is to provide a test method, system, and device based on loading an Excel file.

[0005] To solve the above technical problems, the present invention provides a test method based on loading an Excel file, including the following: Editing an Excel test case, and Perform tests on the above Excel test cases.

[0006] Furthermore, the methods for editing the above Excel test cases include the following: An Excel file is created using a test case viewing and editing device. This Excel file is then loaded, and the detailed information of the test cases is displayed to the test engineer, who can then edit the test cases. When the Excel program is launched, the Excel file created by the above test case viewing and editing device is opened. Each sheet in the Excel file is a single test case, and each test case includes a test step, name, description, execution action, operation details, parameters, and notes.

[0007] Furthermore, the Excel test step column in the above Excel file defines information identifying the steps of the above test case in step order. The "Excel Name" column in the above Excel file defines the display name for the steps described above. The Excel Description column in the above Excel file defines the explanatory text for the above steps, and this explanatory text is displayed in the test case viewing and editing device. The Excel execution action column in the above Excel file defines the specific action that the test system will perform in the steps described above. The "Excel Operation Details" column in the above Excel file defines the content of the operation performed in the above step. The Excel parameter column in the above Excel file defines the information of the parameters required to perform the above steps. The Excel annotation column in the above Excel file defines the annotation information for the steps described above.

[0008] Furthermore, the methods for testing based on the above Excel test cases include the following: The actuator for the above test case executes the above Excel test case, and during the execution of the Excel test case, the test results are written to an Excel results file to generate a test report. The actuator in the above test case, during its operation, (1) loads and displays the contents of an Excel file, (2) executes each test case one by one, (3) displays the test results, and generates the above test report. After the above Excel test case is completed and the Excel program is launched, the above test report will be displayed. The test report file will contain multiple sheets, each corresponding to the report for one of the above test cases. Each of the above reports includes the test results, the test steps, the names, the descriptions, the actions performed, the operations performed, the parameters, and the notes.

[0009] Furthermore, the test results column in the above report includes a judgment for the current test step, and the judgment includes OK, NOK, and COK. The Excel test step column in the above report defines the information identifying the above steps of the current test case in step order. The Excel name column in the above report defines the display name in the above step. In the above report, the Excel description column defines the descriptive text for the above steps that is displayed in the device for viewing and editing the above test cases. In the above report, the Excel execution action column defines the specific action that the test system performs in the above step. In the above report, the "Excel Operation Details" column defines the content of the operation performed in the above step. In the above report, the Excel parameter column defines the information of the parameters required to perform the above steps. In the report above, the Excel annotation column defines the annotation information for the steps described above.

[0010] Furthermore, the execution classification of the above test cases includes execution action classification, operation content classification, and parameter classification. The above classification of execution actions includes: defining the above test steps, defining test variables, 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 of the above operation classification and parameter classification correspond one-to-one with the items in the above execution operation classification.

[0011] Furthermore, the definition of the above test step is represented as a single string. When this string is read, if its content matches the pre-set string for the above step, the row corresponding to that step is determined to be the definition of the above test step. In this case, the contents of the three columns, "Test Step Column," "Name Column," and "Description Column," become valid. If the content differs from the pre-set string, the contents of the three columns, "Test Step Column," "Name Column," and "Description Column," become invalid and are treated as blank. The operations corresponding to the actions that define the above test steps include general steps and test completion steps. The above general steps are the conventional test steps. If the test process terminates prematurely due to an error or other reason, all of the above general steps are skipped, and the above test termination step is executed directly, which is at the end of all of the above test steps. If the above parameters corresponding to the actions defining the above test steps do not exist, they will be treated as blank. The operation to define the above test variable is a single string. When this string is read, if its content is the same as a pre-defined variable string, the line corresponding to that string is determined to be a variable definition, and a new above variable is obtained based on other information in that line. The above operation content, which corresponds to the action of defining the above test variable, is the variable name. An arbitrary string that identifies the characteristics of the above operation content is entered and becomes the defined variable name. The parameter corresponding to the action defining the above test variable is a single string containing two fields: the variable type and the initial value. The fields are separated by the character "|". The function call and the return of the error code described above are represented by a single string. When this string is read, if its content matches a pre-configured function string, the line corresponding to that string is recognized as a test system function call. The test system then searches for the corresponding function based on the function name and calls that function based on the parameters defined in that line. The above function name corresponds to the above function call and the above error code return action. The above parameters, corresponding to the function call and the return of the above error code, are a single string containing zero or more of the above fields, each of which corresponds to a single parameter value, and the above fields are separated by the character "|". The previous error code check operation was a single string. When reading this string, if the read content is the same as a preset check string, the line corresponding to that string is identified as the error code detection operation described above. After an error is detected, based on the definition of the operation content for that line, it is selected whether to write the error information to a specific variable or to abort the test process. The above operations, which correspond to the previous error code check, include setting variables and canceling the above test. Setting the above variables indicates that after the above test encounters an error, the error information will be written to the corresponding variable and the above test will continue. Terminating the above test indicates that after the above test encounters an error, the above test will be terminated immediately and the process will proceed to the test termination step to continue. The above parameter, corresponding to the previous error code check operation, is only valid if the operation involves setting a variable, and indicates the name of the variable that needs to be written. If the operation involves canceling the test, this parameter cell will be treated as blank. The inspection of the above variable range and the operation of returning the above error code are a single string. When reading this string, if the content read is the same as the preset variable string, the line corresponding to this string is identified as a test determination of a detected variable, and the upper and lower limits of detection and the corresponding variables are defined in other columns of this line. The above operation content corresponding to the inspection of the above variable range and the operation of returning the above error code is the detected variable name. The above parameters corresponding to the inspection of the above variable range and the operation of returning the above error code are a single string including the above two fields. The above two fields correspond to the lower threshold and the upper threshold respectively. The lower threshold and the upper threshold each correspond to a parameter value, and the fields are separated by the character "|".

[0012] In a second aspect, the present invention further provides a test system by loading an Excel file, including the following: An editing module for editing an Excel test case, and A test module for performing tests on the Excel test case.

[0013] In a third aspect, the present invention further provides a test device by loading an Excel file, including the following: An Excel test case editing module, an Excel test case execution module, and an Excel test case execution operation classification module. The above Excel test case editing module is suitable for editing the above Excel test case. The above Excel test case execution operation classification module is suitable for defining the test operations executed by the Excel test case execution module. The above Excel test case execution module is suitable for performing tests on the above Excel test case based on the defined above test operations.

[0014] The beneficial effects of the present invention are as follows. The present invention realizes implementing a test script with an Excel file by editing an Excel test case and executing a test based on the Excel test case. To modify the test script, it is only necessary to modify the Excel file. Thereby, when modifying the script, frequent modification of the program can be avoided, and the parameter controllability of the test system can be improved.

[0015] Other features and advantages of the present invention will be described in the specification hereinafter, some of which are obvious from the specification or can be understood by implementing the present invention. The objectives and other advantages of the present invention are achieved and obtained by the configurations particularly described in this specification and the drawings. In order to make the above-mentioned objectives, features, and advantages of the present invention clearer and easier to understand, the following will specify better embodiments and describe them in detail as follows together with the drawings.

Brief Description of the Drawings

[0016] To more clearly explain 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] It is a flowchart of a test method by loading an Excel file of the present invention. [Figure 2] It is a schematic diagram of the editing principle of an Excel test case of the present invention. [Figure 3] It is a schematic diagram of the operating principle of an Excel test case of the present invention. [Figure 4] It is a schematic diagram of the classification of the execution operations of an Excel test case of the present invention.

Embodiments for Carrying Out the Invention

[0017] To further clarify the object, technical solution, and advantages of the embodiments of the present invention, the technical solution of the present invention will be clearly and completely described below with reference to the drawings. Obviously, the embodiments described are only a portion of the embodiments included in the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without requiring creative effort are all included within the scope of the protection of the present invention.

[0018] As shown in Figure 1, this embodiment provides a testing method using Excel files, including editing Excel test cases and performing tests against those Excel test cases. It solves the technical problems of low readability and editability of conventional test programs, by implementing test scripts in Excel files. When modifying test scripts, only the Excel file needs to be modified, thus avoiding frequent program modifications during script modification and improving the parameter controllability of the test system. The cumbersome script development and modification work in conventional test systems is generalized to the reference and editing of Excel files, allowing testers to create and modify test scripts in Excel. Therefore, testers do not need to understand specific programming languages, thereby decoupling test system development and test script development, improving test script development efficiency, and reducing the difficulty of test script development. Using the test system of this invention reduces dependence on the tester's programming proficiency level.

[0019] As shown in Figure 2, in this embodiment, the method for editing the Excel test cases includes the following: (1) creating an Excel file using the test case viewing and editing device, (2) loading the Excel file, displaying detailed information about the test cases to the test engineer, and editing the test cases. The Excel program is used by the test engineer to edit the test cases. (3) When the Excel program is started, it opens the Excel file created by the test case viewing and editing device, and each sheet of the Excel file is a single test case. Each test case includes test steps, name, description, execution actions, operation details, parameters, and notes.

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

[0021] As shown in Figure 3, in this embodiment, the method of performing tests based on the above Excel test cases includes the following: executing the Excel test cases using the test case actuator, and generating a test report by writing the test results to an Excel results file during the execution of the Excel test cases. After the test is completed, the user can open the Excel program and view the test report. During the operation of the test case actuator, the following processes are performed in order: (1) load and display the contents of the Excel file, (2) execute each test case one by one, (3) display the test results, and generate a test report. After the testing of the Excel test cases is completed, the test report is displayed after the Excel program is launched. The test report file contains multiple sheets, each sheet corresponding to the report for one test case. Each report includes the following: test results, test steps, name, description, execution, operation details, parameters, and notes.

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

[0023] As shown in Figure 4, in this embodiment, the execution classification of test cases includes execution action classification, operation content classification, and parameter classification. The execution action classification includes: definition of test steps, definition of test variables, function calls and return of error codes, checking of previous error codes, checking of variable ranges and return of error codes. The content in the operation content classification and parameter classification corresponds one-to-one with the items in the execution action classification.

[0024] In this embodiment, the definition of the test step is represented as a single string, which includes but is not limited to the string "define_test_step". When the test system reads the cell containing this string, if the read content is the same as the pre-set step string "define_test_step", it is determined that this row is a definition of a test step, and in this case, the contents of the three columns, "Test Step Column", "Name Column", and "Description Column", become valid. If the contents of this cell are different from the string, the contents of the three columns, "Test Step Column", "Name Column", and "Description Column", are invalid and are treated as blank.

[0025] The operations corresponding to the actions that define the above test steps include, but are not limited to, two types: normal steps (normal_step) and test tear-down steps (test_tear_down). Normal steps are conventional test steps; if the test process terminates early due to an error or other reason, all normal steps are skipped, and the test tear-down step is executed directly, which is the last of all test steps. If there are no parameters corresponding to the actions that define the above test steps, they are treated as blank.

[0026] The action of defining the above test variable is a single string, which includes but is not limited to the string "define_variable". When the test system reads the cell containing this string, if the read content is the same as the pre-defined variable string "define_variable", the test system determines that this row defines a variable, and then retrieves a new variable based on other information in this row.

[0027] The operation content corresponding to the action that defines the above test variables is represented by the variable name. Here, you can enter any string that identifies the characteristics of the operation content, and this will be used as the defined variable name.

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

[0029] The function call and error code return operation described above are a single string, which includes but is not limited to the string "call_function". When the test system reads the cell containing this string, if the read content is the same as the pre-configured function string "call_function", it recognizes that the row corresponding to the string is a test system function call. The test system then searches for the corresponding function based on the function name and calls this function based on the parameters defined in that row.

[0030] The operation corresponding to the above function call and error code return is the function name, and here you can enter a function name that already exists in the test system.

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

[0032] The last error code check operation is a single string, which includes, but is not limited to, the string "check_last_error". When the test system reads the cell containing this string, if its content is the same as the preset check string "check_last_error", it knows that the row corresponding to this string is an error code detection operation. After an error is detected, based on the definition of the operation in this row, it is selected whether to write the error information to a specific variable or to abort the test process.

[0033] The operations corresponding to the previously mentioned error code check operation include, but are not limited to, two types: (1) setting a variable (set_variable) and (2) ending the test (exit_on_fail). Setting a variable means that after the test encounters an error, the error information is written to the corresponding variable, indicating that the test will continue. Ending the test means that after the test encounters an error, the test will be terminated immediately, and the process will proceed to the test termination step (test_tear_down) to continue.

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

[0035] The above variable range check and error code return operation is a single string, which includes but is not limited to the string "check_var_range". When the test system reads the cell containing this string, if its content is the same as the pre-set variable string "check_var_range", it knows that the row corresponding to this string is a test judgment for one detection variable, and the upper and lower limits of detection and the corresponding variable are defined in other columns of that row.

[0036] The operation corresponding to the inspection of the above variable range and the return of error codes is the name of the detected variable.

[0037] The parameter corresponding to the check of the above variable range and the return of error codes is a single string containing two fields, the two fields corresponding to a low threshold and a high threshold, respectively, the threshold and high threshold each corresponding to a single parameter value, and the fields are separated by the character "|". For example, if the decision variable needs to be between 3.5 and 5.6, the parameter here would be "3.5|5.6". If the decision variable needs to be equal to 3.5, the parameter here would be "3.5|3.5". This divides the test system construction task into two parts, allowing specialized developers to focus on the test system architecture and API design, while testers can focus on test scripts and parameter settings. As a result, these two tasks can be performed simultaneously, simplifying the design of the test system, improving the efficiency of test system development, and reducing the difficulty of test system development.

[0038] This embodiment provides a message transmission test case and system that loads an Excel file, the Excel file including columns for test step, name, description, execution, operation details, parameters, and annotations. The message transmission test case and system includes the Excel file, a device for viewing and editing the test case that loads the Excel file, and an actuator for executing the test case that runs the Excel file.

[0039] As shown in Table 1, the Excel file contains one test case, the purpose of which is to connect to a bus tool, send one frame of a CAN message to the system under test, determine whether the message transmission was successful or not, and finally disconnect the bus tool. As shown in Table 1, the execution action of the first line is "define_test_step," which means that a test step is defined. The step number of this line is 1. The step name is "Connect." The description is "Connect hardware," which means that the bus tool is connected. The operation is "normal_step," which indicates that this step is a normal step. As shown in Table 1, the execution action on the second line is "define_variable", meaning the variable is defined. The operation is performed on the variable named "vTransmitResult". The parameters are the variable type and initial value "double|0", meaning the type is double and the initial value is 0. As shown in Table 1, the execution action on the third line is "call_function," which means calling a system function. The operation is performed by the function named "app.connect," which means connecting a bus tool. This function does not require any parameters, so the parameter field is blank. The function returns 1 if it is successful, and 0 otherwise. As shown in Table 1, the execution action on the fourth line is "check_last_error," which means it detects the previous error. The operation is "exit_on_fail," which means that if the previous operation fails, the test is immediately terminated. Since the operation is "exit_on_fail," no parameters are required for this action. As shown in Table 1, the execution action on the 5th line is "define_test_step," meaning a test step is defined, and the step number for this line is 2. The step name is "Transmit." The description is "Msg.Transmit," meaning a message is sent. The operation is "normal_step," which means this step is a normal step. As shown in Table 1, the execution action on the 6th row is "call_function," which means calling a system function. The operation is performed by the function named "com.transmit_can," which means sending a CAN message. This function requires one parameter, a CAN message pointer, so the required message MSG1 is given in the parameter column. As shown in Table 1, the execution action on line 7 is "check_last_error," meaning that the previous error is detected. The action is "set_variable," meaning that if an error is detected, the error information is written to the variable. The parameter is "vTransmitResult," which is the name of the variable that needs to be written to. As shown in Table 1, the execution operation on line 8 is "check_var_range", which means it detects whether the variable is within the range. The operation is "vTransmitResult", meaning the variable name that needs to be checked is "vTransmitResult". The parameter is "1|1", which means it detects whether this variable is 1. As shown in Table 1, the execution action on line 9 is "define_test_step," which defines a test step, and the step number for this line is 3. The step name is "Disconnect." The step description is "Disconnect Hardware," which means disconnecting the bus tool. The operation is "test_tear_down," which indicates that this is the test termination step, and this step is executed unconditionally if the test is aborted while the previous step is being executed. This step does not require any parameters. As shown in Table 1, the execution action on line 10 is "call_function," which means calling a system function. The operation performed is the function named "app.disconnect," which means disconnecting the bus tool connection. No parameters are required for this function. As shown in Table 1, the test case viewing and editing device loads this file and then provides the user with the ability to view the test script. After loading this file, the test case actuator executes the tests one row at a time 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, they only need 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, they only need to open the Excel file, add a new row in step 2, and edit this row according to the execution behavior of "call_function". Table 1: Execution Classification Table JPEG0007852955000001.jpg66170

[0040] This embodiment further provides a test system that loads Excel files and includes an editing module and a test module. The editing module edits the Excel test cases. The test module performs tests on the Excel test cases. In this embodiment, the test system for loading Excel files further includes a method for editing Excel test cases, a method for executing Excel test cases, and an execution classification of Excel test cases. The Excel test case editing method consists of two parts: a test case viewing and editing device, and an Excel program. The Excel test case execution method consists of two parts: a test case actuator and an Excel program. The above-mentioned test case execution classification consists of three parts: execution action classification, operation content classification, and parameter classification. In this embodiment, the specific processes of each module and method have already been described in detail in the test method using the Excel file loading described above.

[0041] This embodiment further provides a test device that loads Excel files, and includes an Excel test case editing module, an Excel test case execution module, and an Excel test case execution behavior classification module. The above Excel test case editing module is suitable for editing Excel test cases. The above Excel test case execution behavior classification module is suitable for defining the test operations that the Excel test case execution module will perform. The above Excel test case execution module is suitable for performing tests on Excel test cases based on the defined test operations.

[0042] In this embodiment, the test device that loads Excel files is suitable for testing Excel test cases using the above-described test method of loading Excel files.

[0043] In summary, the present invention achieves the implementation of test scripts using Excel files by editing Excel test cases and testing those Excel test cases. When modifying a test script, only the Excel file needs to be modified. This avoids the need to frequently modify the program during the script modification process, thereby improving the parameter controllability of the test system.

[0044] In some embodiments provided by this application, the disclosed apparatus and methods can, of course, be implemented in other ways. The embodiments of the apparatus described above are merely illustrative; for example, the flowcharts and block diagrams in the drawings illustrate the architectures, functions, and operations that can be implemented in the apparatus, methods, and computer program products according to some embodiments of the present invention. In this regard, each block in a flowchart or block diagram is implemented as part of a module, program segment, or code containing one or more executable instructions for performing a predetermined logical function. In some alternative implementations, the functions represented in a block may be executed in an order different from that shown in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes in reverse order depending on the related functions. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, may be implemented in a dedicated hardware-based system that performs a predetermined function or operation, or in a combination of dedicated hardware and computer instructions.

[0045] Furthermore, in each embodiment of the present invention, each functional module may be integrated to form a single independent part, each module may exist individually, or two or more modules may be integrated to form a single independent part. The above functions can be implemented in the form of software function modules and, when sold or used as independent products, can be stored on a single computer-readable storage medium. Based on this understanding, the technical solutions of the present invention or the parts that contribute to the prior art can be provided in the form of a software product. The computer software product is stored on a storage medium, contains a plurality of commands, and causes a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media capable of storing program code, such as U disks, removable disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0046] Based on the preferred embodiments of the present invention described above, and in accordance with the above description, those skilled in the art can 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, and its technical scope must be determined based on the claims.

Claims

1. A method for processing Excel test cases executed by a computer device, When the Excel program is launched, the Excel file created by the Excel test case viewing and editing device is opened, and in each sheet of the Excel file, multiple rows correspond to one step, and multiple such steps constitute one test case, and each sheet of the Excel file includes columns for execution actions and operation details, The Excel execution action column in the aforementioned Excel file defines a specific action that the test system will perform in the row, The Excel operation content column in the aforementioned Excel file defines the content of the operation performed in the row, The execution operation has multiple types, one of which includes the definition of the test step represented by a single string, the type of the execution operation in the first line of each step is the definition of the test step, the operation content corresponding to the definition of the test step includes a general step and a test completion step, the test completion step means the last step of the multiple steps, and the general step means the steps of the multiple steps other than the test completion step. An Excel test case processing method in which, when executing the aforementioned multiple steps sequentially, if the operation content corresponding to the first row of each step is the general step, and the test process terminates prematurely due to an error or other reason, all subsequent general steps are skipped and the test termination step is executed.

2. Each sheet of the Excel file further includes one or more columns of test step, name and description, The Excel test step column in the aforementioned Excel file defines information for identifying the steps of the test case in step order. The Excel name column in the aforementioned Excel file defines the display name for the step, The Excel description column in the aforementioned Excel file defines the descriptive text for the steps that will be displayed on the test case viewing and editing device. The Excel test case processing method according to claim 1, wherein when the above-mentioned steps are executed sequentially, if the type of execution operation in each row is the definition of the test step, the contents of the test step column, name column, and description column corresponding to that row are made valid, and if the type of execution operation in each row is other than the definition of the test step, the contents of the test step column, name column, and description column corresponding to that row are invalidated and the row is treated as a blank row.

3. Each sheet of the Excel file further includes a parameter column, the Excel parameter column in the Excel file defines information about the parameters required to execute the row, The aforementioned multiple types of execution include, in addition to the definition of the test step, the definition of the test variable, The operation of defining the aforementioned test variable is represented by a single string. When this string is read, if its content is the same as a pre-defined variable string, the line corresponding to that string is determined to be a variable definition, and a new variable is requested based on other information in that line. The operation content corresponding to the action of defining the aforementioned test variable is the variable name; a string identifying the operation content is entered and used as the defined variable name. The Excel test case processing method according to claim 1 or 2, characterized in that the parameter corresponding to the operation defining the test variable is a string containing two fields, the variable type and the initial value, and the two fields are separated by the character "|".

4. Each sheet of the Excel file further includes a parameter column, the Excel parameter column in the Excel file defines information about the parameters required to execute the row, The aforementioned multiple types of execution include, in addition to the definition of the test step, function calls and the return of error codes. The function call and the return of the error code are represented by a single string. When this string is read, if its content is the same as a pre-configured function string, the line corresponding to this string is determined to be a function call of the test system. The test system then searches for the corresponding function based on the function name and calls that function based on the parameters defined in that line. The operation corresponding to the function call and the return of the error code is the function name. The method for processing an Excel test case according to claim 1 or 2, characterized in that the parameters corresponding to the function call and the error code return operation are a string containing zero or more fields, each field corresponding to one parameter value, and the fields are separated by the character "|".

5. Each sheet of the Excel file further includes a parameter column, the Excel parameter column in the Excel file defines information about the parameters required to execute the row, The aforementioned multiple types of execution include, in addition to the definition of the test step, a check of the previous error code. The previous error code check operation was represented by a single string. When this string is read, if the read content is the same as a pre-set check string, it is determined that the line corresponding to this string is an error code detection operation. After an error is detected, based on the definition of the operation content of that line, it is selected whether to write the error information to a specific variable or to abort the test process. The operations corresponding to the previous error code check operation include setting variables and canceling the test. The setting of the aforementioned variable indicates that after the test encounters an error, the error information is written to the corresponding variable, and the test continues. The termination of the test indicates that, after the test encounters an error, the test will be immediately terminated and the process will proceed to the test termination step. The Excel test case processing method according to claim 1 or 2, characterized in that the parameter corresponding to the previous error code check operation is valid only when the operation content is setting the variable, indicates the name of the variable that needs to be written, and when the operation content is canceling the test, the cell storing the parameter is treated as blank.

6. Each sheet of the Excel file further includes a parameter column, the Excel parameter column in the Excel file defines information about the parameters required to execute the row, The aforementioned multiple types of execution include, in addition to the definition of the test step, checking a variable range and returning an error code. The variable range check and the error code return operation are represented by a single string. When this string is read, if the read content is the same as a pre-defined variable string, the row corresponding to this string is identified as a test judgment for the detected variable. The upper and lower limits of detection and the corresponding variable are defined in other columns of that row. The operation content corresponding to the inspection of the variable range and the return of the error code is the detected variable name. The method for processing an Excel test case according to claim 1 or 2, wherein the parameter corresponding to the inspection of the variable range and the return operation of the error code is a string containing two fields, the two fields each corresponding to a low threshold and a high threshold, each threshold corresponding to one parameter value, and the two fields are separated by the character "|".

7. The computer device, which is the test case execution device, executes the Excel test case, and in the process of executing the Excel test case, the test results are written to an Excel results file to generate a test report, The execution device for the aforementioned test case, during its operation, (1) Load and display the contents of the Excel file mentioned above. (2) Execute the test cases one by one. (3) Display the test results and generate the test report, then execute in this order. After the test of the Excel test case is completed, the Excel program is launched and the test report is displayed. The test report file contains multiple sheets, each sheet corresponding to the report of one of the test cases. The method for processing Excel test cases according to claim 1 or 2, characterized in that each test report includes one or more of the following: test results, test steps, name, description, execution, operation details, parameters, and notes.

8. The test results column in the aforementioned test report includes a judgment for the current test step, and the judgment includes one or more of the following: OK, NOK, and COK. The Excel test step column in the aforementioned test report defines information in step order to identify the step of the current test case. The Excel name column in the aforementioned test report defines the display name for the step, The Excel description column in the aforementioned test report defines the descriptive text for the steps displayed on the test case viewing and editing device. The Excel execution action column in the aforementioned test report defines the specific action that the test system performs in the row, The Excel operation details column in the aforementioned test report defines the content of the operation performed in the row, The Excel parameter column in the aforementioned test report defines the parameter information required to execute the aforementioned row. The method for processing an Excel test case according to claim 7, characterized in that the Excel annotation column in the test report defines the annotation information for the row.

9. A system that performs testing by loading an Excel file, An editing module for editing Excel test cases, It includes a test module for performing tests on Excel test cases. The aforementioned editing module is The test case viewing and editing device creates an Excel file, loads the Excel file, displays the detailed information of the test case, and edits the test case. When the Excel program is launched, the Excel file created by the Excel test case viewing and editing device is opened, and in each sheet of the Excel file, multiple rows correspond to one step, and multiple such steps constitute one test case, and each sheet of the Excel file includes columns for execution actions and operation details, The Excel execution action column in the aforementioned Excel file defines a specific action that the test system will perform in the row, The Excel operation content column in the aforementioned Excel file defines the content of the operation performed in the row, The execution operation has multiple types, one of which includes the definition of the test step represented by a single string, the type of the execution operation in the first line of each step is the definition of the test step, the operation content corresponding to the definition of the test step includes a general step and a test completion step, the test completion step means the last step of the multiple steps, and the general step means the steps of the multiple steps other than the test completion step. A system configured to skip all subsequent general steps and execute the test termination step when the test process terminates early due to an error or other reason, in cases where the operation content corresponding to the first line of each step is the general step when the aforementioned multiple steps are executed sequentially.

10. A device that performs testing by loading an Excel file, An Excel test case editing module for editing Excel test cases, An Excel test case execution module for performing tests on Excel test cases based on defined test operations, The system includes an Excel test case execution behavior classification module for defining test operations to be performed by the Excel test case execution module, The aforementioned Excel test case editing module is, The test case viewing and editing device creates an Excel file, loads the Excel file, displays the detailed information of the test case, and edits the test case. When the Excel program is launched, the Excel file created by the Excel test case viewing and editing device is opened, and in each sheet of the Excel file, multiple rows correspond to one step, and multiple such steps constitute one test case, and each sheet of the Excel file includes columns for execution actions and operation details, The Excel execution action column in the aforementioned Excel file defines a specific action that the test system will perform in the row, The Excel operation content column in the aforementioned Excel file defines the content of the operation performed in the row, The execution operation has multiple types, one of which includes the definition of the test step represented by a single string, the type of the execution operation in the first line of each step is the definition of the test step, the operation content corresponding to the definition of the test step includes a general step and a test completion step, the test completion step means the last step of the multiple steps, and the general step means the steps of the multiple steps other than the test completion step. An apparatus configured to skip all subsequent general steps and execute the test termination step when the test process terminates prematurely due to an error or other reason, in cases where the operation content corresponding to the first line of each step is the general step during the sequential execution of the aforementioned multiple steps.

11. A computer device configured to execute a program for processing Excel test cases as described in claims 1 to 8.

12. A computer-readable storage medium storing a program for processing Excel test cases as described in claims 1 to 8.

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