WO2019075973A1 - 应用程序的测试方法及装置 - Google Patents

应用程序的测试方法及装置 Download PDF

Info

Publication number
WO2019075973A1
WO2019075973A1 PCT/CN2018/076553 CN2018076553W WO2019075973A1 WO 2019075973 A1 WO2019075973 A1 WO 2019075973A1 CN 2018076553 W CN2018076553 W CN 2018076553W WO 2019075973 A1 WO2019075973 A1 WO 2019075973A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
health insurance
attribute
component
insurance application
Prior art date
Application number
PCT/CN2018/076553
Other languages
English (en)
French (fr)
Inventor
高超
胡阳
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019075973A1 publication Critical patent/WO2019075973A1/zh

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/3684Test management for test design, e.g. generating new test cases
    • 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

Definitions

  • the present application relates to the field of software testing technologies, and in particular, to a testing method and apparatus for an application.
  • WeChat is a multi-functional interactive platform that can support the integration of electronic commercial products with different functions.
  • WeChat applet is an application that can be developed by operators without downloading and installing. Electronic business products are developed in the WeChat applet.
  • pure manual manual testing can no longer meet the iterative speed of electronic commercial products due to the need to input a large number of ID numbers, ages, premiums, and insured products. It will also waste a lot of human resources and reduce the test results.
  • the present application provides a test method and apparatus for an application, the main purpose of which is that an application developed by an existing insurance electronic commercial product in a WeChat applet needs to input a large number of ID numbers when performing manual testing. Data such as age, premium, and insured products, pure manual manual testing can not meet the iterative speed of electronic commercial products, and also waste a lot of human resources and reduce the test effect.
  • a method for testing an application including:
  • the trigger event of the UI component corresponding to the attribute is run according to the preset test code, and the running result is returned.
  • the method further includes:
  • test scenario conforming to the health insurance application is configured according to the operating environment after the installation, and the test environment is a complete test scenario in which the test scenarios applicable to different UI component elements are connected in series according to the health insurance business process.
  • the method further includes:
  • the uiautomatorviewer tool in the sdk is started by the terminal device to acquire attributes of different UI component elements of the health insurance application, and the search parameters in the preset test code are replaced with the attributes.
  • the determining, in the test environment, whether the attributes of the UI component element exist in the health insurance application include:
  • the jar installer is configured, and it is determined whether there is a code segment corresponding to the attribute of the UI component element matching the business process in the underlying code of the health insurance application in the terminal device.
  • the jar installer is configured, and it is determined whether the attribute of the UI component of the health insurance application in the terminal device corresponds to the attribute of the UI component element that matches the business process.
  • the method further includes:
  • an application testing apparatus including:
  • a determining unit configured to determine, in a test environment, whether an attribute of a user interface UI component element exists in a health insurance application, the UI component element being an object that executes a different UI component program in the health insurance application according to a business process;
  • the running unit is configured to: if the attribute of the user interface UI component element exists in the health insurance application, execute a trigger event of the UI component corresponding to the attribute according to the preset test code, and return a running result.
  • the device further includes:
  • the configuration unit is configured to configure a test scenario conforming to the health insurance application according to the installed operating environment, where the test environment is a complete test scenario in which test scenarios applicable to different UI component elements are connected in series according to the health insurance business process.
  • the device further includes:
  • an obtaining unit configured to start, by the terminal device, the uiautomatorviewer tool in the sdk, acquire attributes of different UI component elements of the health insurance application, and replace the search parameters in the preset test code with the attributes.
  • the determining unit is specifically configured to: after the creation of the Appium on the Eclipse, configure the jar installer, and determine whether there is a UI matching the business process in the underlying code of the health insurance application in the terminal device.
  • the code segment corresponding to the attribute of the component element.
  • the device further includes:
  • a sending unit configured to: if it is determined, if there is no code segment corresponding to the attribute of the UI component element that matches the service process, send the alarm information, where the alarm information carries the attribute of the UI component element in the business process Mismatched information.
  • a storage medium in which at least one executable instruction is stored, the executable instruction causing a processor to perform an operation corresponding to a test method of the application described above.
  • a server including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface complete mutual communication through the communication bus ;
  • the memory is configured to store at least one executable instruction that causes the processor to perform an operation corresponding to the test method of the application.
  • the technical solution provided by the embodiment of the present application has at least the following advantages:
  • the present application provides a testing method and apparatus for an application, first determining whether there is an attribute of a user interface UI component element in a health insurance application in a test environment, the UI component element being performing the health insurance application according to a business process
  • the object of the different UI component program in the program if it exists, runs the trigger event of the UI component corresponding to the attribute according to the preset test code, and returns the running result.
  • Manual testing developed in the WeChat applet with existing existing insurance electronic business products requires manual manual testing due to the need to input a large number of ID numbers, ages, premiums, and insured products. Satisfying the iterative speed of the electronic commerce product, and also consuming a lot of human resources and reducing the test effect.
  • the embodiment of the present application performs triggering on the UI component corresponding to the attribute according to the preset test code. Automated testing of WeChat's health insurance application avoids manual manual testing and improves test efficiency.
  • FIG. 1 is a flow chart showing a test method of an application program provided by an embodiment of the present application
  • FIG. 2 is a flowchart of a testing method of another application provided by an embodiment of the present application.
  • FIG. 3 is a block diagram of a testing device of an application program provided by an embodiment of the present application.
  • FIG. 4 is a block diagram of a test apparatus of another application provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a server provided by an embodiment of the present application.
  • the embodiment of the present application provides a testing method of an application, as shown in FIG. 1 , the method includes:
  • the UI component element is an object that executes different UI component programs in the health insurance application according to a business process, where the test environment is an environment for executing a test method of a current application, and may be extended by an automation framework.
  • the development platform and other environment are built.
  • the health insurance application in the WeChat applet in the test machine needs to be tested, the test environment needs to be installed with a driver matching the test machine system.
  • the test machine is an Android mobile phone
  • the driver of the Android system needs to be installed, which is not specifically limited in this embodiment.
  • the health insurance application may provide an insurance company with a small program for selling health insurance products for WeChat, and an application for insuring convenience for users who use WeChat.
  • the user interface UI component element includes components of the health insurance application itself and components after entering the health insurance application, such as a Button button, a CheckedTextView multiple selection, a RadioButton radio button, an EditText user input, a TextView text display, etc., and the implementation of the present application The example is not specifically limited.
  • an element will correspond to one or more attributes.
  • the element can be determined by the uniqueness of the attribute. Therefore, the corresponding component can be found by judging whether there is a property of the UI component element, such as a Button.
  • the attributes of the button component are index and text, and the Button button component can be corresponding to the obtained index and text.
  • the preset code is a code for triggering different events in which the java voice is pre-written in the jar environment, which is not specifically limited in the embodiment of the present application.
  • the triggering event includes a triggering event of a scene such as a click, a selection, an entry, a sliding screen, and the like, which is not specifically limited in the embodiment of the present application.
  • the operation result includes normal operation and abnormal operation. The normal operation is triggered by the trigger event, that is, the operation corresponding to the trigger event is successfully executed, and the abnormal operation is triggered by the trigger event, that is, the operation corresponding to the trigger event cannot be performed.
  • the test subject of the current execution application is a PC end connected to the terminal device that performs the test behavior, and may be a server end or a client end, which is not specifically limited in this embodiment. Since there are many different functional components in the health insurance application, according to the business process, it is necessary to judge the attributes of each UI component element, and execute the test method of the current application cyclically until all the UI components corresponding to the business process are completed. The judgment of the element, the business process is the sequence of triggering the corresponding component to execute the test in different scenarios in the health insurance application. For example, after clicking the button 1, the corresponding service after entering the interface corresponding to the button 1 is the button 2 and the button 3, The embodiments of the present application are not specifically limited.
  • each operation can also be performed in a certain order, and the text that needs to be entered can be pre-configured in the preset test code for the input.
  • the information, the data, and the like are directly invoked, and the embodiment of the present application is not specifically limited.
  • the application provides a test method for an application, and an application developed in a WeChat applet with an existing existing insurance electronic commercial product is required to input a large number of ID numbers, ages, premiums, and the like when performing manual testing. Insured products and other data, pure manual manual testing can not meet the iterative speed of electronic commercial products, and also waste a lot of human resources, reduce the test effect. Compared with the attributes of the UI component elements, the present embodiment corresponds to this attribute.
  • the UI component is triggered according to the preset test code to implement the automated test of WeChat's health insurance application, avoiding manual manual testing and improving test efficiency.
  • the embodiment of the present application provides another testing method of an application, as shown in FIG. 2, the method includes:
  • the terminal device of the test behavior is a test machine for installing a WeChat applet, and may be a mobile phone, a tablet computer, a mobile phone simulator, etc., which is not specifically limited in this embodiment.
  • a test machine for installing a WeChat applet
  • the terminal device of the test behavior is a test machine for installing a WeChat applet, and may be a mobile phone, a tablet computer, a mobile phone simulator, etc., which is not specifically limited in this embodiment.
  • Appium, android-sdk package, Eclipse can be downloaded directly or manually, and the background system is directly installed according to the downloaded installation package.
  • the test environment is a complete test scenario in which the test scenarios to which different UI component elements are applied are connected in series according to the health insurance business process.
  • the health insurance business process is a pre-population in accordance with the order of insured, inquiring, and paying the insurance, and can be set in advance by a technician, and is not specifically limited in the embodiment of the present application.
  • the test scenario applicable to the different UI component elements is a separate business scenario in the health insurance business process, such as insuring and querying are two independent business scenarios, but for the entire business process, if the insurance is in front, then The query can be divided into querying the insured product information and querying the uninsured product information. If the query is in the front, it can only query the uninsured product information.
  • the actual business process in the test environment can be performed in the form of a tree diagram, but In the test environment, if there is one test machine, multiple separate business scenarios can be connected in series, and the test operation is performed according to one path. After the execution is completed, another serial path is executed from the beginning. If there are multiple test machines, more The tandem paths are tested at the same time, which is not specifically limited in the embodiment of the present application.
  • test program of the next corresponding business process is executed to generate a streamlined test case.
  • the jar is a package for implementing different functions, so as to write test code, and support background for the judgment step, such as java-client-1.2.1.jar: provide Appium driver, start service, common operation method, Selenium-api-2.41.0.jar: parameter setting when starting the server, such as using the automated test engine, mobile operating system, WeChat applet package name and appActiviy, etc., testng.jar: call java program through xml file, execute The test results and the like are tested and output, and the embodiment of the present application is not specifically limited.
  • the object of the determination is specifically whether the code segment corresponding to the attribute of the UI component element exists in the underlying code of the health insurance application. Specifically, the attribute of each UI component element has its own corresponding code segment for implementing the corresponding The function of the present application is not specifically limited.
  • the embodiment of the present application may further include: starting, by using the terminal device, the uiautomatorviewer tool in the sdk, acquiring attributes of different UI component elements of the health insurance application, and setting a preset test code The lookup parameter in is replaced with the attribute.
  • the preset test code is a code for executing a corresponding trigger event, and the general preset test code is configured with parameters that can replace other attributes, so that the corresponding parameters can be applied to other test processes as long as the corresponding parameters are modified.
  • testng plugin in Eclipse can be used for annotations in order to concatenate individual scenes into a complete test scenario.
  • Parameterization refers to the data configuration parameters that can be replaced in the preset test code, so that the corresponding parameters can be applied to other test modules as long as the corresponding parameters are modified, and the dependency relationship is to connect the parameters between different test modules, so that the previous test module After the test is executed, the corresponding next test is executed, thereby implementing the concatenation of the business processes.
  • This step is the same as the method in step 101 shown in FIG. 1, and details are not described herein again.
  • the process of judging is to determine whether there is a "discovered” element by looking up the UI component attribute, and if so, using the preset test code to perform a click on the "discovery” element, and then judging "small” Whether the "program” element exists, if it exists, click the "small program” element, enter "Ping Health Insurance Mall” in the search box, click search, click the "Ping Health Insurance Mall” applet name, enter the main page of the mall, and then Each element in the applet performs operations such as clicking.
  • the step 204b along with the step 204a, if there is no code segment corresponding to the attribute of the UI component element matching the business process, the alarm information is sent.
  • the alarm information carries information that the attributes of the UI component elements in the service flow do not match, and the alarm information may be an underlying code prompt, or may be a message prompting, etc., which is not specifically limited in this embodiment. .
  • the technician can adjust and update the abnormal UI component.
  • the application provides a test method for another application.
  • the embodiment of the present application determines whether the attributes of each UI component element in the complete test scenario exist according to the business process by establishing an Appium and Eclipse test environment, and then according to the preset test code.
  • the triggering operation is performed on the UI component corresponding to the attribute to implement the automated test of the WeChat health insurance application, without manual manual testing, automatically executing the program test in a streamlined and parameterized form, speeding up the test, and eliminating the need to manually update the test scenario. Thereby improving test efficiency.
  • the embodiment of the present application provides a testing device for an application program.
  • the device includes: a determining unit 31 and an operating unit 32.
  • the determining unit 31 is configured to determine, in the test environment, whether an attribute of the user interface UI component element exists in the health insurance application, where the UI component element is an object that executes different UI component programs in the health insurance application according to the business process;
  • the determining unit 31 executes a function module for determining, by the testing device of the application, whether the attribute of the user interface UI component element exists in the health insurance application in the test environment.
  • the running unit 32 is configured to: if the determining unit 31 determines that the attribute of the user interface UI component element exists in the health insurance application, execute a trigger event of the UI component corresponding to the attribute according to the preset test code, and return a running result.
  • the running unit 32 executes, for the testing device of the application, the attribute of the user interface UI component element in the health insurance application, and then runs the trigger event of the UI component corresponding to the attribute according to the preset test code, and returns the running result. functional module.
  • the application provides a test method for an application, and an application developed in a WeChat applet with an existing existing insurance electronic commercial product is required to input a large number of ID numbers, ages, premiums, and the like when performing manual testing. Insured products and other data, pure manual manual testing can not meet the iterative speed of electronic commercial products, and also waste a lot of human resources, reduce the test effect. Compared with the attributes of the UI component elements, the present embodiment corresponds to this attribute.
  • the UI component is triggered according to the preset test code to implement the automated test of WeChat's health insurance application, avoiding manual manual testing and improving test efficiency.
  • the embodiment of the present application provides another testing device for an application program.
  • the device includes: a determining unit 41, an operating unit 42, and an establishing unit 43.
  • a determining unit 41 configured to determine, in a test environment, whether an attribute of a user interface UI component element exists in a health insurance application, the UI component element being an object that executes different UI component programs in the health insurance application according to a business process;
  • the running unit 42 is configured to: if the determining unit 41 determines that the attribute of the user interface UI component element exists in the health insurance application, execute a trigger event of the UI component corresponding to the attribute according to the preset test code, and return a running result.
  • the device further includes:
  • the establishing unit 43 is configured to establish a connection with the terminal device that performs the testing behavior, and separately install the downloaded automation framework Appium, the scalable development platform Eclipse, and the sdk installation package in the Android system Android;
  • the configuration unit 44 is configured to configure a test scenario conforming to the health insurance application according to the installed operating environment, where the test environment is a complete test scenario in which test scenarios applicable to different UI component elements are connected in series according to the health insurance business process.
  • the device further includes:
  • the obtaining unit 45 is configured to start, by using the terminal device, the uiautomatorviewer tool in the sdk, acquire attributes of different UI component elements of the health insurance application, and replace the search parameters in the preset test code with the attributes. .
  • the determining unit 41 is specifically configured to: after the creation of the Appium on the Eclipse, configure the jar installer, and determine whether there is a UI component element matching the business process in the underlying code of the health insurance application in the terminal device.
  • the attribute corresponds to the code snippet.
  • the device further includes:
  • the sending unit 46 is configured to determine, by the determining unit 41, that if there is no code segment corresponding to the attribute of the UI component element that matches the service flow, the sending of the alarm information, where the alarm information carries the UI component element in the business process The properties do not match the information.
  • the application provides another testing device for the application.
  • the embodiment of the present application determines whether the attributes of each UI component element in the complete test scenario exist according to the business process by establishing an Appium and Eclipse test environment, and then according to the preset test code.
  • the triggering operation is performed on the UI component corresponding to the attribute to implement the automated test of the WeChat health insurance application, without manual manual testing, automatically executing the program test in a streamlined and parameterized form, speeding up the test, and eliminating the need to manually update the test scenario. Thereby improving test efficiency.
  • the embodiment of the present application further provides a computer readable storage medium, where the computer program is stored, and when the program is executed by the processor, the following steps are implemented: determining in a test environment. Whether there is an attribute of a user interface UI component element in the health insurance application, the UI component element being an object that executes different UI component programs in the health insurance application according to the business process; if present, runs according to the preset test code The trigger event of the UI component corresponding to the property, and returns the running result.
  • FIG. 5 a schematic structural diagram of a server provided by an embodiment of the present application is shown in FIG. 5.
  • the specific embodiment of the present application does not implement the specific implementation of the terminal. Make a limit.
  • the server may include: a processor 51, a communication interface (Communications) Interface 52, memory 53, and communication bus 54.
  • the processor 51, the communication interface 52, and the memory 53 complete communication with each other via the communication bus 54.
  • the communication interface 54 is configured to communicate with network elements of other devices such as clients or other servers.
  • the processor 51 is configured to execute a program, and specifically may perform related steps in the testing method embodiment of the application.
  • the program can include program code, the program code including computer operating instructions.
  • the processor 51 may be a central processing unit CPU or a specific integrated circuit ASIC (Application) Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.
  • the one or more processors included in the terminal may be the same type of processor, such as one or more CPUs; or may be different types of processors, such as one or more CPUs and one or more ASICs.
  • the memory 53 is configured to store a program. Memory 53 may contain high speed RAM memory and may also include non-volatile memory (non-volatile memory) Memory), such as at least one disk storage.
  • the program may be specifically configured to cause the processor 51 to perform: determining, in the test environment, whether an attribute of the user interface UI component element exists in the health insurance application, the UI component element being executed in the health insurance application according to the business process An object of a different UI component program; if present, the trigger event of the UI component corresponding to the attribute is executed according to the preset test code, and the running result is returned.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • the various component embodiments of the present application can be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of the testing method and apparatus of the application in accordance with embodiments of the present application.
  • the application can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • Such a program implementing the present application may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

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)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Stored Programmes (AREA)

