CN110119354A - Method for testing software, device and electronic equipment based on Test cases technology - Google Patents

Method for testing software, device and electronic equipment based on Test cases technology Download PDF

Info

Publication number
CN110119354A
CN110119354A CN201910317800.9A CN201910317800A CN110119354A CN 110119354 A CN110119354 A CN 110119354A CN 201910317800 A CN201910317800 A CN 201910317800A CN 110119354 A CN110119354 A CN 110119354A
Authority
CN
China
Prior art keywords
software
information
tested
test
data
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
CN201910317800.9A
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 Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201910317800.9A priority Critical patent/CN110119354A/en
Publication of CN110119354A publication Critical patent/CN110119354A/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)
  • Debugging And Monitoring (AREA)

Abstract

Present invention discloses a kind of method for testing software based on Test cases technology, device and electronic equipments.The described method includes: the software identification for including in identification software test instruction;Obtain the target software information of the corresponding software to be tested of software identification;The recalls information of software to be tested is read from target software information;Building and the matched simulated object of object invocation object information;Test software is treated by analogue data to be tested.Under the method, Test cases technology technology in the test case of test based on research and development management, it can determine the object that software to be tested needs to call, and the simulated object for the content building and the object matching that can be exported according to object, so that the simulated object can provide the data needed to software to be tested, data loss that may be present or situations such as damage in transmission process is avoided, ensure that the correctness for the data that software to be tested obtains.The accuracy of software test can be improved in the technical program.

Description

Method for testing software, device and electronic equipment based on Test cases technology
Technical field
The present invention relates to software testing technology field, in particular to a kind of software test side based on Test cases technology Method, device and electronic equipment.
Background technique
Currently, there may be various problems after developing for software, it is therefore desirable to which tester is to software It is tested, and software online could provide stable service for user only after through test.
In the realization of the prior art, special testing tool can be used, software is tested.However, in practice It was found that the data that Current software may need to get during the test other software transmission could operate normally, if its The data of his software transmission occur to lose, when damage, then Current software is just unable to operate normally, so as to cause this Software test result inaccuracy.
Summary of the invention
In order to solve the technical problem of software test result inaccuracy present in the relevant technologies, the present invention provides one kind Method for testing software, device and electronic equipment based on Test cases technology.
First aspect of the embodiment of the present invention discloses a kind of method for testing software based on Test cases technology, the method packet It includes:
When detecting software test instruction, the software identification for including in the software test instruction is identified;
Obtain the target software information of the corresponding software to be tested of the software identification;
The recalls information of the software to be tested is read from the target software information, includes institute in the recalls information It states in the object invocation software information and the object invocation software information that software to be tested needs to call during the test Object invocation object information;
Building and the matched simulated object of object invocation object information, so that the simulation number of simulated object output It is matched according to the object invocation object information;
The software to be tested is tested by the analogue data.
As an alternative embodiment, in first aspect of the embodiment of the present invention, it is described to obtain the software identification The target software information of corresponding software to be tested, comprising:
Detect whether the target software information for being previously stored with software to be tested corresponding with the software identification;
If so, obtaining the target software information;
If not, determining the software interface of the software to be tested;
The target software information of the software to be tested is obtained by the software interface, and stores the target software letter Breath.
As an alternative embodiment, in first aspect of the embodiment of the present invention, it is described to pass through the software interface The target software information of the software to be tested is obtained, and stores the target software information, comprising:
Information request instruction is sent to the software to be tested by the software interface, the information request instruction is used for So that the software to be tested is obtained software development document, and feeds back the software development document;
When receiving the software development document of the software feedback to be tested, the software development document is determined For the target software information of the software to be tested, and store the target software information.
As an alternative embodiment, in first aspect of the embodiment of the present invention, the method also includes:
When detecting software information more new command, the software to be updated for including in the software information more new command is obtained Mark and software information to be updated;
Search and the matched target of software identification to be updated software to be updated from pre-stored all software informations Information;
The software information to be updated is added in target software information to be updated, updated target is obtained and waits for Update software information.
As an alternative embodiment, in first aspect of the embodiment of the present invention, it is described to believe from the target software The recalls information of the software to be tested is read in breath, comprising:
The data transmission information of the software to be tested, the data transmission information are obtained from the target software information The first data information and received second data information of the software to be tested including the software output to be tested;
The object invocation software that data are sent to the software to be tested, Yi Jishi are determined from second data information The object invocation object of data is sent in the not described object invocation software to the software to be tested;
The recalls information of the software to be tested, institute are generated according to the object invocation software and the object invocation object State the object invocation software information in recalls information comprising the object invocation software and the institute in the object invocation software State the object invocation object information of object invocation object.
As an alternative embodiment, in first aspect of the embodiment of the present invention, the building and the target tune With the matched simulated object of object information, so that the analogue data and the object invocation object information of simulated object output Matching, comprising:
It identifies the calling data information for including in the object invocation object information, includes tune in the calling data information With the field quantity of data and the parameter information of each field, the parameter information includes at least the field type of the field With field boundaries value;
According to the calling data information construct simulated object so that the simulated object output data information with it is described Call data information identical.
As an alternative embodiment, in first aspect of the embodiment of the present invention, it is described to pass through the analogue data After testing the software to be tested, the method also includes:
Obtain the test result of the software to be tested;
Judge whether the test result is within the scope of default normal data;
If so, determining that the software to be tested passes through test;
If not, the problem of software to be tested is positioned according to the test result, and generated and surveyed according to described problem Examination report.
Second aspect of the embodiment of the present invention discloses a kind of software testing device based on Test cases technology, described device packet It includes:
Recognition unit, for when detecting software test instruction, identifying the software for including in the software test instruction Mark;
Acquiring unit, for obtaining the target software information of the corresponding software to be tested of the software identification;
Reading unit, for reading the recalls information of the software to be tested, the tune from the target software information With the object invocation software information and the target tune for needing to call during the test comprising the software to be tested in information With the object invocation object information in software information;
Construction unit, for building and the matched simulated object of object invocation object information, so that the simulation pair As the analogue data of output is matched with the object invocation object information;
Test cell, for being tested by the analogue data the software to be tested.
The third aspect of the embodiment of the present invention discloses a kind of electronic equipment, and the electronic equipment includes:
Processor;
Memory is stored with computer-readable instruction on the memory, and the computer-readable instruction is by the processing When device executes, foregoing method is realized.
Fourth aspect of the embodiment of the present invention discloses a kind of computer readable storage medium, stores computer program, described Computer program makes computer realize foregoing method.
The technical solution that the embodiment of the present invention provides can include the following benefits:
Display control method provided by the present invention includes the following steps, when detecting software test instruction, identifies soft The software identification for including in part test instruction;Obtain the target software information of the corresponding software to be tested of software identification;From target The recalls information of software to be tested is read in software information, needs to adjust during the test comprising software to be tested in recalls information Object invocation object information in object invocation software information and object invocation software information;Building and object invocation object The simulated object of information matches, so that the analogue data of simulated object output is matched with object invocation object information;Pass through simulation Data are treated test software and are tested.
Under the method, based on research and development management test test case in Test cases technology technology, can determine to Test software needs the object called, and the simulated object for the content building and the object matching that can be exported according to object, with So that the simulated object is provided the data needed to software to be tested, avoids that data are that may be present in transmission process to lose Situations such as losing or damaging, ensure that the correctness for the data that software to be tested obtains, to ensure that software test result just True property.To sum up, the accuracy of software test is improved.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited Invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and in specification together principle for explaining the present invention.
Fig. 1 is a kind of schematic diagram of device shown according to an exemplary embodiment;
Fig. 2 is a kind of process of method for testing software based on Test cases technology shown according to an exemplary embodiment Figure;
Fig. 3 is a kind of stream of the method for testing software based on Test cases technology shown according to another exemplary embodiment Cheng Tu;
Fig. 4 is a kind of frame of software testing device based on Test cases technology shown according to an exemplary embodiment Figure;
Fig. 5 is a kind of frame of the software testing device based on Test cases technology shown according to another exemplary embodiment Figure.
Specific embodiment
Here will the description is performed on the exemplary embodiment in detail, the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Implementation environment of the invention can be electronic equipment, such as tablet computer, desktop computer, laptop etc..
Fig. 1 is a kind of schematic diagram of device shown according to an exemplary embodiment.Device 100 can be above-mentioned portable shifting Dynamic equipment.As shown in Figure 1, device 100 may include following one or more components: processing component 102, memory 104, power supply Component 106, multimedia component 108, audio component 110, sensor module 114 and communication component 116.
The integrated operation of the usual control device 100 of processing component 102, such as with display, telephone call, data communication, phase Machine operation and the associated operation of record operation etc..Processing component 102 may include one or more processors 118 to execute Instruction, to complete all or part of the steps of following methods.In addition, processing component 102 may include one or more modules, For convenient for the interaction between processing component 102 and other assemblies.For example, processing component 102 may include multi-media module, use In to facilitate the interaction between multimedia component 108 and processing component 102.
Memory 104 is configured as storing various types of data to support the operation in device 100.These data are shown Example includes the instruction of any application or method for operating on the device 100.Memory 104 can be by any kind of Volatibility or non-volatile memory device or their combination are realized, such as static random access memory (Static Random Access Memory, abbreviation SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, abbreviation EEPROM), Erasable Programmable Read Only Memory EPROM (Erasable Programmable Read Only Memory, abbreviation EPROM), programmable read only memory (Programmable Red- Only Memory, abbreviation PROM), read-only memory (Read-Only Memory, abbreviation ROM), magnetic memory, flash Device, disk or CD.It is also stored with one or more modules in memory 104, is configured to for the one or more module It is executed by the one or more processors 118, to complete all or part of step in method as follows.
Power supply module 106 provides electric power for the various assemblies of device 100.Power supply module 106 may include power management system System, one or more power supplys and other with for device 100 generate, manage, and distribute the associated component of electric power.
Multimedia component 108 includes the screen of one output interface of offer between described device 100 and user.One In a little embodiments, screen may include liquid crystal display (Liquid Crystal Display, abbreviation LCD) and touch panel. If screen includes touch panel, screen may be implemented as touch screen, to receive input signal from the user.Touch panel Including one or more touch sensors to sense the gesture on touch, slide, and touch panel.The touch sensor can be with The boundary of a touch or slide action is not only sensed, but also detects duration associated with the touch or slide operation and pressure Power.Screen can also include display of organic electroluminescence (Organic Light Emitting Display, abbreviation OLED).
Audio component 110 is configured as output and/or input audio signal.For example, audio component 110 includes a Mike Wind (Microphone, abbreviation MIC), when device 100 is in operation mode, such as call model, logging mode and speech recognition mould When formula, microphone is configured as receiving external audio signal.The received audio signal can be further stored in memory 104 or via communication component 116 send.In some embodiments, audio component 110 further includes a loudspeaker, for exporting Audio signal.
Sensor module 114 includes one or more sensors, and the state for providing various aspects for device 100 is commented Estimate.For example, sensor module 114 can detecte the state that opens/closes of device 100, the relative positioning of component, sensor group Part 114 can be with the position change of 100 1 components of detection device 100 or device and the temperature change of device 100.Some In embodiment, which can also include Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 116 is configured to facilitate the communication of wired or wireless way between device 100 and other equipment.Device 100 can access the wireless network based on communication standard, such as WiFi (Wireless-Fidelity, Wireless Fidelity).Show at one In example property embodiment, communication component 116 receives broadcast singal or broadcast from external broadcasting management system via broadcast channel Relevant information.In one exemplary embodiment, the communication component 116 further includes near-field communication (Near Field Communication, abbreviation NFC) module, for promote short range communication.For example, radio frequency identification can be based in NFC module (Radio Frequency Identification, abbreviation RFID) technology, Infrared Data Association (Infrared Data Association, abbreviation IrDA) technology, ultra wide band (Ultra Wideband, abbreviation UWB) technology, Bluetooth technology and other skills Art is realized.
In the exemplary embodiment, device 100 can be by one or more application specific integrated circuit (Application Specific Integrated Circuit, abbreviation ASIC), it is digital signal processor, digital signal processing appts, programmable Logical device, field programmable gate array, controller, microcontroller, microprocessor or other electronic components are realized, for executing Following methods.
Fig. 2 is a kind of process of method for testing software based on Test cases technology shown according to an exemplary embodiment Figure.As shown in Fig. 2, the method includes the following steps.
Step 201, when detecting software test instruction, identification software tests the software identification for including in instruction.
In the embodiment of the present invention, software test instruction can be what software to be tested was sent to test software, be also possible to The software test instruction of tester's input, in addition, may include in software test instruction needs software to be tested to be tested Software identification can uniquely determine a software to be tested by the software identification, to guarantee to determine by software identification Software to be tested accuracy.
Step 202, the target software information of the corresponding software to be tested of software identification is obtained.
In the embodiment of the present invention, the target software information of software to be tested can directly be obtained from the memory of test software Pre-stored target software information is got, target software information can also be transmitted to by network by survey by software to be tested Try software.Since developer may go out new function based on software development to be tested, the same software to be tested can It can need to carry out multiple software test, therefore test software is treat for the first time can be to be tested by this when test software is tested The target software information of software is stored, so that follow-up test software can be straight when testing again the software to be tested It connects and gets pre-stored target software information from memory, improve the speed of target software acquisition of information.
Step 203, the recalls information of software to be tested is read from target software information, comprising to be measured in the recalls information The object invocation pair in object invocation software information and object invocation software information that examination software needs to call during the test Image information.
In the embodiment of the present invention, recalls information may include software to be tested need in the process of running using arrive other The data of software, therefore software to be tested needs to call and arrives other software, wherein software to be tested needs the other software called Software information can be determined as recalls information;Further, software to be tested can be with from the data of object invocation software transfer It is that any object generation in object invocation software therefore can also be comprising generating in recalls information in object invocation software The information of the object invocation object of the data of software transfer to be tested.
Step 204, building and the matched simulated object of object invocation object information, so that the simulation number of simulated object output It is matched according to object invocation object information.
In the embodiment of the present invention, the data of object invocation object output can be software to be tested and correctly run, therefore, According to the data of the simulated object output of object invocation object information building it is also required to that software to be tested is enable correctly to run, Therefore the data information of the analogue data of simulated object output can be identical as object invocation object information.
Step 205, test software is treated by analogue data to be tested.
As an alternative embodiment, after step 205, following steps can also be performed:
Obtain the test result of software to be tested;
Judge whether test result is within the scope of default normal data;
If so, determining that software to be tested passes through test;
If not, the problem of software to be tested is positioned according to test result, and test report is generated according to problem.
Wherein, implement this embodiment, test software can be treated and analyzed according to the result that analogue data is run, If operation result meets the requirements, it may be considered that software to be tested is tested by this;If operation result is undesirable, It may be considered that in software to be tested, there are problems, in addition, eating what software can also be to be tested according to operation result analyzing and positioning The position to go wrong in software improves the intelligence of software test to generate test report according to the problem.
In the method depicted in fig. 2, data loss that may be present or situations such as damage in transmission process is avoided, It ensure that the correctness for the data that software to be tested obtains improves software to ensure that the correctness of software test result The accuracy of test.In addition, implementing method described in Fig. 2, the intelligence of software test is improved.
Fig. 3 is a kind of stream of the method for testing software based on Test cases technology shown according to another exemplary embodiment Cheng Tu.As shown in figure 3, the method the following steps are included:
Step 301, when detecting software test instruction, identification software tests the software identification for including in instruction.
Step 302, the target software information for being previously stored with software to be tested corresponding with software identification is detected whether, such as Fruit is to execute step 303;If not, executing step 304~step 311.
As an alternative embodiment, following steps can also be performed before step 302:
When detecting software information more new command, the software identification to be updated for including in software information more new command is obtained And software information to be updated;
Search and the matched target of software identification to be updated software information to be updated from pre-stored all software informations;
Software information to be updated is added in target software information to be updated, updated target software to be updated is obtained Information.
Wherein, implement this embodiment, can be determined according to the more new command received and the target updated is needed to wait for more New software information, by the way that the software information to be updated in more new command is added in target software information to be updated, realization pair In the update of target software information to be updated, the timeliness of the software information of storage ensure that.
Step 303, target software information is obtained, and executes step 306~step 311.
Step 304, the software interface of software to be tested is determined.
In the embodiment of the present invention, based on the security consideration for treating test software, usual test software cannot be directly acquired To the information of software inhouse to be tested, still, for the other software outside software to be tested, it is possible that needing to make The case where using the information of software inhouse to be tested, therefore, software to be tested can provide software interface, so that software to be tested External other software can get the information of software inhouse to be tested by the software interface that software to be tested provides, and both protect The safety of software to be tested has been protected, and information can be provided to other software, so that other software can operate normally.
Step 305, the target software information of software to be tested is obtained by software interface, and stores target software information.
In the embodiment of the present invention, implement above-mentioned step 302~step 305, it is soft test can be detected according to software identification Whether with the software identification corresponding target software information is previously stored in part, if there is can be directly obtained the software Information, if it does not, the target software of the software can be got by the interface of target software corresponding with software identification Information, so that guarantee gets the success rate of target software information.
As an alternative embodiment, obtaining the target software information of software to be tested by software interface, and deposit The mode of storage target software information may comprise steps of:
Information request instruction is sent to software to be tested by software interface, information request instruction is for making software to be tested Software development document is obtained, and feedback software develops document;
When receiving the software development document of software feedback to be tested, software development document is determined as software to be tested Target software information, and store target software information.
Wherein, implement this embodiment, the request of target software information can be obtained by sending to software to be tested Instruction, so that target software information is fed back to test software by software to be tested, to guarantee the target that test software is got The accuracy of software information.
Step 306, the data transmission information of software to be tested is obtained from target software information, data transmission information includes The first data information and received second data information of software to be tested of software output to be tested.
In the embodiment of the present invention, software to be tested will appear the case where data are transmitted in the process of running, wherein to be tested When software may generate data to other software send, also can receive other software transmission data, thus according to other Therefore software to be tested can be generated the first data to the process of other software output data by the data run that software is sent Information can also receive process the second data information of generation that other software send data according to software to be tested.
Step 307, the object invocation software that data are sent to software to be tested, Yi Jishi are determined from the second data information The object invocation object of data is sent in other object invocation software to software to be tested.
Step 308, the recalls information of software to be tested is generated according to object invocation software and object invocation object, calls letter The target of object invocation software information in breath comprising object invocation software and the object invocation object in object invocation software Call object information.
In the embodiment of the present invention, implement above-mentioned step 306~step 308, it is available may to software to be tested The data transmission information of appearance, and can be from the number that reading tape test software calls from other software in data transmission information It is believed that breath, obtains the object invocation software of software transfer to be tested, may further determine in the object invocation software of calling Specific object invocation object, and the recalls information of software to be tested is generated according to object invocation software and object invocation object, So that the recalls information generated is in further detail.
Step 309, it identifies the calling data information for including in object invocation object information, calls in data information comprising adjusting With the field quantity of data and the parameter information of each field, parameter information includes at least field type and the field side of field Dividing value.
Step 310, according to calling data information to construct simulated object, so that the data information and calling of simulated object output Data information is identical.
In the embodiment of the present invention, implement above-mentioned step 309~step 310, can determine mesh in data information from calling Mark calls the parameter information of the data of object output, the field quantity for including such as the data of object invocation object output and each word The information such as type, the range of section, and simulated object is constructed according to parameter information, so that the data and the ginseng of simulated object output Number information matches, ensure that the service requirement for the data fit software to be tested that software to be tested is got.
Step 311, test software is treated by analogue data to be tested.
In the method depicted in fig. 3, data loss that may be present or situations such as damage in transmission process is avoided, It ensure that the correctness for the data that software to be tested obtains improves software to ensure that the correctness of software test result The accuracy of test.In addition, method described in implementing Fig. 3, ensure that the timeliness of the software information of storage.In addition, implementing Method described in Fig. 3, it is ensured that get the success rate of target software information.In addition, method described in implementing Fig. 3, It can guarantee the accuracy for the target software information that test software is got.In addition, method described in implementing Fig. 3, can make The recalls information that must be generated is in further detail.In addition, method described in implementing Fig. 3, ensure that the number that software to be tested is got According to the service requirement for meeting software to be tested.
It is the device of the invention embodiment below.
Fig. 4 is a kind of frame of software testing device based on Test cases technology shown according to an exemplary embodiment Figure.As shown in figure 4, the device includes:
Recognition unit 401, the software mark for including in identification software test instruction when detecting software test instruction Know.
Acquiring unit 402, it is soft for obtaining the target of the corresponding software to be tested of software identification of the identification of recognition unit 401 Part information.
Reading unit 403, for reading the calling of software to be tested from the target software information that acquiring unit 402 obtains Information, the object invocation software information and target tune for needing to call during the test comprising software to be tested in the recalls information With the object invocation object information in software information.
Construction unit 404, for constructing the matched simulation pair of object invocation object information read with reading unit 403 As so that the analogue data of simulated object output is matched with object invocation object information.
Test cell 405, the analogue data for being constructed by construction unit 404 are treated test software and are tested.
As an alternative embodiment, test cell 405 can be also used for:
Obtain the test result of software to be tested;
Judge whether test result is within the scope of default normal data;
If so, determining that software to be tested passes through test;
If not, the problem of software to be tested is positioned according to test result, and test report is generated according to problem.
Wherein, implement this embodiment, test software can be treated and analyzed according to the result that analogue data is run, If operation result meets the requirements, it may be considered that software to be tested is tested by this;If operation result is undesirable, It may be considered that in software to be tested, there are problems, in addition, eating what software can also be to be tested according to operation result analyzing and positioning The position to go wrong in software improves the intelligence of software test to generate test report according to the problem.
In software testing device shown in Fig. 4 based on Test cases technology, avoiding data can in transmission process Situations such as existing capable of losing or damage, it ensure that the correctness for the data that software to be tested obtains, to ensure that software is surveyed The correctness of test result improves the accuracy of software test.In addition, improving software test in device shown in Fig. 4 Intelligence.
Fig. 5 is a kind of frame of the software testing device based on Test cases technology shown according to another exemplary embodiment Figure.Wherein, the software testing device shown in fig. 5 based on Test cases technology is as shown in Figure 4 based on Test cases technology Software testing device optimize.Compared with the software testing device shown in Fig. 4 based on Test cases technology, figure The acquiring unit 402 of software testing device shown in 5 based on Test cases technology may include:
Detection sub-unit 4021, for detecting whether being previously stored with the target of software to be tested corresponding with software identification Software information.
As an alternative embodiment, detection sub-unit 4021 can be also used for:
When detecting software information more new command, the software identification to be updated for including in software information more new command is obtained And software information to be updated;
Search and the matched target of software identification to be updated software information to be updated from pre-stored all software informations;
Software information to be updated is added in target software information to be updated, updated target software to be updated is obtained Information.
Wherein, implement this embodiment, can be determined according to the more new command received and the target updated is needed to wait for more New software information, by the way that the software information to be updated in more new command is added in target software information to be updated, realization pair In the update of target software information to be updated, the timeliness of the software information of storage ensure that.
First obtains subelement 4022, and the result for detecting in detection sub-unit 4021 is when being, to obtain target software Information.
It determines subelement 4023, when the result for detecting in detection sub-unit 4021 is no, determines software to be tested Software interface.
Storing sub-units 4024, for by determining that the determining software interface of subelement 4023 obtains the mesh of software to be tested Software information is marked, and stores target software information.
In the embodiment of the present invention, it can be detected in test software and whether be previously stored with and the software mark according to software identification Know corresponding target software information, if there is the software information can be directly obtained, if it does not, can by with it is soft The interface that part identifies corresponding target software gets the target software information of the software, to guarantee to get target software letter The success rate of breath.
As an alternative embodiment, storing sub-units 4024 obtain the target of software to be tested by software interface Software information, and the mode for storing target software information is specifically as follows:
Information request instruction is sent to software to be tested by software interface, information request instruction is for making software to be tested Software development document is obtained, and feedback software develops document;
When receiving the software development document of software feedback to be tested, software development document is determined as software to be tested Target software information, and store target software information.
Wherein, implement this embodiment, the request of target software information can be obtained by sending to software to be tested Instruction, so that target software information is fed back to test software by software to be tested, to guarantee the target that test software is got The accuracy of software information.
As an alternative embodiment, the reading of the software testing device shown in fig. 5 based on Test cases technology Unit 403 may include:
Second obtains subelement 4031, for obtaining the data transmission information of software to be tested from target software information, The data transmission information includes the first data information and received second data information of software to be tested of software output to be tested;
First identification subelement 4032, for from second obtain subelement 4031 obtain the second data information in determine to Software to be tested sends in the object invocation software of data, and identification object invocation software and sends data to software to be tested Object invocation object;
Subelement 4033 is generated, the object invocation software and object invocation for identifying according to the first identification subelement 4032 Object generates the recalls information of software to be tested, object invocation software information in recalls information comprising object invocation software and The object invocation object information of object invocation object in object invocation software.
Wherein, implement this embodiment, it is available to software to be tested it is possible that data transmission information, and And software to be tested can be obtained from the data information that reading tape test software calls from other software in data transmission information The object invocation software of calling may further determine the specific object invocation object in the object invocation software of calling, and The recalls information of software to be tested is generated according to object invocation software and object invocation object, so that the recalls information generated In further detail.
As an alternative embodiment, the building of the software testing device shown in fig. 5 based on Test cases technology Unit 404 may include:
Second identification subelement 4041, the calling data information for including in object invocation object information for identification, the tune With, comprising calling the field quantity of data and the parameter information of each field, parameter information includes at least field in data information Field type and field boundaries value;
Subelement 4042 is constructed, the calling data information building simulation pair for identifying according to the second identification subelement 4041 As so that the data information of simulated object output is identical as data information is called.
Wherein, implement this embodiment, it can be from the data for calling determining object invocation object output in data information Parameter information, such as the output of object invocation object the data field quantity and each field that include type, range information, And according to parameter information construct simulated object so that simulated object output data matched with the parameter information, ensure that The service requirement of the data fit that test software is got software to be tested.
In software testing device based on Test cases technology shown in Fig. 5, avoiding data can in transmission process Situations such as existing capable of losing or damage, it ensure that the correctness for the data that software to be tested obtains, to ensure that software is surveyed The correctness of test result improves the accuracy of software test.In addition, in the arrangement as shown in fig. 5, ensure that the software of storage The timeliness of information.In addition, in the arrangement as shown in fig. 5, it is ensured that get the success rate of target software information.In addition, In the arrangement as shown in fig. 5, it is ensured that the accuracy for the target software information that test software is got.In addition, shown in Fig. 5 Device in, can make generate recalls information in further detail.In addition, in the arrangement as shown in fig. 5, ensure that be tested soft The service requirement of the data fit that part is got software to be tested.
The present invention also provides a kind of electronic equipment, which includes:
Processor;
Memory is stored with computer-readable instruction on the memory, when which is executed by processor, Realize the method for testing software based on Test cases technology as previously shown.
The electronic equipment can be Fig. 1 shown device 100.
In one exemplary embodiment, the present invention also provides a kind of computer readable storage mediums, are stored thereon with calculating Machine program when the computer program is executed by processor, realizes the software test side as previously shown based on Test cases technology Method.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and change can executed without departing from the scope.The scope of the present invention is limited only by the attached claims.

Claims (10)

1. a kind of method for testing software based on Test cases technology, which is characterized in that the described method includes:
When detecting software test instruction, the software identification for including in the software test instruction is identified;
Obtain the target software information of the corresponding software to be tested of the software identification;
Read the recalls information of the software to be tested from the target software information, in the recalls information comprising it is described to The target in object invocation software information and the object invocation software information that test software needs to call during the test Call object information;
Building with the matched simulated object of object invocation object information so that the simulated object output analogue data with The object invocation object information matching;
The software to be tested is tested by the analogue data.
2. the method according to claim 1, wherein described obtain the corresponding software to be tested of the software identification Target software information, comprising:
Detect whether the target software information for being previously stored with software to be tested corresponding with the software identification;
If so, obtaining the target software information;
If not, determining the software interface of the software to be tested;
The target software information of the software to be tested is obtained by the software interface, and stores the target software information.
3. according to the method described in claim 2, it is characterized in that, described described to be tested soft by software interface acquisition The target software information of part, and store the target software information, comprising:
Information request instruction is sent to the software to be tested by the software interface, the information request instruction is for making institute It states software to be tested and obtains software development document, and feed back the software development document;
When receiving the software development document of the software feedback to be tested, the software development document is determined as institute The target software information of software to be tested is stated, and stores the target software information.
4. according to the method in claim 2 or 3, which is characterized in that the method also includes:
When detecting software information more new command, the software identification to be updated for including in the software information more new command is obtained And software information to be updated;
Search and the matched target of software identification to be updated software information to be updated from pre-stored all software informations;
The software information to be updated is added in target software information to be updated, it is to be updated to obtain updated target Software information.
5. according to the method described in claim 4, it is characterized in that, it is described read from the target software information it is described to be measured Try the recalls information of software, comprising:
The data transmission information of the software to be tested is obtained from the target software information, the data transmission information includes The first data information and received second data information of the software to be tested of the software output to be tested;
The object invocation software that data are sent to the software to be tested, and identification institute are determined from second data information State the object invocation object for sending data in object invocation software to the software to be tested;
The recalls information of the software to be tested, the tune are generated according to the object invocation software and the object invocation object With the mesh in the object invocation software information and the object invocation software in information comprising the object invocation software Mark calls the object invocation object information of object.
6. according to the method described in claim 5, it is characterized in that, the building is matched with the object invocation object information Simulated object, so that the analogue data of simulated object output is matched with the object invocation object information, comprising:
It identifies the calling data information for including in the object invocation object information, includes calling number in the calling data information According to field quantity and each field parameter information, the parameter information include at least the field field type and word Segment boundary value;
Simulated object is constructed according to the calling data information, so that the data information of simulated object output and the calling Data information is identical.
7. according to the method described in claim 6, it is characterized in that, it is described by the analogue data to the software to be tested After being tested, the method also includes:
Obtain the test result of the software to be tested;
Judge whether the test result is within the scope of default normal data;
If so, determining that the software to be tested passes through test;
If not, the problem of software to be tested is positioned according to the test result, and test report is generated according to described problem It accuses.
8. a kind of software testing device based on Test cases technology, which is characterized in that described device includes:
Recognition unit, for when detecting software test instruction, identifying the software identification for including in the software test instruction;
Acquiring unit, for obtaining the target software information of the corresponding software to be tested of the software identification;
Reading unit, for reading the recalls information of the software to be tested, the calling letter from the target software information The object invocation software information and the object invocation for needing to call during the test comprising the software to be tested in breath are soft Object invocation object information in part information;
Construction unit, for building and the matched simulated object of object invocation object information, so that the simulated object is defeated Analogue data out is matched with the object invocation object information;
Test cell, for being tested by the analogue data the software to be tested.
9. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
Processor;
Memory is stored with computer-readable instruction on the memory, and the computer-readable instruction is held by the processor When row, method as described in any one of claim 1 to 7 is realized.
10. a kind of computer readable storage medium, which is characterized in that it stores computer program, and the computer program makes Computer perform claim requires 1~7 described in any item methods.
CN201910317800.9A 2019-04-19 2019-04-19 Method for testing software, device and electronic equipment based on Test cases technology Pending CN110119354A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910317800.9A CN110119354A (en) 2019-04-19 2019-04-19 Method for testing software, device and electronic equipment based on Test cases technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910317800.9A CN110119354A (en) 2019-04-19 2019-04-19 Method for testing software, device and electronic equipment based on Test cases technology

Publications (1)

Publication Number Publication Date
CN110119354A true CN110119354A (en) 2019-08-13

Family

ID=67521232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910317800.9A Pending CN110119354A (en) 2019-04-19 2019-04-19 Method for testing software, device and electronic equipment based on Test cases technology

Country Status (1)

Country Link
CN (1) CN110119354A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679986A (en) * 2020-06-11 2020-09-18 湖南快乐阳光互动娱乐传媒有限公司 Software testing method and device and electronic equipment
CN112286795A (en) * 2020-09-28 2021-01-29 长沙市到家悠享网络科技有限公司 Software testing method, device and storage medium
CN112579467A (en) * 2020-12-28 2021-03-30 北京百家科技集团有限公司 Test method, test device, computer equipment and storage medium
CN112783779A (en) * 2021-01-28 2021-05-11 北京达佳互联信息技术有限公司 Test case generation method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020032538A1 (en) * 2000-05-09 2002-03-14 Lee Young-Seok Software test system and method
CN105335281A (en) * 2014-07-30 2016-02-17 阿里巴巴集团控股有限公司 Method and device for automatic mock of external dependency
CN108572918A (en) * 2018-04-13 2018-09-25 平安普惠企业管理有限公司 Performance test methods, device, computer equipment and storage medium
CN109634867A (en) * 2018-12-18 2019-04-16 宁夏隆基宁光仪表股份有限公司 Based on method for testing software, device and the storage medium under data analog system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020032538A1 (en) * 2000-05-09 2002-03-14 Lee Young-Seok Software test system and method
CN105335281A (en) * 2014-07-30 2016-02-17 阿里巴巴集团控股有限公司 Method and device for automatic mock of external dependency
CN108572918A (en) * 2018-04-13 2018-09-25 平安普惠企业管理有限公司 Performance test methods, device, computer equipment and storage medium
CN109634867A (en) * 2018-12-18 2019-04-16 宁夏隆基宁光仪表股份有限公司 Based on method for testing software, device and the storage medium under data analog system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679986A (en) * 2020-06-11 2020-09-18 湖南快乐阳光互动娱乐传媒有限公司 Software testing method and device and electronic equipment
CN111679986B (en) * 2020-06-11 2023-09-22 湖南快乐阳光互动娱乐传媒有限公司 Software testing method and device and electronic equipment
CN112286795A (en) * 2020-09-28 2021-01-29 长沙市到家悠享网络科技有限公司 Software testing method, device and storage medium
CN112579467A (en) * 2020-12-28 2021-03-30 北京百家科技集团有限公司 Test method, test device, computer equipment and storage medium
CN112783779A (en) * 2021-01-28 2021-05-11 北京达佳互联信息技术有限公司 Test case generation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110119354A (en) Method for testing software, device and electronic equipment based on Test cases technology
CN107908952B (en) Method and device for identifying real machine and simulator and terminal
CN110134593A (en) Method for testing software, device, electronic equipment and storage medium
CN105898794A (en) Device and method of transmitting data
CN110162442B (en) System performance bottleneck positioning method and system
CN103765936B (en) The method and apparatus managed for privacy policy
CN110196795A (en) Detect the method and relevant apparatus of mobile terminal application operating status
CN110083527A (en) A kind of generation method and device, electronic equipment of test case
CN109753425A (en) Pop-up processing method and processing device
CN106990989B (en) Method and device for controlling application program installation
CN106201610A (en) Web application accesses the method and device of the primary function of terminal
CN109325364A (en) A kind of authority configuring method and electronic equipment
CN105100477B (en) Terminal notifying device and method
CN106653011A (en) Voice control method, voice control device and terminal
CN109885791A (en) A kind of front end page access method, device and electronic equipment
CN113672441B (en) Method and device for testing intelligent equipment
CN107632901A (en) A kind of self-repair method and device of application program operation exception
CN110347672A (en) Verification method and device, the electronic equipment and storage medium of tables of data related update
CN110659093A (en) Operation prompting method and device
CN107450912A (en) Layout method, device and the terminal of the page
CN105589575A (en) Input method invoking method and device
CN105704331A (en) Mobile terminal application program recommendation method and system thereof
CN109802994A (en) A kind of information push method and system based on content distributing network
CN109857921A (en) A kind of document management method and document file management system updated based on data
CN105404529A (en) Popup method, device and system of operation system popup for reinstallation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 201, room 518000, building A, No. 1, front Bay Road, Qianhai Shenzhen Guangdong Shenzhen Hong Kong cooperation zone (Qianhai business secretary)

Applicant after: Pingan Pu Hui Enterprise Management Co., Ltd.

Address before: 518000 Guangdong city of Shenzhen province Qianhai Shenzhen Hong Kong cooperation zone before Bay Road No. 1 building 201 room A

Applicant before: Pingan Pu Hui Enterprise Management Co., Ltd.

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination