CN104809054A - Method and system for realizing program testing - Google Patents

Method and system for realizing program testing Download PDF

Info

Publication number
CN104809054A
CN104809054A CN201410032804.XA CN201410032804A CN104809054A CN 104809054 A CN104809054 A CN 104809054A CN 201410032804 A CN201410032804 A CN 201410032804A CN 104809054 A CN104809054 A CN 104809054A
Authority
CN
China
Prior art keywords
master routine
test
routine
instruction value
module
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.)
Granted
Application number
CN201410032804.XA
Other languages
Chinese (zh)
Other versions
CN104809054B (en
Inventor
陈泽凯
蔡荧园
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201410032804.XA priority Critical patent/CN104809054B/en
Publication of CN104809054A publication Critical patent/CN104809054A/en
Application granted granted Critical
Publication of CN104809054B publication Critical patent/CN104809054B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a method and system for realizing program testing. The method comprises the steps: generating a testing command value according to testing operation of a user in a monitor program and transmitting the testing command value to a main program through the monitor program; executing a testing task corresponding to the testing command value in a to-be-tested main program through the testing command value; storing running state information, generated by the main program during the execution of the testing task, to a log file. The system comprises a transmission module, a test execution module and a log storage module; the transmission module is used for generating a testing command value according to the testing operation of a user in a monitor program and transmitting the testing command value to a main program through the monitor program; the test execution module is used for executing a testing task corresponding to the testing command value in a to-be-tested main program through the testing command value; the log storage module is used for storing running state information, generated by the main program during the execution of the testing task, to a log file. By adopting the invention, a program can be automatically tested.

Description

Realize the method and system of program test
Technical field
The present invention relates to automatization testing technique, particularly relate to a kind of method and system realizing program test.
Background technology
Weigh the stability being this program as the major criterion of the program of a product, its stability determines the retention ratio of program and the quality of public praise to a certain extent, therefore, how to promote the stability of program and stability test is carried out to program will have very important meaning.
Program is tested to know the current existing defect of this program, and then very large help will be provided, for developer provides more running state of programs information for the stability of program promotes.Such as, but carry out manual test to program and there is various defect, need the manpower test resource of at substantial, the test assignment that can complete is also very limited etc.
Summary of the invention
Based on this, to be necessary existing for the manual test for program the technical matters of numerous defect, a kind of method realizing program test carrying out automatic test to program is provided.
In addition, there is a need to provide a kind of system realizing program test carrying out automatic test to program.
Realize a method for program test, comprise the steps:
Generate test instruction value according to the test operation of user in watchdog routine, described test instruction value is passed to master routine by described watchdog routine;
In master routine to be tested, test assignment corresponding to described test instruction value is performed by described test instruction value;
The running state information produced when preserving described master routine execution test assignment is in journal file.
Realize a system for program test, comprising:
Transmitting module, for generating test instruction value according to the test operation of user in watchdog routine, described test instruction value being passed to master routine by described watchdog routine;
Testing execution module, for performing test assignment corresponding to described test instruction value by described test instruction value in master routine to be tested;
Log saving module, the running state information produced during for preserving described master routine execution test assignment is in journal file.
The above-mentioned method and system realizing program test, test instruction value is generated according to the test operation of user in watchdog routine, and by watchdog routine by test instruction value transmit in master routine, now, in master routine to be tested, test assignment corresponding to test instruction value is performed by by test instruction value, and then the running state information produced when master routine being performed test assignment is saved in journal file, to realize automatic test.
Accompanying drawing explanation
Fig. 1 is the method flow diagram realizing program test in an embodiment;
Fig. 2 is the method flow diagram being performed test assignment corresponding to test instruction value in Fig. 1 by test instruction value in master routine to be tested;
Fig. 3 is the method flow diagram realizing program test in another embodiment;
Fig. 4 is the method flow diagram realizing program test in another embodiment;
Fig. 5 is the application schematic diagram realizing the method for program test in an embodiment;
Fig. 6 is the structural representation realizing PTS in an embodiment;
Fig. 7 is the structural representation of testing execution module in Fig. 6;
Fig. 8 is the structural representation realizing PTS in another embodiment;
Fig. 9 is the structural representation realizing PTS in another embodiment;
Figure 10 is the module map of the computer system realizing the embodiment of the present invention.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Unless context separately has the description of specific distinct, the element in the present invention and assembly, the form that quantity both can be single exists, and form that also can be multiple exists, and the present invention does not limit this.Although the step in the present invention arranges with label, and be not used in and limit the precedence of step, the order of step or the execution of certain step need based on other steps unless expressly stated, otherwise the relative rank of step is adjustable.Be appreciated that term "and/or" used herein relates to and contains the one or more any and all possible combination in the Listed Items be associated.
As shown in Figure 1, in one embodiment, a kind of method realizing program test, comprises the steps:
Step S110, generates test instruction value according to the test operation of user in watchdog routine, test instruction value is passed to master routine by watchdog routine.
In the present embodiment, watchdog routine will be used for controlling various program and carry out automatic test, and master routine is then the program that arbitrary needs carry out testing.Obtain the test operation that user triggers in watchdog routine, to obtain selected automatic test function, and then generate corresponding test instruction value, the test instruction value of generation is carried out in the master routine tested as Parameter transfer to needs by watchdog routine.
Concrete, user selects a certain item automatic test function by clicking in the watchdog routine interface of opening, now, the variate-value that watchdog routine will generate corresponding to this automatic test function, i.e. test instruction value, and in the mode of Transfer Parameters, test instruction value is passed to master routine by watchdog routine.
Step S130, performs test assignment corresponding to test instruction value by test instruction value in master routine to be tested.
In the present embodiment, master routine to be tested will carry out the execution of corresponding test assignment according to test instruction value, to realize automatically completing various test assignment in master routine to be tested, greatly save human resources, can be applicable to the testing results of long-time and large intensity, to complete the test assignment that manual test cannot complete.
Step S150, the running state information produced when preserving master routine execution test assignment is in journal file.
In the present embodiment, along with master routine performs test assignment, running state information will be produced, now, by the running state information that acquisition master routine produces, preserve to write in journal file, so that developer is along with the running state information had access to any instant and produce, and then know the running orbit of master routine and the exception of generation.
Concrete, the running state information be saved in real time in journal file will include each important function entrance in master routine, important code and other point needing emphasis to mark, to obtain the whole service track in master routine operational process, and then by checking that journal file can get the real time status of master routine operation.
Further, be saved in real time running state information in journal file by include when master routine occurs abnormal error message, function call stack information, so that know the mistake that master routine occurs, and then contribute to service logic and the performance of improving master routine.
As shown in Figure 2, in one embodiment, above-mentioned steps S130 comprises:
Step S131, carries out the test instruction value transmitted as parameter in reading watchdog routine.
In the present embodiment, will read by the test instruction value of watchdog routine as Parameter transfer after master routine starts, to know that master routine is about to the test assignment performed.
Step S133, calls test module corresponding with test instruction value in master routine, to perform test assignment corresponding to test instruction by test module.
In the present embodiment, be one or more with the test module corresponding to test instruction value in master routine, by current required automatic test function can be realized with one or more test module corresponding to test instruction value, and then complete corresponding test assignment.
As shown in Figure 3, in one embodiment, before above-mentioned steps S130, the method also comprises the steps:
Step S210, starts master routine.
In the present embodiment, trigger the program starting current needs and carry out testing, this program is master routine, so that make master routine complete various test assignment under the control of watchdog routine.
Step S230, judge start master routine upper once run time whether be improper exiting, if yes, then enter step S250, if NO, then enter step S130.
In the present embodiment, after starting master routine, by first judge that this master routine occurs in the upper process once run out of service whether be improper exiting, if yes, then illustrate that this master routine to have occurred extremely waiting error situation in the upper process once run, and then cause the improper of master routine and exit, and master routine upper once run time performed test assignment do not complete, therefore, step S250 will be entered with the execution of the test assignment again triggering this and do not complete.
If the master routine determining startup upper once run time normally exit, then directly enter step S130 and perform new test assignment.
Step S250, trigger watchdog routine by master routine upper once run time test instruction value be again passed in master routine.
In the present embodiment, the program determining startup upper once run time be improper exiting after, watchdog routine will be waken up, the test instruction when last time of preserving to read watchdog routine is run, lay equal stress on and be newly passed in master routine, so that test assignment when master routine re-executes last operation.
Further, method as above is after execution step S250, and will enter step S130, accordingly, the detailed process of step S130 is:
Read the test instruction value that watchdog routine is transmitted again, to re-execute test assignment corresponding to test instruction value.
In the present embodiment, master routine is after receiving the test instruction value that watchdog routine transmits again, by the test instruction value that reading watchdog routine is transmitted again, with the test module that the test instruction value called and again transmit is corresponding, perform the test assignment corresponding to test instruction by test module, during to complete last operation, there occurs the abnormal test assignment waiting error situation.
As shown in Figure 4, in one embodiment, after above-mentioned steps S210, the method also comprises the steps:
Step S310, the master routine corresponding to master routine writing current startup to journal file starts ident value.
In the present embodiment, master routine starts the fixed value that ident value will generate when being master routine startup, for the startup of mark master routine, that is, corresponding master routine when corresponding master routine starts ident value and starts next time when being different from last startup is started ident value, to be reached through the object that the startup of master routine startup ident value to master routine identifies by master routine is current when starting corresponding master routine starts ident value.
Step S330, deletes master routine and starts ident value from journal file when master routine normally exits.
In the present embodiment, when master routine runs and normally exits, the master routine writing journal file when deleting from journal file and start is started ident value, and master routine is improper exit time can not delete from journal file start time write master routine start mark, so that the test assignment that the master routine of announcement does not complete in addition when the upper once operation of master routine, and in this test assignment do not completed, there occurs the error situations such as exception.
In one embodiment, the detailed process of above-mentioned steps S230 is: whether there is master routine corresponding to master routine when judging that master routine starts in journal file and start ident value, if yes, then enter step S250, if NO, then enter step S130.
In the present embodiment, when master routine starts by by whether exist in journal file master routine corresponding to this master routine start ident value know master routine upper once run time whether there is improper exiting, if yes, then test instruction value during last operation is again transmitted.
In another embodiment, the master routine determining startup upper once run time improper exit after, the method also comprises the steps:
The last running state information run when exiting in the journal file of location, to obtain, master routine generation is improper exits corresponding running state information.
In the present embodiment, master routine corresponding various running state information when carrying out improper exiting occurs due to various error situation in automatic test course will be very important data messages, vital for developer, therefore, by the master routine determining startup upper once run time there occurs improper exiting after from journal file, just locate running state information master routine once run when exiting, think that developer presents the whole abnormal of generation intuitively and waits error situation, help the location and the reparation that realize master routine.
The above-mentioned method realizing program test is elaborated below in conjunction with a specific embodiment.In this embodiment, as shown in Figure 5, master routine 530 realizes automatic test by by watchdog routine 510 and cooperatively interacting of journal file 550, to improve its performance and stability.
Watchdog routine 510 generates test instruction value and after preservation, by reading and transmitting this test instruction value by the mode of Parameter transfer, calls master routine 530 to trigger under the test operation of user.
Start the master routine that monitored program 510 is called, now, the master routine 530 of this startup will read the test instruction value transmitted by watchdog routine 510, and from journal file 550, carry out the reading of master routine ident value.
Whether first master routine 530 will detect when running last time is improper exiting, namely judge whether to read from journal file 550 to obtain corresponding master routine ident value, if yes, the running state information of then locating when last operation is exited in journal file can obtain running state information during improper exiting, and re-executing last test assignment, this realization re-executing last test assignment will be described in detail in subsequent process.
Master routine 530 detect operated to last time normally exit time, specific test module will be called, namely with transmit test instruction value descend corresponding test module, to perform the test assignment corresponding to test instruction value.
In the process performing test assignment, by preserving the running state information of generation in real time in journal file 550, check so that developer can have access at any time.
If there occurs improper exiting in the test assignment implementation of master routine 530, namely test assignment does not complete, and there occurs crash and exit, and now will wake watchdog routine 510 up.
The watchdog routine 510 be waken up by the test instruction value of reading and saving, to carry out the transmission again of test instruction value, and then the test assignment making master routine re-execute not complete.
By test process as above, while realizing the automatic test of program, also the serious problems such as bug and crash existed in developer's Timeliness coverage master routine are just obtained, and provide a large amount of running state information by journal file, the location of auxiliary problem (AP) and solution, greatly improve performance and the stability of master routine.
As shown in Figure 6, in one embodiment, a kind of system realizing program test, comprises and transmits module 110, testing execution module 130 and log saving module 150.
Transmitting module 110, for generating test instruction value according to the test operation of user in watchdog routine, test instruction value being passed to master routine by watchdog routine.
In the present embodiment, watchdog routine will be used for controlling various program and carry out automatic test, and master routine is then the program that arbitrary needs carry out testing.Obtaining the test operation that user triggers in watchdog routine, to obtain selected automatic test function, and then generate corresponding test instruction value, transmitting module 110 using the test instruction value of generation as Parameter transfer to needing to carry out in the master routine tested.
Concrete, user selects a certain item automatic test function by clicking in the watchdog routine interface of opening, now, the variate-value that transmission module 110 in watchdog routine will generate corresponding to this automatic test function, i.e. test instruction value, and in the mode of Transfer Parameters, test instruction value is passed to master routine by watchdog routine.
Testing execution module 130, for performing test assignment corresponding to test instruction value by test instruction value in master routine to be tested.
In the present embodiment, testing execution module 130 in master routine to be tested will carry out the execution of corresponding test assignment according to test instruction value, to realize automatically completing various test assignment in master routine to be tested, greatly save human resources, can be applicable to the testing results of long-time and large intensity, to complete the test assignment that manual test cannot complete.
Log saving module 150, the running state information produced during for preserving master routine execution test assignment is in journal file.
In the present embodiment, along with master routine performs test assignment, running state information will be produced, now, the running state information that acquisition master routine produces by log saving module 150, preserve to write in journal file, so that developer is along with the running state information had access to any instant and produce, and then know the running orbit of master routine and the exception of generation.
Concrete, the running state information that log saving module 150 is saved in journal file in real time will include each important function entrance in master routine, important code and other point needing emphasis to mark, to obtain the whole service track in master routine operational process, and then by checking that journal file can get the real time status of master routine operation.
Further, log saving module 150 be saved in real time running state information in journal file by include when master routine occurs abnormal error message, function call stack information, so that know the mistake that master routine occurs, and then contribute to service logic and the performance of improving master routine.
As shown in Figure 7, in one embodiment, above-mentioned testing execution module 130 comprises reading unit 131 and module call unit 133.
Reading unit 131, carries out as parameter the test instruction value transmitted for reading in watchdog routine.
In the present embodiment, after master routine starts, reading unit 131 will read by the test instruction value of watchdog routine as Parameter transfer, to know that master routine is about to the test assignment performed.
Module call unit 133, for calling test module corresponding with call instruction value in master routine, to perform test assignment corresponding to test instruction by test module.
In the present embodiment, be one or more with the test module corresponding to test instruction value in master routine, by current required automatic test function can be realized with one or more test module corresponding to test instruction value, and then complete corresponding test assignment.
As shown in Figure 8, in one embodiment, this system further comprises and starts module 210 and judge module 230.
Start module 210, for starting master routine.
In the present embodiment, start module 210 and trigger the program starting current needs and carry out testing, this program is master routine, so that make master routine complete various test assignment under the control of watchdog routine.
Judge module 230, for judge start master routine upper once run time whether be improper exiting, if yes, then notice transmit module 110, if NO, then notify testing execution module 130.
In the present embodiment, after starting master routine, judge module 230 by first judge that this master routine occurs in the upper process once run out of service whether be improper exiting, if yes, then illustrate that this master routine to have occurred extremely waiting error situation in the upper process once run, and then cause the improper of master routine and exit, and master routine upper once run time performed test assignment do not complete, therefore, the execution of the test assignment that this does not complete will again be triggered.
If the master routine that judge module 230 determines startup upper once run time normally exit, then directly perform new test assignment.
Transmit module 110 also for trigger watchdog routine by master routine upper once run time test instruction value be again passed in master routine.
In the present embodiment, the program determining startup upper once run time be improper exiting after, watchdog routine will be waken up, the test instruction when last time of preserving to read watchdog routine is run, and being again passed in master routine by transmission module 110, so that test assignment when master routine re-executes last operation.
In another embodiment, testing execution module 130 also for reading the test instruction value that watchdog routine is transmitted again, to re-execute test assignment corresponding to test instruction value.
In the present embodiment, master routine is after receiving the test instruction value that watchdog routine transmits again, the test instruction value that reading watchdog routine is transmitted by testing execution module 130 again, with the test module that the test instruction value called and again transmit is corresponding, perform the test assignment corresponding to test instruction by test module, during to complete last operation, there occurs the abnormal test assignment waiting error situation.
As shown in Figure 9, in another embodiment, this system further comprises writing module 310 and removing module 330.
Writing module 310, for write master routine from current startup to journal file corresponding to master routine start ident value.
In the present embodiment, master routine starts the fixed value that ident value will generate when being master routine startup, for the startup of mark master routine, that is, corresponding master routine when corresponding master routine starts ident value and starts next time when being different from last startup is started ident value, to be reached through the object that the startup of master routine startup ident value to master routine identifies by master routine is current when starting corresponding master routine starts ident value.
Removing module 330, starts ident value for deleting master routine from journal file when master routine normally exits.
In the present embodiment, when master routine runs and normally exits, the master routine writing journal file when deleting from journal file and start is started ident value by removing module 330, and master routine is improper exit time can not delete from journal file start time write master routine start mark, so that the test assignment that the master routine of announcement does not complete in addition when the upper once operation of master routine, and in this test assignment do not completed, there occurs the error situations such as exception.
In one embodiment, whether there is master routine corresponding to this master routine when judge module 230 is also for judging that master routine starts in journal file and start ident value, if yes, then notice transmits module 110, if NO, then notifies testing execution module 130.
In the present embodiment, when master routine starts judge module 230 by by whether exist in journal file master routine corresponding to this master routine start ident value know master routine upper once run time whether there is improper exiting, if yes, then notice transmits test instruction value when module 110 transmits last operation again.
In another embodiment, this system further comprises Information locating module.Information locating module is for locating the last running state information run when exiting in journal file, and to obtain, master routine generation is improper exits corresponding running state information.
In the present embodiment, master routine corresponding various running state information when carrying out improper exiting occurs due to various error situation in automatic test course will be very important data messages, vital for developer, therefore, by the master routine determining startup upper once run time there occurs improper exiting after Information locating module from journal file, just locate running state information master routine once run when exiting, think that developer presents the whole abnormal of generation intuitively and waits error situation, help the location and the reparation that realize master routine.
Figure 10 is the module map of a computer system 1000 that can realize the embodiment of the present invention.This computer system 1000 is an example being applicable to computer environment of the present invention, can not think to propose any restriction to usable range of the present invention.Computer system 1000 can not be interpreted as the combination needing the one or more parts depending on or have in illustrated exemplary computer system 1000.
Computer system 1000 shown in Figure 10 is the examples being suitable for computer system of the present invention.Other framework with different sub-systems configuration also can use.The similar devices such as the desktop computer known by masses, notebook, personal digital assistant, smart phone, panel computer, portable electronic device, Set Top Box are such as had to go for some embodiments of the present invention.But be not limited to above cited equipment.
As shown in Figure 10, computer system 1000 comprises processor 1010, storer 1020 and system bus 1022.The various system components comprising storer 1020 and processor 1010 are connected on system bus 1022.Processor 1010 is the hardware being used for being performed by arithmetic sum logical operation basic in computer system computer program instructions.Storer 1020 be one for storing the physical equipment of calculation procedure or data (such as, program state information) temporarily or permanently.System bus 1020 can be any one in the bus structure of following several types, comprises memory bus or memory controller, peripheral bus and local bus.Processor 1010 and storer 1020 can carry out data communication by system bus 1022.Wherein storer 1020 comprises ROM (read-only memory) (ROM) or flash memory (all not shown in figure), and random-access memory (ram), and RAM typically refers to the primary memory being loaded with operating system and application program.
Computer system 1000 also comprises display interface 1030(such as, Graphics Processing Unit), display device 1040(such as, liquid crystal display), audio interface 1050(such as, sound card) and audio frequency apparatus 1060(such as, loudspeaker).Display device 1040 and audio frequency apparatus 1060 are the media devices for experiencing content of multimedia.
Computer system 1000 generally comprises a memory device 1070.Memory device 1070 can be selected from multiple computer-readable medium, and computer-readable medium refers to any available medium can accessed by computer system 1000, that comprise movement and fixing two media.Such as, computer-readable medium includes but not limited to, flash memory (miniature SD card), CD-ROM, digital versatile disc (DVD) or other optical disc storage, tape cassete, tape, disk storage or other magnetic storage apparatus, or can be used for storing information needed and other medium any can accessed by computer system 1000.
Computer system 1000 also comprises input media 1080 and input interface 1090(such as, I/O controller).User can pass through input media 1080, and as the touch panel equipment in keyboard, mouse, display device 1040, input instruction and information are in computer system 1000.Input media 1080 is normally connected on system bus 1022 by input interface 1090, but also can be connected by other interface or bus structure, as USB (universal serial bus) (USB).
Computer system 1000 can be carried out logic with one or more network equipment in a network environment and is connected.The network equipment can be PC, server, router, smart phone, panel computer or other common network node.Computer system 1000 is connected with the network equipment by Local Area Network interface 1100 or mobile comm unit 1110.Local Area Network refers in limited area, such as family, school, computer laboratory or use the office building of the network media, the computer network of interconnected composition.WiFi and twisted-pair feeder wiring Ethernet are two kinds of technology of the most frequently used structure LAN (Local Area Network).WiFi is a kind of technology that can make computer system 1000 swapping data or be connected to wireless network by radiowave.Mobile comm unit 1110 can be answered by radio communication diagram while movement and call in a wide geographic area.Except call, mobile comm unit 1110 is also supported in the 2G providing mobile data service, carries out internet access in 3G or 4G cellular communication system.
It should be pointed out that other computer system comprising the subsystem more more or less than computer system 1000 also can be applicable to invention.Such as, computer system 1000 can comprise the bluetooth unit that can exchange data in short distance, for the imageing sensor of taking a picture, and for the accelerometer of acceleration measurement.
As described in detail above, being applicable to computer system 1000 of the present invention and can performing the above-mentioned assigned operation realizing the method for program test.The form of the software instruction that computer system 1000 is operated in computer-readable medium by processor 1010 performs these operations.These software instructions can be read into storer 1020 from memory device 1070 or by lan interfaces 1100 from another equipment.The software instruction be stored in storer 1020 makes processor 1010 perform the above-mentioned method realizing program test.In addition, also the present invention can be realized equally by hardware circuit or hardware circuit in conjunction with software instruction.Therefore, the combination that the present invention is not limited to any specific hardware circuit and software is realized.
The above embodiment only have expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (14)

1. realize a method for program test, comprise the steps:
Generate test instruction value according to the test operation of user in watchdog routine, described test instruction value is passed to master routine by described watchdog routine;
In master routine to be tested, test assignment corresponding to described test instruction value is performed by described test instruction value;
The running state information produced when preserving described master routine execution test assignment is in journal file.
2. method according to claim 1, is characterized in that, the described step performing test assignment corresponding to described test instruction by described test instruction value in master routine to be tested comprises:
Read in described watchdog routine and carry out as parameter the test instruction value transmitted;
Call test module corresponding with described test instruction value in described master routine, to perform test assignment corresponding to described test instruction by described test module.
3. method according to claim 1, is characterized in that, described in master routine to be tested, performed the step of test assignment corresponding to described test instruction value by described test instruction value before, described method also comprises:
Start described master routine;
Judge the master routine of described startup upper once run time whether be improper exiting, if yes, then
Trigger described watchdog routine by master routine upper once run time test instruction value be again passed in master routine.
4. method according to claim 3, is characterized in that, the described step performing test assignment corresponding to described test instruction value by described test instruction value in master routine to be tested comprises:
Read the test instruction value that described watchdog routine is transmitted again, to re-execute test assignment corresponding to described test instruction value.
5. method according to claim 3, is characterized in that, after the step of the described master routine of described startup, described method also comprises:
The master routine corresponding to master routine writing current startup to described journal file starts ident value;
From described journal file, delete described master routine when described master routine normally exits start ident value.
6. method according to claim 5, is characterized in that, described judge the master routine of described startup upper once run time whether be that the improper step exited comprises:
Whether there is master routine corresponding to described master routine when judging that described master routine starts in described journal file and start ident value, if yes, then
Enter the described watchdog routine of described triggering by master routine upper once run time test instruction value be again passed to step in master routine.
7. method according to claim 3, is characterized in that, described in determine described startup master routine upper once run time the improper step exited after, described method also comprises:
Locate the last running state information run when exiting in described journal file, to obtain, master routine generation is improper exits corresponding running state information.
8. realize a system for program test, it is characterized in that, comprising:
Transmitting module, for generating test instruction value according to the test operation of user in watchdog routine, described test instruction value being passed to master routine by described watchdog routine;
Testing execution module, for performing test assignment corresponding to described test instruction value by described test instruction value in master routine to be tested;
Log saving module, the running state information produced during for preserving described master routine execution test assignment is in journal file.
9. system according to claim 8, is characterized in that, described testing execution module comprises:
Reading unit, carries out as parameter the test instruction value transmitted for reading in described watchdog routine;
Module call unit, for calling test module corresponding with debug command value in described master routine, to perform test assignment corresponding to described test instruction by described test module.
10. system according to claim 8, is characterized in that, described system also comprises:
Start module, for starting described master routine;
Judge module, for judge the master routine of described startup upper once run time whether be improper exiting, if yes, then notify described transmission module;
Described transmission module also for trigger described watchdog routine by master routine upper once run time test instruction value be again passed in master routine.
11. systems according to claim 10, is characterized in that, described testing execution module also for reading the test instruction value that described watchdog routine is transmitted again, to re-execute test assignment corresponding to described test instruction value.
12. systems according to claim 10, is characterized in that, described system also comprises:
Writing module, for write master routine from current startup to described journal file corresponding to master routine start ident value;
Removing module, starts ident value for deleting described master routine from described journal file when described master routine normally exits.
13. systems according to claim 12, is characterized in that, whether there is master routine corresponding to described master routine and start ident value, if yes, then notify described transmission module when described judge module is also for judging that described master routine starts in described journal file.
14. systems according to claim 10, is characterized in that, described system also comprises:
Information locating module, for locating the last running state information run when exiting in described journal file, to obtain, master routine generation is improper exits corresponding running state information.
CN201410032804.XA 2014-01-23 2014-01-23 Realize the method and system of program test Active CN104809054B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410032804.XA CN104809054B (en) 2014-01-23 2014-01-23 Realize the method and system of program test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410032804.XA CN104809054B (en) 2014-01-23 2014-01-23 Realize the method and system of program test

Publications (2)

Publication Number Publication Date
CN104809054A true CN104809054A (en) 2015-07-29
CN104809054B CN104809054B (en) 2018-07-24

Family

ID=53693898

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410032804.XA Active CN104809054B (en) 2014-01-23 2014-01-23 Realize the method and system of program test

Country Status (1)

Country Link
CN (1) CN104809054B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105302726A (en) * 2015-11-13 2016-02-03 浪潮电子信息产业股份有限公司 Test method and device
CN106155907A (en) * 2016-07-04 2016-11-23 厦门美图移动科技有限公司 A kind of automated testing method, device and computing device
CN107273283A (en) * 2016-04-07 2017-10-20 高德信息技术有限公司 A kind of automated software detection method and device
CN107273284A (en) * 2017-04-20 2017-10-20 北京小度信息科技有限公司 The method and device of test application program performance
CN109271288A (en) * 2017-07-17 2019-01-25 展讯通信(上海)有限公司 Performance estimating method before processor silicon
CN111209209A (en) * 2020-01-15 2020-05-29 上海知白智能科技有限公司 Testing device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252471A (en) * 2008-03-20 2008-08-27 中兴通讯股份有限公司 Distributed automatization test system and method
US20090306954A1 (en) * 2008-06-05 2009-12-10 Wistron Corporation Method for automatically simulating manual testing of a computer, and testing system for performing the method
CN102075381A (en) * 2010-12-14 2011-05-25 云海创想信息技术(北京)有限公司 Automatic test platform server and system applied to cloud storage
CN102222042A (en) * 2011-06-28 2011-10-19 北京新媒传信科技有限公司 Automatic software testing method based on cloud computing
CN103425574A (en) * 2012-05-25 2013-12-04 腾讯科技(深圳)有限公司 Method and device for testing applications
CN103516557A (en) * 2012-06-26 2014-01-15 腾讯科技(深圳)有限公司 Method and system for testing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252471A (en) * 2008-03-20 2008-08-27 中兴通讯股份有限公司 Distributed automatization test system and method
US20090306954A1 (en) * 2008-06-05 2009-12-10 Wistron Corporation Method for automatically simulating manual testing of a computer, and testing system for performing the method
CN102075381A (en) * 2010-12-14 2011-05-25 云海创想信息技术(北京)有限公司 Automatic test platform server and system applied to cloud storage
CN102222042A (en) * 2011-06-28 2011-10-19 北京新媒传信科技有限公司 Automatic software testing method based on cloud computing
CN103425574A (en) * 2012-05-25 2013-12-04 腾讯科技(深圳)有限公司 Method and device for testing applications
CN103516557A (en) * 2012-06-26 2014-01-15 腾讯科技(深圳)有限公司 Method and system for testing

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105302726A (en) * 2015-11-13 2016-02-03 浪潮电子信息产业股份有限公司 Test method and device
CN107273283A (en) * 2016-04-07 2017-10-20 高德信息技术有限公司 A kind of automated software detection method and device
CN106155907A (en) * 2016-07-04 2016-11-23 厦门美图移动科技有限公司 A kind of automated testing method, device and computing device
CN106155907B (en) * 2016-07-04 2018-12-18 厦门美图移动科技有限公司 A kind of automated testing method, device and calculate equipment
CN107273284A (en) * 2017-04-20 2017-10-20 北京小度信息科技有限公司 The method and device of test application program performance
CN107273284B (en) * 2017-04-20 2020-12-25 北京星选科技有限公司 Method and device for testing application program performance
CN109271288A (en) * 2017-07-17 2019-01-25 展讯通信(上海)有限公司 Performance estimating method before processor silicon
CN109271288B (en) * 2017-07-17 2021-09-21 展讯通信(上海)有限公司 Method for evaluating performance of processor before silicon
CN111209209A (en) * 2020-01-15 2020-05-29 上海知白智能科技有限公司 Testing device

Also Published As

Publication number Publication date
CN104809054B (en) 2018-07-24

Similar Documents

Publication Publication Date Title
CN108959000B (en) Server pressure testing method, system and terminal
CN107038112B (en) Application interface debugging method and device
CN104809054B (en) Realize the method and system of program test
CN109901881B (en) Plug-in loading method and device of application program, computer equipment and storage medium
CN107817995A (en) A kind of silent method, apparatus and terminal device for starting application in backstage
CN109359118B (en) Data writing method and device
CN111078556B (en) Application testing method and device
CN104268472B (en) Reduction is by the method and apparatus of third party's dynamic base Modification growth function address
CN111330280A (en) Data processing method and device in game, storage medium and electronic equipment
CN113268416A (en) Application program testing method and device, storage medium and terminal
CN108984374B (en) Method and system for testing database performance
CN111858112B (en) Method, client and server for detecting memory leakage
CN115756881A (en) Data processing method, device, equipment and storage medium based on SDK
CN104965692A (en) Method and system for displaying data across multiple processes in a desktop application
CN106709330B (en) Method and device for recording file execution behaviors
CN115656788B (en) Chip testing system, method, equipment and storage medium
CN108269223B (en) Webpage graph drawing method and terminal
CN106708705B (en) Terminal background process monitoring method and system
CN114510417A (en) Image rendering effect testing method and device, electronic equipment and storage medium
US9961534B2 (en) Program and information processing apparatus
CN104714879A (en) Picture testing method and device
CN112269708B (en) Debugging information acquisition method and device, electronic equipment and storage medium
CN115617675A (en) Automatic testing method, device and equipment of application program and storage medium
US20140310711A1 (en) Method for determining performance of process of application and computer system
CN116955147A (en) Information processing method and related device

Legal Events

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

Effective date of registration: 20210922

Address after: 518057 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 floors

Patentee after: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

Patentee after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd.

Address before: 2, 518000, East 403 room, SEG science and Technology Park, Zhenxing Road, Shenzhen, Guangdong, Futian District

Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.