[go: up one dir, main page]

CN105866574B - Automatic test auxiliary identification method and auxiliary identification system - Google Patents

Automatic test auxiliary identification method and auxiliary identification system Download PDF

Info

Publication number
CN105866574B
CN105866574B CN201610186289.XA CN201610186289A CN105866574B CN 105866574 B CN105866574 B CN 105866574B CN 201610186289 A CN201610186289 A CN 201610186289A CN 105866574 B CN105866574 B CN 105866574B
Authority
CN
China
Prior art keywords
test
module
database
judgment
resolution
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
CN201610186289.XA
Other languages
Chinese (zh)
Other versions
CN105866574A (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.)
Dongguan Huabei Electronic Technology Co Ltd
Original Assignee
Dongguan Huabei Electronic 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 Dongguan Huabei Electronic Technology Co Ltd filed Critical Dongguan Huabei Electronic Technology Co Ltd
Priority to CN201610186289.XA priority Critical patent/CN105866574B/en
Publication of CN105866574A publication Critical patent/CN105866574A/en
Application granted granted Critical
Publication of CN105866574B publication Critical patent/CN105866574B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Testing Or Calibration Of Command Recording Devices (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention belongs to the technical field of automatic testing, and particularly relates to an auxiliary identification method for automatic testing, which comprises the following steps: acquiring a process handle of a test program, connecting the process handle to the test program in a database in a serial port mode, identifying the current resolution of a computer, converting according to the standard resolution set in the database and the coordinate of a standard starting position to obtain the coordinate of the current starting position, clicking the coordinate, and starting the test operation of the test program; and the test program gives out the judgment of the qualified product and the unqualified product, intercepts the judgment interface, positions four corner positions of the intercepted interface to obtain the judgment of the background color of the interface, and then compares the judgment with the background colors of the qualified product and the unqualified product stored in the database to judge whether the test product is qualified. The invention can connect the lower computer and the upper computer, and automatically realize all actions which need to be manually realized at present, thereby realizing full automation of the test and greatly improving the test efficiency.

Description

自动化测试辅助识别方法和辅助识别系统Automated test auxiliary identification method and auxiliary identification system

技术领域technical field

本发明属于自动化测试技术领域,尤其涉及一种自动化测试辅助识别方法和辅助识别系统。The invention belongs to the technical field of automated testing, and in particular relates to an automated testing auxiliary identification method and an auxiliary identification system.

背景技术Background technique

目前,当用一些自动化测试软件对产品性能进行测试时,一般是将待测试产品放在测试夹具上,然后再手动点击测试软件的“开始”或“启动”按钮,待该测试软件对产品测试结果进行判定后,得出“合格”或“不合格”的结论,操作人员根据该结论将产品分别放入“合格品”箱或“不合格品”箱内。因此,这些测试软件并没有真正实现全自动化,还是需要人工点击和人眼判定。At present, when some automated testing software is used to test product performance, the product to be tested is generally placed on a test fixture, and then the "start" or "start" button of the testing software is manually clicked to wait for the testing software to test the product. After the results are judged, the conclusion of "qualified" or "unqualified" is drawn, and the operator puts the products into the "qualified product" box or the "unqualified product" box respectively according to the conclusion. Therefore, these test software are not truly fully automated, and still require manual clicking and human eye judgment.

为了实现测试的全自动化,一般会在测试软件中加入一些程序代码,但这无疑会增加程序成本,而且每个测试软件都需要进行加程序代码的操作,操作繁琐。In order to realize the full automation of the test, some program codes are generally added to the test software, but this will undoubtedly increase the cost of the program, and each test software needs to add program codes, which is cumbersome.

有鉴于此,确有必要提供一种自动化测试辅助识别方法和辅助识别系统,其能够主动识别相应的测试软件及其“开始”或“启动”按钮并进行点击,以开启测试,测试完成后,其又能够自动识别“合格品”或“不合格品”的判定结果,并将该结果传递给下一级的设备进行相应的操作。此外,该方法无需在测试程序上加程序代码,而且通用性强,可以用于多种测试软件中。In view of this, it is necessary to provide an automated test auxiliary identification method and auxiliary identification system, which can actively identify the corresponding test software and its "start" or "start" button and click to start the test. After the test is completed, It can also automatically identify the judgment result of "qualified product" or "unqualified product", and pass the result to the next-level equipment for corresponding operation. In addition, the method does not need to add program codes to the test program, and has strong versatility and can be used in various test software.

发明内容Contents of the invention

本发明的目的之一在于:针对现有技术的不足,而提供一种自动化测试辅助识别方法,其能够主动识别相应的测试软件及其“开始”或“启动”按钮并进行点击,以开启测试,测试完成后,其又能够自动识别“合格品”或“不合格品”的判定结果,并将该结果传递给下一级的设备进行相应的操作。此外,该方法无需在测试程序上加程序代码,而且通用性强,可以用于多种测试软件中。One of the objectives of the present invention is to provide an automated test aided identification method for the deficiencies of the prior art, which can actively identify the corresponding test software and its "Start" or "Start" button and click to start the test After the test is completed, it can automatically identify the judgment result of "qualified product" or "unqualified product", and pass the result to the next-level equipment for corresponding operation. In addition, the method does not need to add program codes to the test program, and has strong versatility and can be used in various test software.

为了达到上述目的,本发明采用如下技术方案:In order to achieve the above object, the present invention adopts following technical scheme:

自动化测试辅助识别方法,包括如下步骤:The automated test assisted identification method includes the following steps:

第一步,获取测试程序的进程句柄,以串口模式连接到数据库中的测试程序,识别电脑当前的分辨率,根据数据库中设定的标准分辨率和标准启动位置所在的坐标进行换算,得到当前启动位置所在的坐标,然后点击该坐标,测试程序开始测试操作;The first step is to obtain the process handle of the test program, connect to the test program in the database in serial port mode, identify the current resolution of the computer, convert it according to the standard resolution set in the database and the coordinates of the standard start position, and obtain the current Start the coordinates of the position, and then click on the coordinates, the test program will start the test operation;

第二步,测试完成后,测试程序给出合格品和不合格品的判定,截取该判定界面,对截取的界面的四个角位进行定位,获得对该界面的背景色的判定,然后将该判定与数据库中存储的合格品和不合格品的背景色进行对比,判断该测试产品是否合格,并将该判定结果发送给下级设备的控制中心;In the second step, after the test is completed, the test program gives the judgment of qualified products and unqualified products, intercepts the judgment interface, locates the four corners of the intercepted interface, obtains the judgment of the background color of the interface, and then The judgment is compared with the background colors of qualified and unqualified products stored in the database to judge whether the test product is qualified, and send the judgment result to the control center of the lower-level equipment;

第三步,识别电脑当前的分辨率,根据数据库中设定的标准分辨率和标准停止位置所在的坐标进行换算,得到当前停止位置所在的坐标,然后点击该坐标,测试程序结束测试操作。The third step is to identify the current resolution of the computer, convert according to the standard resolution set in the database and the coordinates of the standard stop position, and obtain the coordinates of the current stop position, and then click the coordinates, the test program ends the test operation.

作为本发明自动化测试辅助识别方法的一种改进,第一步中,连接到测试程序后,进行程序匹配检查,若与需进行的测试不匹配,则重新以串口模式连接到数据库中的其他测试程序,直到匹配为止。As an improvement of the automatic test auxiliary identification method of the present invention, in the first step, after connecting to the test program, the program matching check is performed, and if it does not match the test to be carried out, then reconnect to other tests in the database in serial port mode program until a match is made.

作为本发明自动化测试辅助识别方法的一种改进,所述方法还包括在开始测试操作和结束测试操作之间的定时,以控制测试的时间。As an improvement of the automatic test aided recognition method of the present invention, the method further includes timing between the start of the test operation and the end of the test operation, so as to control the time of the test.

作为本发明自动化测试辅助识别方法的一种改进,若第二步中进行对比后发现测试程序的判定结果无效,则回到第一步,重新点击开始,重新测试。As an improvement of the automatic test auxiliary identification method of the present invention, if the judgment result of the test program is found to be invalid after comparison in the second step, return to the first step, click start again, and retest.

相对于现有技术,本发明能够主动识别相应的测试软件及其“开始”或“启动”按钮并进行点击,以开启测试,测试完成后,其又能够自动识别“合格品”或“不合格品”的判定结果,并将该结果传递给下一级的设备进行相应的操作,测试完成后,其还能主动识别停止按钮并进行点击。此外,该方法无需在测试程序上加程序代码,而且通用性强,可以用于多种测试软件中。本发明能够将下位机(机台和夹具)和上位机(测试软件)连接起来,将目前需要人工实现的动作,如开始和停止按钮的点击和测试结果的识别等,全部自动实现,从而实现测试的全自动化,大大提高了测试效率。尤其对于需要进行若干次重复测试的情况,该方法可以大大提高效率,节省人工成本。Compared with the prior art, the present invention can actively identify the corresponding test software and its "start" or "start" button and click to start the test. After the test is completed, it can automatically identify "qualified product" or "unqualified product". "Product" judgment result, and pass the result to the next-level equipment for corresponding operation. After the test is completed, it can also actively identify the stop button and click it. In addition, the method does not need to add program codes to the test program, and has strong versatility and can be used in various test software. The invention can connect the lower computer (machine platform and fixture) with the upper computer (test software), and automatically realize all the actions that need to be realized manually at present, such as clicking the start and stop buttons and identifying the test results, so as to realize The full automation of the test greatly improves the test efficiency. Especially for the situation where several repeated tests are required, this method can greatly improve efficiency and save labor costs.

本发明的另一个目的在于提供一种自动化测试辅助识别系统,包括句柄获取模块、数据库、通讯模块、分辨率识别模块、换算模块、分辨率比对模块、点击模块、界面截取模块、定位模块、判定模块和数据输出模块,所述数据库内存储有测试程序、电脑的标准分辨率、测试程序的标准启动位置和标准停止位置、合格品和不合格品的背景色;Another object of the present invention is to provide an automated test auxiliary identification system, including a handle acquisition module, a database, a communication module, a resolution identification module, a conversion module, a resolution comparison module, a click module, an interface interception module, a positioning module, Judgment module and data output module, the test program, the standard resolution of the computer, the standard start position and the standard stop position of the test program, the background color of qualified products and unqualified products are stored in the database;

句柄获取模块通过通讯模块与数据库通讯,分辨率比对模块的输入端分别与分辨率识别模块和数据库连接,换算模块的输入端与分辨率比对模块连接,换算模块的输出端与点击模块连接;The handle acquisition module communicates with the database through the communication module, the input end of the resolution comparison module is respectively connected with the resolution recognition module and the database, the input end of the conversion module is connected with the resolution comparison module, and the output end of the conversion module is connected with the click module ;

界面截取模块的输出端与定位模块连接,判定模块的输入端分别与定位模块和数据库连接,判定模块的输出端与数据输出模块连接。The output terminal of the interface interception module is connected with the positioning module, the input terminal of the determination module is respectively connected with the positioning module and the database, and the output terminal of the determination module is connected with the data output module.

作为本发明自动化测试辅助识别系统的一种改进,所述系统还包括定时模块,定时模块与点击模块连接。As an improvement of the automatic test auxiliary identification system of the present invention, the system further includes a timing module connected with the click module.

作为本发明自动化测试辅助识别系统的一种改进,所述系统还包括匹配检查模块,匹配检查模块分别与柄获取模块和数据库连接。As an improvement of the automatic test auxiliary identification system of the present invention, the system further includes a matching checking module, which is respectively connected with the handle acquisition module and the database.

相对于现有技术,本发明能够主动识别相应的测试软件及其“开始”或“启动”按钮并进行点击,以开启测试,测试完成后,其又能够自动识别“合格品”或“不合格品”的判定结果,并将该结果传递给下一级的设备进行相应的操作,测试完成后,其还能主动识别停止按钮并进行点击。此外,该方法无需在测试程序上加程序代码,而且通用性强,可以用于多种测试软件中。本发明能够将下位机(机台和夹具)和上位机(测试软件)连接起来,将目前需要人工实现的动作,如开始和停止按钮的点击和测试结果的识别等,全部自动实现,从而实现测试的全自动化,大大提高了测试效率。尤其对于需要进行若干次重复测试的情况,该方法可以大大提高效率,节省人工成本。Compared with the prior art, the present invention can actively identify the corresponding test software and its "start" or "start" button and click to start the test. After the test is completed, it can automatically identify "qualified product" or "unqualified product". "Product" judgment result, and pass the result to the next-level equipment for corresponding operation. After the test is completed, it can also actively identify the stop button and click it. In addition, the method does not need to add program codes to the test program, and has strong versatility and can be used in various test software. The invention can connect the lower computer (machine platform and fixture) with the upper computer (test software), and automatically realize all the actions that need to be realized manually at present, such as clicking the start and stop buttons and identifying the test results, so as to realize The full automation of the test greatly improves the test efficiency. Especially for the situation where several repeated tests are required, this method can greatly improve efficiency and save labor costs.

附图说明Description of drawings

图1为本发明的流程框图。Fig. 1 is a flow chart of the present invention.

图2为本发明的结构框图。Fig. 2 is a structural block diagram of the present invention.

具体实施方式Detailed ways

以下将结合具体实施例对本发明及其有益效果作进一步详细的说明,但是,本发明的具体实施方式并不局限于此。The present invention and its beneficial effects will be further described in detail below in conjunction with specific examples, however, the specific embodiments of the present invention are not limited thereto.

实施例1Example 1

如图1所示,本实施例提供的自动化测试辅助识别方法,包括如下步骤:As shown in Figure 1, the automated test-assisted identification method provided in this embodiment includes the following steps:

第一步,获取测试程序的进程句柄,以串口模式连接到数据库中的测试程序,识别电脑当前的分辨率,根据数据库中设定的标准分辨率和标准启动位置所在的坐标进行换算,得到当前启动位置所在的坐标。这是因为当电脑选择的分辨率不同时,启动位置所在的坐标也会不同,数据库中存储的一般是标准的分辨率及其对应的标准启动位置所在的坐标,当电脑的分辨率不是标准分辨率时,就需要进行换算,以得到启动位置实际所在的坐标,然后点击该坐标,测试程序开始测试操作,从而实现了开始按钮的自动点击;本发明采用的是串口通讯,其是按位发送和接收字节,其可以在使用一根线发送数据的同时用另一个线接收数据,其不仅简单,而且能够实现远距离通信,本发明中,通讯协议可以做成配置文件,以便于外部修改。The first step is to obtain the process handle of the test program, connect to the test program in the database in serial port mode, identify the current resolution of the computer, convert it according to the standard resolution set in the database and the coordinates of the standard start position, and obtain the current The coordinates where the start position is located. This is because when the resolution selected by the computer is different, the coordinates of the starting position will also be different. Generally, the standard resolution and the coordinates of the corresponding standard starting position are stored in the database. When the resolution of the computer is not the standard resolution When the rate is high, it needs to be converted to obtain the actual coordinates of the starting position, and then click on the coordinates, the test program starts the test operation, thereby realizing the automatic clicking of the start button; what the present invention uses is serial communication, which is bit-by-bit transmission And receiving bytes, it can use another line to receive data while using one line to send data, which is not only simple, but also can realize long-distance communication. In the present invention, the communication protocol can be made into a configuration file for external modification .

第二步,测试完成后,测试程序给出合格品和不合格品的判定,一般在测试程序中,合格品和不合格品的背景色是不同的,以便于区分,截取该合格品和不合格品的判定界面,对截取的界面的四个角位进行定位,获得对该界面的背景色的判定(识别其背景色),四个位置的定位和判定可以提高判定的准确性,然后将该判定与数据库中存储的合格品和不合格品的背景色进行对比,判断该测试产品是否合格,并将该判定结果发送给下级设备的控制中心;这是因为,数据库中会存储合格品和不合格品所对应的背景色等基本特征,测试程序给出的合格品和不合格品的背景色与数据库中合格品和不合格品所对应的背景色是相对应的,因此可以进行比对,从而代替人眼对合格品和不合格品进行判定。In the second step, after the test is completed, the test program gives the judgment of qualified products and unqualified products. Generally, in the test program, the background colors of qualified products and unqualified products are different for easy distinction. For the judgment interface of qualified products, the four corners of the intercepted interface are positioned to obtain the judgment of the background color of the interface (identify its background color). The positioning and judgment of the four positions can improve the accuracy of the judgment, and then the This judgment is compared with the background color of qualified and unqualified products stored in the database to judge whether the test product is qualified, and the judgment result is sent to the control center of the lower-level equipment; this is because the qualified and unqualified products will be stored in the database. Basic characteristics such as the background color corresponding to the unqualified product, the background color of the qualified product and the unqualified product given by the test program correspond to the background color corresponding to the qualified product and the unqualified product in the database, so it can be compared , so as to replace the human eye to judge qualified and unqualified products.

第三步,识别电脑当前的分辨率,根据数据库中设定的标准分辨率和标准停止位置所在的坐标进行换算,得到当前停止位置所在的坐标,这是因为当电脑选择的分辨率不同时,停止位置所在的坐标也会不同,数据库中存储的一般是标准的分辨率及其对应的标准停止位置所在的坐标,当电脑的分辨率不是标准分辨率时,就需要进行换算,以得到停止位置实际所在的坐标,然后点击该坐标,测试程序结束测试操作。The third step is to identify the current resolution of the computer, convert according to the standard resolution set in the database and the coordinates of the standard stop position, and obtain the coordinates of the current stop position. This is because when the resolutions selected by the computer are different, The coordinates of the stop position will also be different. Generally, the standard resolution and the coordinates of the corresponding standard stop position are stored in the database. When the resolution of the computer is not the standard resolution, conversion is required to obtain the stop position. The actual coordinates, and then click the coordinates, the test program ends the test operation.

其中,第一步中,连接到测试程序后,进行程序匹配检查,若与需进行的测试不匹配,则重新以串口模式连接到数据库中的其他测试程序,直到匹配为止,其能够应用于多种测试程序。实际使用时,匹配的方法如检查连接到的数据库中该测试程序的名称与实际需要进行的测试程序的名称是否一致等,其中,实际需要进行的测试程序的名称可以根据需要人工输入。在需要进行重复测试时,只需要在第一次测试前进行匹配检查,后面的若干次测试则不需要进行匹配检查。Among them, in the first step, after connecting to the test program, the program matching check is carried out. If it does not match the test to be carried out, then reconnect to other test programs in the database in serial port mode until it matches. It can be applied to multiple a test program. In actual use, the matching method is to check whether the name of the test program in the connected database is consistent with the name of the actual test program. The name of the actual test program can be manually input as required. When repeated testing is required, only matching checks need to be performed before the first test, and matching checks are not required for subsequent tests.

所述方法还包括在开始测试操作和结束测试操作之间的定时,以控制测试的时间,有的测试需要在设定的时间内进行,该定时则可以轻松地解决该问题。The method also includes timing between the start of the test operation and the end of the test operation to control the time of the test. Some tests need to be performed within a set time, and the timing can easily solve this problem.

若第二步中进行对比后发现测试程序的判定结果无效,如既未显示为合格品,也未显示为不合格品,则回到第一步,重新点击开始,重新测试。If it is found that the judgment result of the test program is invalid after the comparison in the second step, if neither qualified product nor unqualified product is displayed, go back to the first step, click start again, and test again.

总之,本发明能够主动识别相应的测试软件及其“开始”或“启动”按钮并进行点击,以开启测试,测试完成后,其又能够自动识别“合格品”或“不合格品”的判定结果,并将该结果传递给下一级的设备进行相应的操作,测试完成后,其还能主动识别停止按钮并进行点击。此外,该方法无需在测试程序上加程序代码,而且通用性强,可以用于多种测试软件中。本发明能够将下位机(机台和夹具)和上位机(测试软件)连接起来,将目前需要人工实现的动作,如开始和停止按钮的点击和测试结果的识别等,全部自动实现,从而实现测试的全自动化,大大提高了测试效率。尤其对于需要进行若干次重复测试的情况,该方法可以大大提高效率,节省人工成本。尤其对于需要进行若干次重复测试的情况,该方法可以大大提高效率,节省人工成本。In a word, the present invention can actively identify the corresponding test software and its "start" or "start" button and click to start the test. After the test is completed, it can automatically identify the judgment of "qualified product" or "unqualified product" result, and pass the result to the next-level equipment for corresponding operation. After the test is completed, it can also actively identify the stop button and click it. In addition, the method does not need to add program codes to the test program, and has strong versatility and can be used in various test software. The invention can connect the lower computer (machine platform and fixture) with the upper computer (test software), and automatically realize all the actions that need to be realized manually at present, such as clicking the start and stop buttons and identifying the test results, so as to realize The full automation of the test greatly improves the test efficiency. Especially for the situation where several repeated tests are required, this method can greatly improve efficiency and save labor costs. Especially for the situation where several repeated tests are required, this method can greatly improve efficiency and save labor costs.

实施例2Example 2

本实施例提供的一种自动化测试辅助识别系统,包括句柄获取模块1、数据库2、通讯模块3、分辨率识别模块4、换算模块5、分辨率比对模块6、点击模块7、界面截取模块8、定位模块9、判定模块10和数据输出模块11,数据库2内存储有测试程序、电脑的标准分辨率、测试程序的标准启动位置和标准停止位置、合格品和不合格品的背景色;An automated test auxiliary identification system provided in this embodiment includes a handle acquisition module 1, a database 2, a communication module 3, a resolution identification module 4, a conversion module 5, a resolution comparison module 6, a click module 7, and an interface interception module 8, positioning module 9, judgment module 10 and data output module 11, store the background color of test program, the standard resolution of computer, the standard start position and standard stop position of test program, qualified product and unqualified product in the database 2;

句柄获取模块1通过通讯模块3与数据库2通讯,句柄获取模块1可以从数据库2中获取测试程序的进程句柄,以连接到该测试程序,分辨率比对模块6的输入端分别与分辨率识别模块4和数据库2连接,换算模块5的输入端与分辨率比对模块6连接,换算模块5的输出端与点击模块7连接;分辨率比对模块6从分辨率识别模块4提取电脑实际的分辨率,并从数据库2中提取电脑的标准分辨率,并进行比对,然后将比对结果发送给换算模块5,换算模块5将换算好后的结果(实际启动位置或实际停止位置)发送给点击模块7,点击模块7再在相应的位置进行点击操作,以实现启动按钮或停止按钮的自动点击;;The handle acquisition module 1 communicates with the database 2 through the communication module 3. The handle acquisition module 1 can acquire the process handle of the test program from the database 2 to connect to the test program. The input terminals of the resolution comparison module 6 are respectively identified with the resolution The module 4 is connected with the database 2, the input end of the conversion module 5 is connected with the resolution comparison module 6, and the output end of the conversion module 5 is connected with the click module 7; the resolution comparison module 6 extracts the actual resolution, and extract the standard resolution of the computer from the database 2, and compare it, and then send the comparison result to the conversion module 5, and the conversion module 5 will send the converted result (actual start position or actual stop position) Give the click module 7, and click the module 7 to perform a click operation at the corresponding position, so as to realize the automatic click of the start button or the stop button;

界面截取模块8的输出端与定位模块9连接,界面截取模块8可截取测试软件对合格品和不合格品的判定界面,定位模块9可对该界面的四个角位进行定位并获得对该界面的背景色的判定,判定模块10的输入端分别与定位模块9和数据库2连接,判定模块10的输出端与数据输出模块11连接。判定模块10可以将对该界面的背景色的判定与数据库2中存储的合格品和不合格品的背景色进行对比,判断该测试产品是否合格,并将该判定结果通过数据输出模块11发送给下级设备的控制中心。The output end of the interface interception module 8 is connected with the positioning module 9, the interface interception module 8 can intercept the judgment interface of the qualified product and the unqualified product by the testing software, and the positioning module 9 can locate the four corners of the interface and obtain the For the determination of the background color of the interface, the input terminals of the determination module 10 are respectively connected to the positioning module 9 and the database 2 , and the output terminals of the determination module 10 are connected to the data output module 11 . The judgment module 10 can compare the judgment of the background color of the interface with the background color of the qualified product and the unqualified product stored in the database 2, judge whether the test product is qualified, and send the judgment result through the data output module 11 to The control center of the subordinate equipment.

所述系统还包括定时模块12,定时模块12与点击模块7连接,定时模块12可以对“点击开始”和“点击结束”之间的时间间隔进行设定,从而限定测试时间。The system also includes a timing module 12, which is connected to the click module 7, and the timing module 12 can set the time interval between "click to start" and "click to end", thereby limiting the test time.

所述系统还包括匹配检查模块13,匹配检查模块13分别与柄获取模块1和数据库2连接,匹配检查模块13用于检查所打开的测试程序与实际需要打开的测试程序是否是同一个程序,以防误测。Described system also comprises matching checking module 13, and matching checking module 13 is connected with handle acquisition module 1 and database 2 respectively, and matching checking module 13 is used for checking whether the test program opened and the test program that actually needs to be opened are the same program, In case of false detection.

总之,本发明能够主动识别相应的测试软件及其“开始”或“启动”按钮并进行点击,以开启测试,测试完成后,其又能够自动识别“合格品”或“不合格品”的判定结果,并将该结果传递给下一级的设备进行相应的操作,测试完成后,其还能主动识别停止按钮并进行点击。此外,该方法无需在测试程序上加程序代码,而且通用性强,可以用于多种测试软件中。本发明能够将下位机(机台和夹具)和上位机(测试软件)连接起来,将目前需要人工实现的动作,如开始和停止按钮的点击和测试结果的识别等,全部自动实现,从而实现测试的全自动化,大大提高了测试效率。尤其对于需要进行若干次重复测试的情况,该方法可以大大提高效率,节省人工成本。In a word, the present invention can actively identify the corresponding test software and its "start" or "start" button and click to start the test. After the test is completed, it can automatically identify the judgment of "qualified product" or "unqualified product" result, and pass the result to the next-level equipment for corresponding operation. After the test is completed, it can also actively identify the stop button and click it. In addition, the method does not need to add program codes to the test program, and has strong versatility and can be used in various test software. The invention can connect the lower computer (machine platform and fixture) with the upper computer (test software), and automatically realize all the actions that need to be realized manually at present, such as clicking the start and stop buttons and identifying the test results, so as to realize The full automation of the test greatly improves the test efficiency. Especially for the situation where several repeated tests are required, this method can greatly improve efficiency and save labor costs.

根据上述说明书的揭示和教导,本发明所属领域的技术人员还可以对上述实施方式进行适当的变更和修改。因此,本发明并不局限于上面揭示和描述的具体实施方式,对本发明的一些修改和变更也应当落入本发明的权利要求的保护范围内。此外,尽管本说明书中使用了一些特定的术语,但这些术语只是为了方便说明,并不对本发明构成任何限制。According to the disclosure and teaching of the above specification, those skilled in the art to which the present invention pertains can also make appropriate changes and modifications to the above embodiment. Therefore, the present invention is not limited to the specific embodiments disclosed and described above, and some modifications and changes to the present invention should also fall within the protection scope of the claims of the present invention. In addition, although some specific terms are used in this specification, these terms are only for convenience of description and do not constitute any limitation to the present invention.

Claims (7)

1.自动化测试辅助识别方法,其特征在于,包括如下步骤:1. automated test aided identification method, is characterized in that, comprises the steps: 第一步,获取测试程序的进程句柄,以串口模式连接到数据库中的测试程序,识别电脑当前的分辨率,根据数据库中设定的标准分辨率和标准启动位置所在的坐标进行换算,得到当前启动位置所在的坐标,然后点击该坐标,测试程序开始测试操作;The first step is to obtain the process handle of the test program, connect to the test program in the database in serial port mode, identify the current resolution of the computer, convert it according to the standard resolution set in the database and the coordinates of the standard start position, and obtain the current Start the coordinates of the position, and then click on the coordinates, the test program will start the test operation; 第二步,测试完成后,测试程序给出合格品和不合格品的判定,截取该判定界面,对截取的界面的四个角位进行定位,获得对该截取的界面的背景色的判定,然后将该判定与数据库中存储的合格品和不合格品的背景色进行对比,判断该测试产品是否合格,并将该产品是否合格的判定结果发送给下级设备的控制中心;In the second step, after the test is completed, the test program gives the judgment of qualified products and unqualified products, intercepts the judgment interface, locates the four corners of the intercepted interface, and obtains the judgment of the background color of the intercepted interface, Then compare the judgment with the background colors of qualified and unqualified products stored in the database to judge whether the test product is qualified, and send the judgment result of whether the product is qualified to the control center of the lower-level equipment; 第三步,识别电脑当前的分辨率,根据数据库中设定的标准分辨率和标准停止位置所在的坐标进行换算,得到当前停止位置所在的坐标,然后点击该坐标,测试程序结束测试操作。The third step is to identify the current resolution of the computer, convert according to the standard resolution set in the database and the coordinates of the standard stop position, and obtain the coordinates of the current stop position, and then click the coordinates, the test program ends the test operation. 2.根据权利要求1所述的自动化测试辅助识别方法,其特征在于:第一步中,连接到测试程序后,进行程序匹配检查,若与需进行的测试不匹配,则重新以串口模式连接到数据库中的其他测试程序,直到匹配为止。2. The automatic test auxiliary identification method according to claim 1, characterized in that: in the first step, after being connected to the test program, the program matching check is carried out, and if it does not match the test to be carried out, then reconnect with the serial port mode to other test programs in the database until there is a match. 3.根据权利要求1所述的自动化测试辅助识别方法,其特征在于:所述方法还包括在开始测试操作和结束测试操作之间的定时,以控制测试的时间。3. The automatic test aided identification method according to claim 1, characterized in that: the method further comprises a timing between the start of the test operation and the end of the test operation, so as to control the time of the test. 4.根据权利要求1所述的自动化测试辅助识别方法,其特征在于:若第二步中进行对比后发现测试程序的判定结果无效,则回到第一步,重新点击开始,重新测试。4. The automatic test aided identification method according to claim 1, characterized in that: if the judgment result of the test program is found to be invalid after the comparison in the second step, return to the first step, click start again, and retest. 5.一种自动化测试辅助识别系统,其特征在于:包括句柄获取模块、数据库、通讯模块、分辨率识别模块、换算模块、分辨率比对模块、点击模块、界面截取模块、定位模块、判定模块和数据输出模块,所述数据库内存储有测试程序、电脑的标准分辨率、测试程序的标准启动位置和标准停止位置、合格品和不合格品的背景色;5. An automated test auxiliary identification system, characterized in that: including a handle acquisition module, a database, a communication module, a resolution identification module, a conversion module, a resolution comparison module, a click module, an interface interception module, a positioning module, and a judgment module And data output module, store the background color of test program, the standard resolution of computer, the standard start position and standard stop position of test program, qualified product and unqualified product in the described database; 句柄获取模块通过通讯模块与数据库通讯,分辨率比对模块的输入端分别与分辨率识别模块和数据库连接,换算模块的输入端与分辨率比对模块连接,换算模块的输出端与点击模块连接;The handle acquisition module communicates with the database through the communication module, the input end of the resolution comparison module is respectively connected with the resolution recognition module and the database, the input end of the conversion module is connected with the resolution comparison module, and the output end of the conversion module is connected with the click module ; 界面截取模块的输出端与定位模块连接,判定模块的输入端分别与定位模块和数据库连接,判定模块的输出端与数据输出模块连接。The output terminal of the interface interception module is connected with the positioning module, the input terminal of the determination module is respectively connected with the positioning module and the database, and the output terminal of the determination module is connected with the data output module. 6.根据权利要求5所述的自动化测试辅助识别系统,其特征在于:所述系统还包括定时模块,定时模块与点击模块连接。6. The automatic test auxiliary identification system according to claim 5, characterized in that: the system further comprises a timing module, which is connected with the click module. 7.根据权利要求5所述的自动化测试辅助识别系统,其特征在于:所述系统还包括匹配检查模块,匹配检查模块分别与句柄获取模块和数据库连接。7. The automatic test auxiliary identification system according to claim 5, characterized in that: the system further comprises a matching checking module, which is respectively connected to the handle acquisition module and the database.
CN201610186289.XA 2016-03-29 2016-03-29 Automatic test auxiliary identification method and auxiliary identification system Active CN105866574B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610186289.XA CN105866574B (en) 2016-03-29 2016-03-29 Automatic test auxiliary identification method and auxiliary identification system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610186289.XA CN105866574B (en) 2016-03-29 2016-03-29 Automatic test auxiliary identification method and auxiliary identification system

Publications (2)

Publication Number Publication Date
CN105866574A CN105866574A (en) 2016-08-17
CN105866574B true CN105866574B (en) 2018-07-17

Family

ID=56626278

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610186289.XA Active CN105866574B (en) 2016-03-29 2016-03-29 Automatic test auxiliary identification method and auxiliary identification system

Country Status (1)

Country Link
CN (1) CN105866574B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108346451A (en) * 2018-03-14 2018-07-31 上海华虹宏力半导体制造有限公司 The test method of memory
CN109871172B (en) * 2019-01-23 2020-09-15 广州杰赛科技股份有限公司 Mouse clicking method and device in automatic test and readable storage medium
CN111190830B (en) * 2019-12-31 2023-05-16 东莞华贝电子科技有限公司 Method and device for automatically identifying computer port state and starting test program

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981954A (en) * 2012-11-28 2013-03-20 百度国际科技(深圳)有限公司 Compatibility test method for input method and electronic device
CN103064781A (en) * 2011-10-18 2013-04-24 飞图科技(北京)有限公司 Mobile software automated testing method
CN103678100A (en) * 2012-09-10 2014-03-26 联芯科技有限公司 Application automatic testing method and system of terminal
CN104268083A (en) * 2014-09-30 2015-01-07 上海联影医疗科技有限公司 Software automatic testing method and device
CN104717337A (en) * 2015-04-03 2015-06-17 杭州昕云信息科技有限公司 Method for testing mobile application in batch and equipment used in method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4332649B2 (en) * 1999-06-08 2009-09-16 独立行政法人情報通信研究機構 Hand shape and posture recognition device, hand shape and posture recognition method, and recording medium storing a program for executing the method
US7128266B2 (en) * 2003-11-13 2006-10-31 Metrologic Instruments. Inc. Hand-supportable digital imaging-based bar code symbol reader supporting narrow-area and wide-area modes of illumination and image capture
KR100967091B1 (en) * 2003-06-19 2010-07-01 삼성전자주식회사 How to adjust the white balance of a digital imaging device
JP2006121240A (en) * 2004-10-20 2006-05-11 Sharp Corp Image projection method, projector, and computer program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064781A (en) * 2011-10-18 2013-04-24 飞图科技(北京)有限公司 Mobile software automated testing method
CN103678100A (en) * 2012-09-10 2014-03-26 联芯科技有限公司 Application automatic testing method and system of terminal
CN102981954A (en) * 2012-11-28 2013-03-20 百度国际科技(深圳)有限公司 Compatibility test method for input method and electronic device
CN104268083A (en) * 2014-09-30 2015-01-07 上海联影医疗科技有限公司 Software automatic testing method and device
CN104717337A (en) * 2015-04-03 2015-06-17 杭州昕云信息科技有限公司 Method for testing mobile application in batch and equipment used in method

Also Published As

Publication number Publication date
CN105866574A (en) 2016-08-17

Similar Documents

Publication Publication Date Title
CN111104341B (en) Smart home equipment automated testing methods, devices, equipment and storage media
CN104052633B (en) Intelligent station 61850 and the stipulations integration test method of telemechanical 104
CN107907775B (en) Wiring detection method and wiring detection device
CN108255653A (en) The test method and its terminal of a kind of product
CN105866574B (en) Automatic test auxiliary identification method and auxiliary identification system
CN110493079A (en) Production Automation Test Method of Industrial Ethernet Switch
CN103761185B (en) A kind of automatization test system and method
CN104780407A (en) Automatic testing method and automatic testing system for set top box
CN115328048A (en) Injection molding process monitoring method, system, device and computer-readable storage medium
CN103488562B (en) Automated testing method and device
WO2018018607A1 (en) Method and device for fixed conversion of transmission protocol based on message protocol identification
CN101141316A (en) Networked Boundary Scan Test Control System and Test Method
CN106598895A (en) Function platelet recognition system and method
CN106301976A (en) A kind of intelligent substation schedule information automated testing method
CN110708216B (en) Switch LLDP protocol test method and test system
CN111124892A (en) Automatic testing method and system based on command line
CN111176995B (en) A test method and test system based on big data test cases
CN104297606A (en) Adapter cable testing system capable of recognizing addresses of tested devices
CN105631615B (en) A detection system and detection method
CN106855850A (en) Based on portable equipment intelligent substation secondary void terminal figure reality symbol detection method
CN111025916B (en) Household appliance detection control method and system
CN109842684A (en) Measure control method, apparatus and system
CN104239214B (en) Method and device for configuring test script
CN116152217A (en) A secondary circuit detection method, device, electronic equipment and storage medium
CN114844861A (en) Automatic address calibration system for master and slave equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant