CN107704396A - The method of testing and device of application program - Google Patents

The method of testing and device of application program Download PDF

Info

Publication number
CN107704396A
CN107704396A CN201710999599.8A CN201710999599A CN107704396A CN 107704396 A CN107704396 A CN 107704396A CN 201710999599 A CN201710999599 A CN 201710999599A CN 107704396 A CN107704396 A CN 107704396A
Authority
CN
China
Prior art keywords
application program
test
health insurance
components
insurance application
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
CN201710999599.8A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201710999599.8A priority Critical patent/CN107704396A/en
Priority to PCT/CN2018/076553 priority patent/WO2019075973A1/en
Publication of CN107704396A publication Critical patent/CN107704396A/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/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

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

The invention discloses a kind of method of testing of application program and device, it is related to a kind of software testing technology field, main purpose is when the application program developed in existing insurance electron-like commercial product in wechat small routine carries out manual test, due to needing to input the data such as substantial amounts of ID card No., age, premium, product of insuring, pure artificial manual test can not meet the iteration speed of e-business product, also substantial amounts of human resources can be wasted, reduce the problem of testing effect.Main technical schemes:Judge to whether there is user interface UI component attributes of an element in health insurance application program under the test environment, the UI components element is the object for performing different UI component programs in the health insurance application program according to operation flow;If in the presence of, the trigger event of UI components according to corresponding to preset test code runs the attribute, and return to operation result.It is mainly used in the test of application program.

Description