Abstract

本申请公开了一种应用程序的测试方法及装置,涉及一种软件测试技术领域,主要目的在于现有保险类电子商业产品在微信小程序中开发的应用程序进行手动测试时,由于需要输入大量的身份证号码、年龄、保费、投保产品等数据,纯人工的手动测试已经无法满足电子商业产品的迭代速度,也会浪费大量的人力资源,降低测试效果的问题。主要技术方案:在测试环境下判断健康险应用程序中是否存在用户界面UI组件元素的属性,所述UI组件元素为按照业务流程执行所述健康险应用程序中不同UI组件程序的对象;若存在,则根据预置测试代码运行所述属性对应的UI组件的触发事件,并返回运行结果。主要用于应用程序的测试。

Description

应用程序的测试方法及装置
本申请要求与2017年10月20日提交中国专利局、申请号为201710999599.8、发明名称为“应用程序的测试方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及一种软件测试技术领域,特别是涉及一种应用程序的测试方法及装置。
背景技术
运营商在开发电子商业产品的应用程序之后、上市之前,需要对开发的应用程序进行测试,以便减少电子商业产品上市之后可能出现的缺陷,避免影响商业口碑。为了对电子商业产品的应用程序中各个功能进行测试,可以使用手动进行测试。
目前,微信作为一款集合多种功能的交互平台,可以支持不同功能的电子商业产品进行集成,如,微信小程序为一种不需要下载安装即可以使用运营商开发的应用程序,对于保险类电子商业产品在微信小程序中开发的应用程序在进行手动测试时,由于需要输入大量的身份证号码、年龄、保费、投保产品等数据,纯人工的手动测试已经无法满足电子商业产品的迭代速度,也会浪费大量的人力资源,降低测试效果。
发明内容
有鉴于此,本申请提供一种应用程序的测试方法及装置,主要目的在于现有保险类电子商业产品在微信小程序中开发的应用程序在进行手动测试时,由于需要输入大量的身份证号码、年龄、保费、投保产品等数据,纯人工的手动测试已经无法满足电子商业产品的迭代速度,也会浪费大量的人力资源,降低测试效果的问题。
依据本申请一个方面,提供了一种应用程序的测试方法,包括:
在测试环境下判断健康险应用程序中是否存在用户界面UI组件元素的属性,所述UI组件元素为按照业务流程执行所述健康险应用程序中不同UI组件程序的对象;
若存在,则根据预置测试代码运行所述属性对应的UI组件的触发事件,并返回运行结果。
进一步地,所述在测试环境下判断健康险应用程序中是否存在UI组件元素的属性之前,所述方法还包括:
建立与进行测试行为的终端设备之间的连接,并分别安装已下载的自动化框架Appium、可扩展开发平台Eclipse、安卓***Android中的sdk安装包;
根据安装后的运行环境配置符合健康险应用程序的测试场景,所述测试环境为按照健康险业务流程将不同UI组件元素适用的测试场景进行串联,得到的完整测试场景。
进一步地,所述在测试环境下判断健康险应用程序中是否存在UI组件元素的属性之前,所述方法还包括:
通过所述终端设备启动所述sdk中的uiautomatorviewer工具,获取所述健康险应用程序的不同UI组件元素的属性,并将预置测试代码中的查找参数替换为所述属性。
进一步地,所述在测试环境下判断健康险应用程序中是否存在UI组件元素的属性包括:
在Eclipse上完成Appium的创建之后,配置jar安装程序,并判断所述终端设备中的健康险应用程序底层代码中是否存在与所述业务流程匹配的UI组件元素的属性对应的代码段。
进一步地,所述在Eclipse上完成Appium的创建之后,配置jar安装程序,并判断所述终端设备中的健康险应用程序底层代码中是否存在与所述业务流程匹配的UI组件元素的属性对应的代码段之后,所述方法还包括:
若不存在与所述业务流程匹配的UI组件元素的属性对应的代码段,则发送告警信息,所述告警信息中携带有所述业务流程中UI组件元素的属性不匹配的信息。
依据本申请一个方面,提供了一种应用程序的测试装置,包括:
判断单元,用于在测试环境下判断健康险应用程序中是否存在用户界面UI组件元素的属性,所述UI组件元素为按照业务流程执行所述健康险应用程序中不同UI组件程序的对象;
运行单元,用于若判断健康险应用程序中存在用户界面UI组件元素的属性,则根据预置测试代码运行所述属性对应的UI组件的触发事件,并返回运行结果。
进一步地,所述装置还包括:
建立单元,用于建立与进行测试行为的终端设备之间的连接,并分别安装已下载的自动化框架Appium、可扩展开发平台Eclipse、安卓***Android中的sdk安装包;
配置单元,用于根据安装后的运行环境配置符合健康险应用程序的测试场景,所述测试环境为按照健康险业务流程将不同UI组件元素适用的测试场景进行串联,得到的完整测试场景。
进一步地,所述装置还包括:
获取单元,用于通过所述终端设备启动所述sdk中的uiautomatorviewer工具,获取所述健康险应用程序的不同UI组件元素的属性,并将预置测试代码中的查找参数替换为所述属性。
进一步地,所述判断单元,具体用于在Eclipse上完成Appium的创建之后,配置jar安装程序,并判断所述终端设备中的健康险应用程序底层代码中是否存在与所述业务流程匹配的UI组件元素的属性对应的代码段。
进一步地,所述装置还包括:
发送单元,用于若判断判断若不存在与所述业务流程匹配的UI组件元素的属性对应的代码段,则发送告警信息,所述告警信息中携带有所述业务流程中UI组件元素的属性不匹配的信息。
根据本申请的又一方面,提供了一种存储介质,所述存储介质中存储有至少一可执行指令,所述可执行指令使处理器执行如上述应用程序的测试方法对应的操作。
根据本申请的再一方面,提供了一种服务器,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;
所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行上述应用程序的测试方法对应的操作。
借由上述技术方案,本申请实施例提供的技术方案至少具有下列优点:
本申请提供了一种应用程序的测试方法及装置,首先在测试环境下判断健康险应用程序中是否存在用户界面UI组件元素的属性,所述UI组件元素为按照业务流程执行所述健康险应用程序中不同UI组件程序的对象,若存在,则根据预置测试代码运行所述属性对应的UI组件的触发事件,并返回运行结果。与现有现有保险类电子商业产品在微信小程序中开发的应用程序在进行手动测试时,由于需要输入大量的身份证号码、年龄、保费、投保产品等数据,纯人工的手动测试已经无法满足电子商业产品的迭代速度,也会浪费大量的人力资源,降低测试效果相比,本申请实施例通过查找UI组件元素的属性,对这个属性对应的UI组件按照预置测试代码执行触发,实现微信的健康险应用程序的自动化测试,避免人为的手动测试,提高测试效率。
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1示出了本申请实施例提供的一种应用程序的测试方法流程图;
图2示出了本申请实施例提供的另一种应用程序的测试方法流程图;
图3示出了本申请实施例提供的一种应用程序的测试装置框图;
图4示出了本申请实施例提供的另一种应用程序的测试装置框图;
图5示出了本申请实施例提供的一种服务器示意图。
具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
本申请实施例提供了一种应用程序的测试方法,如图1所示,所述方法包括:
101、在测试环境下判断健康险应用程序中是否存在用户界面UI组件元素的属性。
其中,所述UI组件元素为按照业务流程执行所述健康险应用程序中不同UI组件程序的对象,所述测试环境为用于执行当前应用程序的测试方法的环境,可以由自动化框架、可扩展开发平台等进行环境搭建,由于需要利用测试机中的微信小程序中的健康险应用程序进行测试,因此搭建的测试环境需要安装与测试机***匹配的驱动程序,如测试机为安卓手机,则需要安装安卓***的驱动,本申请实施例不做具体限定。所述健康险应用程序可以为保险公司针对适用于微信中进行售卖健康保险产品的小程序,可以为使用微信的用户提供投保便利的应用程序,具体的,用户通过微信中的健康险商城进行身份证号、年龄、保费等信息的输入,来查找对应的健康险产品,减少投保步骤,提高投保效率。所述用户界面UI组件元素包括健康险应用程序本身的组件以及进入健康险应用程序后的组件,如Button按钮、CheckedTextView多选、RadioButton单选按钮、EditText用户输入、TextView文字显示等,本申请实施例不做具体限定。
需要说明的是,一个元素会对应一个或多个属性,一般的,可以通过这个属性的唯一性来确定元素,因此,可以通过判断是否存在UI组件元素的属性来查找到对应的组件,如Button按钮组件的属性为index、text,既可以通过获取的index、text来对应Button按钮组件。
102、若存在用户界面UI组件元素的属性,则根据预置测试代码运行所述属性对应的UI组件的触发事件,并返回运行结果。
其中,所述预置代码为在jar环境中预先编写java语音的触发不同事件的代码,本申请实施例不做具体限定。所述触发事件包括点击、选择、录入、滑屏等场景的触发事件,本申请实施例不做具体限定。所述运行结果包括正常运行及异常运行,正常运行即为触发事件触发成功,即成功执行触发事件对应的操作,异常运行即为触发事件触发失败,即无法执行触发事件对应的操作。
需要说明的是,当前执行应用程序的测试主体为与执行测试行为的终端设备相连接的PC端,可以为服务器端、也可以为客户端,本申请实施例不做具体限定。由于健康险应用程序中存在很多个不同功能的组件,因此,按照业务流程,需要对每个UI组件元素的属性进行判断,循环执行当前应用程序的测试方法,直至完成业务流程对应的所有UI组件元素的判断,业务流程即为健康险应用程序中不同场景下,触发对应组件执行测试的顺序,如点击按钮1后,进入按钮1对应的界面后对应的业务为按钮2、按钮3,以此类推,本申请实施例不做具体限定。另外,在执行对应的预置测试代码时,对于点击、选择可以随机配置触发的对应操作,也可以按照一定顺序执行每一个操作,对于录入可以在预置测试代码中预先配置出需要录入的文字、数据等信息,以便直接进行调用,本申请实施例不做具体限定。
本申请提供了一种应用程序的测试方法,与现有现有保险类电子商业产品在微信小程序中开发的应用程序在进行手动测试时,由于需要输入大量的身份证号码、年龄、保费、投保产品等数据,纯人工的手动测试已经无法满足电子商业产品的迭代速度,也会浪费大量的人力资源,降低测试效果相比,本申请实施例通过查找UI组件元素的属性,对这个属性对应的UI组件按照预置测试代码执行触发,实现微信的健康险应用程序的自动化测试,避免人为的手动测试,提高测试效率。
本申请实施例提供了另一种应用程序的测试方法,如图2所示,所述方法包括:
201、建立与进行测试行为的终端设备之间的连接,并分别安装已下载的自动化框架Appium、可扩展开发平台Eclipse、安卓***Android中的sdk安装包。
其中,所述测试行为的终端设备为安装微信小程序的测试机,可以为手机、平板电脑、手机模拟器等,本申请实施例不做具体限定。为了适用测试机中的***,需要安装测试机对应的驱动***,Appium、android-sdk包、Eclipse可以直接自动或手动下载,后台***根据下载后的安装包直接进行安装。
需要说明的是,由于需要执行自动化的测试方法,需要在Eclipse上创建Appium的工程,针对需要进行业务流程的串联,下载的Eclipse需要带有testng插件。通过建立与终端设备的连接及安装Appium、Eclipse、Android中的sdk安装包为自动执行测试做了基层准备,并针对健康险应用程序安装了最适用的测试环境,以便提高微信中测试健康险应用程序的效率。
202、根据安装后的运行环境配置符合健康险应用程序的测试场景。
其中,所述测试环境为按照健康险业务流程将不同UI组件元素适用的测试场景进行串联,得到的完整测试场景。所述健康险业务流程即为按照保险的投保、查询、缴纳费用的顺序进匹配的流行,可以由技术人员预先进行设定,本申请实施例不做具体限定。所述不同UI组件元素适用的测试场景即为健康险业务流程中的单独业务场景,如投保与查询为两个独立的业务场景,但是对于整个业务流程来说,若投保在前,则对于的查询可以分为查询投保产品信息,及查询未投保产品信息,若查询在前,则只能为查询未投保产品信息,因此,测试环境中实际的业务流程可以以树状图形式进行,但是针对测试环境中,若存在一台测试机,可以将多个单独业务场景进行串联,按照一条路径执行测试操作,执行完毕后,从头执行另一个串联的路径,若存在多台测试机,可以将多个串联的路径同时进行测试,本申请实施例不做具体限定。
需要说明的是,可以通过Eclipse中的testng插件完成所有单个场景的串联,得到整个业务的完整测试场景。例如,测试程序在执行完录入被保人信息并且成功后,才会执行后面的录入健康告知案例,如果上个场景执行失败了,就不会执行后面的场景案例,即是将每个单独的场景执行完毕后,执行下一个对应的业务流程的测试程序,从而生成流程化的测试案例。
203、在Eclipse上完成Appium的创建之后,配置jar安装程序,并判断所述终端设备中的健康险应用程序底层代码中是否存在与所述业务流程匹配的UI组件元素的属性对应的代码段。
其中,所述jar为实现不同功能的程序包,以便进行测试代码的编写,为判断步骤做后台支持,如java-client-1.2.1.jar:提供Appium驱动,启动服务、常用操作的方法,selenium-api-2.41.0.jar:启动服务端时的参数设置,如使用的自动化测试引擎、手机操作***、微信小程序的包名和appActiviy等,testng.jar:通过xml文件调用java程序,执行测试并且输出测试结果等,本申请实施例不做具体限定。另外,所述判断的对象具体为健康险应用程序底层代码中是否存在UI组件元素的属性对应的代码段,具体的,每个UI组件元素的属性都具有自身对应的代码段,用以实现对应的功能,本申请实施例不做具体限定。
需要说明的是,为了区别不同业务流程中需要测试的组件,具体需要按照业务流程中标识的UI组件来判断是否存在UI组件元素的属性,例如,投保流程中,可以为每个组件配置标识,以便生成带有顺序的测试流程,为判断每个UI组件元素的属性提供具体判断对象。
进一步地,步骤203之前,本申请实施例还可以包括:通过所述终端设备启动所述sdk中的uiautomatorviewer工具,获取所述健康险应用程序的不同UI组件元素的属性,并将预置测试代码中的查找参数替换为所述属性。
其中,所述预置测试代码为用于执行对应触发事件的代码,一般的预置测试代码中配置有可以替换其他属性的参数,以便只要修改对应的参数即可应用到其他测试流程中。
需要说明的是,Eclipse中的testng插件可以用于注释,以便于将单个场景串联成完整测试场景。在配置生成流程化的测试案例过程中,具体的,可以通过依赖关系以参数化形式将每个步骤进行相关联,从而将所有的业务进行流程化,生成一个完整流程的测试案例,如,@Test是注解,dependsOnMethods是依赖关系,productName是参数化,对于参数化、依赖关系可以为,录入投保人(主被保人)信息 :@Test(dependsOnMethods = { "testChooseProduct" }) public void testInputApplicantInfo() throws InterruptedException {pp.testInputApplicantInfo(productName);}, 录入健康告知:@Test(dependsOnMethods = { "testInputApplicantInfo" })public void testHealthInform() throws InterruptedException {pp.testHealthInform(productName);},从而将录入投保人信息与录入健康告知进行串联。其中,参数化是指预置测试代码中可以替换的数据配置参数,以便只要修改对应的参数即可应用到其他测试模块中,依赖关系为连接不同测试模块之间的参数,使得上一个测试模块执行完测试之后执行对应的下一个测试,从而实现业务流程的串联。
204a、若存在与所述业务流程匹配的UI组件元素的属性,则根据预置测试代码运行所述属性对应的UI组件的触发事件,并返回运行结果。
本步骤与图1所示的步骤101方法相同,在此不再赘述。
需要说明的是,在返回一个UI组件的测试结果后,需要按照本申请实施例中的测试步骤测试下一个UI组件,以此重复循环,直至测试所有的UI组件。例如,判断“发现”元素是否存在,判断的过程即是通过查找UI组件属性来确定是否存在“发现”的元素,若存在,则利用预置测试代码执行点击“发现”元素,再判断“小程序”元素是否存在,若存在,则点击“小程序”元素,在搜索框录入“平安健康保险商城”,点击搜索,点击“平安健康保险商城”小程序名,进入商城主页面,然后再对小程序中的各个元素进行点击等操作。
对于本申请实施例,与步骤204a并列的步骤204b、若不存在与所述业务流程匹配的UI组件元素的属性对应的代码段,则发送告警信息。
其中,所述告警信息中携带有所述业务流程中UI组件元素的属性不匹配的信息,所述告警信息可以为底层代码提示、也可以为发送信息提示等,本申请实施例不做具体限定。通过发送告警信息,以便技术人员对异常UI组件进行调整及更新。
需要说明的是,在运行测试程序时,Appium将执行当前测试端指令代码进行翻译,把这些命令转成测试机可以理解的形式发送给测试机,即测试机语言,然后测试机执行完这些命令,如点击微信小程序的某个按钮、录入某些值等,后把执行结果返回给客户端。这些指令如driver.findElement(By.xpath("//*[@text='发现']")).click();可以理解为:代码在java运行时,就会生成一个点击“发现”菜单的命令,每一个对微信小程序的操作,都是一个命令,而这些命令是遵循Webdriver协议的,Appium也可以使用Webdriver协议,通过相同的通讯协议进行对话则可以视测试机按照这些命令自动执行。
本申请提供了另一种应用程序的测试方法,本申请实施例通过建立Appium、Eclipse测试环境,按照业务流程来判断完整测试场景中的各个UI组件元素的属性是否存在,然后按照预置测试代码对这个属性对应的UI组件执行触发操作,实现微信的健康险应用程序的自动化测试,无需人为的手动测试,以流程化、参数化形式自动执行程序测试,加快测试速度,无需人为更新测试场景,从而提高测试效率。
进一步的,作为对上述图1所示方法的实现,本申请实施例提供了一种应用程序的测试装置,如图3所示,该装置包括:判断单元31、运行单元32。
判断单元31,用于在测试环境下判断健康险应用程序中是否存在用户界面UI组件元素的属性,所述UI组件元素为按照业务流程执行所述健康险应用程序中不同UI组件程序的对象;所述判断单元31为应用程序的测试装置执行在测试环境下判断健康险应用程序中是否存在用户界面UI组件元素的属性的功能模块。
运行单元32,用于若判断单元31判断健康险应用程序中存在用户界面UI组件元素的属性,则根据预置测试代码运行所述属性对应的UI组件的触发事件,并返回运行结果。所述运行单元32为应用程序的测试装置执行判断健康险应用程序中存在用户界面UI组件元素的属性,则根据预置测试代码运行所述属性对应的UI组件的触发事件,并返回运行结果的功能模块。
本申请提供了一种应用程序的测试方法,与现有现有保险类电子商业产品在微信小程序中开发的应用程序在进行手动测试时,由于需要输入大量的身份证号码、年龄、保费、投保产品等数据,纯人工的手动测试已经无法满足电子商业产品的迭代速度,也会浪费大量的人力资源,降低测试效果相比,本申请实施例通过查找UI组件元素的属性,对这个属性对应的UI组件按照预置测试代码执行触发,实现微信的健康险应用程序的自动化测试,避免人为的手动测试,提高测试效率。
进一步的,作为对上述图2所示方法的实现,本申请实施例提供了另一种应用程序的测试装置,如图4所示,该装置包括:判断单元41、运行单元42、建立单元43、配置单元44、发送单元46。
判断单元41,用于在测试环境下判断健康险应用程序中是否存在用户界面UI组件元素的属性,所述UI组件元素为按照业务流程执行所述健康险应用程序中不同UI组件程序的对象;
运行单元42,用于若判断单元41判断健康险应用程序中存在用户界面UI组件元素的属性,则根据预置测试代码运行所述属性对应的UI组件的触发事件,并返回运行结果。
进一步地,所述装置还包括:
建立单元43,用于建立与进行测试行为的终端设备之间的连接,并分别安装已下载的自动化框架Appium、可扩展开发平台Eclipse、安卓***Android中的sdk安装包;
配置单元44,用于根据安装后的运行环境配置符合健康险应用程序的测试场景,所述测试环境为按照健康险业务流程将不同UI组件元素适用的测试场景进行串联,得到的完整测试场景。
进一步地,所述装置还包括:
获取单元45,用于通过所述终端设备启动所述sdk中的uiautomatorviewer工具,获取所述健康险应用程序的不同UI组件元素的属性,并将预置测试代码中的查找参数替换为所述属性。
所述判断单元41,具体用于在Eclipse上完成Appium的创建之后,配置jar安装程序,并判断所述终端设备中的健康险应用程序底层代码中是否存在与所述业务流程匹配的UI组件元素的属性对应的代码段。
进一步地,所述装置还包括:
发送单元46,用于判断单元41判断若不存在与所述业务流程匹配的UI组件元素的属性对应的代码段,则发送告警信息,所述告警信息中携带有所述业务流程中UI组件元素的属性不匹配的信息。
本申请提供了另一种应用程序的测试装置,本申请实施例通过建立Appium、Eclipse测试环境,按照业务流程来判断完整测试场景中的各个UI组件元素的属性是否存在,然后按照预置测试代码对这个属性对应的UI组件执行触发操作,实现微信的健康险应用程序的自动化测试,无需人为的手动测试,以流程化、参数化形式自动执行程序测试,加快测试速度,无需人为更新测试场景,从而提高测试效率。
基于上述如图1所示方法,相应的,本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现以下步骤:在测试环境下判断健康险应用程序中是否存在用户界面UI组件元素的属性,所述UI组件元素为按照业务流程执行所述健康险应用程序中不同UI组件程序的对象;若存在,则根据预置测试代码运行所述属性对应的UI组件的触发事件,并返回运行结果。
基于上述如图1所示方法和如图3所示装置的实施例,本申请一个实施例提供的一种服务器的结构示意图,如图5所示,本申请具体实施例并不对终端的具体实现做限定。
如图5所示,该服务器可以包括:处理器(processor)51、通信接口(Communications Interface)52、存储器(memory)53、以及通信总线54。其中:处理器51、通信接口52、以及存储器53通过通信总线54完成相互间的通信。通信接口54,用于与其它设备比如客户端或其它服务器等的网元通信。处理器51,用于执行程序,具体可以执行上述应用程序的测试方法实施例中的相关步骤。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。处理器51可能是中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本申请实施例的一个或多个集成电路。
终端包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。存储器53,用于存放程序。存储器53可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。程序具体可以用于使得处理器51执行以下操作:在测试环境下判断健康险应用程序中是否存在用户界面UI组件元素的属性,所述UI组件元素为按照业务流程执行所述健康险应用程序中不同UI组件程序的对象;若存在,则根据预置测试代码运行所述属性对应的UI组件的触发事件,并返回运行结果。
在此提供的算法和显示不与任何特定计算机、虚拟***或者其它设备固有相关。各种通用***也可以与基于在此的示教一起使用。根据上面的描述,构造这类***所要求的结构是显而易见的。此外,本申请也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本申请的内容,并且上面对特定语言所做的描述是为了披露本申请的最佳实施方式。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本申请的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本申请的示例性实施例的描述中,本申请的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本申请要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本申请的单独实施例。
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本申请的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。
本申请的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本申请实施例的应用程序的测试方法及装置中的一些或者全部部件的一些或者全部功能。本申请还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本申请的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
应该注意的是上述实施例对本申请进行说明而不是对本申请进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本申请可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。

Claims (20)

  1. 一种应用程序的测试方法,其特征在于,包括:
    在测试环境下判断健康险应用程序中是否存在用户界面UI组件元素的属性,所述UI组件元素为按照业务流程执行所述健康险应用程序中不同UI组件程序的对象;
    若存在,则根据预置测试代码运行所述属性对应的UI组件的触发事件,并返回运行结果。
  2. 根据权利要求1所述的方法,其特征在于,所述在测试环境下判断健康险应用程序中是否存在UI组件元素的属性之前,所述方法还包括:
    建立与进行测试行为的终端设备之间的连接,并分别安装已下载的自动化框架Appium、可扩展开发平台Eclipse、安卓***Android中的sdk安装包;
    根据安装后的运行环境配置符合健康险应用程序的测试场景,所述测试环境为按照健康险业务流程将不同UI组件元素适用的测试场景进行串联,得到的完整测试场景。
  3. 根据权利要求2所述的方法,其特征在于,所述在测试环境下判断健康险应用程序中是否存在UI组件元素的属性之前,所述方法还包括:
    通过所述终端设备启动所述sdk中的uiautomatorviewer工具,获取所述健康险应用程序的不同UI组件元素的属性,并将预置测试代码中的查找参数替换为所述属性。
  4. 根据权利要求3所述的方法,其特征在于,所述在测试环境下判断健康险应用程序中是否存在UI组件元素的属性包括:
    在Eclipse上完成Appium的创建之后,配置jar安装程序,并判断所述终端设备中的健康险应用程序底层代码中是否存在与所述业务流程匹配的UI组件元素的属性对应的代码段。
  5. 根据权利要求4所述的方法,其特征在于,所述在Eclipse上完成Appium的创建之后,配置jar安装程序,并判断所述终端设备中的健康险应用程序底层代码中是否存在与所述业务流程匹配的UI组件元素的属性对应的代码段之后,所述方法还包括:
    若不存在与所述业务流程匹配的UI组件元素的属性对应的代码段,则发送告警信息,所述告警信息中携带有所述业务流程中UI组件元素的属性不匹配的信息。
  6. 一种应用程序的测试装置,其特征在于,包括:
    判断单元,用于在测试环境下判断健康险应用程序中是否存在用户界面UI组件元素的属性,所述UI组件元素为按照业务流程执行所述健康险应用程序中不同UI组件程序的对象;
    运行单元,用于若判断单元判断所述终端设备中的健康险应用程序中存在与所述业务流程匹配的UI组件元素的属性,则根据预置测试代码运行所述属性对应的UI组件的触发事件,并返回运行结果。
  7. 根据权利要求6所述的装置,其特征在于,所述装置还包括:
    建立单元,用于建立与进行测试行为的终端设备之间的连接,并分别安装已下载的自动化框架Appium、可扩展开发平台Eclipse、安卓***Android中的sdk安装包;
    配置单元,用于根据安装后的运行环境配置符合健康险应用程序的测试场景,所述测试环境为按照健康险业务流程将不同UI组件元素适用的测试场景进行串联,得到的完整测试场景。
  8. 根据权利要求7所述的装置,其特征在于,所述装置还包括:
    获取单元,用于通过所述终端设备启动所述sdk中的uiautomatorviewer工具,获取所述健康险应用程序的不同UI组件元素的属性,并将预置测试代码中的查找参数替换为所述属性。
  9. 根据权利要求8所述的装置,其特征在于,
    所述判断单元,具体用于在Eclipse上完成Appium的创建之后,配置jar安装程序,并判断所述终端设备中的健康险应用程序底层代码中是否存在与所述业务流程匹配的UI组件元素的属性对应的代码段。
  10. 根据权利要求9所述的装置,其特征在于,所述装置还包括:
    发送单元,用于若判断判断若不存在与所述业务流程匹配的UI组件元素的属性对应的代码段,则发送告警信息,所述告警信息中携带有所述业务流程中UI组件元素的属性不匹配的信息。
  11. 一种存储介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现应用程序的测试方法,包括:
    在测试环境下判断健康险应用程序中是否存在用户界面UI组件元素的属性,所述UI组件元素为按照业务流程执行所述健康险应用程序中不同UI组件程序的对象;
    若存在,则根据预置测试代码运行所述属性对应的UI组件的触发事件,并返回运行结果。
  12. 根据权利要求11所述的存储介质,其特征在于,所述在测试环境下判断健康险应用程序中是否存在UI组件元素的属性之前,所述方法还包括:
    建立与进行测试行为的终端设备之间的连接,并分别安装已下载的自动化框架Appium、可扩展开发平台Eclipse、安卓***Android中的sdk安装包;
    根据安装后的运行环境配置符合健康险应用程序的测试场景,所述测试环境为按照健康险业务流程将不同UI组件元素适用的测试场景进行串联,得到的完整测试场景。
  13. 根据权利要求12所述的存储介质,其特征在于,所述在测试环境下判断健康险应用程序中是否存在UI组件元素的属性之前,所述方法还包括:
    通过所述终端设备启动所述sdk中的uiautomatorviewer工具,获取所述健康险应用程序的不同UI组件元素的属性,并将预置测试代码中的查找参数替换为所述属性。
  14. 根据权利要求13所述的存储介质,其特征在于,所述在测试环境下判断健康险应用程序中是否存在UI组件元素的属性包括:
    在Eclipse上完成Appium的创建之后,配置jar安装程序,并判断所述终端设备中的健康险应用程序底层代码中是否存在与所述业务流程匹配的UI组件元素的属性对应的代码段。
  15. 根据权利要求14所述的存储介质,其特征在于,所述在Eclipse上完成Appium的创建之后,配置jar安装程序,并判断所述终端设备中的健康险应用程序底层代码中是否存在与所述业务流程匹配的UI组件元素的属性对应的代码段之后,所述方法还包括:
    若不存在与所述业务流程匹配的UI组件元素的属性对应的代码段,则发送告警信息,所述告警信息中携带有所述业务流程中UI组件元素的属性不匹配的信息。
  16. 一种服务器,其特征在于,所述装置包括存储介质和处理器,
    所述存储介质,用于存储计算机程序;
    所述处理器,用于执行所述计算机程序以实现应用程序的测试方法,包括:
    在测试环境下判断健康险应用程序中是否存在用户界面UI组件元素的属性,所述UI组件元素为按照业务流程执行所述健康险应用程序中不同UI组件程序的对象;
    若存在,则根据预置测试代码运行所述属性对应的UI组件的触发事件,并返回运行结果。
  17. 根据权利要求16所述的服务器,其特征在于,所述程序被处理器执行时实现所述在测试环境下判断健康险应用程序中是否存在UI组件元素的属性之前,所述方法还包括:
    建立与进行测试行为的终端设备之间的连接,并分别安装已下载的自动化框架Appium、可扩展开发平台Eclipse、安卓***Android中的sdk安装包;
    根据安装后的运行环境配置符合健康险应用程序的测试场景,所述测试环境为按照健康险业务流程将不同UI组件元素适用的测试场景进行串联,得到的完整测试场景。
  18. 根据权利要求17所述的服务器,其特征在于,所述程序被处理器执行时实现所述在测试环境下判断健康险应用程序中是否存在UI组件元素的属性之前,所述方法还包括:
    通过所述终端设备启动所述sdk中的uiautomatorviewer工具,获取所述健康险应用程序的不同UI组件元素的属性,并将预置测试代码中的查找参数替换为所述属性。
  19. 根据权利要求18所述的服务器,其特征在于,所述程序被处理器执行时实现所述在测试环境下判断健康险应用程序中是否存在UI组件元素的属性包括:
    在Eclipse上完成Appium的创建之后,配置jar安装程序,并判断所述终端设备中的健康险应用程序底层代码中是否存在与所述业务流程匹配的UI组件元素的属性对应的代码段。
  20. 根据权利要求19所述的服务器,其特征在于,所述程序被处理器执行时实现所述在Eclipse上完成Appium的创建之后,配置jar安装程序,并判断所述终端设备中的健康险应用程序底层代码中是否存在与所述业务流程匹配的UI组件元素的属性对应的代码段之后,所述方法还包括:
    若不存在与所述业务流程匹配的UI组件元素的属性对应的代码段,则发送告警信息,所述告警信息中携带有所述业务流程中UI组件元素的属性不匹配的信息。
PCT/CN2018/076553 2017-10-20 2018-02-12 应用程序的测试方法及装置 WO2019075973A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710999599.8A CN107704396A (zh) 2017-10-20 2017-10-20 应用程序的测试方法及装置
CN201710999599.8 2017-10-20

Publications (1)

Publication Number Publication Date
WO2019075973A1 true WO2019075973A1 (zh) 2019-04-25

Family

ID=61182184

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/076553 WO2019075973A1 (zh) 2017-10-20 2018-02-12 应用程序的测试方法及装置

Country Status (2)

Country Link
CN (1) CN107704396A (zh)
WO (1) WO2019075973A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928791A (zh) * 2019-11-27 2020-03-27 腾讯科技(深圳)有限公司 程序测试方法、装置、计算机设备和存储介质

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415844B (zh) * 2018-03-22 2022-03-08 北京奇虎科技有限公司 插件化调试方法及装置
CN110389886B (zh) * 2018-04-16 2021-08-03 腾讯科技(深圳)有限公司 一种主体应用程序的附加功能测试方法、装置及存储介质
CN108959047B (zh) * 2018-06-11 2022-05-03 奇安信科技集团股份有限公司 一种基于业务场景的压力测试方法及装置
CN108920366B (zh) * 2018-06-28 2020-09-29 腾讯科技(深圳)有限公司 一种子应用调试方法、装置及***
CN109376093B (zh) * 2018-12-04 2022-02-01 泰康保险集团股份有限公司 保险产品的测试方法及装置、存储介质及电子设备
CN109815119B (zh) * 2018-12-14 2022-09-30 平安科技(深圳)有限公司 一种app链接渠道的测试方法及装置
CN110287122B (zh) * 2019-06-29 2023-08-11 广州华多网络科技有限公司 一种自动化测试方法、装置、终端和存储介质
CN110401665B (zh) * 2019-07-30 2021-06-22 四川虹魔方网络科技有限公司 统一入口的微信鉴权api接口实现方法
CN110750463B (zh) * 2019-10-29 2023-06-23 百度在线网络技术(北京)有限公司 一种小程序测试方法、装置、***、设备及介质
CN112786034B (zh) * 2019-11-08 2023-04-07 阿里巴巴集团控股有限公司 语音交互方法、装置、设备及存储介质
CN111127223B (zh) * 2019-11-25 2023-07-18 泰康保险集团股份有限公司 保险产品测试方法、装置和存储介质
CN116361196A (zh) * 2023-06-01 2023-06-30 北京轻松筹信息技术有限公司 一种测试投保流程的方法、装置、设备和可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309797A (zh) * 2012-03-09 2013-09-18 阿里巴巴集团控股有限公司 用户界面自动化测试方法及装置
US9021442B2 (en) * 2013-02-13 2015-04-28 Sap Se Dynamic scenario testing of web application
CN104794050A (zh) * 2014-01-21 2015-07-22 腾讯科技(深圳)有限公司 应用程序的测试方法、装置及***
CN106445816A (zh) * 2016-09-07 2017-02-22 美的智慧家居科技有限公司 控件执行方法和装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521120B (zh) * 2011-11-16 2014-11-12 中国民航信息网络股份有限公司 一种软件自动化测试***及方法
CN104281518B (zh) * 2013-07-02 2018-05-15 腾讯科技(深圳)有限公司 终端应用测试方法、装置、***、平台及移动终端
CN104978266B (zh) * 2014-04-11 2019-01-01 腾讯科技(深圳)有限公司 一种应用测试方法和装置
CN106776344A (zh) * 2017-01-16 2017-05-31 上海聚宝网络科技股份有限公司 一种基于appium的智能快递柜的自动化测试方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309797A (zh) * 2012-03-09 2013-09-18 阿里巴巴集团控股有限公司 用户界面自动化测试方法及装置
US9021442B2 (en) * 2013-02-13 2015-04-28 Sap Se Dynamic scenario testing of web application
CN104794050A (zh) * 2014-01-21 2015-07-22 腾讯科技(深圳)有限公司 应用程序的测试方法、装置及***
CN106445816A (zh) * 2016-09-07 2017-02-22 美的智慧家居科技有限公司 控件执行方法和装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928791A (zh) * 2019-11-27 2020-03-27 腾讯科技(深圳)有限公司 程序测试方法、装置、计算机设备和存储介质
CN110928791B (zh) * 2019-11-27 2022-03-01 腾讯科技(深圳)有限公司 程序测试方法、装置、计算机设备和存储介质
US11983101B2 (en) 2019-11-27 2024-05-14 Tencent Technology (Shenzhen) Company Limited Program testing method and apparatus, computer device, and storage medium

Also Published As

Publication number Publication date
CN107704396A (zh) 2018-02-16

Similar Documents

Publication Publication Date Title
WO2019075973A1 (zh) 应用程序的测试方法及装置
WO2018107610A1 (zh) 业务数据处理方法、***、设备及计算机可读存储介质
WO2019174375A1 (zh) 接口测试方法、装置、设备及计算机可读存储介质
WO2020045927A1 (en) Electronic device and method for generating short cut of quick command
WO2019104876A1 (zh) 保险产品的推送方法、***、终端、客户终端及存储介质
WO2019192085A1 (zh) 银企直联通信方法、装置、设备及计算机可读存储介质
WO2019037396A1 (zh) 账户清结算方法、装置、设备及存储介质
WO2018205376A1 (zh) 一种关联信息查询方法、终端、服务器管理***及计算机可读存储介质
WO2017142293A1 (en) Electronic device and method of application data display therefor
WO2019165691A1 (zh) 自动生成测试案例的方法、装置、设备及可读存储介质
WO2019100638A1 (zh) 数据同步方法、装置、设备及存储介质
WO2019196213A1 (zh) 接口测试方法、装置、设备及计算机可读存储介质
WO2019218444A1 (zh) 测试报告的生成方法、装置、设备及存储介质
WO2015196960A1 (en) Method and system for checking security of url for mobile terminal
WO2019061613A1 (zh) 贷款资质筛选方法、装置及计算机可读存储介质
WO2017028601A1 (zh) 智能终端的语音控制方法、装置及电视机***
WO2019169814A1 (zh) 自动生成中文注释的方法、装置、设备及存储介质
WO2019114262A1 (zh) 加载用户界面的方法、智能电视及计算机可读存储介质
WO2020224247A1 (zh) 基于区块链的数据溯源方法、装置、设备及可读存储介质
WO2018149190A1 (zh) 组件调试方法、装置、设备和计算机可读存储介质
WO2019161597A1 (zh) 基于即时通讯的信息发送方法、装置、设备和存储介质
WO2017054592A1 (zh) 一种界面显示的方法及终端
WO2019024219A1 (zh) 文档自动生成方法、装置、文档自动生成器及介质
WO2019109521A1 (zh) 视频面签身份审核方法、装置、设备及可读存储介质
WO2019100531A1 (zh) 数字签名生成、验证方法及其设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18869015

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 23.09.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18869015

Country of ref document: EP

Kind code of ref document: A1