CN110795340A - Non-invasive Flash player automatic testing method - Google Patents

Non-invasive Flash player automatic testing method Download PDF

Info

Publication number
CN110795340A
CN110795340A CN201910946277.6A CN201910946277A CN110795340A CN 110795340 A CN110795340 A CN 110795340A CN 201910946277 A CN201910946277 A CN 201910946277A CN 110795340 A CN110795340 A CN 110795340A
Authority
CN
China
Prior art keywords
call
flash
flash player
coordinate
button
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.)
Pending
Application number
CN201910946277.6A
Other languages
Chinese (zh)
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.)
Guangzhou Yifang Information Technology Co Ltd
Original Assignee
Guangzhou Yifang Information 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 Guangzhou Yifang Information Technology Co Ltd filed Critical Guangzhou Yifang Information Technology Co Ltd
Priority to CN201910946277.6A priority Critical patent/CN110795340A/en
Publication of CN110795340A publication Critical patent/CN110795340A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

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

A non-intrusive Flash player automatic test method is characterized by comprising the following steps: the external interface class is used for communicating with the JavaScript, so that the purpose of opening functions and events outside is achieved, and the external interface class has two methods: call, which can make Flash call the method in js, and addCallback, which is used to register Flash function for JavaScript call. The method for realizing Flash button automatic clicking comprises the following steps: and acquiring the coordinate of the central point of the button in the current screen by using an image matching technology, and then clicking the coordinate. Compared with the prior art, the method has the advantages of supporting the current mainstream Flash version, being used for automatic verification of the online version and completing the test without injecting any third-party file.

Description

Non-invasive Flash player automatic testing method
Technical Field
The invention relates to the field of computers, in particular to an automatic testing technology of a player.
Background
Flash players are still one of the mainstream web players at present, especially in the online education industry, and compared with H5 players, Flash players have natural video anti-theft advantages and are well-liked by people. The Flash player has various functions, if the Flash player only depends on manual testing, the testing quality and the coverage are difficult to ensure, a large amount of testing time is consumed, and quick version release cannot be realized. The traditional scheme of Flash player automatic test is as follows: and injecting a SeleniumFlexAPI.swc (download address: http:// sourceform. net/projects/seleniumFlexapi /) into the Flex engineering, and recompiling and packaging to ensure that functions and events inside the Flash player can be opened to be called by JavaScript (JS for short, the same below) so as to control the Flash player. The disadvantages of this solution are:
1. the Selenium FlexAPI. swc has not been updated for a long time and seems not to support the current mainstream Flash version;
2. because the version of the Flash player to be tested needs to be injected into Selenium FlexAPI.swc and recompiled, and the online version should not be injected into the file, the test is inconsistent with the online version, so the scheme can only be used for the test before online and cannot be used for the automatic verification of the online version;
3. the possibility of contaminating the source code by seleniumflexapi.
Disclosure of Invention
The invention aims to provide a non-intrusive automatic Flash player testing method which can support the current mainstream Flash player version, can be used for automatic verification of the online version and can complete testing without injecting any third-party file.
The invention is realized by the following steps:
the purpose of opening functions and events outside is achieved by using an ExternalInterface class and JS communication, and the ExternalInterface class has two methods: call and addCallback, call can let the Flash player call the method in JS, addCallback is used for registering the Flash player function for JS call, the realization method of Flash player button automatic click: obtaining the coordinate of the button center point in the current screen by using an image matching technology, then carrying out click operation on the coordinate,
basic principles of test verification:
1. the result verification is carried out by using a native method of the Flash player as much as possible;
2. when the function is verified, the event of the Flash player is used for rechecking;
compared with the prior art, the invention has
1. Three defects of the traditional scheme can be avoided;
2. extremely fast test, fast response;
3. the player is prevented from being repeatedly compiled and packaged (the existing method is that the version of the player to be tested needs to be injected into Selenium FlexAPI. swc and recompiled and packaged, and the online version does not need to be injected into the file, so that the player needs to be repeatedly compiled and packaged).
Detailed Description
The purpose of opening functions and events outside is achieved by using an ExternalInterface class and JS communication, and the ExternalInterface class has two methods: call and addCallback, call can make Flash player call JS inside method (1, import flash.external.external interface; 2, call using external interface.call ("JS function name", parameter), the returned value is the value returned by JS function), addCallback is used to register Flash player function for JS call (1, import flash.external.external interface; 2, register using external interface.addCallback ("function name for JS call", function name in As) in initApp), 3, JS can use document.getElementById ("ID of Flas in Html") to register, Flash button automatic click method is realized: obtaining the coordinate of the button center point in the current screen by using an image matching technology, then carrying out click operation on the coordinate,
basic principles of test verification:
1. the result verification is carried out by using a native method of the Flash player as much as possible;
2. when the function is verified, the event of the Flash player is used for rechecking;
taking a test play button as an example, when the video is in a pause state (the pause state needs to be verified, and the following contents can be referred to for the idea), using JS to call a function of the Flash player to obtain a current play progress x 1; the method comprises the steps of capturing a screen to obtain a picture a, judging whether a play button exists in the picture a by using an image matching technology, if so, obtaining a coordinate of a central point of the play button, and clicking the coordinate; capturing the picture again to obtain a picture b, judging whether a pause button exists in the picture b, waiting for ten seconds if the pause button exists, and calling a function of a Flash player by using JS after ten seconds to obtain the current playing progress x 2; if x2-x1>1 and the resume play event of Flash is successfully triggered, the play is considered to be successful and the play button is valid.

Claims (1)

1. An intrusive Flash player automatic testing method is characterized in that:
the external interface class is used for communicating with the JavaScript, so that the purpose of opening functions and events outside is achieved, and the external interface class has two methods: call and addCallback, the call can make the Flash player call the method in js, the addCallback is used for registering the Flash player function for JavaScript call, the realization method of Flash player button automatic click: obtaining the coordinate of the button center point in the current screen by using an image matching technology, then carrying out click operation on the coordinate,
basic principles of test verification:
1. the result verification is carried out by using a native method of the Flash player as much as possible;
2. when the function is verified, the event of the Flash player is used for rechecking.
CN201910946277.6A 2019-10-04 2019-10-04 Non-invasive Flash player automatic testing method Pending CN110795340A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910946277.6A CN110795340A (en) 2019-10-04 2019-10-04 Non-invasive Flash player automatic testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910946277.6A CN110795340A (en) 2019-10-04 2019-10-04 Non-invasive Flash player automatic testing method

Publications (1)

Publication Number Publication Date
CN110795340A true CN110795340A (en) 2020-02-14

Family

ID=69438810

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910946277.6A Pending CN110795340A (en) 2019-10-04 2019-10-04 Non-invasive Flash player automatic testing method

Country Status (1)

Country Link
CN (1) CN110795340A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050140668A1 (en) * 2003-12-29 2005-06-30 Michal Hlavac Ingeeni flash interface
CN101089811A (en) * 2006-06-13 2007-12-19 上海新纳广告传媒有限公司 Flash and Net layered structure based on External Interface
CN101976192A (en) * 2010-10-26 2011-02-16 佛山市天瞳智能设备有限公司 Method for separating interface and code on self-service terminal
US20110276834A1 (en) * 2010-05-06 2011-11-10 Salesforce.Com, Inc. Techniques for testing computer readable code
CN106982368A (en) * 2016-01-19 2017-07-25 腾讯科技(深圳)有限公司 video response speed detection method and system
CN107818007A (en) * 2017-11-07 2018-03-20 山东浪潮商用系统有限公司 A kind of method and device played automatically
CN109117358A (en) * 2017-06-23 2019-01-01 百度在线网络技术(北京)有限公司 test method and test device for electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050140668A1 (en) * 2003-12-29 2005-06-30 Michal Hlavac Ingeeni flash interface
CN101089811A (en) * 2006-06-13 2007-12-19 上海新纳广告传媒有限公司 Flash and Net layered structure based on External Interface
US20110276834A1 (en) * 2010-05-06 2011-11-10 Salesforce.Com, Inc. Techniques for testing computer readable code
CN101976192A (en) * 2010-10-26 2011-02-16 佛山市天瞳智能设备有限公司 Method for separating interface and code on self-service terminal
CN106982368A (en) * 2016-01-19 2017-07-25 腾讯科技(深圳)有限公司 video response speed detection method and system
CN109117358A (en) * 2017-06-23 2019-01-01 百度在线网络技术(北京)有限公司 test method and test device for electronic equipment
CN107818007A (en) * 2017-11-07 2018-03-20 山东浪潮商用系统有限公司 A kind of method and device played automatically

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
QUASICEO: "Flash自动化测试调研(一)", Retrieved from the Internet <URL:《www.360doc.com/content/14/0710/13/9200790_393396437》> *
QUASICEO: "Flash自动化测试调研(三)", pages 114 - 119, Retrieved from the Internet <URL:《www.360doc.com/content/14/0710/13/9200790_393396963》> *
谭武;: "Flash通信技术", 电脑知识与技术, no. 1 *

Similar Documents

Publication Publication Date Title
CN106294166B (en) A kind of game data monitoring method and device
CN106326113B (en) A kind of game data monitoring method and device
CN104424022B (en) Screen recording method and device
US7519864B2 (en) Automation test systems
US20190227917A1 (en) Adaptive system for mobile device testing
CN102419732A (en) Android-platform-based automated testing method and testing tool
WO2013192086A1 (en) Methods, systems, and computer readable media for automatically generating a fuzzer that implements functional and fuzz testing and testing a network device using the fuzzer
CN109254910A (en) A kind of test method of application program, device, electronic equipment and storage medium
CN106664285B (en) Event-based recording and playback for advanced applications
CN106096391B (en) A kind of course control method and user terminal
CN110716853A (en) Test script recording method, application program testing method and related device
CN107315606A (en) Using update method and device
CN109885480A (en) A kind of automatic interface compatibility test method and device based on debugging bridge
US20200167270A1 (en) Systems and Methods for Mobile Automation Testing by Emulating Human Behaviors
CN111078554A (en) Applet debugging method, device, equipment and storage medium
CN112882930B (en) Automatic test method and device, storage medium and electronic equipment
CN108319554A (en) Test method, computer readable storage medium and the terminal device of application function
CN110795340A (en) Non-invasive Flash player automatic testing method
CN109165064A (en) A kind of display methods of new information, device, storage medium and terminal
CN109347916A (en) Game interaction method, apparatus and computer readable storage medium
CN105577828B (en) A kind of remoting redirection method and apparatus
CN110795354A (en) Information processing method, device and storage medium
CN110674023B (en) Interface testing method and device
CN106557411B (en) Method and system for testing Hybrid application in Android system
CN107801060A (en) The player method and device of Online Video

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 402, No. 66, North Street, University Town Center, Panyu District, Guangzhou City, Guangdong Province, 510006

Applicant after: Yifang Information Technology Co.,Ltd.

Address before: 510000 room 605, science museum, Guangdong University of technology, Panyu District, Guangzhou City, Guangdong Province

Applicant before: GUANGZHOU EASEFUN INFORMATION TECHNOLOGY Co.,Ltd.