[go: up one dir, main page]

CN103942144B - A kind of method of testing utilizing parameters relationship figureization to map - Google Patents

A kind of method of testing utilizing parameters relationship figureization to map Download PDF

Info

Publication number
CN103942144B
CN103942144B CN201410142485.8A CN201410142485A CN103942144B CN 103942144 B CN103942144 B CN 103942144B CN 201410142485 A CN201410142485 A CN 201410142485A CN 103942144 B CN103942144 B CN 103942144B
Authority
CN
China
Prior art keywords
script
test
control
relationship
scripts
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410142485.8A
Other languages
Chinese (zh)
Other versions
CN103942144A (en
Inventor
方泉
陈刚
冯曙明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Jiangsu Electric Power Co Ltd
Jiangsu Electric Power Information Technology Co Ltd
State Grid Corp of China SGCC
Original Assignee
State Grid Jiangsu Electric Power Co Ltd
Jiangsu Electric Power Information Technology Co Ltd
State Grid Corp of China SGCC
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 State Grid Jiangsu Electric Power Co Ltd, Jiangsu Electric Power Information Technology Co Ltd, State Grid Corp of China SGCC filed Critical State Grid Jiangsu Electric Power Co Ltd
Priority to CN201410142485.8A priority Critical patent/CN103942144B/en
Publication of CN103942144A publication Critical patent/CN103942144A/en
Application granted granted Critical
Publication of CN103942144B publication Critical patent/CN103942144B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of method of testing utilizing parameters relationship figureization to map, the parameter of test script is extracted by the method, set up the incidence relation between script, achieve by single script to multiple scripts by the transformation of flow testing, specifically include initialization control, script information be set, script relationships line and graphical representation script relationships are set.The test script of text type is mapped to graphical operation interface by the present invention, complicated scripted code is converted into succinct visualization interface and configures for tester, be greatly improved the work efficiency of tester's script configuration, save labour cost.

Description

一种利用参数关系图形化映射的测试方法A Test Method Utilizing Graphical Mapping of Parameter Relations

技术领域technical field

本发明涉及一种测试方法,尤其涉及一种利用参数关系图形化映射的测试方法。The present invention relates to a test method, in particular to a test method utilizing graph mapping of parameter relations.

背景技术Background technique

自动化测试工具一般提供特定的测试脚本来完成针对目标应用程序的测试。测试脚本是采用某种特定语言编写,并在特定系统下实现的代码。根据功能的复杂度,测试脚本可以是借助其他语言进行解析的代码,可以是批处理命令,也可以是较为复杂的脚本语言程序片段,这无疑提高了脚本配置工作的门槛。另一方面,脚本与脚本之间是有联系的,有的较为简单,有得错综复杂,当测试发生错误时,由于脚本都是全文本的,其中一些重要信息无法直观的展示给测试人员,测试人员如果要从测试执行的大量脚本中找出发生错误的地方。需要耗费大量的精力进行查找,效率低下。Automated testing tools generally provide specific test scripts to complete testing for target applications. A test script is a code written in a specific language and implemented under a specific system. According to the complexity of the function, the test script can be a code parsed by other languages, it can be a batch command, or it can be a relatively complex script language program fragment, which undoubtedly raises the threshold for script configuration. On the other hand, there are connections between scripts, some of which are relatively simple, and some of which are intricate. When an error occurs in the test, since the scripts are all in full text, some important information cannot be displayed intuitively to the tester. If a person wants to find out where the error occurs from the large number of scripts executed by the test. It takes a lot of energy to search, which is inefficient.

发明内容Contents of the invention

本发明的目的是提供一种利用参数关系图形化映射的测试方法,该方法将脚本间的参数关系进行图形化映射,将复杂的脚本代码转换成简洁的可视化界面供测试人员进行配置。The object of the present invention is to provide a testing method utilizing graphical mapping of parameter relationships, which graphically maps the parameter relationships between scripts, and converts complex script codes into simple visual interfaces for testers to configure.

本发明的目的通过以下技术方案实现:The object of the present invention is achieved through the following technical solutions:

一种利用参数关系图形化映射的测试方法,其特征在于:该方法将测试脚本的参数进行提取,建立起脚本之间的关联关系,实现了由单一脚本到多个脚本按流程测试的转变,具体步骤如下:A test method using graphical mapping of parameter relationships, characterized in that: the method extracts the parameters of test scripts, establishes the relationship between scripts, and realizes the transformation from a single script to multiple scripts according to the process of testing, Specific steps are as follows:

1)初始化控件1) Initialize the control

首先判断,脚本关系控件的容器是否存在,如果存在则先依次释放脚本的数据、脚本关系控件、控件容器;如果不存在,则设置基础参数后初始化容器;最后在控件容器里创建脚本关系控件;First judge whether the container of the script-related control exists, and if so, release the script data, script-related control, and control container in sequence; if not, initialize the container after setting the basic parameters; finally create the script-related control in the control container;

在脚本关系控件的初始化过程中,对设置的模式进行判断,如果为显示模式,则控件里一切内容灰显,只能查看,不能编辑;如果为修改模式,则可进行编辑;During the initialization process of the script relationship control, judge the set mode. If it is the display mode, all the content in the control will be grayed out and can only be viewed but not edited; if it is the modification mode, it can be edited;

2)设置脚本信息2) Set script information

脚本关系控件初始化完成后,对其中的内容进行设置;首先根据测试脚本唯一ID,获取测试脚本对象,然后提取测试脚本对象的信息,进行分类汇总;接着对脚本控件的大小及横纵坐标进行设置,如果不设置,将以默认大小设置在前一个脚本控件右侧;最后调用set_it_data设置到脚本关系控件当中,完成独立的测试脚本的创建;After the initialization of the script relationship control is completed, set the content in it; firstly, according to the unique ID of the test script, obtain the test script object, then extract the information of the test script object, and classify and summarize; then set the size and horizontal and vertical coordinates of the script control , if not set, it will be set on the right side of the previous script control with the default size; finally call set_it_data to set it in the script relationship control to complete the creation of an independent test script;

3)设置脚本关系连线3) Set the script relationship connection

采用连线的方式来进行图形化映射;两点决定一条直线,该两点分别为两个脚本内的参数;当在脚本集合里发现有相同名称及类型的脚本参数时,判断这些参数的输入输出类型,如果合适则自动进行连线,建立测试脚本之间的关系;Graphical mapping is performed by connecting lines; two points determine a straight line, and the two points are parameters in two scripts; when script parameters with the same name and type are found in the script collection, judge the input of these parameters The output type, if appropriate, is automatically connected to establish the relationship between test scripts;

4)图形化展示脚本关系4) Graphical display of script relationships

调用send_data_to_frontend方法,将底层数据传递给展示层进行展示,完成测试。Call the send_data_to_frontend method to pass the underlying data to the display layer for display and complete the test.

本发明中,测试脚本对象的信息包括:脚本名、脚本描述,脚本参数;其中脚本参数包括Import、Export、Changing、Table四种类型。In the present invention, the information of the test script object includes: script name, script description, and script parameters; wherein the script parameters include four types: Import, Export, Changing, and Table.

在set_it_data方法里,通过set_table_properties设置控件的抬头;再通过set_column_properties设置每一列的属性名称,最后通过set_tabledata设置表格里的数据。In the set_it_data method, set the header of the control through set_table_properties; then set the property name of each column through set_column_properties, and finally set the data in the table through set_tabledata.

将底层数据传递给展示层进行展示,具有以下功能:Pass the underlying data to the display layer for display, with the following functions:

视图切换:视窗大小切换,方便脚本配置;导航:含有导航功能,对大量脚本的关系进行概要预览;导出:将脚本关系的快照导出为JPG格式的图片进行存储。View switching: window size switching, convenient for script configuration; navigation: contains navigation function, previewing the relationship of a large number of scripts; export: exporting the snapshot of script relationship as a picture in JPG format for storage.

本发明主要分为两个部分:一个是将测试脚本的参数进行提取,包括输入输出类型,参数具体类型、参数描述等。另一部分是提供了一种关系连线的方式,建立起脚本之间的关联关系,定义了脚本执行时数据的流转,实现了由单一脚本到多个脚本按流程测试的转变。The present invention is mainly divided into two parts: one is to extract the parameters of the test script, including input and output types, specific types of parameters, and descriptions of parameters. The other part is to provide a way of relationship connection, establish the relationship between scripts, define the flow of data when the script is executed, and realize the transformation from a single script to multiple scripts according to the process of testing.

本发明将文本式的测试脚本映射成图形化操作界面,将复杂的脚本代码转换成简洁的可视化界面供测试人员进行配置,可大大提高测试人员脚本配置的工作效率,节约劳动成本。The invention maps textual test scripts into graphical operation interfaces and converts complex script codes into simple visual interfaces for testers to configure, which can greatly improve the work efficiency of testers' script configuration and save labor costs.

附图说明Description of drawings

图1是脚本参数关系图形化映射的实现过程示意图。Fig. 1 is a schematic diagram of the implementation process of graphical mapping of script parameter relationships.

具体实施方式detailed description

脚本参数关系图形化映射的实现通过脚本关系类(本实施例中使用类ZP001CL_IT_JOIN_CNTRL定义,但不限于此名称),其主要属性及方法如表1和表2:The graphical mapping of the script parameter relationship is realized through the script relationship class (in this embodiment, the class ZP001CL_IT_JOIN_CNTRL is used to define, but not limited to this name), and its main attributes and methods are shown in Table 1 and Table 2:

表1Table 1

表2Table 2

如图1所示,脚本关系图形化映射的步骤如下:As shown in Figure 1, the steps of graphical mapping of script relationships are as follows:

步骤一:初始化控件Step 1: Initialize the control

首先判断,脚本关系控件的容器是否存在,如果存在则先依次释放脚本的数据、脚本关系控件、控件容器。如果不存在,则设置一些基础参数后初始化容器。最后在控件容器里创建脚本关系控件。Firstly, it is judged whether the container of the script-related control exists, and if it exists, the data of the script, the script-related control, and the control container are released in sequence. If not present, initialize the container after setting some basic parameters. Finally, create a script relational control in the control container.

在脚本关系控件的初始化过程中,会对设置的模式进行判断,如果为显示模式,则控件里一切内容灰显,只能查看,不能编辑;如果为修改模式,则可进行 编辑。During the initialization process of the script relationship control, the set mode will be judged. If it is the display mode, all content in the control will be grayed out and can only be viewed but not edited; if it is the modification mode, it can be edited.

步骤二:设置脚本信息Step 2: Set script information

脚本关系控件初始化好以后,需要对其中的内容进行设置。首先根据测试脚本唯一ID,获取测试脚本对象,然后提取测试脚本对象的主要信息,包括:脚本名、脚本描述,脚本参数。其中脚本参数又包括Import、Export、Changing、Table四种类型。按照以上内容进行分类汇总。接着可以对脚本控件的大小及横纵坐标进行设置,如果不设置,将以默认大小设置在前一个脚本控件右侧。最后调用set_it_data设置到脚本关系控件当中。After the script relationship control is initialized, the content needs to be set. First, obtain the test script object according to the unique ID of the test script, and then extract the main information of the test script object, including: script name, script description, and script parameters. The script parameters include four types: Import, Export, Changing, and Table. Classify and summarize according to the above contents. Then you can set the size and horizontal and vertical coordinates of the script control. If not set, the default size will be set on the right side of the previous script control. Finally, call set_it_data to set it to the script relationship control.

在set_it_data方法里,通过set_table_properties设置控件的抬头。再通过set_column_properties设置每一列的属性名称,最后通过set_tabledata设置表格里的数据。设置的所有内容如表3所示。In the set_it_data method, set the header of the control through set_table_properties. Then set the attribute name of each column through set_column_properties, and finally set the data in the table through set_tabledata. All the contents of the settings are shown in Table 3.

表3table 3

步骤三:设置脚本关系连线Step 3: Set script relationship connection

步骤二完成的是独立的测试脚本的创建,之后还需要建立测试脚本之间的关系,这里的关系采用一种连线的方式来进行图形化映射。两点决定一条直线,这里的两个点分别为两个脚本的某个参数。当在脚本集合里发现有相同名称及类型的脚本参数时,会判断这些参数的输入输出类型,如果合适则自动进行连线。Step 2 completes the creation of independent test scripts, and then needs to establish the relationship between test scripts. The relationship here uses a connection method for graphical mapping. Two points determine a straight line, where the two points are a certain parameter of the two scripts. When script parameters with the same name and type are found in the script collection, the input and output types of these parameters will be judged, and connections will be made automatically if appropriate.

例如脚本A的参数Val1需要传递给脚本B的参数Val2,其连线的存储结构如表4所示。For example, the parameter Val1 of script A needs to be passed to the parameter Val2 of script B, and the storage structure of its connection is shown in Table 4.

表4Table 4

左侧测试脚本left test script 右侧测试脚本right test script 左侧脚本参数left script parameter 右侧脚本参数right script parameter 脚本AScript A 脚本Bscript B Val1Val1 Val2Val2

步骤四:图形化展示脚本关系Step 4: Graphical display of script relationships

当以上主要步骤完成后,调用send_data_to_frontend方法,将底层数据传递给展示层进行展示。When the above main steps are completed, call the send_data_to_frontend method to pass the underlying data to the presentation layer for display.

此外脚本关系控件还提供以下附属功能:视图切换:视窗大小切换,方便脚本配置。导航:含有导航功能,可对大量脚本的关系进行概要预览。导出:可将脚本关系的快照导出为JPG格式的图片进行存储。In addition, the script relational control also provides the following auxiliary functions: View switching: window size switching, which is convenient for script configuration. Navigation: Contains a navigation function that provides a summary preview of the relationships of a large number of scripts. Export: The snapshot of the script relationship can be exported as a picture in JPG format for storage.

Claims (3)

1.一种利用参数关系图形化映射的测试方法,其特征在于:该方法将测试脚本的参数进行提取,建立起脚本之间的关联关系,实现了由单一脚本到多个脚本按流程测试的转变,具体步骤如下:1. A test method utilizing graphical mapping of parameter relationships, characterized in that: the method extracts the parameters of the test scripts, sets up the correlation between the scripts, and realizes the process of testing from a single script to multiple scripts according to the flow Transformation, the specific steps are as follows: 1)初始化控件1) Initialize the control 首先判断,脚本关系控件的容器是否存在,如果存在则先依次释放脚本的数据、脚本关系控件、控件容器;如果不存在,则设置基础参数后初始化容器;最后在控件容器里创建脚本关系控件;First judge whether the container of the script-related control exists, and if so, release the script data, script-related control, and control container in sequence; if not, initialize the container after setting the basic parameters; finally create the script-related control in the control container; 在脚本关系控件的初始化过程中,对设置的模式进行判断,如果为显示模式,则控件里一切内容灰显,只能查看,不能编辑;如果为修改模式,则可进行编辑;During the initialization process of the script relationship control, judge the set mode. If it is the display mode, all the content in the control will be grayed out and can only be viewed but not edited; if it is the modification mode, it can be edited; 2)设置脚本信息2) Set script information 脚本关系控件初始化完成后,对其中的内容进行设置;首先根据测试脚本唯一ID,获取测试脚本对象,然后提取测试脚本对象的信息,进行分类汇总;接着对脚本关系控件的大小及横纵坐标进行设置,如果不设置,将以默认大小设置在前一个脚本关系控件右侧;最后将测试脚本对象的信息设置到脚本关系控件当中,完成独立的测试脚本的创建;After the initialization of the script relationship control is completed, set the content in it; firstly, according to the unique ID of the test script, obtain the test script object, and then extract the information of the test script object, and classify and summarize; then set the size and horizontal and vertical coordinates of the script relationship control Setting, if not set, it will be set on the right side of the previous script relationship control with the default size; finally, set the information of the test script object into the script relationship control to complete the creation of an independent test script; 3)设置脚本关系连线3) Set the script relationship connection 采用连线的方式来进行图形化映射;两点决定一条直线,该两点分别为两个脚本内的参数;当在脚本集合里发现有相同名称及类型的脚本参数时,判断这些参数的输入输出类型,如果合适则自动进行连线,建立测试脚本之间的关系;Graphical mapping is performed by connecting lines; two points determine a straight line, and the two points are parameters in two scripts; when script parameters with the same name and type are found in the script collection, judge the input of these parameters The output type, if appropriate, is automatically connected to establish the relationship between test scripts; 4)图形化展示脚本关系4) Graphical display of script relationships 将底层数据传递给展示层进行展示,完成测试。Pass the underlying data to the display layer for display and complete the test. 2.根据权利要求1所述的利用参数关系图形化映射的测试方法,其特征在于:步骤2)中,测试脚本对象的信息包括:脚本名、脚本描述,脚本参数;其中脚本参数包括Import、Export 、Changing、Table四种类型。2. The test method utilizing graphical mapping of parameter relationships according to claim 1, characterized in that: in step 2), the information of the test script object includes: script name, script description, and script parameters; wherein the script parameters include Import, Export, Changing, Table four types. 3.根据权利要求1所述的利用参数关系图形化映射的测试方法,其特征在于:步骤4)中,将底层数据传递给展示层进行展示,具有以下功能:3. The test method using graphical mapping of parameter relationships according to claim 1, characterized in that: in step 4), the underlying data is passed to the display layer for display, which has the following functions: ① 视图切换:视窗大小切换,方便脚本配置;① View switching: window size switching, convenient for script configuration; ② 导航:含有导航功能,对大量脚本的关系进行概要预览;② Navigation: Contains a navigation function to preview the relationship of a large number of scripts; ③ 导出:将脚本关系的快照导出为JPG格式的图片进行存储。③ Export: Export the snapshot of the script relationship as a picture in JPG format for storage.
CN201410142485.8A 2014-04-10 2014-04-10 A kind of method of testing utilizing parameters relationship figureization to map Active CN103942144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410142485.8A CN103942144B (en) 2014-04-10 2014-04-10 A kind of method of testing utilizing parameters relationship figureization to map

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410142485.8A CN103942144B (en) 2014-04-10 2014-04-10 A kind of method of testing utilizing parameters relationship figureization to map

Publications (2)

Publication Number Publication Date
CN103942144A CN103942144A (en) 2014-07-23
CN103942144B true CN103942144B (en) 2016-08-17

Family

ID=51189817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410142485.8A Active CN103942144B (en) 2014-04-10 2014-04-10 A kind of method of testing utilizing parameters relationship figureization to map

Country Status (1)

Country Link
CN (1) CN103942144B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104268072B (en) * 2014-09-03 2017-02-15 武汉烽火网络有限责任公司 Graphical script editor and method for fast developing communication equipment testing script
CN104298595A (en) * 2014-09-29 2015-01-21 百视通网络电视技术发展有限责任公司 Automatic testing method and testing system
CN109815123A (en) * 2018-12-15 2019-05-28 中国平安人寿保险股份有限公司 Interface testing case script classification method, device, electronic equipment and medium
CN110597730B (en) * 2019-09-20 2023-08-22 中国工商银行股份有限公司 Automatic test case generation method and system based on scene method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101630328A (en) * 2009-08-20 2010-01-20 浙江大学 Method for graphically displaying Web service attribute
EP1751631B1 (en) * 2004-05-04 2010-05-19 Fisher-Rosemount Systems, Inc. Markup language-based, dynamic process graphics in a process plant user interface
CN101969383A (en) * 2010-09-27 2011-02-09 深圳市共济科技有限公司 Monitoring equipment and visual control method and device thereof
CN102098713A (en) * 2011-01-25 2011-06-15 浪潮通信信息系统有限公司 Method for quickly tolerating disaster for base station in mobile communication network
CN103678263A (en) * 2013-12-31 2014-03-26 吕奇森 Graphical interface display method and system for incidence relations among document chapters

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8432403B2 (en) * 2008-12-15 2013-04-30 Leonovus Usa Inc. Media action script acceleration apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1751631B1 (en) * 2004-05-04 2010-05-19 Fisher-Rosemount Systems, Inc. Markup language-based, dynamic process graphics in a process plant user interface
CN101630328A (en) * 2009-08-20 2010-01-20 浙江大学 Method for graphically displaying Web service attribute
CN101969383A (en) * 2010-09-27 2011-02-09 深圳市共济科技有限公司 Monitoring equipment and visual control method and device thereof
CN102098713A (en) * 2011-01-25 2011-06-15 浪潮通信信息系统有限公司 Method for quickly tolerating disaster for base station in mobile communication network
CN103678263A (en) * 2013-12-31 2014-03-26 吕奇森 Graphical interface display method and system for incidence relations among document chapters

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
TD-SCDMA协议测试仿真仪表的图形化脚本开发系统设计与实现;魏敏;《中国优秀硕士学位论文全文数据库 信息科技辑》;20120215;全文 *

Also Published As

Publication number Publication date
CN103942144A (en) 2014-07-23

Similar Documents

Publication Publication Date Title
WO2020168725A1 (en) Voice control method and apparatus, storage medium and smart home system
CN103942144B (en) A kind of method of testing utilizing parameters relationship figureization to map
CN102708213B (en) Method for realizing BOM (Bill of Material) information transmission between PDM (Product Data Management) system and ERP (Enterprise Resource Planning) system
CN111080170B (en) Workflow modeling method and device, electronic equipment and storage medium
CN107317725A (en) The method for visualizing and system of a kind of block chain
CN105468573B (en) Configurable type chart application system
CN107480380B (en) A kind of engineering drawing generation method based on template
CN103207730B (en) One can locate pull-alongs flow process drawing generating method and process flow diagram maker
CN102801565B (en) Method for carrying out centralized management on service configuration in network management system
CN103324541B (en) The self-propagating method of data between software
CN104035360A (en) Parameter adjusting method for EPS controller and device
CN108038547A (en) Diagnosis rule editing system based on graphics for satellite telemetry data
CN105354138A (en) Method for determining specific control attribute of mobile phone page
CN104615823B (en) Method for simulating river water circulation by using SWMM software
CN104899042A (en) Embedded machine vision inspection program development method and system
CN205453753U (en) Gateway
CN107015768A (en) A kind of RAID card operation instrument and method
CN103713930B (en) Method and device for graphically defining process map
CN106815019A (en) WEB interface integration method and device for Hadoop distributed algorithm
CN113076092B (en) Processing method and device for A2L file of vehicle-mounted controller
CN113886647A (en) Data dictionary creating method, terminal device and medium
CN106777252A (en) A kind of method and device of uncertain semantic Temporal query middleware
CN107992674A (en) A kind of earth station monitoring visualization construction method based on model
CN103246512B (en) A kind of is the method for Visio figure by VG Graphic Exchanging
CN115203162A (en) A WYSIWYG Graph Data Construction Method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant