[go: up one dir, main page]

CN110737573B - Method and device for automatically testing user interface UI - Google Patents

Method and device for automatically testing user interface UI Download PDF

Info

Publication number
CN110737573B
CN110737573B CN201810789737.4A CN201810789737A CN110737573B CN 110737573 B CN110737573 B CN 110737573B CN 201810789737 A CN201810789737 A CN 201810789737A CN 110737573 B CN110737573 B CN 110737573B
Authority
CN
China
Prior art keywords
test
picture
instructions
instruction
automation
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
CN201810789737.4A
Other languages
Chinese (zh)
Other versions
CN110737573A (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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201810789737.4A priority Critical patent/CN110737573B/en
Publication of CN110737573A publication Critical patent/CN110737573A/en
Application granted granted Critical
Publication of CN110737573B publication Critical patent/CN110737573B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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/3696Methods or tools to render software testable

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

The invention discloses a method and a device for automatically testing a user interface UI. The method comprises the following steps: reading the test case from the storage path of the test case; generating a test instruction corresponding to each test picture according to the file name of each test picture in the test case; and finishing the UI automatic test according to the test instruction and the corresponding test picture. The technical scheme realizes the tight coupling of the test case and the test picture based on the modification of the file name of the test picture, is convenient for management and test result investigation, and simultaneously, the code of the automatic test can be automatically generated according to the rule, thereby being convenient for use.

Description

用户界面UI自动化测试的方法和装置Method and device for automated testing of user interface UI

技术领域technical field

本发明涉及自动化测试领域,具体涉及用户界面UI自动化测试的方法和装置。The invention relates to the field of automation testing, in particular to a method and device for UI automation testing.

背景技术Background technique

以往UI(User Interface,用户界面)测试通常采用手工测试,费时费力。目前UI自动化测试有了良好的发展,但也存在很多不足,例如,在需要用到测试图片时,需要针对测试图片编写测试用例,测试用例和测试图片相分离,既不便于存储管理,也不便于测试结果的排查,同样不便于自动化测试代码的生成。In the past, UI (User Interface, user interface) testing usually used manual testing, which was time-consuming and labor-intensive. At present, UI automation testing has made good progress, but there are still many deficiencies. For example, when test pictures are needed, test cases need to be written for test pictures. The separation of test cases and test pictures is neither convenient for storage management nor It is easy to check the test results, but it is also not easy to generate automated test codes.

发明内容Contents of the invention

鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的用户界面UI自动化测试的方法和装置。In view of the above problems, the present invention is proposed to provide a method and device for UI automation testing that overcomes the above problems or at least partially solves the above problems.

依据本发明的一个方面,提供了一种用户界面UI自动化测试的方法,包括:According to one aspect of the present invention, a method for automated testing of user interface UI is provided, including:

从测试用例的存储路径下读取测试用例;Read the test case from the storage path of the test case;

根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令;Generate test instructions corresponding to each test picture according to the file name of each test picture in the test case;

根据所述测试指令和相应的测试图片完成UI自动化测试。Complete the UI automation test according to the test instruction and the corresponding test picture.

可选地,所述测试用例为包含若干个测试图片的文件夹。Optionally, the test case is a folder containing several test pictures.

可选地,所述测试图片的文件名中包括测试顺序的序列标识;Optionally, the file name of the test picture includes a sequence identifier of the test sequence;

所述从测试用例的存储路径下读取测试用例包括:The reading of the test case from the storage path of the test case includes:

按照序列标识从所述文件夹中读取测试图片,其中,每次读取一个测试图片,并在根据该测试图片完成相应的测试后,读取与测试顺序中下一个序列标识对应的测试图片,或者,根据测试结果确定新的序列标识,读取与新的序列标识对应的测试图片;Read the test picture from the folder according to the sequence identification, wherein, read a test picture at a time, and after completing the corresponding test according to the test picture, read the test picture corresponding to the next sequence identification in the test order , or, determine a new sequence identifier according to the test result, and read a test picture corresponding to the new sequence identifier;

当所述文件夹中的与测试顺序中最后一个序列标识对应的测试图片被读取完时结束UI自动化测试,或者,当根据一个测试图片的测试结果确定满足测试结束条件时,结束UI自动化测试。End the UI automation test when the test picture corresponding to the last sequence identifier in the test sequence in the folder is read, or, when it is determined that the test end condition is met according to the test result of a test picture, end the UI automation test .

可选地,测试图片的文件名中包括若干条测试信息,以及与各测试信息对应的标识;Optionally, the file name of the test picture includes several pieces of test information, and an identification corresponding to each test information;

所述测试信息包括测试指令的伪指令和/或测试用数据。The test information includes pseudo-instructions of test instructions and/or test data.

可选地,所述根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令包括:Optionally, said generating test instructions corresponding to each test picture according to the file name of each test picture in the test case includes:

将测试图片的文件名读取为字符串,依序遍历字符串,获得各标识及与各标识对应的测试信息;Read the file name of the test picture as a string, traverse the string in order, and obtain each logo and the test information corresponding to each logo;

根据所述测试信息中的伪指令查找测试指令映射表,查找出相应的测试指令。The test instruction mapping table is searched according to the pseudo-instruction in the test information, and the corresponding test instruction is found.

可选地,所述测试指令包括如下的一种或多种:Optionally, the test instructions include one or more of the following:

触发用户事件的指令,判断指令,跳转指令,测试时间设置指令。Instructions that trigger user events, judgment instructions, jump instructions, and test time setting instructions.

可选地,所述根据所述测试指令和相应的测试图片完成UI自动化测试包括:Optionally, the completing the UI automation test according to the test instruction and the corresponding test picture includes:

对应用的UI进行截图,在截图中进行测试图片的识别;Take a screenshot of the UI of the application, and identify the test picture in the screenshot;

根据图像识别结果和所述测试指令完成UI自动化测试。Complete the UI automation test according to the image recognition result and the test instruction.

可选地,该方法还包括:Optionally, the method also includes:

将UI自动化测试的测试结果和对应的测试用例保存至同一目录下。Save the test results of the UI automation test and the corresponding test cases in the same directory.

依据本发明的另一方面,提供了一种用户界面UI自动化测试的装置,包括:According to another aspect of the present invention, a device for automated testing of user interface UI is provided, including:

测试用例读取单元,适于从测试用例的存储路径下读取测试用例;The test case reading unit is suitable for reading the test case from the storage path of the test case;

测试指令生成单元,适于根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令;A test command generation unit is adapted to generate test commands corresponding to each test picture according to the file name of each test picture in the test case;

测试单元,适于根据所述测试指令和相应的测试图片完成UI自动化测试。The test unit is adapted to complete the UI automation test according to the test instructions and corresponding test pictures.

可选地,所述测试用例为包含若干个测试图片的文件夹。Optionally, the test case is a folder containing several test pictures.

可选地,所述测试图片的文件名中包括测试顺序的序列标识;Optionally, the file name of the test picture includes a sequence identifier of the test sequence;

所述测试用例读取单元,适于按照序列标识从所述文件夹中读取测试图片,其中,每次读取一个测试图片,并在根据该测试图片完成相应的测试后,读取与测试顺序中下一个序列标识对应的测试图片,或者,根据测试结果确定新的序列标识,读取与新的序列标识对应的测试图片;当所述文件夹中的与测试顺序中最后一个序列标识对应的测试图片被读取完时结束UI自动化测试,或者,当根据一个测试图片的测试结果确定满足测试结束条件时,结束UI自动化测试。The test case reading unit is adapted to read the test picture from the folder according to the sequence identification, wherein each time a test picture is read, and after completing the corresponding test according to the test picture, read and test The test picture corresponding to the next sequence ID in the sequence, or determine the new sequence ID according to the test results, and read the test picture corresponding to the new sequence ID; when the one in the folder corresponds to the last sequence ID in the test sequence End the UI automation test when the test picture is read, or end the UI automation test when it is determined that the test end condition is satisfied according to the test result of a test picture.

可选地,测试图片的文件名中包括若干条测试信息,以及与各测试信息对应的标识;Optionally, the file name of the test picture includes several pieces of test information, and an identification corresponding to each test information;

所述测试信息包括测试指令的伪指令和/或测试用数据。The test information includes pseudo-instructions of test instructions and/or test data.

可选地,所述测试指令生成单元,适于将测试图片的文件名读取为字符串,依序遍历字符串,获得各标识及与各标识对应的测试信息;根据所述测试信息中的伪指令查找测试指令映射表,查找出相应的测试指令。Optionally, the test instruction generation unit is adapted to read the file name of the test picture as a character string, traverse the character string in order, and obtain each logo and the test information corresponding to each logo; according to the test information in the test information The pseudo-instruction searches the test instruction mapping table to find out the corresponding test instruction.

可选地,所述测试指令包括如下的一种或多种:Optionally, the test instructions include one or more of the following:

触发用户事件的指令,判断指令,跳转指令,测试时间设置指令。Instructions that trigger user events, judgment instructions, jump instructions, and test time setting instructions.

可选地,所述测试单元,适于对应用的UI进行截图,在截图中进行测试图片的识别;根据图像识别结果和所述测试指令完成UI自动化测试。Optionally, the test unit is adapted to take a screenshot of the UI of the application, and identify the test picture in the screenshot; complete the UI automation test according to the image recognition result and the test instruction.

可选地,所述测试单元,还适于将UI自动化测试的测试结果和对应的测试用例保存至同一目录下。Optionally, the test unit is further adapted to save the test results of the UI automation test and the corresponding test cases in the same directory.

依据本发明的又一方面,提供了一种电子设备,包括:处理器;以及被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器执行如上述任一所述的方法。According to yet another aspect of the present invention, there is provided an electronic device, comprising: a processor; and a memory arranged to store computer-executable instructions that, when executed, cause the processor to perform any of the above a method as described.

依据本发明的再一方面,提供了一种计算机可读存储介质,其中,所述计算机可读存储介质存储一个或多个程序,所述一个或多个程序当被处理器执行时,实现如上述任一所述的方法。According to still another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the following is implemented: any of the methods described above.

由上述可知,本发明的技术方案,从测试用例的存储路径下读取测试用例,根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令,根据测试指令和相应的测试图片完成UI自动化测试。该技术方案基于对测试图片文件名的修改,实现了测试用例与测试图片的紧耦合,便于管理和测试结果排查,同时自动化测试的代码也可以按规律自动生成,方便使用。As can be seen from the above, the technical solution of the present invention reads the test case from the storage path of the test case, generates test instructions corresponding to each test picture according to the file name of each test picture in the test case, and according to the test command and the corresponding test Image complete UI automation testing. Based on the modification of the file name of the test picture, the technical solution realizes the tight coupling between the test case and the test picture, which is convenient for management and test result checking. At the same time, the code of the automated test can also be automatically generated according to the rules, which is convenient for use.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same components. In the attached picture:

图1示出了根据本发明一个实施例的一种用户界面UI自动化测试的方法的流程示意图;FIG. 1 shows a schematic flow diagram of a method for automated testing of a user interface UI according to an embodiment of the present invention;

图2示出了根据本发明一个实施例的一种用户界面UI自动化测试的装置的结构示意图;FIG. 2 shows a schematic structural diagram of a device for automated testing of a user interface UI according to an embodiment of the present invention;

图3示出了根据本发明一个实施例的电子设备的结构示意图;FIG. 3 shows a schematic structural diagram of an electronic device according to an embodiment of the present invention;

图4示出了根据本发明一个实施例的计算机可读存储介质的结构示意图。Fig. 4 shows a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

图1示出了根据本发明一个实施例的一种用户界面UI自动化测试的方法的流程示意图。如图1所示,该方法包括:Fig. 1 shows a schematic flowchart of a method for UI automation testing according to an embodiment of the present invention. As shown in Figure 1, the method includes:

步骤S110,从测试用例的存储路径下读取测试用例。Step S110, read the test case from the storage path of the test case.

测试用例的含义通常要结合使用场景来分析,在本发明的实施例中,自动化测试代码是与测试用例分离的,但测试用例中也包含了测试逻辑。也就是说,测试用例包含有测试所使用的数据,以及测试逻辑的描述信息,但是不包含具体的执行指令。The meaning of the test case is usually analyzed in conjunction with the usage scenario. In the embodiment of the present invention, the automated test code is separated from the test case, but the test case also includes the test logic. That is to say, the test case contains the data used in the test and the description information of the test logic, but does not contain specific execution instructions.

因此在步骤S120,根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令。Therefore, in step S120, according to the file name of each test picture in the test case, a test instruction corresponding to each test picture is generated.

可以看出,文件名中包含有测试逻辑的描述信息,例如一个测试图片的图片内容描述了应用中的一个控件,文件名中描述了要对这个控件进行点击操作,那么测试指令就是根据这些来生成的。It can be seen that the file name contains the description information of the test logic. For example, the picture content of a test picture describes a control in the application, and the file name describes the click operation on this control, so the test instruction is based on these Generated.

步骤S130,根据测试指令和相应的测试图片完成UI自动化测试。Step S130, completing the UI automation test according to the test instruction and the corresponding test picture.

可见,图1所示的方法,从测试用例的存储路径下读取测试用例,根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令,根据测试指令和相应的测试图片完成UI自动化测试。该技术方案基于对测试图片文件名的修改,实现了测试用例与测试图片的紧耦合,便于管理和测试结果排查,同时自动化测试的代码也可以按规律自动生成,方便使用。It can be seen that the method shown in Figure 1 reads the test case from the storage path of the test case, generates the test instructions corresponding to each test picture according to the file name of each test picture in the test case, and generates the corresponding test instructions according to the test instructions and the corresponding test pictures. Complete UI automation testing. Based on the modification of the file name of the test picture, the technical solution realizes the tight coupling between the test case and the test picture, which is convenient for management and test result checking. At the same time, the code of the automated test can also be automatically generated according to the rules, which is convenient for use.

在本发明的一个实施例中,上述方法中,测试用例为包含若干个测试图片的文件夹。In one embodiment of the present invention, in the above method, the test case is a folder containing several test pictures.

可见,一个包含了若干个测试图片的文件夹就是一个测试用例。现有技术中一些UI自动化测试的实现如下:将测试图片集中保存,在另外一个文件(例如Excel文档)中写入测试图片及相应的测试逻辑。这种情况下,一般将文件称之为测试用例,而测试图片仅作为测试中使用的测试数据,这样就形成了松耦合。但是在测试结果查看以及测试用例、测试数据的管理上就十分不便,例如,发现某个控件的测试没有成功,还需要打开文件,确定相应的测试图片,再打开测试图片,步骤十分繁琐。而在本实施例中,则是直接将包含测试图片的文件夹作为测试用例,在测试结果反查时,可以直接定位到相应的测试图片,并通过测试图片文件名快速了解测试的基本逻辑,直观简单。It can be seen that a folder containing several test pictures is a test case. The implementation of some UI automation tests in the prior art is as follows: centrally save the test pictures, and write the test pictures and the corresponding test logic in another file (such as an Excel document). In this case, the file is generally called a test case, and the test picture is only used as the test data used in the test, thus forming a loose coupling. However, it is very inconvenient to view test results and manage test cases and test data. For example, if you find that the test of a certain control is not successful, you need to open the file, determine the corresponding test picture, and then open the test picture. The steps are very cumbersome. However, in this embodiment, the folder containing the test picture is directly used as the test case. When the test result is checked back, the corresponding test picture can be directly located, and the basic logic of the test can be quickly understood through the test picture file name. Intuitive and simple.

在本发明的一个实施例中,上述方法中,测试图片的文件名中包括测试顺序的序列标识;从测试用例的存储路径下读取测试用例包括:按照序列标识从所述文件夹中读取测试图片,其中,每次读取一个测试图片,并在根据该测试图片完成相应的测试后,读取与测试顺序中下一个序列标识对应的测试图片,或者,根据测试结果确定新的序列标识,读取与新的序列标识对应的测试图片;当文件夹中的与测试顺序中最后一个序列标识对应的测试图片被读取完时结束UI自动化测试,或者,当根据一个测试图片的测试结果确定满足测试结束条件时,结束UI自动化测试。In one embodiment of the present invention, in the above method, the file name of the test picture includes the sequence identification of the test sequence; reading the test case from the storage path of the test case includes: reading from the folder according to the sequence identification A test picture, wherein one test picture is read each time, and after the corresponding test is completed according to the test picture, the test picture corresponding to the next sequence identifier in the test sequence is read, or a new sequence identifier is determined according to the test result , read the test picture corresponding to the new sequence ID; end the UI automation test when the test picture corresponding to the last sequence ID in the test sequence in the folder is read, or, when the test result is based on a test picture When it is determined that the test end condition is met, the UI automation test is ended.

例如,文件夹下有01、02……10开头的十个测试图片,作为测试顺序的序列标识。则在测试时,先读取01开头的图片,根据其文件名的剩余部分获知测试逻辑,生成相应的测试指令,根据该图片完成测试,然后再读取02开头的图片……直至对10开头的图片测试完毕。这样就完成了针对一个测试用例的测试。For example, there are ten test pictures beginning with 01, 02...10 under the folder, which are used as the sequence identification of the test sequence. When testing, first read the picture starting with 01, get the test logic according to the remaining part of its file name, generate the corresponding test instruction, complete the test according to the picture, and then read the picture starting with 02... until the picture starting with 10 The picture test is complete. This completes the test for a test case.

而在一些情况下,有可能根据某些测试图片的不同测试结果执行不同的测试逻辑。例如点击一个控件才能进行跳转,那么当该控件不存在时也需要进行别的测试。则可以在测试图片03失败时,跳转至测试图片08的测试,而不是继续测试图片04的测试。In some cases, it is possible to execute different test logics according to different test results of certain test pictures. For example, click a control to jump, then other tests need to be performed when the control does not exist. Then, when the test picture 03 fails, jump to the test of the test picture 08 instead of continuing the test of the test picture 04.

根据测试图片文件名生成的测试指令中还可以包括根据测试结果直接判断为结束测试的指令,例如某个图片没有识别到,则直接结束测试。而上述测试过程同样支持在UI自动化测试过程中出现的干扰场景图片,例如测试图片08可能会被一个悬浮窗(例如系统悬浮窗,而非待测试应用的悬浮窗)遮挡,那么可以在测试图片08之前添加悬浮窗对应的测试图片07,这样虽然实际不需要测试悬浮窗08,但是由于其是一个干扰,也可以对其进行操作,例如点击悬浮窗,其消失后露出与测试图片08对应的控件,这样就可以继续UI自动化测试。这样对测试图片07的执行逻辑就变成点击一下即可,成功点击与否并不影响测试结果的呈现,因为这本来就不是测试目的。The test instruction generated according to the file name of the test picture may also include an instruction to directly judge the end of the test according to the test result, for example, if a certain picture is not recognized, the test is directly ended. The above test process also supports the interference scene pictures that appear in the UI automation test process. For example, the test picture 08 may be blocked by a floating window (such as the system floating window, not the floating window of the application to be tested), so you can use the test picture Add the test picture 07 corresponding to the floating window before 08, so that although it is not actually necessary to test the floating window 08, because it is an interference, you can also operate it, for example, click on the floating window, and after it disappears, it will reveal the corresponding test picture 08. controls so that UI automation testing can continue. In this way, the execution logic of the test picture 07 becomes just one click, and whether the click is successful or not does not affect the presentation of the test results, because this is not the purpose of the test.

在本发明的一个实施例中,上述方法中,测试图片的文件名中包括若干条测试信息,以及与各测试信息对应的标识;测试信息包括测试指令的伪指令和/或测试用数据。In one embodiment of the present invention, in the above method, the file name of the test picture includes several pieces of test information and the identification corresponding to each test information; the test information includes pseudo-instructions of test instructions and/or test data.

基于一个测试图片可能存在多个操作,也可能只有一个操作;操作本身可能仅仅是判断某个测试图片对应的控件是否存在,也可能需要对控件进行点击,也有可能控件是一个输入框,需要输入一些测试数据。下面给出了三个文件名的示例:There may be multiple operations based on a test image, or there may be only one operation; the operation itself may only determine whether a control corresponding to a test image exists, or it may be necessary to click on the control, or the control may be an input box that needs to be entered some test data. Examples of three file names are given below:

01_click_key_Enter.png;02_exist.png;03_type_value.png。01_click_key_Enter.png; 02_exist.png; 03_type_value.png.

其中,01开头的测试图片需要先点击(click)控件,判断特征项(key),再执行按回车键的操作(Enter);02开头的测试图片仅需要判断相应的图片内容是否存在;03开头的测试图片需要在控件中输入(type)相应的测试数据的值(value)。也就是一个测试图片支持多个测试指令。Among them, the test picture at the beginning of 01 needs to click (click) the control first, judge the feature item (key), and then perform the operation of pressing the Enter key (Enter); the test picture at the beginning of 02 only needs to judge whether the corresponding picture content exists; 03 The test picture at the beginning needs to input (type) the value (value) of the corresponding test data in the control. That is, one test picture supports multiple test instructions.

可以看出,文件名中有多个测试信息,以“_”即下划线分隔开来。当然在其他实施例中可以采用其他标识符号来标识各测试信息。It can be seen that there are multiple test information in the file name, separated by "_" or underscore. Of course, in other embodiments, other identification symbols may be used to identify each test information.

同样地,可以看出测试可能包括多个步骤,这也存在着先后顺序。在本发明的一个实施例中,上述方法中,根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令包括:将测试图片的文件名读取为字符串,依序遍历字符串,获得各标识及与各标识对应的测试信息;根据测试信息中的伪指令查找测试指令映射表,查找出相应的测试指令。Similarly, it can be seen that the test may include multiple steps, which also have a sequence. In one embodiment of the present invention, in the above method, according to the file name of each test picture in the test case, generating the test instruction corresponding to each test picture includes: reading the file name of the test picture as a character string, traversing in order character strings to obtain each identifier and the test information corresponding to each identifier; search the test instruction mapping table according to the pseudo-instruction in the test information, and find out the corresponding test instruction.

显然,click是一个可以被测试人员理解的伪指令,而不是一个实际的测试指令。在本实施例中可以预置一个测试指令映射表,设置伪指令和测试指令的映射关系,这样就需要测试图片在命名时也依赖该测试指令映射表进行设置。Obviously, click is a pseudo command that can be understood by testers, not an actual test command. In this embodiment, a test command mapping table can be preset to set the mapping relationship between pseudo-commands and test commands. In this way, the naming of test pictures also depends on the test command mapping table for setting.

具体来说,在本发明的一个实施例中,上述方法中,测试指令包括如下的一种或多种:触发用户事件的指令,判断指令,跳转指令,测试时间设置指令。Specifically, in an embodiment of the present invention, in the above method, the test instruction includes one or more of the following: an instruction to trigger a user event, a judgment instruction, a jump instruction, and a test time setting instruction.

例如,click对应于点击屏幕的操作,Enter对应于按回车键的操作,这些都是触发相应的用户事件,相应的测试指令属于判断指令;而exist属于判断图片是否存在,相应的测试指令属于判断指令;在测试图片不存在时,不按原顺序而是跳转测试其他的测试图片,相应的测试指令属于跳转指令,实际上容易想到对应于代码中if else语句的逻辑;在UI界面中查找图片可能因为各种原因,响应时间不同,因此还可以设置测试时间,以满足部分因测试环境等原因请求响应较慢的等待,相应的测试指令为测试时间设置指令。For example, click corresponds to the operation of clicking the screen, and Enter corresponds to the operation of pressing the Enter key. These all trigger the corresponding user event, and the corresponding test instruction belongs to the judgment instruction; while exist belongs to the judgment of whether the picture exists, and the corresponding test instruction belongs to the Judgment command; when the test picture does not exist, it will not follow the original order but jump to test other test pictures. The corresponding test command belongs to the jump command. In fact, it is easy to think of the logic corresponding to the if else statement in the code; in the UI interface The response time of searching for pictures may be different due to various reasons, so the test time can also be set to meet the slow response of some requests due to the test environment and other reasons. The corresponding test command is the test time setting command.

在本发明的一个实施例中,上述方法中,根据测试指令和相应的测试图片完成UI自动化测试包括:对应用的UI进行截图,在截图中进行测试图片的识别;根据图像识别结果和测试指令完成UI自动化测试。In an embodiment of the present invention, in the above method, completing the UI automation test according to the test instruction and the corresponding test picture includes: taking a screenshot of the UI of the application, and identifying the test picture in the screenshot; according to the image recognition result and the test instruction Complete UI automation testing.

在本实施例中基于图像识别技术,对UI的截图进行识别,判断截图中是否包含了测试图片的图片内容,后续的测试可以参照前述实施例中给出的几种测试逻辑的示例,例如点击控件或是输入测试数据等等。In this embodiment, based on the image recognition technology, the screenshots of the UI are identified, and it is judged whether the screenshots contain the picture content of the test picture. The subsequent tests can refer to the examples of several test logics given in the previous embodiments, such as clicking Controls or input test data, etc.

其中,基于一个测试图片,有可能从截图中识别出多个相同的部分,例如UI界面中有两个“确认”对应的图片,完全一致。在本发明的实施例中可以支持对这类相同的图片全部进行识别和进行相应的操作,例如点击,而在测试用例中仅需要放置一幅图片,仅修改文件名中相应的测试信息即可,例如标注出可能识别出两幅相同的图片,对这两个图片均进行点击操作。Among them, based on a test picture, it is possible to identify multiple identical parts from the screenshot. For example, there are two pictures corresponding to "confirmation" in the UI interface, which are completely consistent. In the embodiment of the present invention, it is possible to support the identification and corresponding operations on all the same pictures of this type, such as clicking. In the test case, only one picture needs to be placed, and only the corresponding test information in the file name needs to be modified. , for example, to mark that two identical pictures may be identified, and to perform a click operation on both pictures.

在本发明的一个实施例中,上述方法还包括:将UI自动化测试的测试结果和对应的测试用例保存至同一目录下。In an embodiment of the present invention, the above method further includes: saving the test results of the UI automation test and the corresponding test cases in the same directory.

这样就实现了测试结果的快速排查,能够看到测试结果,就马上可以找到测试用例,找到相应的测试图片,极大地方便了测试人员的排查,提升了测试效率。In this way, the quick inspection of the test results is realized, and the test cases and corresponding test pictures can be found immediately after seeing the test results, which greatly facilitates the inspection of the test personnel and improves the test efficiency.

图2示出了根据本发明一个实施例的一种用户界面UI自动化测试的装置的结构示意图。如图2所示,用户界面UI自动化测试的装置200包括:Fig. 2 shows a schematic structural diagram of an apparatus for UI automation testing according to an embodiment of the present invention. As shown in FIG. 2 , the device 200 for UI automation testing includes:

测试用例读取单元210,适于从测试用例的存储路径下读取测试用例。The test case reading unit 210 is adapted to read the test case from the storage path of the test case.

测试用例的含义通常要结合使用场景来分析,在本发明的实施例中,自动化测试代码是与测试用例分离的,但测试用例中也包含了测试逻辑。也就是说,测试用例包含有测试所使用的数据,以及测试逻辑的描述信息,但是不包含具体的执行指令。The meaning of the test case is usually analyzed in conjunction with the usage scenario. In the embodiment of the present invention, the automated test code is separated from the test case, but the test case also includes the test logic. That is to say, the test case contains the data used in the test and the description information of the test logic, but does not contain specific execution instructions.

测试指令生成单元220,适于根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令。The test instruction generating unit 220 is adapted to generate test instructions corresponding to each test picture according to the file name of each test picture in the test case.

可以看出,文件名中包含有测试逻辑的描述信息,例如一个测试图片的图片内容描述了应用中的一个控件,文件名中描述了要对这个控件进行点击操作,那么测试指令就是根据这些来生成的。It can be seen that the file name contains the description information of the test logic. For example, the picture content of a test picture describes a control in the application, and the file name describes the click operation on this control, so the test instruction is based on these Generated.

测试单元230,适于根据测试指令和相应的测试图片完成UI自动化测试。The testing unit 230 is adapted to complete UI automation testing according to testing instructions and corresponding testing pictures.

可见,图2所示的装置,通过各单元的相互配合,从测试用例的存储路径下读取测试用例,根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令,根据测试指令和相应的测试图片完成UI自动化测试。该技术方案基于对测试图片文件名的修改,实现了测试用例与测试图片的紧耦合,便于管理和测试结果排查,同时自动化测试的代码也可以按规律自动生成,方便使用。It can be seen that the device shown in Figure 2 reads the test case from the storage path of the test case through the mutual cooperation of each unit, and generates the test instruction corresponding to each test picture according to the file name of each test picture in the test case, according to Test instructions and corresponding test pictures complete UI automation testing. Based on the modification of the file name of the test picture, the technical solution realizes the tight coupling between the test case and the test picture, which is convenient for management and test result checking. At the same time, the code of the automated test can also be automatically generated according to the rules, which is convenient for use.

在本发明的一个实施例中,上述装置中,测试用例为包含若干个测试图片的文件夹。In an embodiment of the present invention, in the above device, the test case is a folder containing several test pictures.

可见,一个包含了若干个测试图片的文件夹就是一个测试用例。现有技术中一些UI自动化测试的实现如下:将测试图片集中保存,在另外一个文件(例如Excel文档)中写入测试图片及相应的测试逻辑。这种情况下,一般将文件称之为测试用例,而测试图片仅作为测试中使用的测试数据,这样就形成了松耦合。但是在测试结果查看以及测试用例、测试数据的管理上就十分不便,例如,发现某个控件的测试没有成功,还需要打开文件,确定相应的测试图片,再打开测试图片,步骤十分繁琐。而在本实施例中,则是直接将包含测试图片的文件夹作为测试用例,在测试结果反查时,可以直接定位到相应的测试图片,并通过测试图片文件名快速了解测试的基本逻辑,直观简单。It can be seen that a folder containing several test pictures is a test case. The implementation of some UI automation tests in the prior art is as follows: centrally save the test pictures, and write the test pictures and the corresponding test logic in another file (such as an Excel document). In this case, the file is generally called a test case, and the test picture is only used as the test data used in the test, thus forming a loose coupling. However, it is very inconvenient to view test results and manage test cases and test data. For example, if you find that the test of a certain control is not successful, you need to open the file, determine the corresponding test picture, and then open the test picture. The steps are very cumbersome. However, in this embodiment, the folder containing the test picture is directly used as the test case. When the test result is checked back, the corresponding test picture can be directly located, and the basic logic of the test can be quickly understood through the test picture file name. Intuitive and simple.

在本发明的一个实施例中,上述装置中,测试图片的文件名中包括测试顺序的序列标识;测试用例读取单元210,适于按照序列标识从所述文件夹中读取测试图片,其中,每次读取一个测试图片,并在根据该测试图片完成相应的测试后,读取与测试顺序中下一个序列标识对应的测试图片,或者,根据测试结果确定新的序列标识,读取与新的序列标识对应的测试图片;当文件夹中的与测试顺序中最后一个序列标识对应的测试图片被读取完时结束UI自动化测试,或者,当根据一个测试图片的测试结果确定满足测试结束条件时,结束UI自动化测试。In one embodiment of the present invention, in the above-mentioned device, the file name of the test picture includes the sequence identification of the test sequence; the test case reading unit 210 is adapted to read the test picture from the folder according to the sequence identification, wherein , read a test picture each time, and after completing the corresponding test according to the test picture, read the test picture corresponding to the next sequence identifier in the test sequence, or determine a new sequence identifier according to the test result, and read the corresponding test picture corresponding to the next sequence identifier in the test sequence. The test picture corresponding to the new sequence ID; when the test picture corresponding to the last sequence ID in the test sequence in the folder is read, the UI automation test ends, or when the test result of a test picture determines that the test ends When the condition is met, the UI automation test ends.

例如,文件夹下有01、02……10开头的十个测试图片,作为测试顺序的序列标识。则在测试时,先读取01开头的图片,根据其文件名的剩余部分获知测试逻辑,生成相应的测试指令,根据该图片完成测试,然后再读取02开头的图片……直至对10开头的图片测试完毕。这样就完成了针对一个测试用例的测试。For example, there are ten test pictures beginning with 01, 02...10 under the folder, which are used as the sequence identification of the test order. When testing, first read the picture starting with 01, get the test logic according to the remaining part of its file name, generate the corresponding test instruction, complete the test according to the picture, and then read the picture starting with 02... until the picture starting with 10 The picture test is complete. This completes the test for a test case.

而在一些情况下,有可能根据某些测试图片的不同测试结果执行不同的测试逻辑。例如点击一个控件才能进行跳转,那么当该控件不存在时也需要进行别的测试。则可以在测试图片03失败时,跳转至测试图片08的测试,而不是继续测试图片04的测试。In some cases, it is possible to execute different test logics according to different test results of certain test pictures. For example, click a control to jump, then other tests need to be performed when the control does not exist. Then, when the test picture 03 fails, jump to the test of the test picture 08 instead of continuing the test of the test picture 04.

根据测试图片文件名生成的测试指令中还可以包括根据测试结果直接判断为结束测试的指令,例如某个图片没有识别到,则直接结束测试。而上述测试过程同样支持在UI自动化测试过程中出现的干扰场景图片,例如测试图片08可能会被一个悬浮窗(例如系统悬浮窗,而非待测试应用的悬浮窗)遮挡,那么可以在测试图片08之前添加悬浮窗对应的测试图片07,这样虽然实际不需要测试悬浮窗08,但是由于其是一个干扰,也可以对其进行操作,例如点击悬浮窗,其消失后露出与测试图片08对应的控件,这样就可以继续UI自动化测试。这样对测试图片07的执行逻辑就变成点击一下即可,成功点击与否并不影响测试结果的呈现,因为这本来就不是测试目的。The test instruction generated according to the file name of the test picture may also include an instruction to directly judge the end of the test according to the test result, for example, if a certain picture is not recognized, the test is directly ended. The above test process also supports the interference scene pictures that appear in the UI automation test process. For example, the test picture 08 may be blocked by a floating window (such as the system floating window, not the floating window of the application to be tested), so you can use the test picture Add the test picture 07 corresponding to the floating window before 08, so that although it is not actually necessary to test the floating window 08, because it is an interference, you can also operate it, for example, click on the floating window, and after it disappears, it will reveal the corresponding test picture 08. controls so that UI automation testing can continue. In this way, the execution logic of the test picture 07 becomes just one click, and whether the click is successful or not does not affect the presentation of the test results, because this is not the purpose of the test.

在本发明的一个实施例中,上述装置中,测试图片的文件名中包括若干条测试信息,以及与各测试信息对应的标识;测试信息包括测试指令的伪指令和/或测试用数据。In an embodiment of the present invention, in the above-mentioned device, the file name of the test picture includes several pieces of test information and the identification corresponding to each test information; the test information includes pseudo-instructions of test instructions and/or test data.

基于一个测试图片可能存在多个操作,也可能只有一个操作;操作本身可能仅仅是判断某个测试图片对应的控件是否存在,也可能需要对控件进行点击,也有可能控件是一个输入框,需要输入一些测试数据。下面给出了三个文件名的示例:There may be multiple operations based on a test image, or there may be only one operation; the operation itself may only determine whether a control corresponding to a test image exists, or it may be necessary to click on the control, or the control may be an input box that needs to be entered some test data. Examples of three file names are given below:

01_click_key_Enter.png;02_exist.png;03_type_value.png。01_click_key_Enter.png; 02_exist.png; 03_type_value.png.

其中,01开头的测试图片需要先点击(click)控件,判断特征项(key),再执行按回车键的操作(Enter);02开头的测试图片仅需要判断相应的图片内容是否存在;03开头的测试图片需要在控件中输入(type)相应的测试数据的值(value)。也就是一个测试图片支持多个测试指令。Among them, the test picture at the beginning of 01 needs to click (click) the control first, judge the feature item (key), and then perform the operation of pressing the Enter key (Enter); the test picture at the beginning of 02 only needs to judge whether the corresponding picture content exists; 03 The test picture at the beginning needs to input (type) the value (value) of the corresponding test data in the control. That is, one test picture supports multiple test instructions.

可以看出,文件名中有多个测试信息,以“_”即下划线分隔开来。当然在其他实施例中可以采用其他标识符号来标识各测试信息。It can be seen that there are multiple test information in the file name, separated by "_" or underscore. Of course, in other embodiments, other identification symbols may be used to identify each test information.

同样地,可以看出测试可能包括多个步骤,这也存在着先后顺序。在本发明的一个实施例中,上述装置中,测试指令生成单元220,适于将测试图片的文件名读取为字符串,依序遍历字符串,获得各标识及与各标识对应的测试信息;根据测试信息中的伪指令查找测试指令映射表,查找出相应的测试指令。Similarly, it can be seen that the test may include multiple steps, which also have a sequence. In one embodiment of the present invention, in the above device, the test instruction generation unit 220 is adapted to read the file name of the test picture as a character string, traverse the character string in order, and obtain each identification and the test information corresponding to each identification ; Look up the test instruction mapping table according to the pseudo-instruction in the test information, and find out the corresponding test instruction.

显然,click是一个可以被测试人员理解的伪指令,而不是一个实际的测试指令。在本实施例中可以预置一个测试指令映射表,设置伪指令和测试指令的映射关系,这样就需要测试图片在命名时也依赖该测试指令映射表进行设置。Obviously, click is a pseudo command that can be understood by testers, not an actual test command. In this embodiment, a test command mapping table can be preset to set the mapping relationship between pseudo-commands and test commands. In this way, the naming of test pictures also depends on the test command mapping table for setting.

具体来说,在本发明的一个实施例中,上述装置中,测试指令包括如下的一种或多种:触发用户事件的指令,判断指令,跳转指令,测试时间设置指令。Specifically, in an embodiment of the present invention, in the above device, the test instruction includes one or more of the following: an instruction to trigger a user event, a judgment instruction, a jump instruction, and a test time setting instruction.

例如,click对应于点击屏幕的操作,Enter对应于按回车键的操作,这些都是触发相应的用户事件,相应的测试指令属于判断指令;而exist属于判断图片是否存在,相应的测试指令属于判断指令;在测试图片不存在时,不按原顺序而是跳转测试其他的测试图片,相应的测试指令属于跳转指令,实际上容易想到对应于代码中if else语句的逻辑;在UI界面中查找图片可能因为各种原因,响应时间不同,因此还可以设置测试时间,以满足部分因测试环境等原因请求响应较慢的等待,相应的测试指令为测试时间设置指令。For example, click corresponds to the operation of clicking the screen, and Enter corresponds to the operation of pressing the Enter key. These all trigger the corresponding user event, and the corresponding test instruction belongs to the judgment instruction; while exist belongs to the judgment of whether the picture exists, and the corresponding test instruction belongs to the Judgment command; when the test picture does not exist, it will not follow the original order but jump to test other test pictures. The corresponding test command belongs to the jump command. In fact, it is easy to think of the logic corresponding to the if else statement in the code; in the UI interface The response time of searching for pictures may be different due to various reasons, so the test time can also be set to meet the slow response of some requests due to the test environment and other reasons. The corresponding test command is the test time setting command.

在本发明的一个实施例中,上述装置中,测试单元230,适于对应用的UI进行截图,在截图中进行测试图片的识别;根据图像识别结果和测试指令完成UI自动化测试。In an embodiment of the present invention, in the above device, the testing unit 230 is adapted to take a screenshot of the UI of the application, identify the test picture in the screenshot, and complete the UI automation test according to the image recognition result and the test instruction.

在本实施例中基于图像识别技术,对UI的截图进行识别,判断截图中是否包含了测试图片的图片内容,后续的测试可以参照前述实施例中给出的几种测试逻辑的示例,例如点击控件或是输入测试数据等等。In this embodiment, based on the image recognition technology, the screenshots of the UI are identified, and it is judged whether the screenshots contain the picture content of the test picture. The subsequent tests can refer to the examples of several test logics given in the previous embodiments, such as clicking Controls or input test data, etc.

其中,基于一个测试图片,有可能从截图中识别出多个相同的部分,例如UI界面中有两个“确认”对应的图片,完全一致。在本发明的实施例中可以支持对这类相同的图片全部进行识别和进行相应的操作,例如点击,而在测试用例中仅需要放置一幅图片,仅修改文件名中相应的测试信息即可,例如标注出可能识别出两幅相同的图片,对这两个图片均进行点击操作。Among them, based on a test picture, it is possible to identify multiple identical parts from the screenshot. For example, there are two pictures corresponding to "confirmation" in the UI interface, which are completely consistent. In the embodiment of the present invention, it is possible to support the identification and corresponding operations on all the same pictures of this type, such as clicking. In the test case, only one picture needs to be placed, and only the corresponding test information in the file name needs to be modified. , for example, to mark that two identical pictures may be identified, and to perform a click operation on both pictures.

在本发明的一个实施例中,上述装置中,测试单元230,还适于将UI自动化测试的测试结果和对应的测试用例保存至同一目录下。In an embodiment of the present invention, in the above device, the testing unit 230 is further adapted to save the test results of the UI automation test and the corresponding test cases in the same directory.

这样就实现了测试结果的快速排查,能够看到测试结果,就马上可以找到测试用例,找到相应的测试图片,极大地方便了测试人员的排查,提升了测试效率。In this way, the quick inspection of the test results is realized, and the test cases and corresponding test pictures can be found immediately after seeing the test results, which greatly facilitates the inspection of the test personnel and improves the test efficiency.

综上所述,本发明的技术方案,从测试用例的存储路径下读取测试用例,根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令,根据测试指令和相应的测试图片完成UI自动化测试。该技术方案基于对测试图片文件名的修改,实现了测试用例与测试图片的紧耦合,便于管理和测试结果排查,同时自动化测试的代码也可以按规律自动生成,方便使用。In summary, the technical solution of the present invention reads the test case from the storage path of the test case, generates test instructions corresponding to each test picture according to the file name of each test picture in the test case, and generates test instructions corresponding to each test picture according to the test command and corresponding Test pictures to complete UI automation testing. Based on the modification of the file name of the test picture, the technical solution realizes the tight coupling between the test case and the test picture, which is convenient for management and test result checking. At the same time, the code of the automated test can also be automatically generated according to the rules, which is convenient for use.

需要说明的是:It should be noted:

在此提供的算法和显示不与任何特定计算机、虚拟装置或者其它设备固有相关。各种通用装置也可以与基于在此的示教一起使用。根据上面的描述,构造这类装置所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual appliance, or other device. Various general purpose devices can also be used with the teachings based on this. The structure required to construct such an apparatus will be apparent from the foregoing description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.

类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的用户界面UI自动化测试的装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) can be used in practice to realize some or all functions of some or all parts in the device for automated testing of the user interface UI according to the embodiment of the present invention . The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

例如,图3示出了根据本发明一个实施例的电子设备的结构示意图。该电子设备包括处理器310和被安排成存储计算机可执行指令(计算机可读程序代码)的存储器320。存储器320可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器320具有存储用于执行上述方法中的任何方法步骤的计算机可读程序代码331的存储空间330。例如,用于存储计算机可读程序代码的存储空间330可以包括分别用于实现上面的方法中的各种步骤的各个计算机可读程序代码331。计算机可读程序代码331可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为例如图4所述的计算机可读存储介质。图4示出了根据本发明一个实施例的一种计算机可读存储介质的结构示意图。该计算机可读存储介质400存储有用于执行根据本发明的方法步骤的计算机可读程序代码331,可以被电子设备300的处理器310读取,当计算机可读程序代码331由电子设备300运行时,导致该电子设备300执行上面所描述的方法中的各个步骤,具体来说,该计算机可读存储介质存储的计算机可读程序代码331可以执行上述任一实施例中示出的方法。计算机可读程序代码331可以以适当形式进行压缩。For example, FIG. 3 shows a schematic structural diagram of an electronic device according to an embodiment of the present invention. The electronic device comprises a processor 310 and a memory 320 arranged to store computer executable instructions (computer readable program code). Memory 320 may be electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. The memory 320 has a storage space 330 storing computer readable program code 331 for performing any method step in the method described above. For example, the storage space 330 for storing computer-readable program codes may include respective computer-readable program codes 331 for respectively implementing various steps in the above methods. The computer readable program code 331 can be read from or written into one or more computer program products. These computer program products comprise program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such a computer program product is typically, for example, a computer-readable storage medium as described in FIG. 4 . Fig. 4 shows a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention. The computer-readable storage medium 400 stores computer-readable program code 331 for executing the method steps according to the present invention, which can be read by the processor 310 of the electronic device 300, when the computer-readable program code 331 is run by the electronic device 300 , causing the electronic device 300 to execute each step in the method described above, specifically, the computer-readable program code 331 stored in the computer-readable storage medium may execute the method shown in any of the foregoing embodiments. The computer readable program code 331 can be compressed in a suitable form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

本发明提供了A1、一种用户界面UI自动化测试的方法,包括:The invention provides A1, a method for automated testing of user interface UI, comprising:

从测试用例的存储路径下读取测试用例;Read the test case from the storage path of the test case;

根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令;Generate test instructions corresponding to each test picture according to the file name of each test picture in the test case;

根据所述测试指令和相应的测试图片完成UI自动化测试。Complete the UI automation test according to the test instruction and the corresponding test picture.

A2、如A1所述的方法,其中,所述测试用例为包含若干个测试图片的文件夹。A2. The method as described in A1, wherein the test case is a folder containing several test pictures.

A3、如A2所述的方法,其中,所述测试图片的文件名中包括测试顺序的序列标识;A3, the method as described in A2, wherein, comprise the serial identification of test order in the file name of described test picture;

所述从测试用例的存储路径下读取测试用例包括:The reading of the test case from the storage path of the test case includes:

按照序列标识从所述文件夹中读取测试图片,其中,每次读取一个测试图片,并在根据该测试图片完成相应的测试后,读取与测试顺序中下一个序列标识对应的测试图片,或者,根据测试结果确定新的序列标识,读取与新的序列标识对应的测试图片;Read the test picture from the folder according to the sequence identification, wherein, read a test picture at a time, and after completing the corresponding test according to the test picture, read the test picture corresponding to the next sequence identification in the test sequence , or, determine a new sequence identifier according to the test result, and read a test picture corresponding to the new sequence identifier;

当所述文件夹中的与测试顺序中最后一个序列标识对应的测试图片被读取完时结束UI自动化测试,或者,当根据一个测试图片的测试结果确定满足测试结束条件时,结束UI自动化测试。End the UI automation test when the test picture corresponding to the last sequence identifier in the test sequence in the folder is read, or, when it is determined that the test end condition is met according to the test result of a test picture, end the UI automation test .

A4、如A1所述的方法,其中,测试图片的文件名中包括若干条测试信息,以及与各测试信息对应的标识;A4. The method as described in A1, wherein the file name of the test picture includes several pieces of test information, and an identification corresponding to each test information;

所述测试信息包括测试指令的伪指令和/或测试用数据。The test information includes pseudo-instructions of test instructions and/or test data.

A5、如A4所述的方法,其中,所述根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令包括:A5, the method as described in A4, wherein, according to the file name of each test picture in the test case, generating the test instruction corresponding to each test picture includes:

将测试图片的文件名读取为字符串,依序遍历字符串,获得各标识及与各标识对应的测试信息;Read the file name of the test picture as a string, traverse the string in order, and obtain each logo and the test information corresponding to each logo;

根据所述测试信息中的伪指令查找测试指令映射表,查找出相应的测试指令。The test instruction mapping table is searched according to the pseudo-instruction in the test information, and the corresponding test instruction is found.

