CN107766230A - A kind of method and apparatus tested based on configuration file - Google Patents

A kind of method and apparatus tested based on configuration file Download PDF

Info

Publication number
CN107766230A
CN107766230A CN201610696640.XA CN201610696640A CN107766230A CN 107766230 A CN107766230 A CN 107766230A CN 201610696640 A CN201610696640 A CN 201610696640A CN 107766230 A CN107766230 A CN 107766230A
Authority
CN
China
Prior art keywords
test
testing procedure
test case
configuration file
case
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
CN201610696640.XA
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610696640.XA priority Critical patent/CN107766230A/en
Publication of CN107766230A publication Critical patent/CN107766230A/en
Pending legal-status Critical Current

Links

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Tests Of Electronic Circuits (AREA)

Abstract

The purpose of the application is to provide a kind of method and apparatus tested based on configuration file.Compared with prior art, the application parses configuration file, to obtain several pending test cases, wherein, the test case includes at least one testing procedure, the testing procedure includes at least one basic function unit, then, the test case is performed successively by order of several the described test cases in the configuration file;The application improves the reusability for testing code by the other multiplexing of basic function cell level.Further, the application stores implementing result corresponding to the testing procedure whenever having performed a testing procedure, realizes that the breakpoint succession of lower granularity is carried out.Further, the application adds logic control keyword in the test case, controls the execution logic of the test case, so as to describe more complicated test scene.

Description

A kind of method and apparatus tested based on configuration file
Technical field
The application is related to computer realm, more particularly to a kind of technology tested based on configuration file.
Background technology
Automation generally to test is all relatively simple, and simplest is to add one section of new survey for a test scene Try code to support, configuration file simply simply configures different parameters, is substantially intended merely to test automation and tests certainly Dynamicization.Following problem generally be present in prior art:
1) it is very low to test the multiplexer level of code, only developing to use, and it is other to be related to code level Call.
2) executable portion step can not be only selected, breakpoint transmission can not be supported well.
3) configuration file is simple configuration parameter, can not add more functions.
The content of the invention
The purpose of the application is to provide a kind of method and apparatus tested based on configuration file, to solve to improve The problem of testing code reusability.
According to the one side of the application, there is provided a kind of method tested based on configuration file, wherein, this method Including:
Configuration file is parsed, to obtain several pending test cases, wherein, the test case includes at least one Individual testing procedure, the testing procedure include at least one basic function unit;
Several described test cases are performed successively by order of the test case in the configuration file.
According to further aspect of the application, there is provided a kind of equipment tested based on configuration file, wherein, this sets It is standby to include:
Resolver, for parsing configuration file, to obtain several pending test cases, wherein, the test Example includes at least one testing procedure, and the testing procedure includes at least one basic function unit;
Performs device, for performing several described surveys successively by order of the test case in the configuration file Try example.
According to the another aspect of the application, a kind of equipment tested based on configuration file, the equipment are additionally provided Including:
Processor;And
It is arranged to store the memory of computer executable instructions, the executable instruction makes the place when executed Manage device:Configuration file is parsed, to obtain several pending test cases, wherein, the test case includes at least one Testing procedure, the testing procedure include at least one basic function unit;By several described test cases in the configuration Order in file performs the test case successively.
Compared with prior art, the application parses configuration file, to obtain several pending test cases, wherein, The test case includes at least one testing procedure, and the testing procedure includes at least one basic function unit, then, pressed Order of several the described test cases in the configuration file performs the test case successively;The application passes through basic work( The energy other multiplexing of cell level, improve the reusability of test code.Further, the application is whenever having performed a survey Try is rapid, stores implementing result corresponding to the testing procedure, realizes that the breakpoint succession of lower granularity is carried out.Further, originally Logic control keyword is added in application in the test case, the execution logic of the test case is controlled, so as to retouch State more complicated test scene.
Brief description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 shows a kind of structural representation of configuration file according to the application;
Fig. 2 shows a kind of equipment schematic diagram tested based on configuration file according to the application one side;
Fig. 3 shows to be illustrated according to a kind of equipment tested based on configuration file of one preferred embodiment of the application Figure.
Same or analogous reference represents same or analogous part in accompanying drawing.
Embodiment
The application is described in further detail below in conjunction with the accompanying drawings.
In one typical configuration of the application, terminal, the equipment of service network and trusted party include one or more Processor (CPU), input/output interface, network interface and internal memory.
Internal memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, magnetic disk storage or other magnetic storage apparatus or Any other non-transmission medium, the information that can be accessed by a computing device available for storage.Defined according to herein, computer Computer-readable recording medium does not include non-temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
According to the application on one side, there is provided a kind of method tested based on configuration file, methods described are included Step S11 and step S12.
Specifically, in step s 11, equipment 1 parses configuration file, to obtain several pending test cases, its In, the test case includes at least one testing procedure, and the testing procedure includes at least one basic function unit;In step In rapid S12, equipment 1 performs several described test cases successively by order of the test case in the configuration file.
Here, the equipment 1 includes but is not limited to user equipment, the network equipment or user equipment and the network equipment passes through Network is integrated formed equipment.The user equipment its include but is not limited to any one and can be entered with user by touch pad The mobile electronic product of row man-machine interaction, such as smart mobile phone, tablet personal computer etc., the mobile electronic product can use any Operating system, such as android operating systems, iOS operating systems.Wherein, the network equipment can be according to thing including one kind The instruction for first setting or storing, the automatic electronic equipment for carrying out numerical computations and information processing, its hardware are including but not limited to micro- Processor, application specific integrated circuit (ASIC), programmable gate array (FPGA), digital processing unit (DSP), embedded device etc..Institute Stating the network equipment, it includes but is not limited to computer, network host, single network server, multiple webserver collection or multiple The cloud that server is formed;Here, cloud is by a large amount of computer or the webserver structures based on cloud computing (Cloud Computing) Into, wherein, cloud computing is one kind of Distributed Calculation, the virtual super meter of one be made up of the computer collection of a group loose couplings Calculation machine.The network includes but is not limited to internet, wide area network, Metropolitan Area Network (MAN), LAN, VPN, wireless self-organization network (Ad Hoc networks) etc..Preferably, equipment 1, which can also be, runs on the user equipment, the network equipment or user equipment and net Network equipment, the network equipment, touch terminal or the network equipment are integrated the pin in formed equipment with touch terminal by network This program.Certainly, those skilled in the art will be understood that the said equipment 1 is only for example, and other are existing or are likely to occur from now on Equipment 1 be such as applicable to the application, should also be included within the application protection domain, and be contained in by reference herein This.
In step s 11, equipment 1 parses configuration file, to obtain several pending test cases, wherein, reference Fig. 1, the test case include at least one testing procedure, and the testing procedure includes at least one basic function unit.
For example, the configuration file is used for the execution content and logic for describing test.In a test system, by resolver solution Configuration file is analysed, and is performed according to the logic of configuration description.In once testing, there are several test cases (case) to be held OK.The basic function unit (processor) is the minimum functional module in test, can directly use the side of configuration file Formula describes, and resolved device performs.The testing procedure (step) is the execution step of the test case (case), Ke Yiyou Multiple basic function unit (processor) descriptions, i.e. a step is by multiple minimum functional module (processor) groups Close.
Compared with prior art, the application can directly be existed by the multiplexing of basic function unit (processor) rank The scene of test is described in configuration file using functional module.So that test code reusability is high, also reduce simultaneously To the requirement of test system.
Preferably, the testing procedure includes following at least any of class:When performing failure, it is real to skip presently described test Example, continues executing with next test case;Setup test environment;Check whether test environment meets expection;Perform test; Clear up test environment.
For example, the testing procedure (step) can have it is following several:1)valid_case_running:Special step Suddenly, current case can be skipped if failure is performed, continues executing with next case;2)pre_env:Environmental preparation works; 3)check_pre:Whether inspection environment meets expection;4)run:Perform test;5)clean_env:Clear up environment.In an institute State in test case (case), be not that above-mentioned every kind of step there must be, but must at least have a step.
Preferably, the basic function unit includes execution method and performs parameter.
For example, the description of each basic function unit (processor) includes two parts:Execution method and execution Parameter.Assuming that there is the basic function unit (processor) to be:" TEST RUN arg1=arg11111arg2= Arg2222xx_key=xxx_val ";Wherein, " TEST RUN " represent there is one in ./processor/test files There is Run (execution) method CTest classes, the inside, and this method only has map (mapping) parameter;" arg1= Arg11111arg2=arg2222xx_key=xxx_val " can be combined into a map (mapping):{‘arg1:’arg11111’ arg2:’arg2222’xx_key:' xxx_val ', the map (mapping) can be as the method for foregoing Run (execution);In this example In, the execution method is Run methods, and the execution parameter is map parameters.
Preferably, the test case also includes logic control keyword.
For example, exception keywords can be added in test case (case) to set the test case (case) Execution control logic.
It is highly preferred that the logic control keyword is including following at least any of:Ignore and currently perform failure, continue to hold OK;Perform next testing procedure;Go to the testing procedure of cleaning test environment;Stop performing, exit test.
For example, connecting example, exception keywords can have following several:1)continue:(default value) is ignored currently Failure, is continued executing with;2)break:Perform next testing procedure;3)clean:Go to clean_env;4)exit:Stop institute Some tests, exit test.
In step s 12, equipment 1 is performed described some successively by order of the test case in the configuration file Individual test case.
For example, it is assumed that the form of the configuration file is as follows:
[case_prepare_env]
Pre_env=ENV PREPARE
Exception=exit
[cluster_info]
Valid_case_running=TEST ISRUN
Run=CLUSTER INFO | CLUSTER BUILD
[case_test_run]
#run-step
Pre_env=TEST PREENV aa=111bb=11 | TEST EXECUTE xx=aa yy=2
Check_pre=TEST CHECKPRE param1=aaa
Run=TEST RUN arg1=arg11111arg2=arg2222xx_key=xxx_val
Clean_env=TEST CLEANENV xx=xxx
Exception=break
Wherein, including three test cases, i.e. " case_prepare_env ", " cluster_info " and " case_ test_run”.By order of the test case in the configuration file, " case_prepare_ is performed successively from top to bottom env”、“cluster_info”、“case_test_run”。
Preferably, in step s 12, equipment 1 is when the test case includes multiple testing procedures, according to each test The execution sequence of step performs the multiple testing procedure in the test case successively.
For example, a test case (case) needs in particular order successively if including multiple testing procedures (step) Perform each testing procedure (step).
It is highly preferred that the execution sequence of each testing procedure is pressed with Types Below by elder generation to rear:When performing failure, skip current The test case, continue executing with next test case;Setup test environment;It is pre- to check whether test environment meets Phase;Perform test;Clear up test environment.
For example, it is assumed that valid_case_running is represented:When performing failure, presently described test case is skipped, is continued Perform next test case;Pre_env is represented:Setup test environment;Check_pre is represented:Checking test environment is It is no to meet expection;Run is represented:Perform test;Clean_env is represented:Clear up test environment.At each test case (case) In, it is necessary to be held successively according to valid_case_running, pre_env, check_pre, run, clean_env particular order OK.If in a test case (case) simultaneously including valid_case_running, pre_env, check_pre, run, Five kinds of testing procedures (step) of clean_env, then according to valid_case_running, pre_ in the test case (case) Env, check_pre, run, clean_env order perform each testing procedure (step) successively;An if test case (case) tri- kinds of testing procedures (step) of valid_case_running, run, clean_env are included, then in the test case (case) each testing procedure (step) is performed successively according to valid_case_running, run, clean_env order in;If Only include a testing procedure (step) in one test case (case):Run, then only performed in the test case (case) run。
Preferably, in step s 12, equipment 1 is when the testing procedure includes multiple basic function units, reference picture 1, According to each basic function unit, order performs the multiple basis in the testing procedure successively in the testing procedure Functional unit.
For example, a testing procedure (step) is if including multiple basic function units (processor), multiple bases therein Plinth functional unit (processor) can be connected by " | ", and be performed successively according to order from left to right, here, " | " symbol Number represent processor between interval.
Certainly, those skilled in the art will be understood that the symbol at above-mentioned expression interval and execution sequence are only for example, and also may be used With the interval between representing processor with other symbols, and can also be performed successively according to order from right to left.
Preferably, in step s 12, logic control keyword of the equipment 1 in the test case performs the survey Try example.
For example, neatly it can be controlled using exception=break, clean, exit when some test case (case) whether also to continue after performing failure.It so be free to combine the test scene of specific function.
Preferably, in step s 12, equipment 1 stores the testing procedure pair whenever having performed a testing procedure The implementing result answered.
For example, after each testing procedure (step) execution terminates, will can all be performed corresponding to the testing procedure (step) As a result store to data center, and persistence (such as mix and be stored in disk), in order to accomplish testing procedure (step) rank Breakpoint succession performs.
Preferably, methods described also includes step S13 ';In step S13 ', equipment 1 is after the test case stops When recovering to perform, suspended testing procedure restarts to perform from the test case.
For example, example is connected, because after each testing procedure (step) execution terminates, all can be by the testing procedure (step) Corresponding implementing result is stored to data center, when recovering to perform after test case termination, can be added from data center Implementing result corresponding to load, then proceed to perform.Moreover, it is also possible to by neatly being matched somebody with somebody using valid_case_running Whether put will skip the execution of some test implementation (case).
Fig. 2 shows a kind of equipment 1 tested based on configuration file according to the application one side, wherein, equipment 1 Including resolver 11 and performs device 12.
Specifically, the resolver 11 parses configuration file, to obtain several pending test cases, wherein, The test case includes at least one testing procedure, and the testing procedure includes at least one basic function unit;It is described to hold Luggage puts 12 and performs several described test cases successively by order of the test case in the configuration file.
Here, the equipment 1 includes but is not limited to user equipment, the network equipment or user equipment and the network equipment passes through Network is integrated formed equipment.The user equipment its include but is not limited to any one and can be entered with user by touch pad The mobile electronic product of row man-machine interaction, such as smart mobile phone, tablet personal computer etc., the mobile electronic product can use any Operating system, such as android operating systems, iOS operating systems.Wherein, the network equipment can be according to thing including one kind The instruction for first setting or storing, the automatic electronic equipment for carrying out numerical computations and information processing, its hardware are including but not limited to micro- Processor, application specific integrated circuit (ASIC), programmable gate array (FPGA), digital processing unit (DSP), embedded device etc..Institute Stating the network equipment, it includes but is not limited to computer, network host, single network server, multiple webserver collection or multiple The cloud that server is formed;Here, cloud is by a large amount of computer or the webserver structures based on cloud computing (Cloud Computing) Into, wherein, cloud computing is one kind of Distributed Calculation, the virtual super meter of one be made up of the computer collection of a group loose couplings Calculation machine.The network includes but is not limited to internet, wide area network, Metropolitan Area Network (MAN), LAN, VPN, wireless self-organization network (Ad Hoc networks) etc..Preferably, equipment 1, which can also be, runs on the user equipment, the network equipment or user equipment and net Network equipment, the network equipment, touch terminal or the network equipment are integrated the pin in formed equipment with touch terminal by network This program.Certainly, those skilled in the art will be understood that the said equipment 1 is only for example, and other are existing or are likely to occur from now on Equipment 1 be such as applicable to the application, should also be included within the application protection domain, and be contained in by reference herein This.
The resolver 11 parses configuration file, to obtain several pending test cases, wherein, the test Example includes at least one testing procedure, and the testing procedure includes at least one basic function unit.
For example, the configuration file is used for the execution content and logic for describing test.In a test system, by resolver solution Configuration file is analysed, and is performed according to the logic of configuration description.In once testing, there are several test cases (case) to be held OK.The basic function unit (processor) is the minimum functional module in test, can directly use the side of configuration file Formula describes, and resolved device performs.The testing procedure (step) is the execution step of the test case (case), Ke Yiyou Multiple basic function unit (processor) descriptions, i.e. a step is by multiple minimum functional module (processor) groups Close.
Compared with prior art, the application can directly be existed by the multiplexing of basic function unit (processor) rank The scene of test is described in configuration file using functional module.So that test code reusability is high, also reduce simultaneously To the requirement of test system.
Preferably, the testing procedure includes following at least any of class:When performing failure, it is real to skip presently described test Example, continues executing with next test case;Setup test environment;Check whether test environment meets expection;Perform test; Clear up test environment.
For example, the testing procedure (step) can have it is following several:1)valid_case_running:Special step Suddenly, current case can be skipped if failure is performed, continues executing with next case;2)pre_env:Environmental preparation works; 3)check_pre:Whether inspection environment meets expection;4)run:Perform test;5)clean_env:Clear up environment.In an institute State in test case (case), be not that above-mentioned every kind of step there must be, but must at least have a step.
Preferably, the basic function unit includes execution method and performs parameter.
For example, the description of each basic function unit (processor) includes two parts:Execution method and execution Parameter.Assuming that there is the basic function unit (processor) to be:" TEST RUN arg1=arg11111arg2= Arg2222xx_key=xxx_val ";Wherein, " TEST RUN " represent there is one in ./processor/test files There is Run (execution) method CTest classes, the inside, and this method only has map (mapping) parameter;" arg1= Arg11111arg2=arg2222xx_key=xxx_val " can be combined into a map (mapping):{‘arg1:’arg11111’ arg2:’arg2222’xx_key:' xxx_val ', the map (mapping) can be as the method for foregoing Run (execution);In this example In, the execution method is Run methods, and the execution parameter is map parameters.
Preferably, the test case also includes logic control keyword.
For example, exception keywords can be added in test case (case) to set the test case (case) Execution control logic.
It is highly preferred that the logic control keyword is including following at least any of:Ignore and currently perform failure, continue to hold OK;Perform next testing procedure;Go to the testing procedure of cleaning test environment;Stop performing, exit test.
For example, connecting example, exception keywords can have following several:1)continue:(default value) is ignored currently Failure, is continued executing with;2)break:Perform next testing procedure;3)clean:Go to clean_env;4)exit:Stop institute Some tests, exit test.
The performs device 12 by order of the test case in the configuration file perform successively it is described several Test case.
For example, it is assumed that the form of the configuration file is as follows:
[case_prepare_env]
Pre_env=ENV PREPARE
Exception=exit
[cluster_info]
Valid_case_running=TEST ISRUN
Run=CLUSTER INFO | CLUSTER BUILD
[case_test_run]
#run-step
Pre_env=TEST PREENV aa=111bb=11 | TEST EXECUTE xx=aa yy=2
Check_pre=TEST CHECKPRE param1=aaa
Run=TEST RUN arg1=arg11111arg2=arg2222xx_key=xxx_val
Clean_env=TEST CLEANENV xx=xxx
Exception=break
Wherein, including three test cases, i.e. " case_prepare_env ", " cluster_info " and " case_ test_run”.By order of the test case in the configuration file, " case_prepare_ is performed successively from top to bottom env”、“cluster_info”、“case_test_run”。
Preferably, the performs device 12 is when the test case includes multiple testing procedures, according to each test step Rapid execution sequence performs the multiple testing procedure in the test case successively.
For example, a test case (case) needs in particular order successively if including multiple testing procedures (step) Perform each testing procedure (step).
It is highly preferred that the execution sequence of each testing procedure is pressed with Types Below by elder generation to rear:When performing failure, skip current The test case, continue executing with next test case;Setup test environment;It is pre- to check whether test environment meets Phase;Perform test;Clear up test environment.
For example, it is assumed that valid_case_running is represented:When performing failure, presently described test case is skipped, is continued Perform next test case;Pre_env is represented:Setup test environment;Check_pre is represented:Checking test environment is It is no to meet expection;Run is represented:Perform test;Clean_env is represented:Clear up test environment.At each test case (case) In, it is necessary to be held successively according to valid_case_running, pre_env, check_pre, run, clean_env particular order OK.If in a test case (case) simultaneously including valid_case_running, pre_env, check_pre, run, Five kinds of testing procedures (step) of clean_env, then according to valid_case_running, pre_ in the test case (case) Env, check_pre, run, clean_env order perform each testing procedure (step) successively;An if test case (case) tri- kinds of testing procedures (step) of valid_case_running, run, clean_env are included, then in the test case (case) each testing procedure (step) is performed successively according to valid_case_running, run, clean_env order in;If Only include a testing procedure (step) in one test case (case):Run, then only performed in the test case (case) run。
Preferably, the performs device 12 is when the testing procedure includes multiple basic function units, according to each base Plinth functional unit order in the testing procedure performs the multiple basic function unit in the testing procedure successively.
For example, a testing procedure (step) is if including multiple basic function units (processor), multiple bases therein Plinth functional unit (processor) can be connected by " | ", and be performed successively according to order from left to right, here, " | " symbol Number represent processor between interval.
Certainly, those skilled in the art will be understood that the symbol at above-mentioned expression interval and execution sequence are only for example, and also may be used With the interval between representing processor with other symbols, and can also be performed successively according to order from right to left.
Preferably, it is real to perform the test for logic control keyword of the performs device 12 in the test case Example.
For example, neatly it can be controlled using exception=break, clean, exit when some test case (case) whether also to continue after performing failure.It so be free to combine the test scene of specific function.
Preferably, it is corresponding to store the testing procedure whenever having performed a testing procedure for the performs device 12 Implementing result.
For example, after each testing procedure (step) execution terminates, will can all be performed corresponding to the testing procedure (step) As a result store to data center, and persistence (such as mix and be stored in disk), in order to accomplish testing procedure (step) rank Breakpoint succession performs.
Preferably, the equipment 1 also includes stopping recovery device 13 ' (as shown in Figure 3);The termination recovery device 13 ' When recovering to perform after test case termination, suspended testing procedure restarts to perform from the test case.
For example, example is connected, because after each testing procedure (step) execution terminates, all can be by the testing procedure (step) Corresponding implementing result is stored to data center, when recovering to perform after test case termination, can be added from data center Implementing result corresponding to load, then proceed to perform.Moreover, it is also possible to by neatly being matched somebody with somebody using valid_case_running Whether put will skip the execution of some test implementation (case).
According to the another aspect of the application, a kind of equipment tested based on configuration file, the equipment are additionally provided Including:
Processor;And
It is arranged to store the memory of computer executable instructions, the executable instruction makes the place when executed Manage device:Configuration file is parsed, to obtain several pending test cases, wherein, the test case includes at least one Testing procedure, the testing procedure include at least one basic function unit;By several described test cases in the configuration Order in file performs the test case successively.
Compared with prior art, the application parses configuration file, to obtain several pending test cases, wherein, The test case includes at least one testing procedure, and the testing procedure includes at least one basic function unit, then, pressed Order of several the described test cases in the configuration file performs the test case successively;The application passes through basic work( The energy other multiplexing of cell level, improve the reusability of test code.Further, the application is whenever having performed a survey Try is rapid, stores implementing result corresponding to the testing procedure, realizes that the breakpoint succession of lower granularity is carried out.Further, originally Logic control keyword is added in application in the test case, the execution logic of the test case is controlled, so as to retouch State more complicated test scene.
It should be noted that the application can be carried out in the assembly of software and/or software and hardware, for example, can adopt With application specific integrated circuit (ASIC), general purpose computer or any other realized similar to hardware device.In one embodiment In, the software program of the application can realize steps described above or function by computing device.Similarly, the application Software program (including related data structure) can be stored in computer readable recording medium storing program for performing, for example, RAM memory, Magnetically or optically driver or floppy disc and similar devices.In addition, some steps or function of the application can employ hardware to realize, example Such as, coordinate as with processor so as to perform the circuit of each step or function.
In addition, the part of the application can be applied to computer program product, such as computer program instructions, when its quilt When computer performs, by the operation of the computer, it can call or provide according to the present processes and/or technical scheme. And the programmed instruction of the present processes is called, it is possibly stored in fixed or moveable recording medium, and/or pass through Broadcast or the data flow in other signal bearing medias and be transmitted, and/or be stored according to described program instruction operation In the working storage of computer equipment.Here, including a device according to one embodiment of the application, the device includes using Memory in storage computer program instructions and processor for execute program instructions, wherein, when the computer program refers to When order is by the computing device, method and/or skill of the plant running based on foregoing multiple embodiments according to the application are triggered Art scheme.
It is obvious to a person skilled in the art that the application is not limited to the details of above-mentioned one exemplary embodiment, Er Qie In the case of without departing substantially from spirit herein or essential characteristic, the application can be realized in other specific forms.Therefore, no matter From the point of view of which point, embodiment all should be regarded as exemplary, and be nonrestrictive, scope of the present application is by appended power Profit requires rather than described above limits, it is intended that all in the implication and scope of the equivalency of claim by falling Change is included in the application.Any reference in claim should not be considered as to the involved claim of limitation.This Outside, it is clear that the word of " comprising " one is not excluded for other units or step, and odd number is not excluded for plural number.That is stated in device claim is multiple Unit or device can also be realized by a unit or device by software or hardware.The first, the second grade word is used for table Show title, and be not offered as any specific order.

Claims (21)

1. a kind of method tested based on configuration file, wherein, this method includes:
Configuration file is parsed, to obtain several pending test cases, wherein, the test case includes at least one survey Try is rapid, and the testing procedure includes at least one basic function unit;
The test case is performed successively by order of several the described test cases in the configuration file.
2. according to the method for claim 1, wherein, the testing procedure includes following at least any of class:
When performing failure, presently described test case is skipped, continues executing with next test case;
Setup test environment;
Check whether test environment meets expection;
Perform test;
Clear up test environment.
3. according to the method for claim 1, wherein, described several test cases described in are in the configuration file Order performs the test case successively also to be included:
When the test case includes multiple testing procedures, the survey is performed successively according to the execution sequence of each testing procedure Try the multiple testing procedure in example.
4. according to the method for claim 3, wherein, the execution sequence of each testing procedure is pressed with Types Below by elder generation to rear:
When performing failure, presently described test case is skipped, continues executing with next test case;
Setup test environment;
Check whether test environment meets expection;
Perform test;
Clear up test environment.
5. according to the method for claim 3, wherein, described several test cases described in are in the configuration file Order performs the test case successively also to be included:
Whenever having performed a testing procedure, implementing result corresponding to the testing procedure is stored.
6. according to the method for claim 5, wherein, methods described also includes:
When recovering to perform after test case termination, suspended testing procedure restarts to hold from the test case OK.
7. according to the method for claim 3, wherein, described several test cases described in are in the configuration file Order performs the test case successively also to be included:
When the testing procedure includes multiple basic function units, according to each basic function unit in the testing procedure Order performs the multiple basic function unit in the testing procedure successively.
8. according to the method for claim 1, wherein, the test case also includes logic control keyword;
Wherein, it is described to perform the test case successively also by order of several the described test cases in the configuration file Including:
Logic control keyword in the test case performs the test case.
9. according to the method for claim 8, wherein, the logic control keyword includes following at least any of:
Ignore and currently perform failure, continue executing with;
Perform next testing procedure;
Go to the testing procedure of cleaning test environment;
Stop performing, exit test.
10. according to the method for claim 1, wherein, the basic function unit includes execution method and performs parameter.
11. a kind of equipment tested based on configuration file, wherein, the equipment includes:
Resolver, for parsing configuration file, to obtain several pending test cases, wherein, the test case Including at least one testing procedure, the testing procedure includes at least one basic function unit;
Performs device, it is real for performing the test successively by order of several the described test cases in the configuration file Example.
12. equipment according to claim 11, wherein, the testing procedure includes following at least any of class:
When performing failure, presently described test case is skipped, continues executing with next test case;
Setup test environment;
Check whether test environment meets expection;
Perform test;
Clear up test environment.
13. equipment according to claim 11, wherein, the performs device is additionally operable to:
When the test case includes multiple testing procedures, the survey is performed successively according to the execution sequence of each testing procedure Try the multiple testing procedure in example.
14. equipment according to claim 13, wherein, the execution sequence of each testing procedure is pressed with Types Below by first extremely Afterwards:
When performing failure, presently described test case is skipped, continues executing with next test case;
Setup test environment;
Check whether test environment meets expection;
Perform test;
Clear up test environment.
15. equipment according to claim 13, wherein, the performs device is additionally operable to:
Whenever having performed a testing procedure, implementing result corresponding to the testing procedure is stored.
16. equipment according to claim 15, wherein, the equipment also includes:
Stop recovery device, for when the test case termination after recover perform when, it is suspended from the test case Testing procedure restarts to perform.
17. equipment according to claim 13, wherein, the performs device is additionally operable to:
When the testing procedure includes multiple basic function units, according to each basic function unit in the testing procedure Order performs the multiple basic function unit in the testing procedure successively.
18. equipment according to claim 11, wherein, the test case also includes logic control keyword;
Wherein, the performs device is additionally operable to:
Logic control keyword in the test case performs the test case.
19. equipment according to claim 18, wherein, the logic control keyword includes following at least any of:
Ignore and currently perform failure, continue executing with;
Perform next testing procedure;
Go to the testing procedure of cleaning test environment;
Stop performing, exit test.
20. equipment according to claim 11, wherein, the basic function unit includes execution method and performs parameter.
21. a kind of equipment tested based on configuration file, the equipment are included:
Processor;And
It is arranged to store the memory of computer executable instructions, the executable instruction makes the processing when executed Device:
Configuration file is parsed, to obtain several pending test cases, wherein, the test case includes at least one survey Try is rapid, and the testing procedure includes at least one basic function unit;
The test case is performed successively by order of several the described test cases in the configuration file.
CN201610696640.XA 2016-08-19 2016-08-19 A kind of method and apparatus tested based on configuration file Pending CN107766230A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610696640.XA CN107766230A (en) 2016-08-19 2016-08-19 A kind of method and apparatus tested based on configuration file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610696640.XA CN107766230A (en) 2016-08-19 2016-08-19 A kind of method and apparatus tested based on configuration file

Publications (1)

Publication Number Publication Date
CN107766230A true CN107766230A (en) 2018-03-06

Family

ID=61262813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610696640.XA Pending CN107766230A (en) 2016-08-19 2016-08-19 A kind of method and apparatus tested based on configuration file

Country Status (1)

Country Link
CN (1) CN107766230A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109918126A (en) * 2019-01-28 2019-06-21 平安普惠企业管理有限公司 Method, apparatus, computer equipment and the storage medium of Code Edit
CN110806967A (en) * 2018-08-06 2020-02-18 北京京东尚科信息技术有限公司 Unit testing method and device
CN112506802A (en) * 2021-01-09 2021-03-16 杭银消费金融股份有限公司 Test data management method and system
CN112559372A (en) * 2020-12-24 2021-03-26 南方电网深圳数字电网研究院有限公司 Interface test case generation method, system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1920779A (en) * 2005-08-25 2007-02-28 中兴通讯股份有限公司 Configuration document based program flow control method
CN201435074Y (en) * 2009-06-04 2010-03-31 中国工商银行股份有限公司 Device for generating test case based on member
CN101882107A (en) * 2010-06-28 2010-11-10 山东中创软件商用中间件股份有限公司 Method and device for automatically testing WEB (World Wide Web) application
CN101989225A (en) * 2009-07-29 2011-03-23 中兴通讯股份有限公司 Method and device for automated test based on breakpoint
US8225288B2 (en) * 2008-01-29 2012-07-17 Intuit Inc. Model-based testing using branches, decisions, and options

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1920779A (en) * 2005-08-25 2007-02-28 中兴通讯股份有限公司 Configuration document based program flow control method
US8225288B2 (en) * 2008-01-29 2012-07-17 Intuit Inc. Model-based testing using branches, decisions, and options
CN201435074Y (en) * 2009-06-04 2010-03-31 中国工商银行股份有限公司 Device for generating test case based on member
CN101989225A (en) * 2009-07-29 2011-03-23 中兴通讯股份有限公司 Method and device for automated test based on breakpoint
CN101882107A (en) * 2010-06-28 2010-11-10 山东中创软件商用中间件股份有限公司 Method and device for automatically testing WEB (World Wide Web) application

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110806967A (en) * 2018-08-06 2020-02-18 北京京东尚科信息技术有限公司 Unit testing method and device
CN109918126A (en) * 2019-01-28 2019-06-21 平安普惠企业管理有限公司 Method, apparatus, computer equipment and the storage medium of Code Edit
CN112559372A (en) * 2020-12-24 2021-03-26 南方电网深圳数字电网研究院有限公司 Interface test case generation method, system and storage medium
CN112559372B (en) * 2020-12-24 2024-05-14 南方电网数字平台科技(广东)有限公司 Method, system and storage medium for generating interface test case
CN112506802A (en) * 2021-01-09 2021-03-16 杭银消费金融股份有限公司 Test data management method and system
CN112506802B (en) * 2021-01-09 2023-06-27 杭银消费金融股份有限公司 Test data management method and system

Similar Documents

Publication Publication Date Title
US20170123965A1 (en) Automated test generation for multi-interface enterprise virtualization management environment
CN102419729B (en) Parallel test execution
US20150301926A1 (en) User Interface Test Coverage
CN107766230A (en) A kind of method and apparatus tested based on configuration file
CN104683386A (en) Pile service implementation method and device capable of customizing response
CN106681903B (en) Method and device for generating test case
CN105204969A (en) Abnormal log processing method and abnormal log processing device
CN105808227A (en) Art resource file detection method and device
CN109271358A (en) Data summarization method, querying method, device, equipment and storage medium
CN108427731A (en) Processing method, device, terminal device and the medium of page code
US10009216B2 (en) Repeat execution of root cause analysis logic through run-time discovered topology pattern maps
CN109960491A (en) Application program generation method, generating means, electronic equipment and storage medium
US20180314516A1 (en) Efficient software testing
US9582270B2 (en) Effective feature location in large legacy systems
US10193989B2 (en) Visualization of user behavior
CN109815128A (en) Execution method, apparatus, terminal and the computer readable storage medium of test case
Holl et al. Mobile application quality assurance
CN104063307B (en) A kind of method for testing software and system
CN106648568B (en) Method and device for adding check box on table
CN113268243A (en) Memory prediction method and device, storage medium and electronic equipment
US20190121909A1 (en) Search Engine Optimization Techniques
CN101859246A (en) System and method for converting corresponding scripts according to different browsers
CN109977005B (en) End-to-end test method, medium, device and computing equipment
CN108563578A (en) SDK compatibility detection method, device, equipment and readable storage medium storing program for executing
CN105868095B (en) Generate the method and apparatus of test data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180306

RJ01 Rejection of invention patent application after publication