The method of testing and device of application program
Technical field
The present invention relates to a kind of software testing technology field, more particularly to the method for testing and dress of a kind of application program Put.
Background technology
Operator is after the application program of exploitation e-business product, before listing, it is necessary to application program to exploitation Tested, to reduce the defects of e-business launch is likely to occur afterwards, avoid influenceing business public praise.In order to electricity Each function is tested in the application program of sub- commercial product, can be used and be tested manually.
At present, interaction platform of the wechat as a set multiple functions, can support the e-business of difference in functionality to produce Product are integrated, and e.g., wechat small routine is a kind of application program that need not be downloaded installation and operator can be used to develop, right When the application program that insurance electron-like commercial product is developed in wechat small routine is carrying out manual test, due to needing to input Data, the pure artificial manual tests such as substantial amounts of ID card No., age, premium, product of insuring can not meet electronics business The iteration speed of industry product, substantial amounts of human resources can be also wasted, reduce test effect.
The content of the invention
In view of this, the present invention provides a kind of method of testing and device of application program, and main purpose is existing insurance The application program that electron-like commercial product is developed in wechat small routine is when carrying out manual test, due to needing to input largely The data such as ID card No., age, premium, product of insuring, pure artificial manual test can not meet e-business product Iteration speed, can also waste substantial amounts of human resources, the problem of reducing test effect.
According to one aspect of the invention, there is provided a kind of method of testing of application program, including:
Judge to whether there is user interface UI component attributes of an element in health insurance application program under the test environment, it is described UI components element is the object that different UI component programs in the health insurance application program are performed according to operation flow;
If in the presence of, the trigger event of UI components according to corresponding to preset test code runs the attribute, and return to fortune Row result.
Further, it is described to judge to whether there is UI component attributes of an element in health insurance application program under the test environment Before, methods described also includes:
The connection between the terminal device of behavioral test is established and carried out, and the automation framework downloaded is installed respectively Sdk installation kits in Appium, expansible development platform Eclipse, Android system Android;
The test scene of health insurance application program is met according to the running environment configuration after installation, the test environment be by The test scene that different UI components elements are applicable is connected according to health insurance operation flow, obtained complete test scene.
Further, it is described to judge to whether there is UI component attributes of an element in health insurance application program under the test environment Before, methods described also includes:
Uiautomatorviewer instruments in the sdk are started by the terminal device, obtaining the health insurance should The attribute is replaced with the different UI components attributes of an element of program, and by the lookup parameter in preset test code.
Further, it is described to judge to whether there is UI component attributes of an element in health insurance application program under the test environment Including:
After the establishment that Appium is completed on Eclipse, jar installation procedures are configured, and judge in the terminal device Health insurance application program bottom code in whether there is with the operation flow matching UI component attributes of an element it is corresponding Code segment.
Further, after the establishment that Appium is completed on Eclipse, jar installation procedures are configured, and judge institute State in the health insurance application program bottom code in terminal device with the presence or absence of the UI component elements matched with the operation flow Attribute corresponding to after code segment, methods described also includes:
If in the absence of the corresponding code segment of the UI component attributes of an element that are matched with the operation flow, alarm letter is sent Cease, the unmatched information of UI components attribute of an element in the operation flow is carried in the warning information.
According to one aspect of the invention, there is provided a kind of test device of application program, including:
Judging unit, for judging to whether there is user interface UI component metadatas in health insurance application program under the test environment The attribute of element, the UI components element are to perform different UI component programs in the health insurance application program according to operation flow Object;
Running unit, if for judging user interface UI component attributes of an element, root in health insurance application program be present The trigger event of UI components corresponding to the attribute is run according to preset test code, and returns to operation result.
Further, described device also includes:
Unit is established, the connection between terminal device for establishing and carrying out behavioral test, and install downloaded respectively Automation framework Appium, expansible development platform Eclipse, the sdk installation kits in Android system Android;
Dispensing unit, for meeting the test scene of health insurance application program, institute according to the running environment configuration after installation It is that the test scene that different UI components elements are applicable is connected according to health insurance operation flow to state test environment, and what is obtained is complete Whole test scene.
Further, described device also includes:
Acquiring unit, for starting the uiautomatorviewer instruments in the sdk by the terminal device, obtain The different UI components attributes of an element of the health insurance application program are taken, and the lookup parameter in preset test code is replaced with The attribute.
Further, the judging unit, after the establishment specifically for completing Appium on Eclipse, jar is configured Installation procedure, and judge to whether there is and the operation flow in the health insurance application program bottom code in the terminal device Code segment corresponding to the UI component attributes of an element of matching.
Further, described device also includes:
Transmitting element, if if for judging in the absence of the UI component attributes of an element pair matched with the operation flow The code segment answered, then sent a warning message, and UI components attribute of an element in the operation flow is carried in the warning information Unmatched information.
According to another aspect of the invention, there is provided a kind of storage medium, being stored with least one in the storage medium can Execute instruction, the executable instruction make computing device be operated as corresponding to the method for testing of above-mentioned application program.
In accordance with a further aspect of the present invention, there is provided a kind of server, including:Processor, memory, communication interface and logical Believe bus, the processor, the memory and the communication interface complete mutual communication by the communication bus;
The memory is used to deposit an at least executable instruction, and the executable instruction makes the computing device above-mentioned Operated corresponding to the method for testing of application program.
By above-mentioned technical proposal, technical scheme provided in an embodiment of the present invention at least has following advantages:
The invention provides a kind of method of testing of application program and device, judges that health insurance should under the test environment first With whether there is user interface UI component attributes of an element in program, the UI components element be perform according to operation flow described in The object of different UI component programs in health insurance application program, if in the presence of according to the preset test code operation attribute pair The trigger event for the UI components answered, and return to operation result.With existing insurance electron-like commercial product in wechat small routine The application program of middle exploitation is when carrying out manual test, due to needing to input substantial amounts of ID card No., age, premium, insuring The data such as product, pure artificial manual test can not meet the iteration speed of e-business product, can also waste substantial amounts of Human resources, reduce test effect and compare, the embodiment of the present invention is corresponding to this attribute by searching UI component attributes of an element UI components according to it is preset test code perform triggering, realize the automatic test of the health insurance application program of wechat, avoid people For manual test, improve testing efficiency.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, And can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature and advantage can Become apparent, below especially exemplified by the embodiment of the present invention.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this area Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention Limitation.And in whole accompanying drawing, identical part is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 shows a kind of method of testing flow chart of application program provided in an embodiment of the present invention;
Fig. 2 shows the method for testing flow chart of another application program provided in an embodiment of the present invention;
Fig. 3 shows a kind of test device block diagram of application program provided in an embodiment of the present invention;
Fig. 4 shows the test device block diagram of another application program provided in an embodiment of the present invention;
Fig. 5 shows a kind of server schematic diagram provided in an embodiment of the present invention.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in accompanying drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
The embodiments of the invention provide a kind of method of testing of application program, as shown in figure 1, methods described includes:
101st, judge to whether there is user interface UI component attributes of an element in health insurance application program under the test environment.
Wherein, the UI components element is to perform different UI components journeys in the health insurance application program according to operation flow The object of sequence, the test environment be for the environment for the method for testing for performing current application program, can by automation framework, Expansible development platform etc. carries out environmental structure, due to needing to utilize the health insurance application journey in the wechat small routine in test machine Sequence is tested, therefore the test environment built needs the driver of installation and checkout machine system matches, if test machine is peace Zhuo Shouji, then need that the driving of Android system is installed, the embodiment of the present invention is not specifically limited.The health insurance application program can Think that insurance company is directed to the small routine for suitable for wechat sell health insurance product, can be the user using wechat Offer is insured convenient application program, specifically, the health insurance store that user passes through in wechat carries out identification card number, age, guarantor The input of information such as take, come health insurance product corresponding to searching, reduction is insured step, and raising is insured efficiency.The user interface UI components element includes health insurance application program component in itself and the component entered after health insurance application program, such as Button Button, CheckedTextView multiselects, RadioButton radio buttons, EditText user's input, TextView words show Show, the embodiment of the present invention is not specifically limited.
It should be noted that an element can correspond to one or more attributes, in general can be by this attribute only One property determines element, therefore, can find corresponding component by judging whether UI components attribute of an element, such as The attribute of Button button assemblies is index, text, both can correspond to Button button groups by index, text of acquisition Part.
If user interface UI component attributes of an element the 102, be present, it is corresponding that the attribute is run according to preset test code UI components trigger event, and return to operation result.
Wherein, the preset code is the code for the triggering different event for writing java voices in advance in jar environment, this Inventive embodiments are not specifically limited.The trigger event includes the trigger event of the scenes such as click, selection, typing, screen sliding, this Inventive embodiments are not specifically limited.The operation result includes normal operation and misoperation, and normal operation is to trigger thing Part triggers successfully, i.e., is operated corresponding to successful execution trigger event, and misoperation is trigger event triggering failure, i.e., can not hold Operated corresponding to row trigger event.
It should be noted that the test subject for currently performing application program is to be connected with performing the terminal device of behavioral test The PC ends connect, it can be server end, can also be client, the embodiment of the present invention is not specifically limited.Because health insurance should With the component that many difference in functionalitys in program be present, therefore, according to operation flow, it is necessary to each UI components attribute of an element Judged, circulation performs the method for testing of current application program, until all UI components elements corresponding to finishing service flow Judgement, operation flow is to trigger the order that corresponding component performs test in health insurance application program under different scenes, such as point After hitting button 1, into interface corresponding to button 1 after corresponding business be button 2, button 3, by that analogy, the embodiment of the present invention It is not specifically limited.In addition, in preset test code corresponding to execution, for clicking on, selecting what can be triggered with random arrangement Respective operations, each operation can also be performed according to certain order, can matched somebody with somebody in advance in preset test code for typing The information such as the word for needing typing, data are put out, to be directly called, the embodiment of the present invention is not specifically limited.
The invention provides a kind of method of testing of application program, with existing insurance electron-like commercial product in wechat The application program developed in small routine is when carrying out manual test, due to needing to input substantial amounts of ID card No., age, guarantor Take, data, the pure artificial manual test such as product of insuring can not meet the iteration speed of e-business product, can also waste Substantial amounts of human resources, reduce test effect and compare, the embodiment of the present invention is by searching UI component attributes of an element, to this category Property corresponding to UI components according to it is preset test code perform triggering, realize the automatic test of the health insurance application program of wechat, Artificial manual test is avoided, improves testing efficiency.
The embodiments of the invention provide the method for testing of another application program, as shown in Fig. 2 methods described includes:
201st, the connection between the terminal device of behavioral test is established and carried out, and the automation frame downloaded is installed respectively Sdk installation kits in frame Appium, expansible development platform Eclipse, Android system Android.
Wherein, the terminal device of the behavioral test is the test machine of installation wechat small routine, can be mobile phone, flat board electricity Brain, mobile phone simulator etc., the embodiment of the present invention is not specifically limited.In order to which the system that is applicable in test machine is, it is necessary to install test Drive system corresponding to machine, Appium, android-sdk bag, Eclipse can be downloaded directly automatic or manual, background system Directly installed according to the installation kit after download.
It should be noted that due to needing to perform the method for testing of automation, it is necessary to create Appium's on Eclipse Engineering, the series connection for needing progress operation flow, the Eclipse of download need to carry testng plug-in units.By establishing and eventually The connection of end equipment and the sdk installation kits installed in Appium, Eclipse, Android test Zuo Liao basic units standard for automatic perform It is standby, and most suitably used test environment is mounted with for health insurance application program, to improve test health insurance application journey in wechat The efficiency of sequence.
202nd, the test scene of health insurance application program is met according to the running environment configuration after installation.
Wherein, the test environment is to enter the test scene that different UI components elements are applicable according to health insurance operation flow Row series connection, obtained complete test scene.The health insurance operation flow is according to the insuring of insurance, inquired about, paying Order enter the prevalence of matching, can be set in advance by technical staff, the embodiment of the present invention is not specifically limited.It is described not The test scene being applicable with UI components element is the separate operation scene in health insurance operation flow, and it is two such as to insure with inquiry Individual independent business scenario, but for whole operation flow, if insuring preceding, for inquiry can be divided into inquiry Insure product information, and inquiry is not insured product information, if inquiry preceding, is only inquiry and not insured product information, therefore, Actual operation flow can be carried out with tree-shaped diagram form in test environment, but be directed in test environment, if in the presence of a survey Test-run a machine, multiple separate operation scenes can be connected, perform test operation according to a paths, after being finished, from the beginning The path of another series connection is performed, if more test machines be present, the path of multiple series connection can be tested simultaneously, the present invention Embodiment is not specifically limited.
It should be noted that the series connection of all single scenes can be completed by the testng plug-in units in Eclipse, obtain The complete test scene of whole business.For example, test program can just perform after typing warrantee information and success has been performed Typing health below informs case, if last scene perform have failed, scene case below would not be performed, be by After each single scene is finished, the test program of next corresponding operation flow is performed, so as to product process Test cases.
203rd, after the establishment that Appium is completed on Eclipse, jar installation procedures are configured, and judge that the terminal is set With the presence or absence of the UI component attributes of an element pair matched with the operation flow in health insurance application program bottom code in standby The code segment answered.
Wherein, the jar is the program bag for realizing difference in functionality, is judgment step to carry out testing writing for code Do back-office support, such as java-client-1.2.1.jar:Appium drivings are provided, start service, the method for conventional operation, selenium-api-2.41.0.jar:Start parameter setting during service end, the automatic test engine such as used, mobile phone behaviour Make system, the bag name of wechat small routine and appActiviy etc., testng.jar:Java programs are called by xml document, performed Test and output test result, the embodiment of the present invention is not specifically limited.In addition, the object of the judgement is specially health It whether there is code segment corresponding to UI component attributes of an element in dangerous application program bottom code, specifically, each UI component metadatas The attribute of element all has code segment corresponding to itself, and to realize corresponding function, the embodiment of the present invention is not specifically limited.
It should be noted that in order to distinguish the component for needing to test in different business flow, specifically need according to Business Stream The UI components identified in journey judge whether UI component attributes of an element, for example, in flow of insuring, can be each component Configuration identifier, to generate with sequential testing process, to judge that each UI components attribute of an element provides specific judgement pair As.
Further, before step 203, the embodiment of the present invention can also include:By described in terminal device startup Uiautomatorviewer instruments in sdk, the different UI components attributes of an element of the health insurance application program are obtained, and Lookup parameter in preset test code is replaced with into the attribute.
Wherein, the preset code of testing is the code for performing corresponding trigger event, the preset test code of in general In be configured with the parameter that can replace other attributes, as long as so as to modification corresponding to parameter i.e. may be used on other testing process In.
It should be noted that the testng plug-in units in Eclipse can be used for annotating, in order to which single scene is connected into Complete test scene.During the test cases of configuration product process, specifically, can be parameterized by dependence Each step is associated by form, so as to which all business are carried out into procedure, generates the test case of an entire flow Example, e.g. ,@Test are to explain, and dependsOnMethods is dependence, and productName is parametrization, for parameterizing, Dependence can be typing insurer (main warrantee) information:@Test (dependsOnMethods={ " testChooseProduct"})public void testInputApplicantInfo()throws InterruptedException{pp.testInputApplicantInfo(productName);, typing health is informed:@ Test (dependsOnMethods={ " testInputApplicantInfo " }) public void testHealthInform()throws InterruptedException{pp.testHealthInform (productName);, connected so as to which typing insurer information be informed with typing health.Wherein, parametrization refers to pre- The data configuration parameter that can be replaced in test code is put, as long as so that parameter corresponding to modification may be used on other test moulds In block, parameter of the dependence between the different test modules of connection so that a upper test module is held after having performed test Next test corresponding to row, so as to realize the series connection of operation flow.
If 204a, in the presence of the UI component attributes of an element matched with the operation flow, according to preset test code fortune The trigger event of UI components corresponding to the row attribute, and return to operation result.
This step is identical with step 101 method shown in Fig. 1, will not be repeated here.
It should be noted that, it is necessary to according to the survey in the embodiment of the present invention after the test result of a UI component is returned Next UI components are tested in try suddenly, with this repetitive cycling, until testing all UI components.For example, judge " it was found that " element Whether there is, the process of judgement be by search UI component propertys determine whether there is " it was found that " element, if in the presence of, Hit using preset test code execution point " it was found that " element, then judge that " small routine " element whether there is, if in the presence of clicking on " small routine " element, in search box typing " safety health insurance store ", search is clicked on, it is small to click on " safety health insurance store " Program name, into store homepage, then again each element in small routine is carried out the operation such as clicking on.
For the embodiment of the present invention, if the step 204b arranged side by side with step 204a, be not present matched with the operation flow UI component attributes of an element corresponding to code segment, then send a warning message.
Wherein, the unmatched information of UI components attribute of an element in the operation flow is carried in the warning information, The warning information can be bottom code prompting, can also be to send information alert etc., and the embodiment of the present invention does not do specific limit It is fixed.By sending a warning message, so that technical staff is adjusted and updated to abnormal UI components.
It should be noted that in testing results program, Appium will perform current test lead instruction code and be translated, These orders are changed into the form that test machine is appreciated that and are sent to test machine, i.e. test machine language, then test machine has performed These orders, such as click some button of wechat small routine, some values of typing, after implementing result returned to client.This A little instructions such as driver.findElement (By.xpath (" // * [@text=' discoveries '] ")) .click ();It is appreciated that For:Code when java is run, will generate a click " it was found that " order of menu, each behaviour to wechat small routine Make, be all an order, and these orders follow Webdriver agreements, Appium can also be assisted using Webdriver View, test machine can then be regarded by being engaged in the dialogue by identical communications protocol performs according to these orders are automatic.
The invention provides the method for testing of another application program, the embodiment of the present invention by establish Appium, Eclipse test environments, judge whether each UI components attribute of an element in complete test scene deposits according to operation flow Then trigger action is being performed to UI components corresponding to this attribute according to preset test code, is realizing that the health insurance of wechat should With the automatic test of program, without artificial manual test, tested, added with procedure, parameterized form automatic program execution Fast test speed, without artificial renewal test scene, so as to improve testing efficiency.
Further, as the realization to method shown in above-mentioned Fig. 1, the embodiments of the invention provide a kind of application program Test device, as shown in figure 3, the device includes:Judging unit 31, running unit 32.
Judging unit 31, for judging to whether there is user interface UI components in health insurance application program under the test environment Attribute of an element, the UI components element are to perform different UI component programs in the health insurance application program according to operation flow Object;The judging unit 31 performs for the test device of application program to be judged in health insurance application program under the test environment With the presence or absence of the functional module of user interface UI component attributes of an element.
Running unit 32, if judging user interface UI component elements in health insurance application program be present for judging unit 31 Attribute, then according to corresponding to preset test code runs the attribute UI components trigger event, and return to operation result.Institute State the test device that running unit 32 is application program and perform and judge user interface UI component metadatas in health insurance application program be present The attribute of element, then according to corresponding to preset test code runs the attribute UI components trigger event, and return to operation result Functional module.
The invention provides a kind of method of testing of application program, with existing insurance electron-like commercial product in wechat The application program developed in small routine is when carrying out manual test, due to needing to input substantial amounts of ID card No., age, guarantor Take, data, the pure artificial manual test such as product of insuring can not meet the iteration speed of e-business product, can also waste Substantial amounts of human resources, reduce test effect and compare, the embodiment of the present invention is by searching UI component attributes of an element, to this category Property corresponding to UI components according to it is preset test code perform triggering, realize the automatic test of the health insurance application program of wechat, Artificial manual test is avoided, improves testing efficiency.
Further, as the realization to method shown in above-mentioned Fig. 2, the embodiments of the invention provide another application program Test device, as shown in figure 4, the device includes:Judging unit 41, running unit 42, establish unit 43, dispensing unit 44, Transmitting element 46.
Judging unit 41, for judging to whether there is user interface UI components in health insurance application program under the test environment Attribute of an element, the UI components element are to perform different UI component programs in the health insurance application program according to operation flow Object;
Running unit 42, if judging user interface UI component elements in health insurance application program be present for judging unit 41 Attribute, then according to corresponding to preset test code runs the attribute UI components trigger event, and return to operation result.
Further, described device also includes:
Unit 43 is established, the connection between terminal device for establishing and carrying out behavioral test, and under installing respectively Sdk installation kits in the automation framework Appium of load, expansible development platform Eclipse, Android system Android;
Dispensing unit 44, for meeting the test scene of health insurance application program according to the running environment configuration after installation, The test environment is that the test scene that different UI components elements are applicable is connected according to health insurance operation flow, is obtained Complete test scene.
Further, described device also includes:
Acquiring unit 45, for starting the uiautomatorviewer instruments in the sdk by the terminal device, The different UI components attributes of an element of the health insurance application program are obtained, and the lookup parameter in preset test code is replaced For the attribute.
The judging unit 41, after the establishment specifically for completing Appium on Eclipse, configuration jar installation journeys Sequence, and judge to whether there is what is matched with the operation flow in the health insurance application program bottom code in the terminal device Code segment corresponding to UI component attributes of an element.
Further, described device also includes:
Transmitting element 46, if judging for judging unit 41 in the absence of the UI component elements matched with the operation flow Code segment corresponding to attribute, then sent a warning message, and UI components element in the operation flow is carried in the warning information The unmatched information of attribute.
The invention provides the test device of another application program, the embodiment of the present invention by establish Appium, Eclipse test environments, judge whether each UI components attribute of an element in complete test scene deposits according to operation flow Then trigger action is being performed to UI components corresponding to this attribute according to preset test code, is realizing that the health insurance of wechat should With the automatic test of program, without artificial manual test, tested, added with procedure, parameterized form automatic program execution Fast test speed, without artificial renewal test scene, so as to improve testing efficiency.
Based on above-mentioned method as shown in Figure 1, accordingly, the embodiment of the present invention additionally provides a kind of computer-readable storage medium Matter, computer program is stored thereon with, the program realizes following steps when being executed by processor:Health is judged under the test environment It whether there is user interface UI component attributes of an element in dangerous application program, the UI components element is to be performed according to operation flow The object of different UI component programs in the health insurance application program;If in the presence of according to the preset test code operation category The trigger event of UI components corresponding to property, and return to operation result.
Embodiment based on above-mentioned method as shown in Figure 1 and device as shown in Figure 3, the one of one embodiment of the invention offer The structural representation of kind server, as shown in figure 5, the specific embodiment of the invention is not limited the specific implementation of terminal.
As shown in figure 5, the server can include:Processor (processor) 51, communication interface (Communications Interface) 52, memory (memory) 53 and communication bus 54.Wherein:Processor 51, lead to Letter interface 52 and memory 53 complete mutual communication by communication bus 54.Communication interface 54, is used for and miscellaneous equipment Such as the network element communication of client or other servers etc..Processor 51, for configuration processor, it can specifically perform above-mentioned application Correlation step in the method for testing embodiment of program.Specifically, program can include program code, and the program code includes meter Calculation machine operational order.Processor 51 is probably central processor CPU, or specific integrated circuit ASIC (Application Specific Integrated Circuit), or it is arranged to implement the integrated electricity of one or more of the embodiment of the present invention Road.
The one or more processors that terminal includes, can be same type of processor, such as one or more CPU; Can be different types of processor, such as one or more CPU and one or more ASIC.Memory 53, for depositing journey Sequence.Memory 53 may include high-speed RAM memory, it is also possible to also including nonvolatile memory (non-volatile Memory), a for example, at least magnetic disk storage.Program specifically can be used for so that processor 51 performs following operation:Surveying Test ring border judges to whether there is user interface UI component attributes of an element in health insurance application program, and the UI components element is The object of different UI component programs in the health insurance application program is performed according to operation flow;If in the presence of according to preset survey Try code and run the trigger event of UI components corresponding to the attribute, and return to operation result.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein. Various general-purpose systems can also be used together with teaching based on this.As described above, required by constructing this kind of system Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that it can utilize various Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the specification that this place provides, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention Example can be put into practice in the case of these no details.In some instances, known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand one or more of each inventive aspect, Above in the description to the exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor The application claims of shield features more more than the feature being expressly recited in each claim.It is more precisely, such as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following embodiment are expressly incorporated in the embodiment, wherein each claim is in itself Separate embodiments all as the present invention.
Those skilled in the art, which are appreciated that, to be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit exclude each other, it can use any Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so to appoint Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power Profit requires, summary and accompanying drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation Replace.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed One of meaning mode can use in any combination.
The all parts embodiment of the present invention can be realized with hardware, or to be run on one or more processor Software module realize, or realized with combinations thereof.It will be understood by those of skill in the art that it can use in practice Microprocessor or digital signal processor (DSP) realize the method for testing of application program according to embodiments of the present invention and dress The some or all functions of some or all parts in putting.The present invention is also implemented as described here for performing Method some or all equipment or program of device (for example, computer program and computer program product).This The program of the realization present invention of sample can store on a computer-readable medium, or can have one or more signal Form.Such signal can be downloaded from internet website and obtained, and either be provided or with any other on carrier signal Form provides.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of some different elements and being come by means of properly programmed computer real It is existing.In if the unit claim of equipment for drying is listed, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame Claim.

Claims (10)

  1. A kind of 1. method of testing of application program, it is characterised in that including:
    Judge to whether there is user interface UI component attributes of an element, the UI groups in health insurance application program under the test environment Part element is the object that different UI component programs in the health insurance application program are performed according to operation flow;
    If in the presence of, the trigger event of UI components according to corresponding to preset test code runs the attribute, and return to operation knot Fruit.
  2. 2. according to the method for claim 1, it is characterised in that described to judge under the test environment in health insurance application program Before UI component attributes of an element, methods described also includes:
    The connection between the terminal device of behavioral test is established and carried out, and the automation framework downloaded is installed respectively Sdk installation kits in Appium, expansible development platform Eclipse, Android system Android;
    Meet the test scene of health insurance application program according to the running environment configuration after installation, the test environment is according to strong Health danger operation flow is connected the test scene that different UI components elements are applicable, obtained complete test scene.
  3. 3. according to the method for claim 2, it is characterised in that described to judge under the test environment in health insurance application program Before UI component attributes of an element, methods described also includes:
    Uiautomatorviewer instruments in the sdk are started by the terminal device, obtain the health insurance application journey The different UI components attributes of an element of sequence, and the lookup parameter in preset test code is replaced with into the attribute.
  4. 4. according to the method for claim 3, it is characterised in that described to judge under the test environment in health insurance application program Include with the presence or absence of UI component attributes of an element:
    After the establishment that Appium is completed on Eclipse, jar installation procedures are configured, and are judged strong in the terminal device It whether there is code corresponding with the UI component attributes of an element of operation flow matching in the application program bottom code of health danger Section.
  5. 5. according to the method for claim 4, it is characterised in that after the establishment that Appium is completed on Eclipse, Configure jar installation procedures, and judge in the health insurance application program bottom code in the terminal device whether there is with it is described After code segment corresponding to the UI component attributes of an element of operation flow matching, methods described also includes:
    If in the absence of the corresponding code segment of the UI component attributes of an element that are matched with the operation flow, send a warning message, The unmatched information of UI components attribute of an element in the operation flow is carried in the warning information.
  6. A kind of 6. test device of application program, it is characterised in that including:
    Judging unit, for judging under the test environment in health insurance application program with the presence or absence of user interface UI component elements Attribute, the UI components element are pair that different UI component programs in the health insurance application program are performed according to operation flow As;
    Running unit, if judging to exist and the business in the health insurance application program in the terminal device for judging unit The UI component attributes of an element of flow path match, then according to corresponding to preset test code runs the attribute UI components triggering thing Part, and return to operation result.
  7. 7. device according to claim 6, it is characterised in that described device also includes:
    Establish unit, the connection between terminal device for establishing and carrying out behavioral test, and install respectively downloaded from Sdk installation kits in dynamicization framework Appium, expansible development platform Eclipse, Android system Android;
    Dispensing unit, for meeting the test scene of health insurance application program, the survey according to the running environment configuration after installation Test ring border is that the test scene that different UI components elements are applicable is connected according to health insurance operation flow, obtained complete survey Examination hall scape.
  8. 8. device according to claim 7, it is characterised in that described device also includes:
    Acquiring unit, for starting the uiautomatorviewer instruments in the sdk by the terminal device, obtain institute State the different UI components attributes of an element of health insurance application program, and the lookup parameter in preset test code replaced with described Attribute.
  9. 9. a kind of storage medium, an at least executable instruction is stored with the storage medium, the executable instruction makes processing Device performs operation corresponding to the method for testing of the application program as any one of claim 1-5.
  10. 10. a kind of server, including:Processor, memory, communication interface and communication bus, the processor, the memory Mutual communication is completed by the communication bus with the communication interface;
    The memory is used to deposit an at least executable instruction, and the executable instruction makes the computing device such as right will Ask and operated corresponding to the method for testing of the application program any one of 1-5.
CN201710999599.8A 2017-10-20 2017-10-20 The method of testing and device of application program Pending CN107704396A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710999599.8A CN107704396A (en) 2017-10-20 2017-10-20 The method of testing and device of application program
PCT/CN2018/076553 WO2019075973A1 (en) 2017-10-20 2018-02-12 Application program testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710999599.8A CN107704396A (en) 2017-10-20 2017-10-20 The method of testing and device of application program

Publications (1)

Publication Number Publication Date
CN107704396A true CN107704396A (en) 2018-02-16

Family

ID=61182184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710999599.8A Pending CN107704396A (en) 2017-10-20 2017-10-20 The method of testing and device of application program

Country Status (2)

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

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415844A (en) * 2018-03-22 2018-08-17 北京奇虎科技有限公司 Plug-in unit adjustment method and device
CN108920366A (en) * 2018-06-28 2018-11-30 腾讯科技(深圳)有限公司 One seed application adjustment method, apparatus and system
CN108959047A (en) * 2018-06-11 2018-12-07 北京奇安信科技有限公司 A kind of method for testing pressure and device based on business scenario
CN109376093A (en) * 2018-12-04 2019-02-22 泰康保险集团股份有限公司 The test method and device of insurance products, storage medium and electronic equipment
CN109815119A (en) * 2018-12-14 2019-05-28 平安科技(深圳)有限公司 A kind of test method and device of APP link channel
CN110287122A (en) * 2019-06-29 2019-09-27 广州华多网络科技有限公司 A kind of automated testing method, device, terminal and storage medium
CN110389886A (en) * 2018-04-16 2019-10-29 腾讯科技(深圳)有限公司 A kind of additional function test method, device and the storage medium of main body application program
CN110401665A (en) * 2019-07-30 2019-11-01 四川虹魔方网络科技有限公司 The wechat of unified entrance authenticates api interface implementation method
CN110750463A (en) * 2019-10-29 2020-02-04 百度在线网络技术(北京)有限公司 Applet testing method, device, system, equipment and medium
CN110928791A (en) * 2019-11-27 2020-03-27 腾讯科技(深圳)有限公司 Program testing method, program testing device, computer equipment and storage medium
CN111127223A (en) * 2019-11-25 2020-05-08 泰康保险集团股份有限公司 Insurance product testing method and device and storage medium
CN112786034A (en) * 2019-11-08 2021-05-11 阿里巴巴集团控股有限公司 Voice interaction method, device, equipment and storage medium
CN116361196A (en) * 2023-06-01 2023-06-30 北京轻松筹信息技术有限公司 Method, device and equipment for testing application flow and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521120A (en) * 2011-11-16 2012-06-27 中国民航信息网络股份有限公司 Software automation test system and method
CN103309797A (en) * 2012-03-09 2013-09-18 阿里巴巴集团控股有限公司 Automatic testing method and device of user interface
WO2015000398A1 (en) * 2013-07-02 2015-01-08 Tencent Technology (Shenzhen) Company Limited Systems and methods for testing terminal applications
CN104978266A (en) * 2014-04-11 2015-10-14 腾讯科技(深圳)有限公司 Application test method and device
CN106776344A (en) * 2017-01-16 2017-05-31 上海聚宝网络科技股份有限公司 A kind of automated testing method of the intelligent express delivery cabinet based on APPIUM

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9021442B2 (en) * 2013-02-13 2015-04-28 Sap Se Dynamic scenario testing of web application
CN104794050B (en) * 2014-01-21 2018-09-18 腾讯科技(深圳)有限公司 The test method of application program, apparatus and system
CN106445816B (en) * 2016-09-07 2019-01-25 美的智慧家居科技有限公司 Control executes method and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521120A (en) * 2011-11-16 2012-06-27 中国民航信息网络股份有限公司 Software automation test system and method
CN103309797A (en) * 2012-03-09 2013-09-18 阿里巴巴集团控股有限公司 Automatic testing method and device of user interface
WO2015000398A1 (en) * 2013-07-02 2015-01-08 Tencent Technology (Shenzhen) Company Limited Systems and methods for testing terminal applications
CN104978266A (en) * 2014-04-11 2015-10-14 腾讯科技(深圳)有限公司 Application test method and device
CN106776344A (en) * 2017-01-16 2017-05-31 上海聚宝网络科技股份有限公司 A kind of automated testing method of the intelligent express delivery cabinet based on APPIUM

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415844A (en) * 2018-03-22 2018-08-17 北京奇虎科技有限公司 Plug-in unit adjustment method and device
CN110389886A (en) * 2018-04-16 2019-10-29 腾讯科技(深圳)有限公司 A kind of additional function test method, device and the storage medium of main body application program
CN110389886B (en) * 2018-04-16 2021-08-03 腾讯科技(深圳)有限公司 Additional function testing method and device of main application program and storage medium
CN108959047A (en) * 2018-06-11 2018-12-07 北京奇安信科技有限公司 A kind of method for testing pressure and device based on business scenario
CN108959047B (en) * 2018-06-11 2022-05-03 奇安信科技集团股份有限公司 Pressure testing method and device based on service scene
CN108920366B (en) * 2018-06-28 2020-09-29 腾讯科技(深圳)有限公司 Sub-application debugging method, device and system
CN108920366A (en) * 2018-06-28 2018-11-30 腾讯科技(深圳)有限公司 One seed application adjustment method, apparatus and system
CN109376093A (en) * 2018-12-04 2019-02-22 泰康保险集团股份有限公司 The test method and device of insurance products, storage medium and electronic equipment
CN109376093B (en) * 2018-12-04 2022-02-01 泰康保险集团股份有限公司 Insurance product testing method and device, storage medium and electronic equipment
CN109815119A (en) * 2018-12-14 2019-05-28 平安科技(深圳)有限公司 A kind of test method and device of APP link channel
CN110287122A (en) * 2019-06-29 2019-09-27 广州华多网络科技有限公司 A kind of automated testing method, device, terminal and storage medium
CN110287122B (en) * 2019-06-29 2023-08-11 广州华多网络科技有限公司 Automatic test method, device, terminal and storage medium
CN110401665B (en) * 2019-07-30 2021-06-22 四川虹魔方网络科技有限公司 Method for realizing WeChat authentication API interface of unified entry
CN110401665A (en) * 2019-07-30 2019-11-01 四川虹魔方网络科技有限公司 The wechat of unified entrance authenticates api interface implementation method
CN110750463A (en) * 2019-10-29 2020-02-04 百度在线网络技术(北京)有限公司 Applet testing method, device, system, equipment and medium
CN112786034A (en) * 2019-11-08 2021-05-11 阿里巴巴集团控股有限公司 Voice interaction method, device, equipment and storage medium
CN112786034B (en) * 2019-11-08 2023-04-07 阿里巴巴集团控股有限公司 Voice interaction method, device, equipment and storage medium
CN111127223A (en) * 2019-11-25 2020-05-08 泰康保险集团股份有限公司 Insurance product testing method and device and storage medium
CN110928791A (en) * 2019-11-27 2020-03-27 腾讯科技(深圳)有限公司 Program testing method, program testing device, computer equipment and storage medium
CN116361196A (en) * 2023-06-01 2023-06-30 北京轻松筹信息技术有限公司 Method, device and equipment for testing application flow and readable storage medium

Also Published As

Publication number Publication date
WO2019075973A1 (en) 2019-04-25

Similar Documents

Publication Publication Date Title
CN107704396A (en) The method of testing and device of application program
US8428813B2 (en) Dynamic decision sequencing method and apparatus for optimizing a diagnostic test plan
CN104765692B (en) Method and apparatus for automatic test software
CN106844217A (en) Control to applying bury method and device, readable storage medium storing program for executing a little
CN109446071A (en) Interface test method, interface test device, electronic equipment and storage medium
CN110276074B (en) Distributed training method, device, equipment and storage medium for natural language processing
CN103714002B (en) Project testing method and device based on configuration system
CN109165170A (en) A kind of method and system automating request for test
CN109977012B (en) Joint debugging test method, device, equipment and computer readable storage medium of system
CN106843976A (en) Method and apparatus for generating image file
EP3786851A1 (en) Method and apparatus for providing recommendations for completion of an engineering project
CN112034819A (en) Vehicle diagnosis method, vehicle diagnosis device and diagnosis equipment
CN106126425B (en) Function traversal method and system based on Android automated test frame
CN107656860A (en) Performance test methods, apparatus and system
CN110135940A (en) Kitchen order display device and method afterwards
CN116756046B (en) Automatic interface testing method, device, equipment and storage medium
US11893383B2 (en) Configuration properties management for software
CN111897725A (en) Automatic test method, medium, equipment and system for middle platform service
CN111797152A (en) Data scene generation method and device and computer equipment
CN115935089A (en) RPA technology-based boarding point recommendation optimization method and system
CN115934513A (en) Demand analysis and test design adaptation method, device, equipment and medium
CN112765041B (en) Game automation testing method and device and electronic equipment
CN115437617A (en) Vehicle control code automatic generation method and device, storage medium and electronic equipment
CN114527993A (en) Application deployment method, device, equipment and medium
CN115269285A (en) Test method and device, equipment and computer readable storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180216

RJ01 Rejection of invention patent application after publication