A6、如A1所述的方法,其中,所述测试指令包括如下的一种或多种:A6. The method as described in A1, wherein the test instruction includes one or more of the following:

触发用户事件的指令,判断指令,跳转指令,测试时间设置指令。Instructions that trigger user events, judgment instructions, jump instructions, and test time setting instructions.

A7、如A1所述的方法,其中,所述根据所述测试指令和相应的测试图片完成UI自动化测试包括:A7. The method as described in A1, wherein said completing the UI automation test according to the test instructions and corresponding test pictures includes:

对应用的UI进行截图,在截图中进行测试图片的识别;Take a screenshot of the UI of the application, and identify the test picture in the screenshot;

根据图像识别结果和所述测试指令完成UI自动化测试。Complete the UI automation test according to the image recognition result and the test instruction.

A8、如A1所述的方法,其中,该方法还包括:A8. The method as described in A1, wherein the method also includes:

将UI自动化测试的测试结果和对应的测试用例保存至同一目录下。Save the test results of the UI automation test and the corresponding test cases in the same directory.

本发明还提供了B9、一种用户界面UI自动化测试的装置,包括:The present invention also provides B9, a device for automated testing of user interface UI, comprising:

测试用例读取单元,适于从测试用例的存储路径下读取测试用例;The test case reading unit is suitable for reading the test case from the storage path of the test case;

测试指令生成单元,适于根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令;A test command generation unit is adapted to generate test commands corresponding to each test picture according to the file name of each test picture in the test case;

测试单元,适于根据所述测试指令和相应的测试图片完成UI自动化测试。The test unit is adapted to complete the UI automation test according to the test instructions and corresponding test pictures.

B10、如B9所述的装置,其中,所述测试用例为包含若干个测试图片的文件夹。B10. The device according to B9, wherein the test case is a folder containing several test pictures.

B11、如B10所述的装置,其中,所述测试图片的文件名中包括测试顺序的序列标识;B11, the device as described in B10, wherein, comprise the serial identification of test sequence in the file name of described test picture;

所述测试用例读取单元,适于按照序列标识从所述文件夹中读取测试图片,其中,每次读取一个测试图片,并在根据该测试图片完成相应的测试后,读取与测试顺序中下一个序列标识对应的测试图片,或者,根据测试结果确定新的序列标识,读取与新的序列标识对应的测试图片;当所述文件夹中的与测试顺序中最后一个序列标识对应的测试图片被读取完时结束UI自动化测试,或者,当根据一个测试图片的测试结果确定满足测试结束条件时,结束UI自动化测试。The test case reading unit is adapted to read the test picture from the folder according to the sequence identification, wherein each time a test picture is read, and after completing the corresponding test according to the test picture, read and test The test picture corresponding to the next sequence ID in the sequence, or, determine the new sequence ID according to the test results, and read the test picture corresponding to the new sequence ID; when the test picture corresponding to the last sequence ID in the test sequence End the UI automation test when the test picture is read, or end the UI automation test when it is determined that the test end condition is satisfied according to the test result of a test picture.

B12、如B9所述的装置,其中,测试图片的文件名中包括若干条测试信息,以及与各测试信息对应的标识;B12. The device as described in B9, wherein the file name of the test picture includes several pieces of test information, and an identification corresponding to each test information;

所述测试信息包括测试指令的伪指令和/或测试用数据。The test information includes pseudo-instructions of test instructions and/or test data.

B13、如B12所述的装置,其中,B13. The device of B12, wherein,

所述测试指令生成单元,适于将测试图片的文件名读取为字符串,依序遍历字符串,获得各标识及与各标识对应的测试信息;根据所述测试信息中的伪指令查找测试指令映射表,查找出相应的测试指令。The test instruction generation unit is adapted to read the file name of the test picture as a character string, traverse the character string in order, and obtain each identification and the test information corresponding to each identification; search for the test according to the pseudo-instruction in the test information Instruction mapping table to find out the corresponding test instruction.

B14、如B9所述的装置,其中,所述测试指令包括如下的一种或多种:B14. The device as described in B9, wherein the test instruction includes one or more of the following:

触发用户事件的指令,判断指令,跳转指令,测试时间设置指令。Instructions that trigger user events, judgment instructions, jump instructions, and test time setting instructions.

B15、如B9所述的装置,其中,B15. The device of B9, wherein,

所述测试单元,适于对应用的UI进行截图,在截图中进行测试图片的识别;根据图像识别结果和所述测试指令完成UI自动化测试。The test unit is adapted to take a screenshot of the UI of the application, identify the test picture in the screenshot, and complete the UI automation test according to the image recognition result and the test instruction.

B16、如B15所述的装置,其中,B16. The device of B15, wherein,

所述测试单元,还适于将UI自动化测试的测试结果和对应的测试用例保存至同一目录下。The test unit is further adapted to save the test results of the UI automation test and the corresponding test cases in the same directory.

本发明还提供了C17、一种电子设备,其中,该电子设备包括:处理器;以及被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器执行A1-A8中任一项所述的方法。The present invention also provides C17, an electronic device, wherein the electronic device comprises: a processor; and a memory arranged to store computer-executable instructions which, when executed, cause the processor to perform A1 - the method according to any one of A8.

本发明还提供了D18、一种计算机可读存储介质,其中,所述计算机可读存储介质存储一个或多个程序,所述一个或多个程序当被处理器执行时,实现如A1-A8中任一项所述的方法。The present invention also provides D18, a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by the processor, the implementation of A1-A8 any one of the methods described.

Claims (16)

1.一种用户界面UI自动化测试的方法,包括:1. A method for user interface UI automated testing, comprising: 从测试用例的存储路径下读取测试用例;所述测试用例为包含若干个测试图片的文件夹;Read the test case from the storage path of the test case; the test case is a folder containing several test pictures; 根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令;Generate test instructions corresponding to each test picture according to the file name of each test picture in the test case; 根据所述测试指令和相应的测试图片完成UI自动化测试;Complete the UI automation test according to the test instructions and corresponding test pictures; 所述测试图片的文件名中包括测试顺序的序列标识;The file name of the test picture includes the sequence identification of the test sequence; 所述从测试用例的存储路径下读取测试用例包括:The reading of the test case from the storage path of the test case includes: 按照序列标识从所述文件夹中读取测试图片。Read the test picture from the folder according to the sequence identification. 2.如权利要求1所述的方法,其中,所述按照序列标识从所述文件夹中读取测试图片,包括:每次读取一个测试图片,并在根据该测试图片完成相应的测试后,读取与测试顺序中下一个序列标识对应的测试图片,或者,根据测试结果确定新的序列标识,读取与新的序列标识对应的测试图片;2. The method according to claim 1, wherein said reading the test picture from the folder according to the sequence identification comprises: reading a test picture at a time, and after completing the corresponding test according to the test picture , reading the test picture corresponding to the next sequence identifier in the test sequence, or determining a new sequence identifier according to the test result, and reading the test picture corresponding to the new sequence identifier; 当所述文件夹中的与测试顺序中最后一个序列标识对应的测试图片被读取完时结束UI自动化测试,或者,当根据一个测试图片的测试结果确定满足测试结束条件时,结束UI自动化测试。End the UI automation test when the test picture corresponding to the last sequence identifier in the test sequence in the folder is read, or, when it is determined that the test end condition is met according to the test result of a test picture, end the UI automation test . 3.如权利要求1所述的方法,其中,测试图片的文件名中包括若干条测试信息,以及与各测试信息对应的标识;3. The method according to claim 1, wherein the file name of the test picture includes several pieces of test information, and an identification corresponding to each test information; 所述测试信息包括测试指令的伪指令和/或测试用数据。The test information includes pseudo-instructions of test instructions and/or test data. 4.如权利要求3所述的方法,其中,所述根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令包括:4. The method according to claim 3, wherein, according to the file name of each test picture in the test case, generating a test instruction corresponding to each test picture comprises: 将测试图片的文件名读取为字符串,依序遍历字符串,获得各标识及与各标识对应的测试信息;Read the file name of the test picture as a string, traverse the string in order, and obtain each logo and the test information corresponding to each logo; 根据所述测试信息中的伪指令查找测试指令映射表,查找出相应的测试指令。The test instruction mapping table is searched according to the pseudo-instruction in the test information, and the corresponding test instruction is found. 5.如权利要求1所述的方法,其中,所述测试指令包括如下的一种或多种:5. The method of claim 1, wherein the test instructions include one or more of the following: 触发用户事件的指令,判断指令,跳转指令,测试时间设置指令。Instructions that trigger user events, judgment instructions, jump instructions, and test time setting instructions. 6.如权利要求1所述的方法,其中,所述根据所述测试指令和相应的测试图片完成UI自动化测试包括:6. The method according to claim 1, wherein said completing UI automated testing according to said test instructions and corresponding test pictures comprises: 对应用的UI进行截图,在截图中进行测试图片的识别;Take a screenshot of the UI of the application, and identify the test picture in the screenshot; 根据图像识别结果和所述测试指令完成UI自动化测试。Complete the UI automation test according to the image recognition result and the test instruction. 7.如权利要求1所述的方法,其中,该方法还包括:7. The method of claim 1, wherein the method further comprises: 将UI自动化测试的测试结果和对应的测试用例保存至同一目录下。Save the test results of the UI automation test and the corresponding test cases in the same directory. 8.一种用户界面UI自动化测试的装置,包括:8. A device for UI automation testing, comprising: 测试用例读取单元,适于从测试用例的存储路径下读取测试用例;所述测试用例为包含若干个测试图片的文件夹;The test case reading unit is adapted to read the test case from the storage path of the test case; the test case is a folder containing several test pictures; 测试指令生成单元,适于根据测试用例中各测试图片的文件名,生成与各测试图片对应的测试指令;A test command generation unit is adapted to generate test commands corresponding to each test picture according to the file name of each test picture in the test case; 测试单元,适于根据所述测试指令和相应的测试图片完成UI自动化测试;A test unit, adapted to complete UI automation testing according to the test instructions and corresponding test pictures; 所述测试图片的文件名中包括测试顺序的序列标识;The file name of the test picture includes the sequence identification of the test sequence; 所述测试用例读取单元,适于按照序列标识从所述文件夹中读取测试图片。The test case reading unit is adapted to read test pictures from the folder according to the sequence identification. 9.如权利要求8所述的装置,其中,所述测试用例读取单元适于:每次读取一个测试图片,并在根据该测试图片完成相应的测试后,读取与测试顺序中下一个序列标识对应的测试图片,或者,根据测试结果确定新的序列标识,读取与新的序列标识对应的测试图片;当所述文件夹中的与测试顺序中最后一个序列标识对应的测试图片被读取完时结束UI自动化测试,或者,当根据一个测试图片的测试结果确定满足测试结束条件时,结束UI自动化测试。9. The device according to claim 8, wherein the test case reading unit is adapted to: read a test picture at a time, and after completing the corresponding test according to the test picture, read and test the next A test picture corresponding to a sequence identifier, or, determine a new sequence identifier according to the test result, and read a test picture corresponding to the new sequence identifier; when the test picture corresponding to the last sequence identifier in the test sequence in the folder End the UI automation test when it is read, or end the UI automation test when it is determined that the test end condition is met according to the test result of a test picture. 10.如权利要求8所述的装置,其中,测试图片的文件名中包括若干条测试信息,以及与各测试信息对应的标识;10. The device according to claim 8, wherein the file name of the test picture includes several pieces of test information, and an identification corresponding to each test information; 所述测试信息包括测试指令的伪指令和/或测试用数据。The test information includes pseudo-instructions of test instructions and/or test data. 11.如权利要求9所述的装置,其中,11. The apparatus of claim 9, wherein, 所述测试指令生成单元,适于将测试图片的文件名读取为字符串,依序遍历字符串,获得各标识及与各标识对应的测试信息;根据所述测试信息中的伪指令查找测试指令映射表,查找出相应的测试指令。The test instruction generation unit is adapted to read the file name of the test picture as a character string, traverse the character string in order, and obtain each identification and the test information corresponding to each identification; search for the test according to the pseudo-instruction in the test information Instruction mapping table to find out the corresponding test instruction. 12.如权利要求8所述的装置,其中,所述测试指令包括如下的一种或多种:12. The device according to claim 8, wherein the test instructions include one or more of the following: 触发用户事件的指令,判断指令,跳转指令,测试时间设置指令。Instructions that trigger user events, judgment instructions, jump instructions, and test time setting instructions. 13.如权利要求8所述的装置,其中,13. The apparatus of claim 8, wherein, 所述测试单元,适于对应用的UI进行截图,在截图中进行测试图片的识别;根据图像识别结果和所述测试指令完成UI自动化测试。The test unit is adapted to take a screenshot of the UI of the application, identify the test picture in the screenshot, and complete the UI automation test according to the image recognition result and the test instruction. 14.如权利要求13所述的装置,其中,14. The apparatus of claim 13, wherein, 所述测试单元,还适于将UI自动化测试的测试结果和对应的测试用例保存至同一目录下。The test unit is further adapted to save the test results of the UI automation test and the corresponding test cases in the same directory. 15.一种电子设备,其中,该电子设备包括:处理器;以及被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器执行如权利要求1-7中任一项所述的方法。15. An electronic device, wherein the electronic device comprises: a processor; and a memory arranged to store computer-executable instructions which, when executed, cause the processor to perform the any one of the methods described. 16.一种计算机可读存储介质,其中,所述计算机可读存储介质存储一个或多个程序,所述一个或多个程序当被处理器执行时,实现如权利要求1-7中任一项所述的方法。16. A computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, any one of claims 1-7 is implemented. method described in the item.
CN201810789737.4A 2018-07-18 2018-07-18 Method and device for automatically testing user interface UI Active CN110737573B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810789737.4A CN110737573B (en) 2018-07-18 2018-07-18 Method and device for automatically testing user interface UI

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810789737.4A CN110737573B (en) 2018-07-18 2018-07-18 Method and device for automatically testing user interface UI

Publications (2)

Publication Number Publication Date
CN110737573A CN110737573A (en) 2020-01-31
CN110737573B true CN110737573B (en) 2023-02-17

Family

ID=69235246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810789737.4A Active CN110737573B (en) 2018-07-18 2018-07-18 Method and device for automatically testing user interface UI

Country Status (1)

Country Link
CN (1) CN110737573B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112150431B (en) * 2020-09-21 2024-06-18 京东科技控股股份有限公司 UI vision walking method and device, storage medium and electronic device
CN112597045A (en) * 2020-12-29 2021-04-02 福州富昌维控电子科技有限公司 PLC instruction quality detection method and terminal based on ladder diagram
CN114323585B (en) * 2021-12-28 2024-04-12 梅卡曼德(北京)机器人科技有限公司 Method for batch calculation of modulation transfer function, electronic device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309797A (en) * 2012-03-09 2013-09-18 阿里巴巴集团控股有限公司 Automatic testing method and device of user interface
US9075918B1 (en) * 2014-02-25 2015-07-07 International Business Machines Corporation System and method for creating change-resilient scripts
CN107861862A (en) * 2017-06-27 2018-03-30 陆金所(上海)科技服务有限公司 UI automated testing methods, device and computer-readable recording medium
CN107885665A (en) * 2017-12-28 2018-04-06 努比亚技术有限公司 With case script method of testing, mobile terminal and computer-readable recording medium
CN107957948A (en) * 2017-12-07 2018-04-24 郑州云海信息技术有限公司 A kind of user interface automatic test device and method
CN108268373A (en) * 2017-09-21 2018-07-10 平安科技(深圳)有限公司 Automatic test cases management method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309797A (en) * 2012-03-09 2013-09-18 阿里巴巴集团控股有限公司 Automatic testing method and device of user interface
US9075918B1 (en) * 2014-02-25 2015-07-07 International Business Machines Corporation System and method for creating change-resilient scripts
CN107861862A (en) * 2017-06-27 2018-03-30 陆金所(上海)科技服务有限公司 UI automated testing methods, device and computer-readable recording medium
CN108268373A (en) * 2017-09-21 2018-07-10 平安科技(深圳)有限公司 Automatic test cases management method, device, equipment and storage medium
CN107957948A (en) * 2017-12-07 2018-04-24 郑州云海信息技术有限公司 A kind of user interface automatic test device and method
CN107885665A (en) * 2017-12-28 2018-04-06 努比亚技术有限公司 With case script method of testing, mobile terminal and computer-readable recording medium

Also Published As

Publication number Publication date
CN110737573A (en) 2020-01-31

Similar Documents

Publication Publication Date Title
US9672029B2 (en) Determining test case priorities based on tagged execution paths
US9619211B2 (en) Code suggestion in a software development tool
US9626164B1 (en) Test-driven development module for repository-based development
US9619373B2 (en) Method and apparatus to semantically connect independent build and test processes
US9389872B2 (en) Software wizard implementation framework
CN105446775B (en) The configuration metaplasia of game installation kit is at method and device
CN111831564A (en) A regression testing method, device and computing device
CN110737573B (en) Method and device for automatically testing user interface UI
CN105190548A (en) Automatic risk analysis of software
JP2008506183A (en) Import automatically generated content
CN105743736B (en) Automated testing method and system
CN105446725A (en) Method and system for model driven development
CN105389262A (en) Method and device for generating test suggestions in allusion to interface tests
US8959479B2 (en) Presenting a custom view in an integrated development environment based on a variable selection
US20090217259A1 (en) Building Operating System Images Based on Applications
EP2951680B1 (en) Acquiring identification of an application lifecycle management entity associated with similar code
CN105094941B (en) It is a kind of to realize multilingual method and device
CN110750434A (en) Interface testing method, apparatus, electronic device, and computer-readable storage medium
CN111460235A (en) Atlas data processing method, device, equipment and storage medium
CN110737577B (en) A method and device for storing test defect data
CN104376126B (en) The method and device of nuclear symbol in binding in Linux drives
US10042638B2 (en) Evaluating documentation coverage
JP2021015481A (en) Information processing program, information processing method, and information processing device
CN109976991A (en) A kind for the treatment of method and apparatus of program code
WO2012066635A1 (en) Test method, test device, and test execution program

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