WO2023093198A1 - 基于 excel 文件加载的测试方法、系统及设备 - Google Patents

基于 excel 文件加载的测试方法、系统及设备 Download PDF

Info

Publication number
WO2023093198A1
WO2023093198A1 PCT/CN2022/116978 CN2022116978W WO2023093198A1 WO 2023093198 A1 WO2023093198 A1 WO 2023093198A1 CN 2022116978 W CN2022116978 W CN 2022116978W WO 2023093198 A1 WO2023093198 A1 WO 2023093198A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
excel
action
variable
column
Prior art date
Application number
PCT/CN2022/116978
Other languages
English (en)
French (fr)
Inventor
刘矗
谢乐寅
莫莽
Original Assignee
上海同星智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海同星智能科技有限公司 filed Critical 上海同星智能科技有限公司
Priority to US18/267,127 priority Critical patent/US20240118994A1/en
Priority to JP2023547915A priority patent/JP7628346B2/ja
Priority to CA3206550A priority patent/CA3206550A1/en
Priority to MX2023010690A priority patent/MX2023010690A/es
Priority to KR1020237011066A priority patent/KR20230082020A/ko
Priority to EP22897289.9A priority patent/EP4322010A1/en
Publication of WO2023093198A1 publication Critical patent/WO2023093198A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3698Environments for analysis, debugging or testing of software

