CN111078564B - A UI test case management method, device, computer equipment and computer-readable storage medium - Google Patents
A UI test case management method, device, computer equipment and computer-readable storage medium Download PDFInfo
- Publication number
- CN111078564B CN111078564B CN201911315869.4A CN201911315869A CN111078564B CN 111078564 B CN111078564 B CN 111078564B CN 201911315869 A CN201911315869 A CN 201911315869A CN 111078564 B CN111078564 B CN 111078564B
- Authority
- CN
- China
- Prior art keywords
- expected effect
- test case
- information
- identification field
- test
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 156
- 238000007726 management method Methods 0.000 title claims abstract description 25
- 230000003631 expected effect Effects 0.000 claims abstract description 131
- 238000010586 diagram Methods 0.000 claims abstract description 66
- 238000000034 method Methods 0.000 claims abstract description 34
- 239000013598 vector Substances 0.000 claims description 37
- 230000000694 effects Effects 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 15
- 238000012545 processing Methods 0.000 claims description 9
- 238000012163 sequencing technique Methods 0.000 claims 3
- 230000000875 corresponding effect Effects 0.000 claims 2
- 230000002596 correlated effect Effects 0.000 claims 1
- 230000009194 climbing Effects 0.000 abstract 1
- 230000008569 process Effects 0.000 description 7
- 238000009877 rendering Methods 0.000 description 7
- 238000012552 review Methods 0.000 description 7
- 230000018109 developmental process Effects 0.000 description 3
- 238000013522 software testing Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 239000003086 colorant Substances 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 238000013506 data mapping Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
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)
Abstract
Description
技术领域Technical field
本发明涉及计算机技术领域,特别涉及一种UI测试用例管理方法、装置、计算机设备以及计算机可读存储介质。The present invention relates to the field of computer technology, and in particular to a UI test case management method, device, computer equipment and computer-readable storage medium.
背景技术Background technique
软件测试是软件开发过程中不可缺少的,由测试工具按照一定的测试方案和流程进行测试操作,其目的是发现潜伏在软件中的缺陷,减少软件开发和维护成本,促进软件质量提升。在各类型的自动化软件测试中,最接近用户需求的软件测试是与用户交互相关的,即用户界面测试,用户界面测试英文名为User interface testing,简称UI测试,主要指测试用户界面的功能模块的布局是否合理、整体风格是否一致以及各个控件的放置位置是否符合客户使用习惯等,更重要的是测试用户界面是否操作便捷,导航简单易懂,界面中文字是否正确,命名是否统一,页面是否美观,文字、图片组合是否完美等等。因此,在应用程序开发完成后,需要对应用程序进行UI(User Interface,用户界面)测试,以便根据测试结果及时发现问题并对应用程序进行修改和完善。Software testing is indispensable in the software development process. Testing tools perform testing operations according to certain testing plans and processes. The purpose is to discover defects lurking in the software, reduce software development and maintenance costs, and promote software quality improvement. Among various types of automated software testing, the software testing closest to user needs is related to user interaction, that is, user interface testing. User interface testing is called User interface testing in English, or UI testing for short. It mainly refers to testing the functional modules of the user interface. Whether the layout is reasonable, whether the overall style is consistent, and whether the placement of each control is in line with customer usage habits, etc. What is more important is to test whether the user interface is easy to operate, the navigation is simple and easy to understand, whether the Chinese characters in the interface are correct, whether the naming is unified, and whether the page Beautiful, whether the combination of text and pictures is perfect, etc. Therefore, after the application development is completed, it is necessary to conduct UI (User Interface) testing on the application so that problems can be discovered in time and the application can be modified and improved based on the test results.
目前现有的用例管理系统只能用文字来描述UI预期结果,在回归测试时要绞尽脑汁地找数据。但是由于每个测试用例会包括若干个标签,而每个人的理解能力又有差异,因此用文字来描述UI预期结果很容易导致描述出现差错,这样的测试结果是没法保证质量的。The current use case management system can only use words to describe the expected results of the UI, and you have to rack your brains to find data during regression testing. However, since each test case will include several labels, and everyone's understanding ability is different, using words to describe the expected results of the UI can easily lead to errors in the description, and the quality of such test results cannot be guaranteed.
发明内容Contents of the invention
为了解决现有技术的问题,本发明实施例提供了一种UI测试用例管理方法、装置、计算机设备和存储介质,以克服现有技术中用文字来描述UI预期结果很容易导致描述出现差错,无法保证质量等问题。In order to solve the problems of the prior art, embodiments of the present invention provide a UI test case management method, device, computer equipment and storage medium to overcome the problem that using words to describe the expected results of the UI in the prior art can easily lead to errors in the description. Issues such as quality cannot be guaranteed.
为解决上述一个或多个技术问题,本发明采用的技术方案是:In order to solve one or more of the above technical problems, the technical solution adopted by the present invention is:
第一方面,提供了一种UI测试用例管理方法,该方法包括如下步骤:The first aspect provides a UI test case management method, which includes the following steps:
获取待管理测试用例的预期效果信息,根据所述预期效果信息生成预期效果图;Obtain the expected effect information of the test case to be managed, and generate an expected effect diagram based on the expected effect information;
为所述待管理测试用例设置标识字段,所述标识字段包括至少一个关键词;Set an identification field for the test case to be managed, where the identification field includes at least one keyword;
将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联存储。The expected effect diagram and the logical information of the test case are associated and stored with the identification field.
进一步的,所述根据所述预期效果信息生成预期效果图包括:Further, generating an expected effect diagram based on the expected effect information includes:
通过预设的提取特征向量的方法将所述预期效果信息转换为效果特征向量;Convert the expected effect information into an effect feature vector through a preset method of extracting feature vectors;
将所述效果特征向量输入到预先构建的生成对抗网络模型中,生成预期效果图。The effect feature vector is input into the pre-built generative adversarial network model to generate the expected effect map.
进一步的,所述将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联存储包括:Further, associating and storing the expected effect diagram and the logical information of the test case with the identification field includes:
按照模块级别对所述测试用例进行分层处理,将所述测试用例进行分层排序;Perform hierarchical processing of the test cases according to module levels, and hierarchically sort the test cases;
将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联,并按照所述分层排序的顺序存储。The expected effect diagram and the logical information of the test case are associated with the identification field, and stored in the order of the hierarchical sorting.
进一步的,所述方法还包括:Further, the method also includes:
接收用例查询请求,将所述用例查询请求与所述标识字段中的关键词进行匹配;Receive a use case query request, and match the use case query request with the keywords in the identification field;
若匹配成功,则将与所述标识字段对应的测试用例的相关信息返回,以供查阅,所述相关信息至少包括所述预期效果图。If the match is successful, the relevant information of the test case corresponding to the identification field is returned for review, and the relevant information at least includes the expected effect diagram.
第一方面,提供了一种UI测试用例管理装置,所述装置包括:In a first aspect, a UI test case management device is provided, and the device includes:
图片生成模块,用于获取待管理测试用例的预期效果信息,根据所述预期效果信息生成预期效果图;A picture generation module, used to obtain the expected effect information of the test case to be managed, and generate an expected effect diagram based on the expected effect information;
字段设置模块,用于为所述待管理测试用例设置标识字段,所述标识字段包括至少一个关键词;A field setting module, configured to set an identification field for the test case to be managed, where the identification field includes at least one keyword;
信息存储模块,用于将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联存储。An information storage module, configured to associate and store the expected effect diagram and the logical information of the test case with the identification field.
进一步的,所述图片生成模块包括:Further, the picture generation module includes:
向量生成单元,用于通过预设的提取特征向量的方法将所述预期效果信息转换为效果特征向量;A vector generation unit, configured to convert the expected effect information into an effect feature vector through a preset method of extracting feature vectors;
图片生成单元,用于将所述效果特征向量输入到预先构建的生成对抗网络模型中,生成预期效果图。The image generation unit is used to input the effect feature vector into a pre-built generative adversarial network model to generate an expected effect image.
进一步的,所述信息存储模块包括:Further, the information storage module includes:
排序处理单元,用于按照模块级别对所述测试用例进行分层处理,将所述测试用例进行分层排序;A sorting processing unit, configured to hierarchically process the test cases according to the module level, and hierarchically sort the test cases;
信息存储单元,用于将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联,并按照所述分层排序的顺序存储。An information storage unit, configured to associate the expected effect diagram and the logical information of the test case with the identification field, and store them in the order of the hierarchical sorting.
进一步的,所述装置还包括:Further, the device also includes:
请求接收模块,用于接收用例查询请求;Request receiving module, used to receive use case query requests;
信息匹配模块,用于将所述用例查询请求与所述标识字段中的关键词进行匹配;An information matching module, used to match the use case query request with the keywords in the identification field;
信息反馈模块,用于若匹配成功,则将与所述标识字段对应的测试用例的相关信息返回,以供查阅,所述相关信息至少包括所述预期效果图。An information feedback module is configured to, if the match is successful, return relevant information of the test case corresponding to the identification field for review, where the relevant information at least includes the expected effect diagram.
第三方面,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
获取待管理测试用例的预期效果信息,根据所述预期效果信息生成预期效果图;Obtain the expected effect information of the test case to be managed, and generate an expected effect diagram based on the expected effect information;
为所述待管理测试用例设置标识字段,所述标识字段包括至少一个关键词;Set an identification field for the test case to be managed, where the identification field includes at least one keyword;
将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联存储。The expected effect diagram and the logical information of the test case are associated and stored with the identification field.
第四方面,提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
获取待管理测试用例的预期效果信息,根据所述预期效果信息生成预期效果图;Obtain the expected effect information of the test case to be managed, and generate an expected effect diagram based on the expected effect information;
为所述待管理测试用例设置标识字段,所述标识字段包括至少一个关键词;Set an identification field for the test case to be managed, where the identification field includes at least one keyword;
将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联存储。The expected effect diagram and the logical information of the test case are associated and stored with the identification field.
本发明实施例提供的技术方案带来的有益效果是:The beneficial effects brought by the technical solutions provided by the embodiments of the present invention are:
本发明实施例提供的UI测试用例管理方法、装置、计算机设备以及计算机可读存储介质,通过获取待管理测试用例的预期效果信息,根据所述预期效果信息生成预期效果图,为所述待管理测试用例设置标识字段,所述标识字段包括至少一个关键词,将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联存储,通过使用预期效果图替换文字来描述UI,既可以不用再爬山涉水的找数据,又可以更清晰的将UI预期结果展示出来。The UI test case management method, device, computer equipment and computer-readable storage medium provided by the embodiment of the present invention obtain the expected effect information of the test case to be managed and generate an expected effect diagram based on the expected effect information to provide the expected effect diagram for the test case to be managed. The test case sets an identification field, the identification field includes at least one keyword, the expected effect diagram and the logical information of the test case are stored in association with the identification field, and the UI is described by using the expected effect diagram to replace the text, Not only can you no longer have to climb mountains and wading through rivers to find data, but you can also display the expected results of the UI more clearly.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative efforts.
图1是根据一示例性实施例示出的UI测试用例管理方法的流程图;Figure 1 is a flow chart of a UI test case management method according to an exemplary embodiment;
图2是根据一示例性实施例示出的根据预期效果信息生成预期效果图的流程图;Figure 2 is a flow chart of generating an expected effect diagram based on expected effect information according to an exemplary embodiment;
图3是根据一示例性实施例示出的将预期效果图以及测试用例的逻辑信息与标识字段进行关联存储的流程图;Figure 3 is a flowchart illustrating associating and storing expected effect diagrams and logical information of test cases with identification fields according to an exemplary embodiment;
图4是根据另一示例性实施例示出的UI测试用例管理方法的流程图;Figure 4 is a flow chart of a UI test case management method according to another exemplary embodiment;
图5是根据一示例性实施例示出的UI测试用例管理装置的结构示意图;Figure 5 is a schematic structural diagram of a UI test case management device according to an exemplary embodiment;
图6是根据一示例性实施例示出的计算机设备的结构示意图。Figure 6 is a schematic structural diagram of a computer device according to an exemplary embodiment.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only Some embodiments of the present invention are not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
图1是根据一示例性实施例示出的UI测试用例管理方法的流程图,参照图1所示,该方法包括如下步骤:Figure 1 is a flow chart of a UI test case management method according to an exemplary embodiment. Referring to Figure 1, the method includes the following steps:
S1:获取待管理测试用例的预期效果信息,根据所述预期效果信息生成预期效果图。S1: Obtain the expected effect information of the test case to be managed, and generate an expected effect diagram based on the expected effect information.
具体的,本发明实施例中,采用通过预期效果图展示UI预期结果的方式替代现有技术中通过文字描述UI预期结果的方式,已解决现有技术中用文字来描述UI预期结果很容易导致描述出现差错,无法保证质量等问题。因此,在接收到业务人员通过前端web系统输入的待管理测试用例的相关信息后,首先获取待管理测试用例的预期效果信息,然后根据该预期效果信息生成对应的预期效果图。这里需要说明的是,本发明实施例中,业务人员通过前端web系统输入的待管理测试用例的相关信息除了上述预期效果信息之外,还可以包括测试用例的版本号、该测试用例的逻辑信息、用例的级别等信息。Specifically, in the embodiment of the present invention, the method of displaying the expected results of the UI through the expected renderings is used instead of the method of describing the expected results of the UI through words in the prior art. It has been solved that using words to describe the expected results of the UI in the prior art can easily lead to There are errors in the description and quality cannot be guaranteed. Therefore, after receiving the relevant information about the test cases to be managed input by the business personnel through the front-end web system, the expected effect information of the test cases to be managed is first obtained, and then the corresponding expected effect diagram is generated based on the expected effect information. It should be noted here that in the embodiment of the present invention, in addition to the above expected effect information, the relevant information of the test case to be managed input by the business personnel through the front-end web system may also include the version number of the test case and the logical information of the test case. , use case level and other information.
S2:为所述待管理测试用例设置标识字段,所述标识字段包括至少一个关键词。S2: Set an identification field for the test case to be managed, where the identification field includes at least one keyword.
具体的,为了后续方便业务人员查询测试用例,本发明实施例中,为各测试用例预先设置至少一个标识字段,其中标识字段由至少一个关键词组成。例如,可以为某一用于测试商品列表页的商品图的相关信息的测试用例设置“列表页坑位检查”,该标识字段包括以下关键词:“列表页、坑位、检查”。Specifically, in order to facilitate business personnel to query test cases later, in the embodiment of the present invention, at least one identification field is preset for each test case, where the identification field consists of at least one keyword. For example, you can set "list page pit location check" for a test case used to test the information related to the product map of the product list page. The identification field includes the following keywords: "list page, pit location, check".
作为一种较优的示例,本发明实施例中,在生成标识字段时,可以先对测试用例的相关信息进行分词处理,然后对获取到的分词进行语义分析,提取出满足预设条件的字段,将这些字段进行组合,作为该测试用例的标识字段。As a better example, in the embodiment of the present invention, when generating the identification field, the relevant information of the test case can be segmented first, and then the obtained segmentation can be semantically analyzed to extract the fields that meet the preset conditions. , combine these fields as the identification field of the test case.
S3:将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联存储。S3: Associate and store the expected effect diagram and the logical information of the test case with the identification field.
具体的,在存储测试用例时,先将上述步骤获取到的预期效果图、测试用例的逻辑信息等数据与标识字段进行关联,然后进行存储。Specifically, when storing test cases, data such as expected renderings and test case logical information obtained in the above steps are first associated with the identification field and then stored.
以下举例对上述方案进行说明:The following examples illustrate the above solutions:
假设待管理的测试用例为某一用于测试商品列表页的商品图的相关信息的测试用例,该待管理测试用例的预期效果信息如下:Assume that the test case to be managed is a test case used to test the relevant information of the product image on the product list page. The expected effect information of the test case to be managed is as follows:
布局:上中下;Layout: top, middle and bottom;
具体:上:商品图;中:价格log,价格信息;下:品牌名,文字标题。Specifically: top: product image; middle: price log, price information; bottom: brand name, text title.
详细:商品图:如果有多个颜色则在右下角显示多色logDetails: Product image: If there are multiple colors, a multi-color log will be displayed in the lower right corner.
剩余尺码显示:如果剩余尺码小于3,则在图片右下方显示剩余尺码等。Remaining size display: If the remaining size is less than 3, the remaining size, etc. will be displayed in the lower right corner of the picture.
还有其它很多检查项,这里不再一一列举。There are many other inspection items, so I won’t list them all here.
为其设置的标识字段为列表页坑位检查,先根据其预期效果信息生成预期效果图,然后将该预期效果图、测试用例的逻辑信息与该标识字段进行关联存储,如下表一所示:The identification field set for it is the list page pit check. First, the expected effect diagram is generated based on the expected effect information, and then the expected effect diagram, the logical information of the test case and the identification field are associated and stored, as shown in Table 1 below:
表一Table I
图2是根据一示例性实施例示出的根据预期效果信息生成预期效果图的流程图,参照图2所示,作为一种较优的实施方式,本发明实施例中,所述根据所述预期效果信息生成预期效果图包括:Figure 2 is a flow chart for generating an expected effect diagram based on expected effect information according to an exemplary embodiment. Referring to Figure 2, as a preferred implementation manner, in the embodiment of the present invention, the The expected effect diagram generated by the effect information includes:
S101:通过预设的提取特征向量的方法将所述预期效果信息转换为效果特征向量。S101: Convert the expected effect information into an effect feature vector through a preset feature vector extraction method.
具体的,具体的,预先设定一种将预期效果信息转换为适用于对抗网络(GAN)模型输入的图像特征向量的方法。预期效果信息可以是对业务人员输入的关于待管理测试用例的描述,如有多个颜色则在图片右下角显示多色log、如果剩余尺码小于3,则在图片右下方显示剩余尺码等,也可以是没有明确意义的抽象特征。使用预设的提取特征向量的方法将抽象特征转换为效果特征向量,其中,该方法可以是简单的数据映射,也可以通过训练深度模型得到。Specifically, a method for converting expected effect information into an image feature vector suitable for input to an adversarial network (GAN) model is set in advance. The expected effect information can be a description of the test case to be managed input by the business personnel. If there are multiple colors, a multi-color log will be displayed in the lower right corner of the picture. If the remaining size is less than 3, the remaining size will be displayed in the lower right corner of the picture, etc. Can be an abstract feature with no clear meaning. Use a preset feature vector extraction method to convert abstract features into effect feature vectors. This method can be a simple data mapping, or it can be obtained by training a deep model.
进一步的,在本发明实施例中,所述预设的提取效果特征向量的方法为:将预期效果信息映射到一个n维向量上,其中,n=1,2,3…,预期效果信息的每个特征对应向量中的至少一维,即预期效果信息的每个特征可以对应向量中的一维,也可以对应向量中的多维。Further, in the embodiment of the present invention, the preset method for extracting effect feature vectors is: mapping the expected effect information to an n-dimensional vector, where n=1, 2, 3..., the expected effect information is Each feature corresponds to at least one dimension in the vector, that is, each feature of the expected effect information can correspond to one dimension in the vector, or can correspond to multiple dimensions in the vector.
S102:将所述效果特征向量输入到预先构建的生成对抗网络模型中,生成预期效果图。S102: Input the effect feature vector into the pre-built generative adversarial network model to generate an expected effect map.
具体的,先使用预先准备的训练数据基于生成对抗网络(即对抗网络,又称对抗神经网络)训练一图片生成模型,其中该预先构建的生成对抗网络模型至少包括一个生成器。生成器的输入为效果特征向量和一个随机噪声向量,输出为预期效果图。Specifically, pre-prepared training data is first used to train an image generation model based on a generative adversarial network (ie, adversarial network, also known as an adversarial neural network), where the pre-built generative adversarial network model includes at least one generator. The input of the generator is the effect feature vector and a random noise vector, and the output is the expected effect map.
图3是根据一示例性实施例示出的将预期效果图以及测试用例的逻辑信息与标识字段进行关联存储的流程图,参照图3所示,作为一种较优的实施方式,本发明实施例中,所述将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联存储包括:Figure 3 is a flowchart illustrating the associated storage of the expected effect diagram and the logical information of the test case with the identification field according to an exemplary embodiment. Referring to Figure 3, as a preferred implementation mode, the embodiment of the present invention , associating and storing the expected effect diagram and the logical information of the test case with the identification field includes:
S301:按照模块级别对所述测试用例进行分层处理,将所述测试用例进行分层排序。S301: Perform hierarchical processing of the test cases according to module levels, and hierarchically sort the test cases.
具体的,本发明实施例中,为便于管理各个测试用例,在存储各测试用例时,按照模块级别对所述测试用例进行分层处理,对各个测试用例进行分层排序。例如,某个case包括如干个测试步骤,则可以按照执行先后顺序对各个测试步骤进行排序。Specifically, in the embodiment of the present invention, in order to facilitate the management of each test case, when storing each test case, the test cases are hierarchically processed according to the module level, and each test case is hierarchically sorted. For example, if a case includes several test steps, each test step can be sorted according to the order of execution.
S302:将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联,并按照所述分层排序的顺序存储。S302: Associate the expected effect diagram and the logical information of the test case with the identification field, and store them in the order of the hierarchical sorting.
具体的,在存储测试用例时,先将上述步骤获取到的预期效果图、测试用例的逻辑信息等数据与标识字段进行关联,然后按照分层排序的顺序进行存储。例如,某个case包括如干个测试步骤,每个测试步骤对应一个测试用例,在对该case的各个测试用例进行存储管理时,按照测试步骤依次进行存储,示意图如下:Specifically, when storing test cases, data such as expected renderings and test case logical information obtained in the above steps are first associated with the identification field, and then stored in a hierarchical sorting order. For example, a case includes several test steps, and each test step corresponds to a test case. When storing and managing each test case of the case, it is stored in sequence according to the test steps. The schematic diagram is as follows:
表二Table II
图4是根据另一示例性实施例示出的UI测试用例管理方法的流程图,参照图4所示,作为一种较优的实施方式,本发明实施例中,所述方法包括:Figure 4 is a flow chart of a UI test case management method according to another exemplary embodiment. Referring to Figure 4, as a preferred implementation, in this embodiment of the present invention, the method includes:
S1:获取待管理测试用例的预期效果信息,根据所述预期效果信息生成预期效果图。S1: Obtain the expected effect information of the test case to be managed, and generate an expected effect diagram based on the expected effect information.
S2:为所述待管理测试用例设置标识字段,所述标识字段包括至少一个关键词。S2: Set an identification field for the test case to be managed, where the identification field includes at least one keyword.
S3:将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联存储。S3: Associate and store the expected effect diagram and the logical information of the test case with the identification field.
具体的,步骤S1至S3的具体实施方式参照前述内容,这里不再一一赘述。Specifically, for the specific implementation of steps S1 to S3, refer to the foregoing content and will not be described again here.
S4:接收用例查询请求,将所述用例查询请求与所述标识字段中的关键词进行匹配。S4: Receive the use case query request, and match the use case query request with the keywords in the identification field.
具体的,本发明实施例中,在接收到用户(如业务人员等)发出的用例查询请求后,首先对该用例查询请求中的查询语句进行分词处理,提取该查询语句的关键词,然后将该查询语句的关键词与标识字段中的关键词进行匹配。具体的匹配方式这里不做具体限制,用户可根据具体需求进行选择。Specifically, in the embodiment of the present invention, after receiving a use case query request from a user (such as a business person, etc.), the query statement in the use case query request is first segmented, the keywords of the query statement are extracted, and then The keywords of the query statement are matched with the keywords in the identification field. There are no specific restrictions on the specific matching methods here, and users can choose according to specific needs.
S5:若匹配成功,则将与所述标识字段对应的测试用例的相关信息返回,以供查阅,所述相关信息至少包括所述预期效果图。S5: If the match is successful, the relevant information of the test case corresponding to the identification field is returned for review, and the relevant information at least includes the expected effect diagram.
具体的,若查询语句的关键词与标识字段中的关键词匹配成功,则将与该标识字段对应的测试用例的相关信息返回,以供查阅,其中相关信息至少包括预期效果图。将预期效果图返回给查询请求方,可以方便查询请求方快速清晰的理解该测试用例的预期效果,从而方便查询请求方选取相应的测试用例。Specifically, if the keyword of the query statement successfully matches the keyword in the identification field, the relevant information of the test case corresponding to the identification field will be returned for review, where the relevant information at least includes the expected renderings. Returning the expected effect diagram to the query requester can facilitate the query requester to quickly and clearly understand the expected effect of the test case, thereby facilitating the query requester to select the corresponding test case.
图5是根据一示例性实施例示出的UI测试用例管理装置的结构示意图,参照图5所示,该装置包括:Figure 5 is a schematic structural diagram of a UI test case management device according to an exemplary embodiment. Referring to Figure 5, the device includes:
图片生成模块,用于获取待管理测试用例的预期效果信息,根据所述预期效果信息生成预期效果图;A picture generation module, used to obtain the expected effect information of the test case to be managed, and generate an expected effect diagram based on the expected effect information;
字段设置模块,用于为所述待管理测试用例设置标识字段,所述标识字段包括至少一个关键词;A field setting module, configured to set an identification field for the test case to be managed, where the identification field includes at least one keyword;
信息存储模块,用于将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联存储。An information storage module, configured to associate and store the expected effect diagram and the logical information of the test case with the identification field.
作为一种较优的实施方式,本发明实施例中,所述图片生成模块包括:As a preferred implementation manner, in this embodiment of the present invention, the picture generation module includes:
向量生成单元,用于通过预设的提取特征向量的方法将所述预期效果信息转换为效果特征向量;A vector generation unit, configured to convert the expected effect information into an effect feature vector through a preset method of extracting feature vectors;
图片生成单元,用于将所述效果特征向量输入到预先构建的生成对抗网络模型中,生成预期效果图。The image generation unit is used to input the effect feature vector into a pre-built generative adversarial network model to generate an expected effect image.
作为一种较优的实施方式,本发明实施例中,所述信息存储模块包括:As a preferred implementation manner, in this embodiment of the present invention, the information storage module includes:
排序处理单元,用于按照模块级别对所述测试用例进行分层处理,将所述测试用例进行分层排序;A sorting processing unit, configured to hierarchically process the test cases according to the module level, and hierarchically sort the test cases;
信息存储单元,用于将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联,并按照所述分层排序的顺序存储。An information storage unit, configured to associate the expected effect diagram and the logical information of the test case with the identification field, and store them in the order of the hierarchical sorting.
作为一种较优的实施方式,本发明实施例中,所述装置还包括:As a preferred implementation manner, in this embodiment of the present invention, the device further includes:
请求接收模块,用于接收用例查询请求;Request receiving module, used to receive use case query requests;
信息匹配模块,用于将所述用例查询请求与所述标识字段中的关键词进行匹配;An information matching module, used to match the use case query request with the keywords in the identification field;
信息反馈模块,用于若匹配成功,则将与所述标识字段对应的测试用例的相关信息返回,以供查阅,所述相关信息至少包括所述预期效果图。An information feedback module is configured to, if the match is successful, return relevant information of the test case corresponding to the identification field for review, where the relevant information at least includes the expected effect diagram.
图6是根据一示例性实施例示出的计算机设备的结构示意图,参照图6所示,该计算机设备包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现以下步骤:FIG. 6 is a schematic structural diagram of a computer device according to an exemplary embodiment. Referring to FIG. 6 , the computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes Computer program implements the following steps:
获取待管理测试用例的预期效果信息,根据所述预期效果信息生成预期效果图;Obtain the expected effect information of the test case to be managed, and generate an expected effect diagram based on the expected effect information;
为所述待管理测试用例设置标识字段,所述标识字段包括至少一个关键词;Set an identification field for the test case to be managed, where the identification field includes at least one keyword;
将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联存储。The expected effect diagram and the logical information of the test case are associated and stored with the identification field.
作为一种较优的实施方式,本发明实施例中,所述根据所述预期效果信息生成预期效果图包括:As a preferred implementation manner, in the embodiment of the present invention, generating an expected effect diagram based on the expected effect information includes:
通过预设的提取特征向量的方法将所述预期效果信息转换为效果特征向量;Convert the expected effect information into an effect feature vector through a preset method of extracting feature vectors;
将所述效果特征向量输入到预先构建的生成对抗网络模型中,生成预期效果图。The effect feature vector is input into the pre-built generative adversarial network model to generate the expected effect map.
作为一种较优的实施方式,本发明实施例中,所述将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联存储包括:As a preferred implementation manner, in the embodiment of the present invention, associating and storing the expected effect diagram and the logical information of the test case with the identification field includes:
按照模块级别对所述测试用例进行分层处理,将所述测试用例进行分层排序;Perform hierarchical processing of the test cases according to module levels, and hierarchically sort the test cases;
将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联,并按照所述分层排序的顺序存储。The expected effect diagram and the logical information of the test case are associated with the identification field, and stored in the order of the hierarchical sorting.
作为一种较优的实施方式,本发明实施例中,所述方法还包括:As a preferred implementation manner, in the embodiment of the present invention, the method further includes:
接收用例查询请求,将所述用例查询请求与所述标识字段中的关键词进行匹配;Receive a use case query request, and match the use case query request with the keywords in the identification field;
若匹配成功,则将与所述标识字段对应的测试用例的相关信息返回,以供查阅,所述相关信息至少包括所述预期效果图。If the match is successful, the relevant information of the test case corresponding to the identification field is returned for review, and the relevant information at least includes the expected effect diagram.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:In one embodiment, a computer-readable storage medium is provided with a computer program stored thereon. When the computer program is executed by a processor, the following steps are implemented:
获取待管理测试用例的预期效果信息,根据所述预期效果信息生成预期效果图;Obtain the expected effect information of the test case to be managed, and generate an expected effect diagram based on the expected effect information;
为所述待管理测试用例设置标识字段,所述标识字段包括至少一个关键词;Set an identification field for the test case to be managed, where the identification field includes at least one keyword;
将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联存储。The expected effect diagram and the logical information of the test case are associated and stored with the identification field.
作为一种较优的实施方式,本发明实施例中,所述根据所述预期效果信息生成预期效果图包括:As a preferred implementation manner, in the embodiment of the present invention, generating an expected effect diagram based on the expected effect information includes:
通过预设的提取特征向量的方法将所述预期效果信息转换为效果特征向量;Convert the expected effect information into an effect feature vector through a preset method of extracting feature vectors;
将所述效果特征向量输入到预先构建的生成对抗网络模型中,生成预期效果图。The effect feature vector is input into the pre-built generative adversarial network model to generate the expected effect map.
作为一种较优的实施方式,本发明实施例中,所述将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联存储包括:As a preferred implementation manner, in the embodiment of the present invention, associating and storing the expected effect diagram and the logical information of the test case with the identification field includes:
按照模块级别对所述测试用例进行分层处理,将所述测试用例进行分层排序;Perform hierarchical processing of the test cases according to module levels, and hierarchically sort the test cases;
将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联,并按照所述分层排序的顺序存储。The expected effect diagram and the logical information of the test case are associated with the identification field, and stored in the order of the hierarchical sorting.
作为一种较优的实施方式,本发明实施例中,所述方法还包括:As a preferred implementation manner, in the embodiment of the present invention, the method further includes:
接收用例查询请求,将所述用例查询请求与所述标识字段中的关键词进行匹配;Receive a use case query request, and match the use case query request with the keywords in the identification field;
若匹配成功,则将与所述标识字段对应的测试用例的相关信息返回,以供查阅,所述相关信息至少包括所述预期效果图。If the match is successful, the relevant information of the test case corresponding to the identification field is returned for review, and the relevant information at least includes the expected effect diagram.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage. In the media, when executed, the computer program may include the processes of the above method embodiments. Any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Synchlink DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
综上所述,本发明实施例提供的技术方案带来的有益效果是:To sum up, the beneficial effects brought by the technical solutions provided by the embodiments of the present invention are:
本发明实施例提供的UI测试用例管理方法、装置、计算机设备以及计算机可读存储介质,通过获取待管理测试用例的预期效果信息,根据所述预期效果信息生成预期效果图,为所述待管理测试用例设置标识字段,所述标识字段包括至少一个关键词,将所述预期效果图以及所述测试用例的逻辑信息与所述标识字段进行关联存储,通过使用预期效果图替换文字来描述UI,既可以不用再爬山涉水的找数据,又可以更清晰的将UI预期结果展示出来。The UI test case management method, device, computer equipment and computer-readable storage medium provided by the embodiment of the present invention obtain the expected effect information of the test case to be managed and generate an expected effect diagram based on the expected effect information to provide the expected effect diagram for the test case to be managed. The test case sets an identification field, the identification field includes at least one keyword, the expected effect diagram and the logical information of the test case are stored in association with the identification field, and the UI is described by using the expected effect diagram to replace the text, Not only can you no longer have to climb mountains and wading through rivers to find data, but you can also display the expected results of the UI more clearly.
需要说明的是:上述实施例提供的UI测试用例管理装置在触发管理业务时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的UI测试用例管理装置与UI测试用例管理方法实施例属于同一构思,即该装置是基于该UI测试用例管理方法的,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the UI test case management device provided in the above embodiment triggers the management service, it only takes the division of the above functional modules as an example. In actual applications, the above functions can be allocated to different functional modules as needed. Completion means dividing the internal structure of the device into different functional modules to complete all or part of the functions described above. In addition, the UI test case management device provided by the above embodiments and the UI test case management method embodiments belong to the same concept, that is, the device is based on the UI test case management method. The specific implementation process is detailed in the method embodiments, which will not be discussed here. Repeat.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned The storage media mentioned can be read-only memory, magnetic disks or optical disks, etc.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within the range.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911315869.4A CN111078564B (en) | 2019-12-18 | 2019-12-18 | A UI test case management method, device, computer equipment and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911315869.4A CN111078564B (en) | 2019-12-18 | 2019-12-18 | A UI test case management method, device, computer equipment and computer-readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111078564A CN111078564A (en) | 2020-04-28 |
CN111078564B true CN111078564B (en) | 2023-09-19 |
Family
ID=70315667
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911315869.4A Active CN111078564B (en) | 2019-12-18 | 2019-12-18 | A UI test case management method, device, computer equipment and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111078564B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112199285B (en) * | 2020-10-12 | 2023-08-01 | 中国农业银行股份有限公司 | Test case optimization method and device and electronic equipment |
CN114116453B (en) * | 2021-10-31 | 2024-01-09 | 苏州浪潮智能科技有限公司 | Method, device, equipment and readable medium for testing case association configuration information |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105260301A (en) * | 2015-09-24 | 2016-01-20 | 努比亚技术有限公司 | Visual effect comparison test device of user interfaces and realization method of visual effect comparison test device of user interfaces |
CN107203463A (en) * | 2016-03-16 | 2017-09-26 | 阿里巴巴集团控股有限公司 | Method, interface method for drafting and the device of interface detection |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170192882A1 (en) * | 2016-01-06 | 2017-07-06 | Hcl Technologies Limited | Method and system for automatically generating a plurality of test cases for an it enabled application |
-
2019
- 2019-12-18 CN CN201911315869.4A patent/CN111078564B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105260301A (en) * | 2015-09-24 | 2016-01-20 | 努比亚技术有限公司 | Visual effect comparison test device of user interfaces and realization method of visual effect comparison test device of user interfaces |
CN107203463A (en) * | 2016-03-16 | 2017-09-26 | 阿里巴巴集团控股有限公司 | Method, interface method for drafting and the device of interface detection |
Non-Patent Citations (1)
Title |
---|
基于UML状态图的类测试用例生成;雷斌;崔丽婷;;电子质量(08);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111078564A (en) | 2020-04-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11599714B2 (en) | Methods and systems for modeling complex taxonomies with natural language understanding | |
US11294968B2 (en) | Combining website characteristics in an automatically generated website | |
CN112631997B (en) | Data processing method, device, terminal and storage medium | |
US11106906B2 (en) | Systems and methods for information extraction from text documents with spatial context | |
CN110096434A (en) | Interface testing method and device | |
WO2020237872A1 (en) | Method and apparatus for testing accuracy of semantic analysis model, storage medium, and device | |
US8880440B2 (en) | Automatic combination and mapping of text-mining services | |
CN107783950A (en) | Package insert processing method and processing device | |
US11727213B2 (en) | Automatic conversation bot generation using input form | |
US10699112B1 (en) | Identification of key segments in document images | |
CN112651236B (en) | Method and device for extracting text information, computer equipment and storage medium | |
CN109710933A (en) | Acquisition methods, device, computer equipment and the storage medium of training corpus | |
US20210390251A1 (en) | Automatic generation of form application | |
US11940964B2 (en) | System for annotating input data using graphs via a user interface | |
CN111078564B (en) | A UI test case management method, device, computer equipment and computer-readable storage medium | |
US20120046937A1 (en) | Semantic classification of variable data campaign information | |
CN110909768B (en) | Method and device for acquiring marked data | |
CN117520343A (en) | Information extraction methods, servers and storage media | |
US11816770B2 (en) | System for ontological graph creation via a user interface | |
CN110866084A (en) | Data processing method and device for family tree character and electronic equipment | |
JP2015165366A (en) | Database reconstruction method, database reconstruction program, and database reconstruction device | |
CN114218907A (en) | Presentation generation method and device, electronic equipment and storage medium | |
CN113722406A (en) | Knowledge fusion method and device based on knowledge graph | |
CN115828856A (en) | Test paper generation method, device, equipment and storage medium | |
CN114612077A (en) | Contract review method, apparatus and computer equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |