Test method, system and device based on excel file loading
Patent Information
- Authority / Receiving Office
- IN · IN
- Patent Type
- Patents
- Current Assignee / Owner
- SHANGHAI TOSUN TECH LTD
- Filing Date
- 2023-09-27
- Publication Date
- 2026-07-13
AI Technical Summary
The existing test systems require frequent modification of program code, leading to tight binding between test system development and programming, dependency on professionals, and low efficiency in modifying test logic and parameters.
A test method and system based on Excel file loading, where test cases are edited and executed using an Excel file, allowing testers to modify test scripts without programming knowledge, decoupling test system development from programming and improving parameterization capabilities.
This approach simplifies test script development by abstracting script modification into Excel file editing, reducing dependence on programming expertise and enhancing development efficiency while improving parameterization capabilities.
Abstract
Description
TECHNICAL FIELDThe present disclosure relates to the technical field of an automobile test system, andspecifically, to a test method, system, and device based on Excel file loading.BACKGROUNDA general test system is typically divided into a test system running environment and atest script. The test script may be arbitrarily edited by a tester based on a test requirement.The test script is generally implemented in a specific programming language, such as a Clanguage, a C# language, a Python language, or a visual basic (VB) script language.In the test script, the tester can define test logic and test parameters. If required, the testlogic and the test parameters are often compiled and changed by a test system developerbased on the test requirements by editing and compiling the test script. Therefore, theediting of the test script involves modification of a program code corresponding to thetest script, which results in the problems such as tight binding between test systemdevelopment and program development, dependency of script modification on aprofessional, and low efficiency of modifying the test logic and the test parameter.Therefore, to resolve the above technical problems, a new test method, system, anddevice based on Excel file loading need to be designed.SUMMARYThe present disclosure is intended to provide a test method, system, and device based onExcel file loading.To resolve the above technical problem, the present disclosure provides a test methodbased on Excel file loading, including: editing an Excel test case; and testing the Exceltest case.Further, a method for editing the Excel test case includes: using a test case viewing andediting device to create an Excel file, load the Excel file, display detailed information ofthe test case to a tester, and edit the test case, where when an Excel program is started, theExcel file created by using the test case viewing and editing device is opened, where eachsheet of the Excel file is a test case, and each test case includes a test step, a name, adescription, an execution action, an operation content, a parameter, and an annotation.Further, the Excel test step column in the Excel file sequentially defines an identifier of astep of a current test case;the Excel name column in the Excel file defines a displayed name of the step;the Excel description column in the Excel file defines a descriptive text of the current step,and the descriptive text is displayed in the test case viewing and editing device;the Excel execution action column in the Excel file defines a specific action to beexecuted by a test system for the current step;the Excel operation content column in the Excel file defines content information foraction execution of the current step;the Excel parameter column in the Excel file defines parameter information on which theaction execution of the current step depends; andthe Excel annotation column in the Excel file defines annotative information of thecurrent step.Further, a method for testing the Excel test case includes:executing the Excel test case by using a test case executor, and writing a test result into anExcel result file in an execution process to generate a test report, whereduring running, the test case executor loads and displays content of the Excel file,executes test cases one by one, displays the test result, and generates the test reportsuccessively;after the Excel test case is tested, the Excel program displays the test report after beingstarted, where a test report file includes a plurality of sheets, and each of the sheetsrepresents a report of one test case; andeach report includes a test result, a test step, a name, a description, an execution action,an operation content, a parameter, and an annotation.Further, the test result column in the report contains a verdict result of the current teststep, namely, OK, NOK, or COK;the Excel test step column in the report sequentially defines the identifier of the step ofthe current test case;the Excel name column in the report defines the displayed name of the step;the Excel description column in the report defines the descriptive text of the current step,and the descriptive text is displayed in the test case viewing and editing device;the Excel execution action column in the report defines the specific action to be executedby the test system for the current step;the Excel operation content column in the report defines the content information for theaction execution of the current step;the Excel parameter column in the report defines the parameter information on which theaction execution of the current step depends; andthe Excel annotation column in the report defines the annotative information of thecurrent step.Further, execution types of the test case include: an execution action type, an operationcontent type, and a parameter type; the execution action type includes: defining a teststep, defining a test variable, calling a function and returning an error code, checking alast error code, and checking a variable range and returning an error code; and content inthe operation content type and the parameter type one-to-one corresponds to entries inthe execution action type.Further, the action of defining the test step is represented by a string, where when thestring is read, if content of the string is the same as a preset step string, it is determinedthat this row is a definition of one test step, and in this case, content of the "Test Step","Name", and "Description" columns is valid; or if content of the string is different from apreset step string, content of the "Test Step", "Name", and "Description" columns isinvalid, and the "Test Step", "Name", and "Description" columns need to be left blank;operation content corresponding to the action of defining the test step includes: a normalstep and a test termination step;the normal step is a routine test step, and when a test process is terminated early due to anerror or another reason, all normal steps are skipped and the test termination step isexecuted directly, where the test termination step is at the end of all test steps;a parameter corresponding to the action of defining the test step does not exist and shouldbe left blank;the action of defining the test variable is represented by a string, where when the string isread, if content of the string is the same as a preset variable string, it is determined thatthis row is a definition of one variable, and a new variable is requested based on otherinformation in this row;operation content corresponding to the action of defining the test variable is a variablename, and any string representing an identifier is input as the defined variable name;a parameter corresponding to the action of defining the test variable is a string containingtwo fields: a variable type and an initial value, where the fields are separated by acharacter "|";the action of calling the function and returning the error code is represented by a string,where when the string is read, if content of the string is the same as a preset functionstring, it is determined that this row is a function call of the test system, and the testsystem searches for a corresponding function based on a function name and calls thefunction based on the parameter defined in this row;operation content corresponding to the action of calling the function and returning theerror code is the function name;a parameter corresponding to the action of calling the function and returning the errorcode is a string containing 0 or a plurality of fields, where each of the fields correspondsto one parameter value, and the fields are separated by the character "|";the action of checking the last error code is represented by a string, where when the stringis read, if content of the string is the same as a preset check string, it is determined thatthis row is an error code detection operation, and after an error is detected, based on adefinition of operation content of this row, an operation of writing error information intoa specific variable or exiting the test process is performed;the operation content corresponding to the action of checking the last error code includes:setting a variable and exiting a test, where the setting a variable means that after an erroroccurs in the test, error information is written into the corresponding variable, and thetest continues; and the exiting a test means that after the error occurs in the test, the testsystem immediately jumps to the test termination step and the test termination isimplemented to terminate the test;a parameter corresponding to the action of checking the last error code is valid only whenthe operation content is to set the variable, indicating a name of the variable to be written,and when the operation content is to exit the test, the parameter cell should be left blank;the action of checking the variable range and returning the error code is represented by astring, where when the string is read, if content of the string is the same as a presetvariable string, it is determined that this row is testing and determining of variabledetection, and upper and lower limits of the detection and a corresponding variable aredefined in other columns of this row;operation content corresponding to the action of checking the variable range andreturning the error code is a name of the detected variable; anda parameter corresponding to the action of checking the variable range and returning theerror code is a string containing two fields, namely, a low threshold and a high threshold,where each of the thresholds corresponds to one parameter value, and the fields areseparated by the character "|".According to a second aspect, the present disclosure further provides a test system basedon Excel file loading, including: an editing module configured to edit an Excel test case;and a test module configured to test the Excel test case.According to a third aspect, the present disclosure further provides a test device based onExcel file loading, including:an Excel test case editing module, an Excel test case execution module, and an Excel testcase execution action classification module, where the Excel test case editing module isadapted to edit an Excel test case;the Excel test case execution action classification module is adapted to define a testoperation executed by the Excel test case execution module; andthe Excel test case execution module is adapted to test the Excel test case based on thedefined test operation.The present disclosure has following beneficial effects: The present disclosure edits anExcel test case, and tests the Excel test case. In this way, a test script is implementedbased on an Excel file, and it is only required to modify the Excel file to modify the testscript, thereby preventing a program from being frequently modified in a process ofchanging the script, and improving a parameterization capability of a test system.Other features and advantages of the present disclosure will be described in the followingdescription, and some of these will become apparent from the description or beunderstood by implementing the present disclosure. The objectives and other advantagesof the present disclosure can be implemented or obtained by structures specificallyindicated in the description and accompanying drawings.In order to make the above purposes, features, and advantages of the present disclosureclearer and more understandable, the present disclosure is described in detail below usingpreferred embodiments with reference to the accompanying drawings.BRIEF DESCRIPTION OF THE DRAWINGSTo describe the technical solutions in the specific implementations of the presentdisclosure or the prior art more clearly, the accompanying drawings required fordescribing the specific implementations or the prior art are briefly described below.Apparently, the accompanying drawings in the following description show merely someimplementations of the present disclosure, and a person of ordinary skill in the art maystill derive other accompanying drawings from these accompanying drawings withoutcreative efforts.FIG. 1 is a flowchart of a test method based on Excel file loading according to the presentdisclosure;FIG. 2 is a schematic diagram of editing an Excel test case according to the presentdisclosure;FIG. 3 is a schematic diagram of running an Excel test case according to the presentdisclosure; andFIG. 4 is a schematic diagram of execution action classification of an Excel test caseaccording to the present disclosure.DETAILED DESCRIPTION OF THE EMBODIMENTSIn order to make the objectives, technical solutions, and advantages of the embodimentsof the present disclosure clearer, the technical solutions in the present disclosure aredescribed clearly and completely below with reference to the accompanying drawings.Apparently, the described embodiments are some rather than all of the embodiments ofthe present disclosure. All other embodiments obtained by a person of ordinary skill inthe art based on the embodiments of the present disclosure without creative efforts shallfall within the protection scope of the present disclosure.As shown in FIG. 1, an embodiment provides a test method based on Excel file loading,including: editing an Excel test case; and testing the Excel test case. This resolvestechnical problems such as poor readability and editability of a traditional test program.A test script is implemented based on an Excel file, and it is only required to modify theExcel file to modify the test script, thereby preventing a program from being frequentlymodified in a process of changing the script, and improving a parameterization capabilityof a test system. Tedious script development and modification in a traditional test systemare abstracted into reading and writing of the Excel file, such that a tester can compileand modify the test script in Excel without mastering any programming language. Thisdecouples development of the test system and the test script, which improvesdevelopment efficiency of the test script, and reduces a development difficulty of the testscript. The test system in the present disclosure can reduce dependence on aprogramming level of the tester.As shown in FIG. 2, in this embodiment, a method for editing the Excel test case includes:creating the Excel file by using a test case viewing and editing device, loading the Excelfile, displaying detailed information of the test case to the tester, and editing the test case.An Excel program is used by the tester to edit the test case. When the Excel program isstarted, 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 a test step, a name, adescription, an execution action, an operation content, a parameter, and an annotation.In this embodiment, the Excel test step column in the Excel file sequentially defines anidentifier of a step of a current test case, for example, "1", "2", "1.1", or "1.2". The Excelname column in the Excel file defines a displayed name of the step, for example, "TestStep 1" or "Power Up". The Excel description column in the Excel file defines adescriptive text of the current step, and the descriptive text is displayed in the test caseviewing and editing device. The Excel execution action column in the Excel file defines aspecific action to be executed by the test system for the current step, and details of theaction are shown in FIG. 4. The Excel operation content column in the Excel file definescontent information for action execution of the current step, and details of theinformation are shown in FIG. 4. The Excel parameter column in the Excel file definesparameter information on which the action execution of the current step depends, anddetails of the parameter information are shown in FIG. 4. The Excel annotation column inthe Excel file defines annotative information of the current step.As shown in FIG. 3, in this embodiment, a method for testing the Excel test case includes:executing the Excel test case by using a test case executor, and writing a test result into anExcel result file in an execution process to generate a test report. After the test, a user canstart the Excel program to view the test report. During running, the test case executorloads and displays content of the Excel file, executes test cases one by one, displays thetest result, and generates the test report successively. After the Excel test case is tested,the Excel program displays the test report after being started. A test report file includes aplurality of sheets, and each of the sheets represents a report of one test case. Each reportincludes a test result, a test step, a name, a description, an execution action, an operationcontent, a parameter, and an annotation.In this embodiment, the test result column in the report contains a verdict result of thecurrent test step, namely, OK, NOK, or COK. The Excel test step column in the reportsequentially defines the identifier of the step of the current test case, for example, "1","2", "1.1", or "1.2". The Excel name column in the report defines the displayed name ofthe step, for example, "Test Step 1" or "Power Up". The Excel description column in thereport defines the descriptive text of the current step, and the descriptive text is displayedin the test case viewing and editing device. The Excel execution action column in thereport defines the specific action to be executed by the test system for the current step,and the details of the action are shown in FIG. 4. The Excel operation content column inthe report defines the content information for the action execution of the current step, andthe details of the information are shown in FIG. 4. The Excel parameter column in thereport defines the parameter information on which the action execution of the currentstep depends, and the details of the parameter information are shown in FIG. 4. The Excelannotation column in the report defines the annotative information of the current step.As shown in FIG. 4, in this embodiment, execution types of the test case include: anexecution action type, an operation content type, and a parameter type. The executionaction type includes: defining a test step, defining a test variable, calling a function andreturning an error code, checking a last error code, and checking a variable range andreturning an error code. Content in the operation content type and the parameter typeone-to-one corresponds to entries in the execution action type.In this embodiment, the action of defining the test step is represented by a string,including but not limited to string "define_test_step". When the test system reads the cell,if content of the cell is the same as the preset step string "define_test_step", it isdetermined that this row is a definition of one test step, and in this case, content of the"Test Step", "Name", and "Description" columns is valid; or if content of the cell isdifferent from the preset step string, content of the "Test Step", "Name", and"Description" columns is invalid, and the "Test Step", "Name", and "Description"columns need to be left blank.Operation content corresponding to the action of defining the test step includes a normalstep (normal_step) and a test termination step (test_tear_down). The normal step is aroutine test step. When a test process is terminated early due to an error or another reason,all normal steps are skipped and the test termination step is executed directly. The testtermination step is at the end of all test steps. A parameter corresponding to the action ofdefining the test step does not exist and should be left blank.The action of defining the test variable is represented by a string, including but notlimited to string "define_variable". When the test system reads the cell, if content of thecell is the same as the preset variable string "define_variable", it is determined that thisrow is a definition of one variable, and a new variable is requested based on otherinformation in this row.Operation content corresponding to the action of defining the test variable is a variablename, and any string representing an identifier can be input as the defined variable name.A parameter corresponding to the action of defining the test variable is a stringcontaining two fields: a variable type and an initial value, where the fields are separatedby a character "|". For example, if a variable of a double type has an initial value of 3.5,the parameter herein is "double|3.5".The action of calling the function and returning the error code is represented by a string,including but not limited to string "call_function". When the test system reads the cell, ifcontent of the cell is the same as the preset function string "call_function", it isdetermined that this row is a function call of the test system, and the test system searchesfor a corresponding function based on a function name and calls the function based onthe parameter defined in this row.Operation content corresponding to the action of calling the function and returning theerror code is the function name. An existing function name in the test system may beinput herein.A parameter corresponding to the action of calling the function and returning the errorcode is a string containing 0 or a plurality of fields, where each of the fields correspondsto one parameter value, and the fields are separated by the character "|". For example, if afunction has two parameters of the double type, namely, 3.5 and 5.6, the parameter hereinis "3.5|5.6".The action of checking the last error code is represented by a string, including but notlimited to string "check_last_error". When the test system reads the cell, if content of thecell is the same as the preset check string "check_last_error", it is determined that thisrow is an error code detection operation, and after an error is detected, based on adefinition of operation content of this row, an operation of writing error information intoa specific variable or exiting the test process is performed.The operation content corresponding to the action of checking the last error codeincludes but is not limited to two types: setting a variable (set_variable) and exiting thetest (exit_on_fail). The setting a variable means that after an error occurs in the test, errorinformation is written into the corresponding variable, and the test continues; and theexiting the test means that after the error occurs in the test, the test system immediatelyjumps to the test termination step and the test termination is implemented to terminate thetest.A parameter corresponding to the action of checking the last error code is valid onlywhen the operation content is to set the variable, indicating a name of the variable to bewritten. When the operation content is to exit the test, the parameter cell should be leftblank.The action of checking the variable range and returning the error code is represented by astring, including but not limited to string "check_var_range". When the test system readsthe cell, if content of the cell is the same as the preset variable string "check_var_range",it is determined that this row is testing and determining of variable detection, and upperand lower limits of the detection and a corresponding variable are defined in othercolumns of this row.Operation content corresponding to the action of checking the variable range andreturning the error code is a name of the detected variable.A parameter corresponding to the action of checking the variable range and returning theerror code is a string containing two fields, namely, a low threshold and a high threshold,where each of the thresholds corresponds to one parameter value, and the fields areseparated by the character "|". For example, if it is necessary to determine that thevariable is between 3.5 and 5.6, the parameter herein is "3.5|5.6". If it is necessary todetermine that the variable is equal to 3.5, the parameter herein is "3.5|3.5". A task ofbuilding the test system is divided into two subtasks. In this way, a professionaldeveloper can focus on designing an architecture and an API of the test system, while thetester can focus on setting the test script and the parameter, such that these two subtaskscan be carried out simultaneously. This simplifies design of the test system, improves thedevelopment efficiency of the test system, and reduces the development difficulty of thetest system.Specifically, an embodiment provides a test case and system for message sending basedon Excel file loading. An Excel file includes a test step column, a name column, adescription column, an execution action column, an operation content column, aparameter column, and an annotation column. The test case and system for messagesending include the Excel file, a test case viewing and editing device that loads the Excelfile, and a test case executor that executes the Excel file.As shown in Table 1, the Excel file contains one case that is intended to connect a bustool, send one frame of a CAN message to a tested system, determine whether themessage is successfully sent, and finally disconnect the bus tool.As shown in Table 1, an execution action in a first row is "define_test_step", whichmeans defining a test step. In this row, a step number is 1; a step name is "Connect"; adescription is "Connect hardware", which means connecting the bus tool; and operationcontent is "normal_step", indicating that this step is a normal step.As shown in Table 1, an execution action in a second row is "define_variable", whichmeans defining a variable. Operation content is variable name "vTransmitResult"; and aparameter is "double|0", where a variable type is double and an initial value is 0.As shown in Table 1, an execution action in a third row is "call_function", which meanscalling a system function. Operation content is function name "app. connect", whichmeans connecting a bus tool. A parameter is left blank because the function requires noparameter. If the function is successfully executed, a value 1 is returned; otherwise avalue 0 is returned.As shown in Table 1, an execution action in a fourth row is "check_last_error", whichmeans detecting a last error. Operation content is "exit_on_fail", which means that if alast operation fails, a test is immediately exited. This action requires no parameterbecause the operation content is "exit_on_fail".As shown in Table 1, an execution action in a fifth row is "define_test_step", whichmeans defining a test step. In this row, a step number is 2; a step name is "Transmit"; adescription is "Msg. Transmit", which means sending a message; and operation content is"normal_step", indicating that this step is a normal step.As shown in Table 1, an execution action in a sixth row is "call_function", which meanscalling a system function. Operation content is function name "com.transmit_can",which means sending a CAN message. This function requires one parameter, namely, aCAN message pointer, so required message MSG1 is given in a parameter column.As shown in Table 1, an execution action in a seventh row is "check_last_error", whichmeans detecting a last error. Operation content is "set_variable", which means that whenan error is detected, error information is written into a variable. A parameter is"vTransmitResult", indicating a name of the variable to be written.As shown in Table 1, an execution action in an eighth row is "check_var_range", whichmeans detecting whether a detected variable is within a range. Operation content is"vTransmitResult", which means that a name of the detected variable is"vTransmitResult". A parameter is "1|1", which means detecting whether the variable is1.As shown in Table 1, an execution action in a ninth row is "define_test_step", whichmeans defining a test step. In this row, a step number is 3; a step name is "Disconnect"; adescription is "Disconnect Hardware", which means disconnecting the bus tool; andoperation content is "test_tear_down", indicating that this step is a test termination step.If the previous step exits during the execution, this step is executed unconditionally. Thisstep requires no parameter.As shown in Table 1, an execution action in a tenth row is "call_function", which meanscalling a system function. Operation content is function name "app.disconnect", whichmeans disconnecting the bus tool. The function requires no parameter.As shown in Table 1, after loading this file, the test case viewing and editing deviceprovides a user with a test script viewing function. After loading this file, the test caseexecutor executes tests row by row from top to bottom based on the content defined inthe Excel file.As shown in Table 1, to modify content of the sent message, the tester only needs to openthe Excel file and modify content in a cell in which MSG1 is located. To add a newto-be-sent message, the tester only needs to open the Excel file, add a new row in the step2, and edit the row based on the execution action of "call_function".Table 1 Execution action typesAn embodiment provides a test system based on Excel file loading, including: an editingmodule configured to edit an Excel test case; and a test module configured to test theExcel test case.In this embodiment, the test system based on Excel file loading may further include: anExcel test case editing method, an Excel test case execution method, and an Excel testcase execution classification. The Excel test case editing method may be composed of atest case viewing and editing device and an Excel program. The Excel test case executionmethod is composed of a test case executor and an Excel program. The test caseexecution classification is composed of execution action classification, operation contentclassification, and parameter classification.In this embodiment, specific processes of the modules and the methods have beendescribed in detail in the above test method based on Excel file loading.An embodiment provides a test device based on Excel file loading, including an Exceltest case editing module, an Excel test case execution module, and an Excel test caseexecution action classification module.The Excel test case editing module is adapted to edit an Excel test case. The Excel testcase execution action classification module is adapted to define a test operation executedby the Excel test case execution module. The Excel test case execution module is adaptedto test the Excel test case based on the defined test operation.In this embodiment, the test device based on Excel file loading is adapted to test the Exceltest case using the above test method based on Excel file loading.To sum up, the present disclosure edits an Excel test case, and tests the Excel test case. Inthis way, a test script is implemented based on an Excel file, and it is only required tomodify the Excel file to modify the test script, thereby preventing a program from beingfrequently modified in a process of changing the script, and improving aparameterization capability of a test system.In several embodiments provided in the present disclosure, it should be understood thatthe disclosed device and method may be implemented in other manners. The deviceembodiments described above are merely examples. For example, the flowcharts andblock diagrams in the accompanying drawings show the possible implementationarchitecture, functions, and operations of the devices, methods, and computer programproducts according to multiple embodiments of the present disclosure. Each block in theflowcharts or block diagrams may represent a module, a program segment, or a part ofcode, and the module, the program segment, or the part of code contains one or moreexecutable instructions used to implement specified logical functions. It should also benoted that, in some alternative implementations, the functions marked in the blocks mayalternatively occur in a different order from that marked in the drawings. For example,two consecutive blocks can actually be executed in parallel, or sometimes can beexecuted in the reverse order, depending on the functions involved. It should also benoted that each block in the flowcharts and / or block diagrams and combinations of theblocks in the flowcharts and / or block diagrams may be implemented by a dedicatedhardware-based system for executing specified functions or operations, or may beimplemented by a combination of dedicated hardware and computer instructions.In addition, all functional modules in the embodiments of the present disclosure may beintegrated into one independent part, or each of the modules may exist alone physically,or two or more modules may be integrated into one independent part.The functions, if implemented in the form of a software functional module and sold orused as a stand-alone product, may be stored in a computer-readable storage medium.Based on such understanding, the technical solutions of the present disclosure essentiallyor the part contributing to the prior art may be implemented in a form of a softwareproduct. The computer software product may be stored in a storage medium, andincludes several instructions for enabling a computer device (which may be a personalcomputer, a server, a network device, or the like) to perform all or some steps of themethods described in the embodiments of the present disclosure. The foregoing storagemedium includes: any medium that can store program code, such as a USB flash disk, aremovable hard disk, a read-only memory (ROM), a random access memory (RAM), amagnetic disk, or an optical disc.Under the inspiration of the above ideal examples of the present disclosure, a skilledperson can absolutely make various changes and modifications through the abovedescription content without departing from the scope of the technical idea of the presentdisclosure. The technical scope of the present disclosure is not limited to the content ofthe description, which must be determined according to the scope of the claims.
Claims
1. A test method based on Excel file loading, comprising: editing an Excel test case; and testing the Excel test case.
2. The test method based on Excel file loading according to claim 1, wherein a method for editing the Excel test case comprises: using a test case viewing and editing device to create an Excel file, load the Excel file, display detailed information of the test case to a tester, and edit the test case, wherein when an Excel program is started, the Excel file created by using the test case viewing and editing device is opened, wherein each sheet of the Excel file is a test case, and each test case comprises a test step, a name, a description, an execution action, an operation content, a parameter, and an annotation.
3. The test method based on Excel file loading according to claim 2, wherein an Excel test step column in the Excel file sequentially defines an identifier of a step of a current test case; an Excel name column in the Excel file defines a displayed name of the step; an Excel description column in the Excel file defines a descriptive text of a current step, and the descriptive text is displayed in the test case viewing and editing device; an Excel execution action column in the Excel file defines a specific action to be executed by a test system for the current step; an Excel operation content column in the Excel file defines content information for action execution of the current step; an Excel parameter column in the Excel file defines parameter information, and the action execution of the current step depends on the parameter information; and an Excel annotation column in the Excel file defines annotative information of the current step.
4. The test method based on Excel file loading according to claim 3, wherein a method for testing the Excel test case comprises: executing the Excel test case by using a test case executor, writing a test result into an Excel result file in an execution process, and generating a test report, wherein during running, the test case executor loads and displays content of the Excel file, executes test cases one by one, displays the test result, and generates the test report successively; after the Excel test case is tested, the Excel program displays the test report after being started, wherein a test report file comprises a plurality of sheets, and each of the sheets represents a report of one test case; and each report comprises a test result, a test step, a name, a description, an execution action, an operation content, a parameter, and an annotation.
5. The test method based on Excel file loading according to claim 4, wherein an test result column in the report contains a verdict result of a current test step, and the verdict result includes OK, NOK, or COK; an Excel test step column in the report sequentially defines an identifier of a step of a current test case; an Excel name column in the report defines a displayed name of the step; an Excel description column in the report defines a descriptive text of a current step, and the descriptive text is displayed in the test case viewing and editing device; an Excel execution action column in the report defines a specific action to be executed by the test system for the current step; an Excel operation content column in the report defines content information for action execution of the current step; an Excel parameter column in the report defines parameter information, and the action execution of the current step depends on the parameter information; and an Excel annotation column in the report defines annotative information of the current step.
6. The test method based on Excel file loading according to claim 5, wherein execution types of the test case comprise: an execution action type, an operation content type, and a parameter type; the execution action type comprises: defining a test step, defining a test variable, calling a function and returning an error code, checking a last error code, and checking a variable range and returning an error code; and content in the operation content type and the parameter type is in one-to-one correspondence to entries in the execution action type.
7. The test method based on Excel file loading according to claim 6, wherein the action of defining the test step is represented by a string, wherein when the string is read, if content of the string is identical to a preset step string, it is determined that this row is a definition of one test step, and in this case, content of the test step column, the name column, and the description column is valid; or if the content of the string is different from the preset step string, the content of the test step column, the name column, and the description column is invalid and blank; operation content corresponding to the action of defining the test step comprises: a normal step and a test termination step; the normal step is a routine test step, and when a test process is terminated early due to an error or another reason, all normal steps are skipped and the test termination step is executed directly, wherein the test termination step is at the end of all test steps; a parameter corresponding to the action of defining the test step does not exist and is blank; the action of defining the test variable is represented by a string, wherein when the string is read, if content of the string is identical to a preset variable string, it is determined that this row is a definition of one variable, and a new variable is requested based on other information in this row; operation content corresponding to the action of defining the test variable is a variable name, and any string representing an identifier is input as the defined variable name; a parameter corresponding to the action of defining the test variable is a string containing two fields: a variable type and an initial value, wherein the fields are separated by a character "|"; the action of calling the function and returning the error code is represented by a string, wherein when the string is read, if content of the string is identical to a preset function string, it is determined that this row is a function call of the test system, and the test system searches for a corresponding function based on a function name and calls the function based on a parameter defined in this row; operation content corresponding to the action of calling the function and returning the error code is the function name; a parameter corresponding to the action of calling the function and returning the error code is a string containing 0 or a plurality of fields, wherein each of the fields corresponds to one parameter value, and the fields are separated by the character "|"; the action of checking the last error code is represented by a string, wherein when the string is read, if content of the string is identical to a preset check string, it is determined that this row is an error code detection operation, and after an error is detected, based on a definition of operation content of this row, an operation of writing error information into a specific variable or exiting the test process is performed; operation content corresponding to the action of checking the last error code comprises: setting a variable and exiting a test, wherein setting the variable means that after an error occurs in the test, the error information is written into the corresponding variable, and the test continues; and exiting the test means that after the error occurs in the test, the test system immediately jumps to the test termination step and the test termination is implemented to terminate the test; a parameter corresponding to the action of checking the last error code is valid only when the operation content is to set the variable, indicating a name of the variable to be written, and when the operation content is to exit the test, a cell of the parameter is blank; the action of checking the variable range and returning the error code is represented by a string, wherein when the string is read, if content of the string is identical to a preset variable string, it is determined that this row is testing and determining of variable detection, and upper and lower limits of the detection and a corresponding variable are defined in other columns of this row; operation content corresponding to the action of checking the variable range and returning the error code is a name of the detected variable; and a parameter corresponding to the action of checking the variable range and returning the error code is a string containing two fields: a low threshold and a high threshold, wherein each of the thresholds corresponds to one parameter value, and the fields are separated by the character "|".
8. A test system based on Excel file loading, comprising: an editing module configured to edit an Excel test case; and a test module configured to test the Excel test case.
9. A test device based on Excel file loading, comprising: an Excel test case editing module, an Excel test case execution module, and an Excel test case execution action classification module, wherein the Excel test case editing module is configured to edit an Excel test case; the Excel test case execution action classification module is configured to define a test operation executed by the Excel test case execution module; and the Excel test case execution module is configured to test the Excel test case based on the defined test operation.