Definitions

  • the invention belongs to the technical field of automobile test systems, and in particular relates to a test method, system and equipment based on Excel file loading.
  • test system is roughly divided into two parts: the test system operating environment and the test script.
  • the test script can be edited arbitrarily by the tester according to the test requirements.
  • a general test script is implemented by a specific programming language, such as C language, C #, Python , VBScript , etc.
  • test scripts testers can define test logic and test parameters. When these two contents need to be written and changed according to test requirements, test system developers often need to participate and realize it by editing and compiling test scripts. Therefore, editing test scripts involves modification of the program code corresponding to the script, which will lead to tight binding between test system development and program development, script modification relies on professionals, and low efficiency of test logic and test parameter modification.
  • the purpose of the present invention is to provide a test method, system and equipment based on Excel file loading.
  • the invention provides a kind of testing method based on Excel file loading, comprising:
  • the method for editing an Excel test case includes:
  • each sheet of the Excel file is a test case, and each test case includes: test steps, names, descriptions, execution actions, and operation content , parameters, and comments.
  • the Excel test step column defines the step identification of the current test case in order
  • the Excel name column defines the display name of the step in the Excel file
  • the Excel description column defines the explanatory text of the current step, which will be displayed in the test case view and editor;
  • the Excel execution action column defines the specific action that the current step needs to be performed by the test system
  • the Excel operation content column defines the content information for the action execution of the current step
  • the Excel parameter column defines the parameter information that the action execution of the current step depends on
  • the Excel comment column in the Excel file defines the commentary information of the current step.
  • the described method for testing the Excel test case comprises:
  • test case executor The running process of the test case executor is executed in sequence: loading and displaying the content of the Excel file, executing test cases one by one, displaying test results and generating test reports;
  • the test report file contains several sheets , and each sheet represents a report of a test case
  • Each report includes: test result, test step, name, description, execution action, operation content, parameter and comment.
  • test result column in the report includes the judgment of the current test step, and the judgment content includes: OK , NOK , COK ;
  • the Excel test step column in the report defines the step identification of the current test case in order
  • the Excel name column in the report defines the display name for the step
  • the Excel description column in the report defines the descriptive text of the current step, which will be displayed in the test case viewer and editor;
  • the Excel execution action column in the report defines the specific actions that the current step needs to be performed by the test system
  • the Excel operation content column in the report defines the content information for the action execution of the current step
  • the Excel parameter column defines the parameter information that the action execution of the current step depends on
  • the Excel comment column in the report defines commentary information for the current step.
  • execution classification of test cases includes: execution action classification, operation content classification and parameter classification;
  • the execution action classification includes: defining test steps, defining test variables, calling functions and returning error codes, checking last error codes, checking variable ranges and returning error codes;
  • the contents in the operation content category and the parameter category correspond one-to-one to the items in the execution action category.
  • test step column The contents of the three columns , "name column” and “description column” are valid; if the content is different from the preset character string, the contents of the three columns “test step column”, "name column” and “description column” are invalid , should be left blank;
  • the operation content corresponding to the defined test step action includes: general steps and test termination steps;
  • the general steps are conventional test steps. When the test process is terminated early due to errors or other reasons, all general steps will be skipped and the test termination steps will be executed directly. The test termination steps are at the end of all test steps;
  • test variable The action of defining a test variable is a character string.
  • the character string When reading the character string, if its content is the same as the preset variable character string, it will be identified that this line is a variable definition, and a variable will be applied based on other information in this line new variable;
  • the operation content corresponding to the action of defining the test variable is a variable name, and any character string representing an identifier is input as the defined variable name;
  • the parameter corresponding to the definition test variable action is a string containing two fields: variable type and initial value, and the fields are separated by the character "
  • the action of calling a function and returning an error code is a character string.
  • this line is a test system function call, and the test system will use the name of the function to Search for the corresponding function and call this function according to the parameters defined by this line;
  • the operation content corresponding to the action of calling the function and returning the error code is a function name
  • the parameter corresponding to the action of calling the function and returning the error code is a string containing 0 or more fields, each field corresponds to a parameter value, and the fields are separated by the character "
  • the action of checking the last error code is a character string.
  • the character string When reading the character string, if its content is the same as the preset check character string, then it is recognized that this line is an error code detection operation. After an error is detected, according to this The definition of the operation content of the line, choose to write the error information into a specific variable, or exit the test process;
  • the operation content corresponding to the action of checking the last error code includes: setting variables and exiting the test;
  • Setting a variable means that when the test encounters an error, write the error information into the corresponding variable, and the test continues; exiting the test means that when the test encounters an error, the test terminates immediately, and jumps to the test termination step to continue execution;
  • the parameter corresponding to the action of checking the last error code is only valid when the operation content is to set a variable, indicating the name of the variable that needs to be written; when the operation content is to exit the test, the parameter cell should be left blank;
  • the operation content corresponding to the action of checking the variable range and returning the error code is the name of the detected variable
  • the parameter corresponding to the action of checking the variable range and returning the error code is a string containing 2 fields, which are the low threshold and the high threshold, each threshold corresponds to a parameter value, and the characters "
  • the present invention also provides a kind of testing system based on Excel file loading, comprising:
  • the test module is used to test the Excel test cases.
  • the present invention also provides a kind of testing equipment based on Excel file loading, comprising:
  • the Excel test case editing module is suitable for editing Excel test cases
  • the execution action classification module of described Excel test case is suitable for defining the test operation that Excel test case execution module executes
  • the Excel test case execution module is suitable for testing the Excel test case according to a defined test operation.
  • the beneficial effect of the present invention is, the present invention is by editing the Excel test case; And the Excel test case is tested, has realized that the test script is realized by the Excel file, and the modification of the test script only needs to revise the Excel file, thus avoiding the need to modify the script in the process of changing the script. Modify the program frequently to improve the parameterization ability of the test system.
  • Fig. 1 is the flow chart of the test method loaded based on the Excel file of the present invention
  • Fig. 2 is the schematic diagram of editing principle of the Excel test case of the present invention.
  • Fig. 3 is the operating principle schematic diagram of the Excel test case of the present invention.
  • Fig. 4 is a schematic diagram of the execution action classification of the Excel test case of the present invention.
  • the present embodiment provides a kind of test method based on Excel file loading, including: editing Excel test case; , the test script is realized through the Excel file, and the modification of the test script only needs to modify the Excel file, thereby avoiding the need to modify the program frequently in the process of changing the script, and improving the parameterization ability of the test system; the tedious script development and modification work in the traditional test system It is abstracted into reading and writing of Excel files, so that testers can write and modify test scripts in Excel , and testers do not need to master any programming language, thus decoupling the development of the test system and the development of test scripts, and improving the test scripts. The development efficiency is improved, and the development difficulty of the test script is reduced. Using the test system of the present invention will reduce the dependence on the programming level of testers.
  • the method for described editing Excel test case comprises: check and editor creates Excel file by test case, loads Excel file, shows the detailed information of test case to tester and edits test case ;
  • the Excel program is used by testers to edit test cases; when the Excel program starts, it will open the Excel file created by the test case viewer and editor.
  • Each sheet of the Excel file is a test case, and each test case includes: Test steps, names, descriptions, execution actions, operation content, parameters, and comments.
  • the Excel test step column in the Excel file defines the step identification of the current test case in order, such as "1", "2", "1.1", “1.2”etc.; the Excel name in the Excel file
  • the column defines the display name of the step, such as " TestStep 1", " PowerUp ", etc.;
  • the Excel description column in the Excel file defines the explanatory text of the current step, which will be displayed in the test case viewer and editor;
  • the The Excel execution action column in the Excel file defines the specific action that the current step needs to be executed by the test system. See Figure 4 for the specific content of this action; the Excel operation content column in the Excel file defines the content information for the action execution of the current step.
  • the method for testing the Excel test case includes: executing the Excel test case by the test case executor, and writing the test results into the Excel result file during execution to generate a test report
  • the user can open the Excel program to view the test report; the running process of the test case executor is executed in sequence: loading and displaying the contents of the Excel file, executing test cases one by one, displaying test results and generating test reports; After the end, the Excel program will display the test report after starting.
  • the test report file contains several sheets , and each sheet represents a report of a test case; each report includes: test result, test step, name, description, execution action, operation Content, parameters and comments.
  • the test result column in the report includes the judgment of the current test step, and the judgment content includes: OK , NOK , COK and so on.
  • the Excel test step column in the report defines the step identification of the current test case in order, such as "1", “2", “1.1”, “1.2” and so on;
  • the Excel name column in the report defines the display name of the step , such as " TestStep 1", " PowerUp ", etc.;
  • the Excel description column in the report defines the descriptive text of the current step, which will be displayed in the test case viewer and editor;
  • the Excel execution action column in the report defines the current The step requires a specific action performed by the test system.
  • the Excel operation content column in the report defines the content information for the action execution of the current step.
  • the Excel parameter column in the report defines the parameter information that the action execution of the current step depends on. The specific content of this information is shown in Figure 4; the Excel comment column in the report defines the annotative information of the current step.
  • the execution classification of test cases includes: execution action classification, operation content classification and parameter classification;
  • the execution action classification includes: defining test steps, defining test variables, calling functions and returning errors code, check the last error code, check variable range and return error code; the content in the operation content category and parameter category corresponds to the entry in the execution action category.
  • the action of defining a test step is a character string, including but not limited to the character string " define_test_step " .
  • the test system reads this cell, if its content is the same as the preset step character If the string " define_test_step " is the same, it is known that this row is a definition of a test step, and at this time the contents of the three columns “test step column”, “name column” and “description column” are valid; if this unit If the content of the cell is different from this string, the contents of the three columns “Test Step Column", "Name Column” and “Description Column” are invalid and should be left blank.
  • the operation content corresponding to the defined test step action includes but not limited to two types: normal step ( normal_step ) and test termination step ( test_tear_down ).
  • General steps are routine test steps. When the test process is terminated early due to errors or other reasons, all general steps will be skipped and the test termination steps will be executed directly. The test termination steps are at the end of all test steps.
  • the parameter corresponding to the defined test step action does not exist and should be left blank.
  • the defined test variable action is a string, including but not limited to the string " define_variable ".
  • the test system reads this cell, if its content is the same as the preset variable string " define_variable ", It is known that this line is a definition of a variable, and the test system will apply for a new variable based on other information in this line.
  • the operation content corresponding to the action of defining a test variable is a variable name, where any character string representing an identifier can be input as the defined variable name.
  • the parameter corresponding to the action of defining test variables is a string containing two fields: variable type and initial value, and the fields are separated by characters "
  • a variable of double type has an initial value of 3.5, and the parameter here is " double
  • the action of calling the function and returning an error code is a string, including but not limited to the string " call_function " .
  • the test system reads this cell, if its content is the same as the preset function string " call_function " ", you know that this line is a test system function call, and the test system will search for the corresponding function according to the function name and call this function according to the parameters defined in this line.
  • the operation content corresponding to the action of calling the function and returning the error code is the function name, and the function name existing in the test system can be input here.
  • the parameter corresponding to the return error code action is a string containing 0 or more fields, each field corresponds to a parameter value, and the fields are separated by the character "
  • the action of checking the last error code is a string, including but not limited to the string "check_last_error " .
  • the test system reads this cell, if its content is the same as the preset check string " check_ last _ error ", it is known that this line is an error code detection operation. After detecting an error, it will choose to write the error information into a specific variable or exit the test process according to the definition of the operation content of this line.
  • the operations corresponding to the action of checking the last error code include but are not limited to two types: setting variables ( set_variable ) and exiting tests ( exit_on_fail ).
  • Setting a variable means that when the test encounters an error, the error information is written into the corresponding variable, and the test continues; exiting the test means that when the test encounters an error, the test is terminated immediately and jumps to the test termination step ( test_tear _ down ) to continue execution.
  • the parameter corresponding to the action of checking the last error code is only valid when the operation content is to set a variable, indicating the name of the variable to be written. When the action content is to exit the test, this parameter cell should be left blank.
  • the action of checking the variable range and returning an error code is a string, including but not limited to the string " check_var_range " , when the test system reads this cell, if its content is the same as the preset variable string " check _ var _ range ”, you know that this line is a test judgment of a detection variable, and the upper and lower limits of detection and the corresponding variables are defined in other columns of this line.
  • the operation content corresponding to the action of checking variable range and returning an error code is the name of the detected variable.
  • the parameters corresponding to the action of checking the variable range and returning the error code are a string containing 2 fields, namely the low threshold and the high threshold, each threshold corresponds to a parameter value, and the characters "
  • this embodiment provides a message sending test case and system based on Excel file loading
  • the Excel file includes: test step column, name column, description column, execution action column, operation content column, parameter column, comment Column; described message sending test case and system include this Excel file and load the test case viewer and editor of this Excel file, execute the test case executor of this Excel file.
  • this Excel file contains a use case whose intention is to connect the bus tool, send a frame of CAN message to the system under test, then judge whether the message is sent successfully, and finally disconnect the bus tool.
  • the execution action of the first line is " define_test_step”, that is, to define the test step; the step number of this line is 1; the step name is “ Connect “; the description is “ Connecthardware “, that is, to connect the bus tool; the operation content is " normal_step " , indicating that this step is a general step.
  • the execution action of the second line is " define_variable ", that is, to define a variable; the content of the operation is the variable name " vTransmitResult "; the parameter is the type and initial value of the variable " double
  • the execution action of the third line is " call_function ", that is, calling the system function; the operation content is the function name " app . connect ", that is, connecting the connection bus tool; since this function does not need parameters, the parameters Leave blank; the function returns 1 if successful, and 0 otherwise.
  • the execution action of the fourth line is " check_last_error ", that is, to detect the last error; the operation content is "exit_on_fail " , that is, if the last operation fails , the test will be exited immediately; Since the operation content of this action is " exit_on_fail ", it does not need parameters.
  • the execution action of the fifth line is " define_test_step " , that is, to define the test step, and the step number of this line is 2; the step name is “ Transmit “; the description is “ Msg . Transmit ", that is, to send message; the operation content is " normal_step " , indicating that this step is a normal step.
  • the execution action of the sixth line is " call_function ", that is, to call the system function; the operation content is the function name " com.transmit_can ", that is, to send the CAN message; this function requires a parameter, namely CAN message pointer, so the required message MSG 1 is given in the parameter column.
  • the execution action of the seventh line is " check_last_error ", that is, to detect the last error ;
  • the operation content is " set_variable ", that is , when an error is detected, the error information is written into the variable ;
  • the parameter is " vTransmitResult ", that is, the name of the variable to be written.
  • the execution action of the eighth line is "check_var_range”, that is, to check whether the variable is within the range; the operation content is “vTransmitResult " , that is, the name of the variable to be checked is “ vTransmitResult "; the parameter is "1
  • the execution action of the ninth line is " define_test_step " , that is, to define the test step, and the sequence number of the changed step is 3; the step name is “ Disconnect “; the step description is “ DisconnectHardware “, that is, to disconnect The connection of the bus tool; the operation content is " test_tear_down ", which means that this is a test termination step, if the aforementioned step exits during execution, this step will be executed unconditionally. This step requires no parameters.
  • the execution action of the tenth line is " call_function ", that is, to call the system function; the operation content is the function name " app.disconnect ", that is , to disconnect the bus tool; this function does not need parameters.
  • test case viewer and editor loads this file, it will provide the user with the viewing function of the test script; after the test case executor loads this file, it will execute it line by line from top to bottom according to the content defined in the Excel file test.
  • This embodiment also provides a test system based on Excel file loading, including: an editing module for editing Excel test cases; and a test module for testing the Excel test cases.
  • the test system loaded based on the Excel file can also include: Excel test case editing method, Excel test case execution method and the execution classification of Excel test case; Excel test case editing method can be viewed and editor by test case,
  • the Excel program is composed of two parts; the Excel test case execution method is composed of the test case executor and the Excel program; the execution classification of the test case is composed of three parts: execution action classification, operation content classification and parameter classification.
  • the present embodiment also provides a kind of test equipment based on Excel file loading, including: Excel test case editing module, Excel test case execution module and the execution action classification module of Excel test case;
  • the Excel test case editing module is suitable for editing Excel test cases; the execution action classification module of the Excel test case is suitable for defining the test operation performed by the Excel test case execution module; the Excel test case execution module is suitable for testing according to the definition Operate the Excel test case for testing.
  • the test device based on the loading of the Excel file is suitable for testing the Excel test case by using the above-mentioned testing method based on the loading of the Excel file.
  • the present invention is by editing the Excel test case; and the Excel test case is tested, and the test script is realized by the Excel file, and the modification of the test script only needs to modify the Excel file, thereby avoiding the need for frequent revisions in the process of changing the script program to improve the parameterization capability of the test system.
  • each block in a flowchart or block diagram may represent a module, program segment, or part of code that includes one or more Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.
  • each functional module in each embodiment of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
  • the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM , Read - OnlyMemory ), random access memory (RAM , RandomAccessMemory ), magnetic disk or optical disk, and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明属于汽车测试系统技术领域,具体涉及一种基于 Excel文件加载的测试方法、系统及设备,其中基于 Excel文件加载的测试方法包括:编辑 Excel测试用例;以及对 Excel测试用例进行测试,实现了将测试脚本通过 Excel文件来实现,修改测试脚本只要修改 Excel文件,从而避免更改脚本的过程中需要频繁修改程序,提升测试系统参数化能力。

Description

基于Excel文件加载的测试方法、系统及设备 技术领域
本发明属于汽车测试系统技术领域,具体涉及一种基于 Excel文件加载的测试方法、系统及设备。
背景技术
一般的测试系统大体分为测试系统运行环境和测试脚本两大块内容,其中的测试脚本可由测试人员按照测试需求任意编辑。一般的测试脚本由特定的编程语言来实现,例如 C语言、 C#、 PythonVBScript等。
在测试脚本中,测试人员可定义测试逻辑和测试参数,当这两个内容需要根据测试需求编写、变更时,往往需要测试系统开发人员参与,并通过编辑和编译测试脚本来实现。因此编辑测试脚本涉及到脚本对应的程序代码的修改,这会导致测试系统开发和程序开发紧密绑定,脚本修改依赖专业人员,测试逻辑和测试参数修改效率低下的问题。
因此,基于上述技术问题需要设计一种新的基于 Excel文件加载的测试方法、系统及设备。
技术问题
本发明的目的是提供一种基于 Excel文件加载的测试方法、系统及设备。
技术解决方案
为了解决上述技术问题,本发明提供了一种基于 Excel文件加载的测试方法,包括:
编辑 Excel测试用例;以及
Excel测试用例进行测试。
进一步,所述编辑 Excel测试用例的方法包括:
通过测试用例查看和编辑器创建 Excel文件、加载 Excel文件、向测试人员展示测试用例的详细信息和编辑测试用例;
Excel程序启动时会打开由测试用例查看和编辑器所创建的 Excel文件, Excel文件的每一个 sheet是一个测试用例,每一个测试用例中包括:测试步骤、名称、说明、执行动作、操作内容、参数和注释。
进一步,所述 Excel文件中 Excel测试步骤列按顺序定义当前测试用例的步骤标识;
所述 Excel文件中 Excel名称列定义该步骤的显示名称;
所述 Excel文件中 Excel说明列定义当前步骤的说明性文字,该文字将显示在测试用例查看和编辑器中;
所述 Excel文件中 Excel执行动作列定义当前步骤需要测试系统执行的特定动作;
所述 Excel文件中 Excel操作内容列定义当前步骤的动作执行针对的内容信息;
所述 Excel文件中 Excel参数列定义了当前步骤的动作执行依赖的参数信息;
所述 Excel文件中 Excel注释列定义了当前步骤的注释性信息。
进一步,所述对 Excel测试用例进行测试的方法包括:
通过测试用例执行器执行 Excel测试用例,在执行过程中将测试结果写入 Excel结果文件中生成测试报告;
测试用例执行器的运行过程按顺序执行:加载显示 Excel文件内容、逐条执行测试用例、显示测试结果和生成测试报告;
Excel测试用例测试结束后, Excel程序在启动后将显示测试报告,测试报告文件包含若干个 sheet,每个 sheet代表一个测试用例的报告;
每个报告包括:测试结果、测试步骤、名称、说明、执行动作、操作内容、参数和注释。
进一步,所述报告中测试结果列包含对当前测试步骤的判定,判定内容包括: OKNOKCOK
所述报告中 Excel测试步骤列按顺序定义了当前测试用例的步骤标识;
所述报告中 Excel名称列定义该步骤的显示名称;
所述报告中 Excel说明列定义当前步骤的说明性文字,该文字将显示在测试用例查看和编辑器中;
所述报告中 Excel执行动作列定义当前步骤需要测试系统执行的特定动作;
所述报告中 Excel操作内容列定义当前步骤的动作执行针对的内容信息;
所述报告中 Excel参数列定义当前步骤的动作执行依赖的参数信息;
所述报告中 Excel注释列定义当前步骤的注释性信息。
进一步,测试用例的执行分类包括:执行动作分类、操作内容分类和参数分类;
所述执行动作分类包括:定义测试步骤、定义测试变量、调用函数与返回错误码、检查上一次错误码和检查变量范围与返回错误码;
所述操作内容分类和参数分类中的内容与执行动作分类中的条目一一对应。
进一步,所述定义测试步骤动作为一个字符串,当读取该字符串时,若其内容与预设步骤字符串相同,则辨别此行是一个测试步骤的定义,此时“测试步骤列”、“名称列”、“说明列”这三个列的内容有效;若内容与预设字步骤符串不同,则“测试步骤列”、“名称列”、“说明列”这三列内容无效,应当留空;
所述定义测试步骤动作对应的操作内容包括:一般步骤和测试终止步骤;
一般步骤为常规的测试步骤,当测试过程由于错误或是其他原因提前终止时,将会跳过所有一般步骤,直接执行测试终止步骤,测试终止步骤都在所有测试步骤的最后;
所述定义测试步骤动作对应的参数不存在,应留空;
所述的定义测试变量动作是一个字符串,当读取该字符串时,若其内容与预设变量字符串相同,则辨别此行是一个变量的定义,并根据此行的其他信息申请一个新变量;
所述定义测试变量动作对应的操作内容是变量名称,输入任意表征标识符的字符串,作为所定义的变量名称;
所述定义测试变量动作对应的参数是一个包含两个字段的字符串:变量类型和初始值,字段之间通过字符“|”隔开;
所述调用函数与返回错误码动作是一个字符串,当读取该字符串时,若其内容与预设函数字符串相同,则辨识此行是一个测试系统函数调用,测试系统将根据函数名称搜索对应函数并根据此行所定义的参数调用此函数;
所述调用函数与返回错误码动作对应的操作内容是函数名称;
所述调用函数与返回错误码动作对应的参数是一个包含0个或多个字段的字符串,每个字段对应一个参数值,字段与字段之间通过字符“|”隔开;
所述检查上一次错误码动作是一个字符串,当读取该字符串时,若其内容与预设检查字符串相同,则辨识此行是一个检测错误码操作,检测到错误后,根据此行的操作内容的定义,选择将错误信息写入特定的变量,或退出测试过程;
所述检查上一次错误码动作对应的操作内容包括:设置变量和退出测试;
设置变量表示当测试遇到错误后,将错误信息写入对应的变量中,测试继续往下进行;退出测试表示当测试遇到错误后,测试立即终止,跳转到测试终止步骤继续执行;
所述检查上一次错误码动作对应的参数仅仅当操作内容是设置变量时才有效,表示需要写入的变量名称;当操作内容是退出测试时,此参数单元格应当留空;
所述的检查变量范围与返回错误码动作是一个字符串,当读取该字符串时,若其内容与预设变量字符串相同,则辨识此行是一个检测变量的测试判定,检测的上下限和对应的变量在此行的其他列中定义;
所述检查变量范围与返回错误码动作对应的操作内容是所检测的变量名称;
所述的检查变量范围与返回错误码动作对应的参数是一个包含2个字段的字符串,分别为低阈值和高阈值,每个阈值对应一个参数值,字段与字段之间通过字符“|”隔开。
第二方面,本发明还提供一种基于 Excel文件加载的测试系统,包括:
编辑模块,编辑 Excel测试用例;以及
测试模块,对 Excel测试用例进行测试。
第三方面,本发明还提供一种基于 Excel文件加载的测试设备,包括:
Excel测试用例编辑模块、 Excel测试用例执行模块和 Excel测试用例的执行动作分类模块;
所述 Excel测试用例编辑模块适于编辑 Excel测试用例;
所述 Excel测试用例的执行动作分类模块适于定义 Excel测试用例执行模块执行的测试操作;
所述 Excel测试用例执行模块适于根据定义的测试操对 Excel测试用例进行测试。
有益效果
本发明的有益效果是,本发明通过编辑 Excel测试用例;以及对 Excel测试用例进行测试,实现了将测试脚本通过 Excel文件来实现,修改测试脚本只要修改 Excel文件,从而避免更改脚本的过程中需要频繁修改程序,提升测试系统参数化能力。
本发明的其他特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点在说明书以及附图中所特别指出的结构来实现和获得。
为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。
附图说明
为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明的基于 Excel文件加载的测试方法流程图;
图2是本发明的 Excel测试用例的编辑原理示意图;
图3是本发明的 Excel测试用例的运行原理示意图;
图4是本发明的 Excel测试用例的执行动作分类示意图。
本发明的实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
如图1所示,本实施例提供了一种基于 Excel文件加载的测试方法,包括:编辑 Excel测试用例;以及对 Excel测试用例进行测试,解决传统测试程序可读性、可编辑性差的技术问题,将测试脚本通过 Excel文件来实现,修改测试脚本只要修改 Excel文件,从而避免更改脚本的过程中需要频繁修改程序,提升测试系统参数化能力;将传统的测试系统中繁琐的脚本开发和修改工作抽象成对 Excel文件的读写,使得测试人员可以在 Excel中编写和修改测试脚本,测试人员无需掌握任何一门编程语言,从而将测试系统的开发和测试脚本的开发解耦,提高了测试脚本的开发效率,降低了测试脚本的开发难度。使用本发明的测试系统,将降低对测试人员编程水平的依赖。
如图2所示,在本实施例中,所述编辑 Excel测试用例的方法包括:通过测试用例查看和编辑器创建 Excel文件、加载 Excel文件、向测试人员展示测试用例的详细信息和编辑测试用例; Excel程序用于测试人员编辑测试用例使用;在 Excel程序启动时会打开由测试用例查看和编辑器所创建的 Excel文件, Excel文件的每一个 sheet是一个测试用例,每一个测试用例中包括:测试步骤、名称、说明、执行动作、操作内容、参数和注释。
在本实施例中,所述 Excel文件中 Excel测试步骤列按顺序定义当前测试用例的步骤标识,例如“1”、“2”、“1.1”、“1.2”等;所述 Excel文件中 Excel名称列定义该步骤的显示名称,例如“ TestStep 1”、“ PowerUp”等;所述 Excel文件中 Excel说明列定义当前步骤的说明性文字,该文字将显示在测试用例查看和编辑器中;所述 Excel文件中 Excel执行动作列定义当前步骤需要测试系统执行的特定动作,这个动作的具体内容请见图4;所述 Excel文件中 Excel操作内容列定义当前步骤的动作执行针对的内容信息,这个信息的具体内容请见图4;所述 Excel文件中 Excel参数列定义了当前步骤的动作执行依赖的参数信息,这个信息的具体内容请见图4;所述 Excel文件中 Excel注释列定义了当前步骤的注释性信息。
如图3所示,在本实施例中,所述对 Excel测试用例进行测试的方法包括:通过测试用例执行器执行 Excel测试用例,在执行过程中将测试结果写入 Excel结果文件中生成测试报告,在测试结束后,用户可打开 Excel程序查看测试报告;测试用例执行器的运行过程按顺序执行:加载显示 Excel文件内容、逐条执行测试用例、显示测试结果和生成测试报告;在 Excel测试用例测试结束后, Excel程序在启动后将显示测试报告,测试报告文件包含若干个 sheet,每个 sheet代表一个测试用例的报告;每个报告包括:测试结果、测试步骤、名称、说明、执行动作、操作内容、参数和注释。
在本实施例中,所述报告中测试结果列包含对当前测试步骤的判定,判定内容包括: OKNOKCOK等。所述报告中 Excel测试步骤列按顺序定义了当前测试用例的步骤标识,例如“1”、“2”、“1.1”、“1.2”等;所述报告中 Excel名称列定义该步骤的显示名称,例如“ TestStep 1”、“ PowerUp”等;所述报告中 Excel说明列定义当前步骤的说明性文字,该文字将显示在测试用例查看和编辑器中;所述报告中 Excel执行动作列定义当前步骤需要测试系统执行的特定动作,这个动作的具体内容请见图4;所述报告中 Excel操作内容列定义当前步骤的动作执行针对的内容信息,这个信息的具体内容请见图4;所述报告中 Excel参数列定义当前步骤的动作执行依赖的参数信息,这个信息的具体内容请见图4;所述报告中 Excel注释列定义当前步骤的注释性信息。
如图4所示,在本实施例中,测试用例的执行分类包括:执行动作分类、操作内容分类和参数分类;所述执行动作分类包括:定义测试步骤、定义测试变量、调用函数与返回错误码、检查上一次错误码和检查变量范围与返回错误码;所述操作内容分类和参数分类中的内容与执行动作分类中的条目一一对应。
在本实施例中,所述的定义测试步骤动作是一个字符串,包括但不限于字符串“ define_ test_ step”,当测试系统读取此单元格时,若其内容与预设步骤字符串“ define_ test_ step”相同,便得知此行是一个测试步骤的定义,此时“测试步骤列”、“名称列”、“说明列”这三个列的内容有效;若此单元格内容与该字符串不同,则“测试步骤列”、“名称列”、“说明列”这三列内容无效,应当留空。
所述的定义测试步骤动作对应的操作内容包含但不限于两种类型:一般步骤( normal_ step)和测试终止步骤( test_ tear_ down)。一般步骤是常规的测试步骤,当测试过程由于错误或是其他原因提前终止时,将会跳过所有一般步骤,直接执行测试终止步骤,测试终止步骤都在所有测试步骤的最后。所述的定义测试步骤动作对应的参数不存在,应留空。
所述的定义测试变量动作是一个字符串,包括但不限于字符串“ define_ variable”,当测试系统读取此单元格时,若其内容与预设变量字符串“ define_ variable”相同,便得知此行是一个变量的定义,测试系统将根据此行的其他信息申请一个新变量。
所述的定义测试变量动作对应的操作内容是变量名称,此处可以输入任意表征标识符的字符串,作为所定义的变量名称。
所述的定义测试变量动作对应的参数是一个包含两个字段的字符串:变量类型和初始值,字段之间通过字符“|”隔开。举例来说,一个 double类型的变量,初始值为3.5,则此处的参数为“ double|3.5”。
所述的调用函数,返回错误码动作是一个字符串,包括但不限于字符串“ call_ function”,当测试系统读取此单元格时,若其内容与预设函数字符串“ call_ function”相同,便得知此行是一个测试系统函数调用,测试系统将根据函数名称搜索对应函数并根据此行所定义的参数调用此函数。
所述的调用函数,返回错误码动作对应的操作内容是函数名称,此处可以输入测试系统中已存在的函数名称。
所述的调用函数,返回错误码动作对应的参数是一个包含0个或多个字段的字符串,每个字段对应一个参数值,字段与字段之间通过字符“|”隔开。举例来说,一个函数有两个 double类型的参数:3.5和5.6,则此处的参数为“3.5|5.6”。
所述的检查上一次错误码动作是一个字符串,包括但不限于字符串“ check_ last_ error”,当测试系统读取此单元格时,若其内容与预设检查字符串“ check_ last_ error”相同,便得知此行是一个检测错误码操作,检测到错误后,会根据此行的操作内容的定义,选择将错误信息写入特定的变量,或退出测试过程。
所述的检查上一次错误码动作对应的操作内容包含但不限于两种类型:设置变量( set_ variable)和退出测试( exit_ on_ fail)。设置变量表示当测试遇到错误后,将错误信息写入对应的变量中,测试继续往下进行;退出测试表示当测试遇到错误后,测试立即终止,跳转到测试终止步骤( test_ tear_ down)继续执行。
所述的检查上一次错误码动作对应的参数仅仅当操作内容是设置变量时才有效,表示需要写入的变量名称。当操作内容是退出测试时,此参数单元格应当留空。
所述的检查变量范围,返回错误码动作是一个字符串,包括但不限于字符串“ check_ var_ range”,当测试系统读取此单元格时,若其内容与预设变量字符串“ check_ var_ range”相同,便得知此行是一个检测变量的测试判定,检测的上下限和对应的变量在此行的其他列中定义。
所述的检查变量范围,返回错误码动作对应的操作内容是所检测的变量名称。
所述的检查变量范围,返回错误码动作对应的参数是一个包含2个字段的字符串,分别为低阈值和高阈值,每个阈值对应一个参数值,字段与字段之间通过字符“|”隔开。举例来说,需要判断变量在3.5和5.6之间,则此处的参数为“3.5|5.6”;若需要判断变量等于3.5,则此处的参数为“3.5|3.5”。将测试系统的搭建任务一分为二,使得专业的开发人员可以专注测试系统架构和 API的设计,同时测试人员可以专注测试脚本和参数的设定,使得这两部分任务可以同时进行,从而简化了测试系统的设计,提高了测试系统的开发效率,降低测试系统开发难度。
具体的,本实施例提供了一个基于 Excel文件加载的报文发送测试用例和系统,所述 Excel文件包括:测试步骤列、名称列、说明列、执行动作列、操作内容列、参数列、注释列;所述的报文发送测试用例和系统包含此 Excel文件以及加载此 Excel文件的测试用例查看和编辑器,执行此 Excel文件的测试用例执行器。
如表1所示,此 Excel文件包含一个用例,其意图是连接总线工具,向被测系统发送一帧 CAN报文,再判断报文是否发送成功,最后断开总线工具。
如表1所示,第一行的执行动作是“ define_ test_ step”,即定义测试步骤;该行的步骤序号为1;步骤名称是“ Connect”;说明是“ Connecthardware”,即连接总线工具;操作内容是“ normal_ step”,说明此步骤是一个一般步骤。
如表1所示,第二行的执行动作是“ define_ variable”,即定义变量;操作内容是变量名称“ vTransmitResult”;参数是变量的类型和初始值“ double|0”,即类型是 double,初始值为0。
如表1所示,第三行的执行动作是“ call_ function”,即调用系统函数;操作内容是函数名称“ app. connect”,即连接连接总线工具;由于此函数不需要参数,故参数留空;此函数执行成功将返回1,否则返回0。
如表1所示,第四行的执行动作是“ check_ last_ error”,即检测上一次错误;操作内容是“ exit_ on_ fail”,即若上一次操作失败,则立即退出测试;此动作由于操作内容为“ exit_ on_ fail”,故不需要参数。
如表1所示,第五行的执行动作是“ define_ test_ step”,即定义测试步骤,该行的步骤序号为2;步骤名称是“ Transmit”;说明是“ Msg. Transmit”,即发送报文;操作内容是“ normal_ step”,说明此步骤是一个一般步骤。
如表1所示,第六行的执行动作是“ call_ function”,即调用系统函数;操作内容是函数名称“ com. transmit_ can”,即发送 CAN报文;此函数需要一个参数,即 CAN报文指针,故参数列中给定了所需的报文 MSG1。
如表1所示,第七行的执行动作是“ check_ last_ error”,即检测上一次错误;操作内容是“ set_ variable”,即当检测到错误时,将错误信息写入变量中;参数是“ vTransmitResult”,即需要写入的变量名称。
如表1所示,第八行的执行动作是“ check_ var_ range”,即检测变量是否在范围内;操作内容是“ vTransmitResult”,即需要检测的变量名称为“ vTransmitResult”;参数是“1|1”,即检测该变量是否为1。
如表1所示,第九行的执行动作是“ define_ test_ step”,即定义测试步骤,改行的步骤序号为3;步骤名称是“ Disconnect”;步骤说明是“ DisconnectHardware”,即断开总线工具的连接;操作内容是“ test_ tear_ down”,表示这是一个测试终止步骤,若前述步骤在执行过程中退出,将无条件执行此步骤。该步骤不需要参数。
如表1所示,第十行的执行动作是“ call_ function”,即调用系统函数;操作内容是函数名称“ app. disconnect”,即断开总线工具的连接;此函数无需参数。
如表1所示,测试用例查看和编辑器加载此文件后,将向用户提供测试脚本的查看功能;测试用例执行器加载此文件后,将根据 Excel文件定义的内容从上至下逐行执行测试。
如表1所示,测试人员若需要修改发送报文内容,只需打开 Excel文件,修改 MSG1所处的单元格内容;测试人员若需要增加一条新的发送报文,只需打开 Excel文件,在步骤2中增加一行新行,按照“ call_ function”的执行动作编辑此行即可。
表1:执行动作分类表
Figure 596157dest_path_image001
本实施例还提供一种基于 Excel文件加载的测试系统,包括:编辑模块,编辑 Excel测试用例;以及测试模块,对 Excel测试用例进行测试。
在本实施例中,基于 Excel文件加载的测试系统还可以包括: Excel测试用例编辑方法、 Excel测试用例执行方法和 Excel测试用例的执行分类; Excel测试用例编辑方法可以由测试用例查看和编辑器, Excel程序两部分组成; Excel测试用例执行方法由测试用例执行器和 Excel程序两部分组成;所述的测试用例的执行分类由执行动作分类、操作内容分类和参数分类这三部分组成。
在本实施例中,各模块和各方法的具体过程在上述基于 Excel文件加载的测试方法中已经详细描述。
本实施例还提供一种基于 Excel文件加载的测试设备,包括: Excel测试用例编辑模块、 Excel测试用例执行模块和 Excel测试用例的执行动作分类模块;
所述 Excel测试用例编辑模块适于编辑 Excel测试用例;所述 Excel测试用例的执行动作分类模块适于定义 Excel测试用例执行模块执行的测试操作;所述 Excel测试用例执行模块适于根据定义的测试操对 Excel测试用例进行测试。
在本实施例中,基于 Excel文件加载的测试设备适于采用上述基于 Excel文件加载的测试方法对 Excel测试用例进行测试。
综上所述,本发明通过编辑 Excel测试用例;以及对 Excel测试用例进行测试,实现了将测试脚本通过 Excel文件来实现,修改测试脚本只要修改 Excel文件,从而避免更改脚本的过程中需要频繁修改程序,提升测试系统参数化能力。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本发明的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
另外,在本发明各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括: U盘、移动硬盘、只读存储器( ROMRead- OnlyMemory)、随机存取存储器( RAMRandomAccessMemory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上述依据本发明的理想实施例为启示,通过上述的说明内容,相关工作人员完全可以在不偏离本项发明技术思想的范围内,进行多样的变更以及修改。本项发明的技术性范围并不局限于说明书上的内容,必须要根据权利要求范围来确定其技术性范围。

Claims (9)

  1. 一种基于 Excel文件加载的测试方法,其特征在于,包括:
    编辑 Excel测试用例;以及
    Excel测试用例进行测试。
  2. 如权利要求1所述的基于 Excel文件加载的测试方法,其特征在于,
    所述编辑 Excel测试用例的方法包括:
    通过测试用例查看和编辑器创建 Excel文件、加载 Excel文件、向测试人员展示测试用例的详细信息和编辑测试用例;
    Excel程序启动时会打开由测试用例查看和编辑器所创建的 Excel文件, Excel文件的每一个 sheet是一个测试用例,每一个测试用例中包括:测试步骤、名称、说明、执行动作、操作内容、参数和注释。
  3. 如权利要求2所述的基于 Excel文件加载的测试方法,其特征在于,
    所述 Excel文件中 Excel测试步骤列按顺序定义当前测试用例的步骤标识;
    所述 Excel文件中 Excel名称列定义该步骤的显示名称;
    所述 Excel文件中 Excel说明列定义当前步骤的说明性文字,该文字将显示在测试用例查看和编辑器中;
    所述 Excel文件中 Excel执行动作列定义当前步骤需要测试系统执行的特定动作;
    所述 Excel文件中 Excel操作内容列定义当前步骤的动作执行针对的内容信息;
    所述 Excel文件中 Excel参数列定义了当前步骤的动作执行依赖的参数信息;
    所述 Excel文件中 Excel注释列定义了当前步骤的注释性信息。
  4. 如权利要求3所述的基于 Excel文件加载的测试方法,其特征在于,
    所述对 Excel测试用例进行测试的方法包括:
    通过测试用例执行器执行 Excel测试用例,在执行过程中将测试结果写入 Excel结果文件中生成测试报告;
    测试用例执行器的运行过程按顺序执行:加载显示 Excel文件内容、逐条执行测试用例、显示测试结果和生成测试报告;
    Excel测试用例测试结束后, Excel程序在启动后将显示测试报告,测试报告文件包含若干个 sheet,每个 sheet代表一个测试用例的报告;
    每个报告包括:测试结果、测试步骤、名称、说明、执行动作、操作内容、参数和注释。
  5. 如权利要求4所述的基于 Excel文件加载的测试方法,其特征在于,
    所述报告中测试结果列包含对当前测试步骤的判定,判定内容包括: OKNOKCOK
    所述报告中 Excel测试步骤列按顺序定义了当前测试用例的步骤标识;
    所述报告中 Excel名称列定义该步骤的显示名称;
    所述报告中 Excel说明列定义当前步骤的说明性文字,该文字将显示在测试用例查看和编辑器中;
    所述报告中 Excel执行动作列定义当前步骤需要测试系统执行的特定动作;
    所述报告中 Excel操作内容列定义当前步骤的动作执行针对的内容信息;
    所述报告中 Excel参数列定义当前步骤的动作执行依赖的参数信息;
    所述报告中 Excel注释列定义当前步骤的注释性信息。
  6. 如权利要求5所述的基于 Excel文件加载的测试方法,其特征在于,
    测试用例的执行分类包括:执行动作分类、操作内容分类和参数分类;
    所述执行动作分类包括:定义测试步骤、定义测试变量、调用函数与返回错误码、检查上一次错误码和检查变量范围与返回错误码;
    所述操作内容分类和参数分类中的内容与执行动作分类中的条目一一对应。
  7. 如权利要求6所述的基于 Excel文件加载的测试方法,其特征在于,
    所述定义测试步骤动作为一个字符串,当读取该字符串时,若其内容与预设步骤字符串相同,则辨别此行是一个测试步骤的定义,此时“测试步骤列”、“名称列”、“说明列”这三个列的内容有效;若内容与预设字步骤符串不同,则“测试步骤列”、“名称列”、“说明列”这三列内容无效,应当留空;
    所述定义测试步骤动作对应的操作内容包括:一般步骤和测试终止步骤;
    一般步骤为常规的测试步骤,当测试过程由于错误或是其他原因提前终止时,将会跳过所有一般步骤,直接执行测试终止步骤,测试终止步骤都在所有测试步骤的最后;
    所述定义测试步骤动作对应的参数不存在,应留空;
    所述的定义测试变量动作是一个字符串,当读取该字符串时,若其内容与预设变量字符串相同,则辨别此行是一个变量的定义,并根据此行的其他信息申请一个新变量;
    所述定义测试变量动作对应的操作内容是变量名称,输入任意表征标识符的字符串,作为所定义的变量名称;
    所述定义测试变量动作对应的参数是一个包含两个字段的字符串:变量类型和初始值,字段之间通过字符“|”隔开;
    所述调用函数与返回错误码动作是一个字符串,当读取该字符串时,若其内容与预设函数字符串相同,则辨识此行是一个测试系统函数调用,测试系统将根据函数名称搜索对应函数并根据此行所定义的参数调用此函数;
    所述调用函数与返回错误码动作对应的操作内容是函数名称;
    所述调用函数与返回错误码动作对应的参数是一个包含0个或多个字段的字符串,每个字段对应一个参数值,字段与字段之间通过字符“|”隔开;
    所述检查上一次错误码动作是一个字符串,当读取该字符串时,若其内容与预设检查字符串相同,则辨识此行是一个检测错误码操作,检测到错误后,根据此行的操作内容的定义,选择将错误信息写入特定的变量,或退出测试过程;
    所述检查上一次错误码动作对应的操作内容包括:设置变量和退出测试;
    设置变量表示当测试遇到错误后,将错误信息写入对应的变量中,测试继续往下进行;退出测试表示当测试遇到错误后,测试立即终止,跳转到测试终止步骤继续执行;
    所述检查上一次错误码动作对应的参数仅仅当操作内容是设置变量时才有效,表示需要写入的变量名称;当操作内容是退出测试时,此参数单元格应当留空;
    所述的检查变量范围与返回错误码动作是一个字符串,当读取该字符串时,若其内容与预设变量字符串相同,则辨识此行是一个检测变量的测试判定,检测的上下限和对应的变量在此行的其他列中定义;
    所述检查变量范围与返回错误码动作对应的操作内容是所检测的变量名称;
    所述的检查变量范围与返回错误码动作对应的参数是一个包含2个字段的字符串,分别为低阈值和高阈值,每个阈值对应一个参数值,字段与字段之间通过字符“|”隔开。
  8. 一种基于 Excel文件加载的测试系统,其特征在于,包括:
    编辑模块,编辑 Excel测试用例;以及
    测试模块,对 Excel测试用例进行测试。
  9. 一种基于 Excel文件加载的测试设备,其特征在于,包括:
    Excel测试用例编辑模块、 Excel测试用例执行模块和 Excel测试用例的执行动作分类模块;
    所述 Excel测试用例编辑模块适于编辑 Excel测试用例;
    所述 Excel测试用例的执行动作分类模块适于定义 Excel测试用例执行模块执行的测试操作;
    所述 Excel测试用例执行模块适于根据定义的测试操对 Excel测试用例进行测试。
PCT/CN2022/116978 2021-11-29 2022-09-05 基于 excel 文件加载的测试方法、系统及设备 WO2023093198A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
US18/267,127 US20240118994A1 (en) 2021-11-29 2022-09-05 Test method, system, and device based on excel file loading
JP2023547915A JP7628346B2 (ja) 2021-11-29 2022-09-05 Excel(登録商標)ファイルのロードによるテスト方法、システム及び装置
CA3206550A CA3206550A1 (en) 2021-11-29 2022-09-05 Test method, system and device based on excel file loading
MX2023010690A MX2023010690A (es) 2021-11-29 2022-09-05 Metodo, sistema y dispositivo de prueba basado en la carga de archivos de excel.
KR1020237011066A KR20230082020A (ko) 2021-11-29 2022-09-05 Excel 파일 로딩을 기반으로 한 테스트 방법, 시스템 및 설비
EP22897289.9A EP4322010A1 (en) 2021-11-29 2022-09-05 Test method, system and device based on excel file loading

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111447914.9A CN114116498A (zh) 2021-11-29 2021-11-29 基于Excel文件加载的测试方法、系统及设备
CN202111447914.9 2021-11-29

Publications (1)

Publication Number Publication Date
WO2023093198A1 true WO2023093198A1 (zh) 2023-06-01

Family

ID=80368997

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/116978 WO2023093198A1 (zh) 2021-11-29 2022-09-05 基于 excel 文件加载的测试方法、系统及设备

Country Status (7)

Country Link
US (1) US20240118994A1 (zh)
EP (1) EP4322010A1 (zh)
KR (1) KR20230082020A (zh)
CN (1) CN114116498A (zh)
CA (1) CA3206550A1 (zh)
MX (1) MX2023010690A (zh)
WO (1) WO2023093198A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114116498A (zh) * 2021-11-29 2022-03-01 上海同星智能科技有限公司 基于Excel文件加载的测试方法、系统及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008135008A (ja) * 2006-11-01 2008-06-12 Matsushita Electric Ind Co Ltd プログラムモジュール検証方式
CN106598869A (zh) * 2016-12-26 2017-04-26 北京京东金融科技控股有限公司 实现软件自动测试的方法、装置及电子设备
CN106874207A (zh) * 2017-02-27 2017-06-20 税友软件集团股份有限公司 一种web页面的自动化测试方法及装置
CN107729243A (zh) * 2017-10-12 2018-02-23 上海携程金融信息服务有限公司 应用编程接口自动化测试方法、系统、设备及存储介质
CN114116498A (zh) * 2021-11-29 2022-03-01 上海同星智能科技有限公司 基于Excel文件加载的测试方法、系统及设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008135008A (ja) * 2006-11-01 2008-06-12 Matsushita Electric Ind Co Ltd プログラムモジュール検証方式
CN106598869A (zh) * 2016-12-26 2017-04-26 北京京东金融科技控股有限公司 实现软件自动测试的方法、装置及电子设备
CN106874207A (zh) * 2017-02-27 2017-06-20 税友软件集团股份有限公司 一种web页面的自动化测试方法及装置
CN107729243A (zh) * 2017-10-12 2018-02-23 上海携程金融信息服务有限公司 应用编程接口自动化测试方法、系统、设备及存储介质
CN114116498A (zh) * 2021-11-29 2022-03-01 上海同星智能科技有限公司 基于Excel文件加载的测试方法、系统及设备

Also Published As

Publication number Publication date
CA3206550A1 (en) 2023-06-01
MX2023010690A (es) 2023-09-25
EP4322010A1 (en) 2024-02-14
US20240118994A1 (en) 2024-04-11
JP2024509721A (ja) 2024-03-05
KR20230082020A (ko) 2023-06-08
CN114116498A (zh) 2022-03-01

Similar Documents

Publication Publication Date Title
US8645912B2 (en) System and method for use in replaying software application events
TWI510915B (zh) Computer automated test system and test methods, recording media and program products
US9152731B2 (en) Detecting a broken point in a web application automatic test case
WO2019161619A1 (zh) 接口自动化测试方法、装置、设备及计算机可读存储介质
CN110096444A (zh) 一种基于excel生成测试用例的管理系统、使用方法及设备
CN112905459A (zh) 服务接口测试方法、装置、电子设备及存储介质
CN103455414A (zh) 获取控件的逻辑位置的方法及装置
WO2023093198A1 (zh) 基于 excel 文件加载的测试方法、系统及设备
TW201324141A (zh) 測試電子裝置之功能的測試方法以及測試裝置
WO2020157795A1 (ja) 試験装置、試験方法および試験プログラム
US20140229923A1 (en) Commit sensitive tests
US7895575B2 (en) Apparatus and method for generating test driver
JP2013113665A (ja) 試験パターン生成装置、試験プログラム生成装置、生成方法、プログラム、および試験装置
CN112380800B (zh) 自动评测的在线fpga实验平台及相关方法
CN112817863B (zh) 一种基于ai深度学习的ai辅助自动化测试方法及系统
CN111008147B (zh) 应用程序的测试方法、终端及计算机可读存储介质
US20210042204A1 (en) Testing apparatus, testing system, and non-transitory tangible machine-readable medium thereof for testing touch mobile devices
JP7628346B2 (ja) Excel(登録商標)ファイルのロードによるテスト方法、システム及び装置
CN111008140B (zh) 一种跨平台的ui自动化测试方法及装置
CN114756448A (zh) 一种用户界面的还原度自动测试系统和方法
CN114461522B (zh) 一种基于bmp文件的gpu绘制功能测试方法
JP6916327B1 (ja) 派生テスト装置、派生テスト方法、および、派生テストプログラム
CN109857636A (zh) 一种在安卓客户端UI自动化过程中定位App首页的方法和应用
CN117370141A (zh) 测试报告生成方法、装置、电子设备及存储介质
CN108073494A (zh) 程序能力评估系统与程序能力评估方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 18267127

Country of ref document: US

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22897289

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3206550

Country of ref document: CA

WWE Wipo information: entry into national phase

Ref document number: 2023547915

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: MX/A/2023/010690

Country of ref document: MX

WWE Wipo information: entry into national phase

Ref document number: 202317065065

Country of ref document: IN

WWE Wipo information: entry into national phase

Ref document number: 2022897289

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022897289

Country of ref document: EP

Effective date: 20231107

WWE Wipo information: entry into national phase

Ref document number: 2023124385

Country of ref document: RU

NENP Non-entry into the national phase

Ref country code: DE