CN108563579A - White-box testing method, apparatus, system and storage medium - Google Patents

White-box testing method, apparatus, system and storage medium Download PDF

Info

Publication number
CN108563579A
CN108563579A CN201810365293.1A CN201810365293A CN108563579A CN 108563579 A CN108563579 A CN 108563579A CN 201810365293 A CN201810365293 A CN 201810365293A CN 108563579 A CN108563579 A CN 108563579A
Authority
CN
China
Prior art keywords
test
version
test object
measured
white
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
CN201810365293.1A
Other languages
Chinese (zh)
Other versions
CN108563579B (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.)
Suzhou Keda Technology Co Ltd
Original Assignee
Suzhou Keda Technology 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 Suzhou Keda Technology Co Ltd filed Critical Suzhou Keda Technology Co Ltd
Priority to CN201810365293.1A priority Critical patent/CN108563579B/en
Publication of CN108563579A publication Critical patent/CN108563579A/en
Application granted granted Critical
Publication of CN108563579B publication Critical patent/CN108563579B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Abstract

This application involves a kind of white-box testing method, apparatus, system and storage mediums, belong to computer realm, and this method includes:Obtain test case and version to be measured to be tested;The compiling mode of the test case is determined according to the attribute information of test object;The test case is compiled into the test code executed for the test object by the compiling mode;It controls the test object and runs the version to be measured;The test code is sent to the test object;It controls the test object and executes the test code, obtain the test report of the version to be measured;It can solve that test case is manually compiled into different language type, lead to the less efficient problem of white-box testing, the efficiency of software test can be improved, reduce the workload of tester.

Description

White-box testing method, apparatus, system and storage medium
Technical field
This application involves a kind of white-box testing method, apparatus, system and storage mediums, belong to computer realm.
Background technology
White-box testing is one kind of method for testing software, and white-box testing system at this stage includes at least:Test case, survey Try controller and test object.Wherein, test case refers to the description to the test assignment of version to be measured, to be measured for embodying this Testing scheme, test method, measuring technology and Test Strategy of version etc.;Test controller can control test object and wait for this Version is surveyed to be tested.
In the test case for writing white-box testing, script may be used to write, can also use and test pair It is write as identical language.After the test case that tester writes, need the test case being compiled as test pair As the test code that can be executed, so that test object executes the test code and tests version to be measured.
However, since the language form for testing code that different test objects can execute may be different, test Personnel may need same test case being compiled into different types of test code, and the efficiency of artificial compiler test use-case compared with It is low, therefore, the less efficient of white-box testing can be led to.
Invention content
This application provides a kind of white-box testing method, apparatus, system and storage medium, can solve manually to use test Example is compiled into different language type, leads to the less efficient problem of white-box testing.The application provides the following technical solutions:
In a first aspect, a kind of white-box testing method is provided, in test controller, including the following steps:
A kind of white-box testing method, which is characterized in that it is used in test controller, the method includes:
Obtain test case and version to be measured to be tested;
The compiling mode of the test case is determined according to the attribute information of test object;
The test case is compiled into the test code executed for the test object by the compiling mode;
It controls the test object and runs the survey version;
The test code is sent to the test object;
It controls the test object and executes the test code, obtain the test report of the version to be measured.
Optionally, the attribute information according to the test object determines the compiling mode of the test case, including:
Obtain the attribute information of the test object;
The corresponding compiling mode of the attribute information is determined in the correspondence to prestore, the correspondence is at least Including the correspondence between the attribute information and the compiling mode.
Optionally, the attribute information includes at least at least one of following information:
The version number of the version to be measured of the title of the test object, the test object, the test object are supported Language form.
Optionally, the control test object runs the version to be measured, including:
It is remotely connect with test object foundation according to corresponding first communication protocol of the attribute information, described first Communication protocol is for test object described in Telnet, to control the test object;
After establishing the long-range connection, the version to be measured is sent to by the test pair based on the second communication protocol As;
The version to be measured will be run by controlling the test object based on the long-range connection.
Optionally, described that the test object operation version to be measured is controlled based on the long-range connection, including:
More newer command is sent to the test object based on the long-range connection, the more newer command is for controlling the survey It tries object and runs the version to be measured.
Optionally, described that the test code is sent to the test object, including:
The test code is sent to the test catalogue of the test object, the test mesh based on the long-range connection Record is established after the test object runs the version to be measured.
Optionally, the control test object executes the test code, before obtaining test report, further includes:
The resource distribution for changing the test object builds the test environment of the test object.
Optionally, the control test object executes the test code, after obtaining test report, further includes:
The test report is downloaded to specified directory.
Second aspect provides a kind of white-box testing device, in test controller, which to include:
First acquisition module, for obtaining test case and version to be measured to be tested;
Mode determining module, the compiling mode for determining the test case according to the attribute information of test object;
Use-case collector is held for being compiled into the test case by the compiling mode for the test object Capable test code;
First control module runs the version to be measured for controlling the test object;
Code sending module, for the test code to be sent to the test object;
Second control module executes the test code for controlling the test object, obtains the version to be measured Test report.
Optionally, the mode determining module, is used for:
Obtain the attribute information of the test object;
The corresponding compiling mode of the attribute information is determined in the correspondence to prestore, the correspondence is at least Including the correspondence between the attribute information and the compiling mode.
Optionally, the attribute information includes at least at least one of following information:
The version number of the version to be measured of the title of the test object, the test object, the test object are supported Language form.
Optionally, first control module, including:Protocol element and the first control unit.
Protocol element, it is long-range for being established according to corresponding first communication protocol of the attribute information and the test object Connection, first communication protocol is for test object described in Telnet, to control the test object;
The protocol element is additionally operable to after establishing the long-range connection, will be described to be measured based on the second communication protocol Version is sent to the test object;
First control unit will run the version to be measured for being based on the long-range connection control test object.
Optionally, first control unit, is used for:
More newer command is sent to the test object based on the long-range connection, the more newer command is for controlling the survey It tries object and runs the version to be measured.
Optionally, the code sending module, is used for:
The test code is sent to the test catalogue of the test object, the test mesh based on the long-range connection Record is established after the test object runs the version to be measured.
Optionally, described device further includes:Configuration modification module.
Configuration modification module executes the test code for controlling the test object, before obtaining test report, repaiies The resource distribution for changing the test object builds the test environment of the test object.
Optionally, described device further includes:Report download module.
It reports download module, the test code is executed controlling the test object, after obtaining test report, by institute It states test report and is downloaded to specified directory.
The third aspect provides a kind of white-box testing device, and the white-box testing device includes processor and memory;Institute It states in memory and has program stored therein, described program is loaded by the processor and executed to realize that the whitepack described in first aspect is surveyed Method for testing.
Fourth aspect, additionally provides a kind of white-box testing system, which includes test controller, test object, test Use-case library and version server;
The test controller is the white-box testing device described in second aspect;Or it is surveyed for the whitepack described in the third aspect Trial assembly is set;
The version server is used to provide version to be measured for the test controller;
The test case library is used to provide test case for the test controller;
The test object obtains test report for being tested the version to be measured according to the test case.
5th aspect, additionally provides a kind of computer readable storage medium, which is characterized in that the computer-readable storage It has program stored therein in medium, described program is loaded by processor and executes the white-box testing method described in first aspect.
The advantageous effect of the application is:
By obtaining version to be measured automatically by test controller and testing the test case of the version to be measured, and test is used Example is automatically compiled into the test code that can be executed in test object;There is the test object of the version to be measured to execute survey by operation Code is tried to test the version to be measured;It can solve manually to be compiled test case the efficiency for leading to software test Not high problem;It is participated in due to being not necessarily to tester during the test so that tester only need to attentively write test case , it is thus possible to improve the efficiency of software test, reduces the workload of tester.
Above description is only the general introduction of technical scheme, in order to better understand the technological means of the application, And can be implemented in accordance with the contents of the specification, below with the preferred embodiment of the application and coordinate attached drawing be described in detail as after.
Description of the drawings
Fig. 1 is the structural schematic diagram for the white-box testing system that the application one embodiment provides;
Fig. 2 is the flow chart for the white-box testing method that the application one embodiment provides;
Fig. 3 is the block diagram for the white-box testing device that the application one embodiment provides;
Fig. 4 is the block diagram for the white-box testing device that the application one embodiment provides.
Specific implementation mode
With reference to the accompanying drawings and examples, the specific implementation mode of the application is described in further detail.Implement below Example is not limited to scope of the present application for illustrating the application.
First, to this application involves several nouns explain.
Version to be measured:It refer to the software version for needing to carry out software test.Version to be measured can be to developed software The version being updated after (or upgrading);Alternatively, version to be measured can also be the version of the software of exploitation for the first time.It is optional Ground, version to be measured are made of at least line code.
Test case:Refer to the description that test assignment is carried out to version to be measured.Optionally, test case can embody test side At least one of case, test method, measuring technology and Test Strategy.The content of test case includes but not limited to:Test mesh At least one of mark, test environment, input data, testing procedure, expected results and test script.
Test object:For running version to be measured, and to object that the version to be measured is tested.Test object can be Hardware;Alternatively, can also be software;Alternatively, can also be the object of software and hardware combining.
Test report:It refer to the document for providing foundation for the problem of correction version to be measured.The content packet of test report It includes but is not limited to the following contents:The process of test, the result of test, the evaluation of product quality, the evaluation of test process.It is optional Ground, test report are to be acquired based on the data in test process and obtained to final test result analysis.
Fig. 1 is the structural schematic diagram for the white-box testing system that the application one embodiment provides, as shown in Figure 1, the system It includes at least:Test controller 110, test object 120, test case library 130 and version server 140.
Test controller 110 can be some or all of in terminal or server, and terminal can be mobile phone, calculate Machine, wearable device, portable computer etc., the present embodiment is not construed as limiting this.
Test controller 110 passes through wired or wirelessly foundation communication connection with test case library 130.Test control Device 110 processed from test case library 130 for obtaining test case.Optionally, test case library 130 and test controller 110 It can be deployed in same equipment;It is set alternatively, test case library 130 can also be respectively deployed in difference with test controller 110 In standby.
Test controller 110 also passes through wired or wirelessly foundation communication connection with version server 140.Test Controller 110 is additionally operable to obtain version to be measured from version server 140.Optionally, test controller 110 and version server 140 can be deployed in same equipment;Alternatively, test controller 110 can also be respectively deployed in difference with version server 140 In equipment.
Optionally, corresponding first communication protocol of attribute information of the test controller 110 based on test object and test pair As the long-range connection of 120 foundation, which is used for Telnet test object, to control test object; It establishes after long-range connection, version to be measured is sent to by test object 120 based on the second communication protocol.
Schematically, the first communication protocol can be remote terminal protocol (Telnet);Alternatively, can also be Secure Shell Agreement (SecureShell, SSH), it is, of course, also possible to be the agreement of other types of achievable remote control, the present embodiment pair This is not construed as limiting.
Schematically, the second communication protocol can be File Transfer Protocol (File Transfer Protocol, FTP); Alternatively, can also be the agreement of other types of realization file transmission, the present embodiment is not construed as limiting this.
Test controller 110 is additionally operable to control test object 120 and runs version to be measured.
Test controller 110 is additionally operable to determine the compiling mode of test case according to the attribute information of test object 120;It is logical It crosses the compiling mode and test case is compiled into the test code executed for test object 120;The test code is sent to survey Try object 120;It controls test object 120 and executes test code, obtain the test report of version to be measured.
Optionally, test controller can have the continuous integrating of similar functions to put down by Jenkins and/or with Jenkins Platform management.
It should be added that the present embodiment is only with test object 120, test case library 130 and version server 140 Quantity be one be illustrated, in actual implementation, test object 120, test case library 130 and version server 140 quantity can be multiple, and the present embodiment is not construed as limiting this.
Fig. 2 is the flow chart for the white-box testing method that the application one embodiment provides, and the present embodiment is answered in this method For in white-box testing system shown in FIG. 1, and for the executive agent of each step is test controller 110 in the system It illustrates.This method includes at least following steps:
S1, test case and version to be measured to be tested are obtained.
Optionally, test controller is obtained according to the attribute information of test object from the test case catalogue of test case library Take test case.Wherein, attribute information is sent to test controller by test object;Alternatively, attribute information is pre-stored in test control In device processed.
Schematically, attribute information includes but not limited at least one of following information:The title of test object, test The language form that the version number of the version to be measured of object, test object are supported.
Test case can be stored in test case library, optionally, test case library use as Jenkins and/or with There is Jenkins the continuous integrating platform of similar functions to be managed.
Optionally, test controller obtains version to be measured from version server.
Optionally, test controller can first obtain test case from test case library, then be obtained from version server Take version to be measured;Alternatively, test controller can also first obtain version to be measured from version server, then from test case library Obtain test case;Alternatively, test controller can also obtain test case and version to be measured to be tested, the present embodiment simultaneously The sequencing for not obtaining test case and version to be measured to test controller is construed as limiting.
S2, the compiling mode that test case is determined according to the attribute information of test object.
Optionally, test controller obtains the attribute information of test object;Attribute letter is determined in the correspondence to prestore Cease corresponding compiling mode.
Wherein, correspondence includes at least the correspondence between the attribute information and compiling mode of test object.
Such as:Correspondence is the correspondence between the title and compiling mode of test object.
S3, test case is compiled by the test code executed for test object by the compiling mode determined.
Due to the correspondence being prerecorded in test controller between test object and compiling mode, pass through The compiling mode obtained based on the correspondence can obtain the executable test code of test object come compiler test use-case.
S4, control test object run version to be measured.
Optionally, test controller control test object runs version to be measured, including:According to attribute information corresponding first Communication protocol is remotely connect with test object foundation;After establishing long-range connection, the second communication protocol is based on by version to be measured It is sent to test object;Version to be measured will be run based on long-range connection control test object.
Wherein, the first communication protocol is used for Telnet test object, to control test object.Schematically, First communication protocol can be remote terminal protocol (Telnet);Alternatively, can also be safety shell protocol (SecureShell, SSH), it is, of course, also possible to be the agreement of other types of achievable remote control, the present embodiment is not construed as limiting this.
Optionally, the correspondence between attribute information and the first communication protocol is also prestored in test server, such as: Correspondence between the title of test object and the first communication protocol, test server are determined and are tested according to the correspondence Object establishes the first communication protocol of communication connection.
Second communication protocol is used for test object transmission data, such as:Version to be measured, test code etc..Schematically, Second communication protocol can be File Transfer Protocol (File Transfer Protocol, FTP);Alternatively, can also be other The agreement for realizing file transmission of type, the present embodiment are not construed as limiting this.
Optionally, version to be measured will be run based on long-range connection control test object, including:Based on remotely connecting to test Object sends more newer command, which runs version to be measured for controlling the test object.
Schematically, more newer command can be shell (shell) order.
Optionally, test object can also generate the test catalogue for storing test code after running version to be measured And/or the test result catalogue for storing test report.
Optionally, this step can execute before S2 and S3;Alternatively, can also be executed after S2 and S3;Alternatively, also It can be performed simultaneously with S2 and S3, execution sequence of the present embodiment not between S4 and S2 and S3 is construed as limiting.
S5, test code is sent to test object.
Optionally, test code is sent to test object by test controller based on long-range connect between test object Test catalogue.Wherein, test catalogue is established after test object runs version to be measured.
S6, control test object execute test code, obtain the test report of version to be measured.
Optionally, test object collects the test data obtained during the test, obtains the test report of version to be measured. Schematically, test report is hypertext markup language (HyperText Markup Language, HTML) format.
In conclusion the present embodiment provides white-box testing method, by obtained automatically by test controller version to be measured and The test case of the version to be measured is tested, and test case is automatically compiled into the test generation that can be executed in test object Code;There is the test object of the version to be measured to execute test code by operation to test the version to be measured;It can solve people Work is compiled test case the inefficient problem for leading to software test;Due to being not necessarily to tester during the test It participates in so that tester only need to attentively write test case, it is thus possible to improve the efficiency of software test, reduces and survey The workload of examination personnel.
Optionally, it is based on above-described embodiment, test controller, can also be to the test wrapper of test object before executing S6 Border is configured.
Schematically, the resource distribution for changing test object builds the test environment of the test object.At this point, in S6, Test controller control test object executes test code in the test environment of structure, obtains the test report of version to be measured.
Wherein, resource distribution includes but not limited to:In network configuration, hardware configuration, software configuration and database configuration It is at least one.
In the present embodiment, by the resource distribution for changing test object so that test object can be suitble to version to be measured This is tested in the environment of being tested, it is ensured that the accuracy of test result.
Optionally, above-described embodiment, after step S6, test that test controller can obtain test object are based on Report is downloaded to specified directory, so that continuous integrating platform carries out same management to the test report in the specified directory.
Schematically, test report can be downloaded to specified mesh by test controller based on the second communication protocol (such as FTP) Record.
Optionally, specified directory can be the catalogue of test controller local;Alternatively, can also be the mesh in miscellaneous equipment Record.Optionally, specified directory is arranged in test controller before downloading test report, such as:Default setting when manufacture Or be that tester is specified or create.
Optionally, it is based on above-described embodiment, after step S6, test controller can also be by the test in test object Directory delete restores the resource distribution of test object.
Fig. 3 is the block diagram for the white-box testing device that the application one embodiment provides, and the present embodiment is with this device application It is illustrated for test controller 110 in white-box testing system shown in FIG. 1.The device includes at least following mould Block:Data obtaining module 310, mode determining module 320, use-case collector 330, the first control module 340, code send mould Block 350 and the second control module 360.
Data obtaining module 310, for obtaining test case and version to be measured to be tested;
Mode determining module 320, the compiling mode for determining the test case according to the attribute information of test object;
Use-case collector 330, for the test case to be compiled into for the test pair by the compiling mode As the test code of execution;
First control module 340 runs the version to be measured for controlling the test object;
Code sending module 350, for the test code to be sent to the test object;
Second control module 360 executes the test code for controlling the test object, obtains the version to be measured Test report.
Optionally, use-case collector 320 includes multi-platform multilingual Compilation Method, for the test executed to needs Use-case is compiled, to obtain the test code that test object can execute, by test object name of product and version number into Row identification, to realize the compatibility to the test object of multi-language multi-platform.
Based on Fig. 3 the embodiment described, the mode determining module 320 is used for:
Obtain the attribute information of the test object;
The corresponding compiling mode of the attribute information is determined in the correspondence to prestore, the correspondence is at least Including the correspondence between the attribute information and the compiling mode.
Optionally, the attribute information includes at least at least one of following information:
The version number of the version to be measured of the title of the test object, the test object, the test object are supported Language form.
Optionally, first control module, including:Protocol element and the first control unit.
Protocol element, it is long-range for being established according to corresponding first communication protocol of the attribute information and the test object Connection, first communication protocol is for test object described in Telnet, to control the test object;
The protocol element is additionally operable to after establishing the long-range connection, will be described to be measured based on the second communication protocol Version is sent to the test object;
First control unit will run the version to be measured for being based on the long-range connection control test object.
Optionally, protocol element includes that various protocols, such as SSH, TELNET, FTP etc. are used for and version server and survey It tries object and establishes connection, to be uploaded, be downloaded, sent the agreement of order etc..
Optionally, first control unit, is used for:
More newer command is sent to the test object based on the long-range connection, the more newer command is for controlling the survey It tries object and runs the version to be measured.
Optionally, the code sending module 350, is used for:
The test code is sent to the test catalogue of the test object, the test mesh based on the long-range connection Record is established after the test object runs the version to be measured.
Optionally, described device further includes:Configuration modification module.
Configuration modification module executes the test code for controlling the test object, before obtaining test report, repaiies The resource distribution for changing the test object builds the test environment of the test object.
Optionally, described device further includes:Report download module.
It reports download module, the test code is executed controlling the test object, after obtaining test report, by institute It states test report and is downloaded to specified directory.
It should be noted that:The white-box testing device provided in above-described embodiment is when carrying out white-box testing, only with above-mentioned The division progress of each function module, can be as needed and by above-mentioned function distribution by different for example, in practical application Function module is completed, i.e., the internal structure of white-box testing device is divided into different function modules, described above to complete All or part of function.In addition, the white-box testing device that above-described embodiment provides belongs to same with white-box testing embodiment of the method One design, specific implementation process refer to embodiment of the method, and which is not described herein again.
Fig. 4 is the block diagram for the white-box testing device that the application one embodiment provides, which can be comprising shown in Fig. 1 White-box testing system in test controller 110 device, such as:Smart mobile phone, tablet computer, laptop or desk-top Computer.White-box testing device is also possible to be referred to as user equipment, portable terminal, laptop terminal, terminal console, control terminal Deng the present embodiment is not construed as limiting this.The device includes at least processor 410 and memory 420.
Processor 401 may include one or more processing cores, such as:4 core processors, 8 core processors etc..Place DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field- may be used in reason device 401 Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed Logic array) at least one of example, in hardware realize.Processor 401 can also include primary processor and coprocessor, master Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state. In some embodiments, processor 401 can be integrated with GPU (Graphics Processing Unit, image processor), GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 401 can also wrap AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processors are for handling related machine learning Calculating operation.
Memory 402 may include one or more computer readable storage mediums, which can To be non-transient.Memory 402 may also include high-speed random access memory and nonvolatile memory, such as one Or multiple disk storage equipments, flash memory device.In some embodiments, the non-transient computer in memory 402 can Storage medium is read for storing at least one instruction, at least one instruction is for performed to realize this Shen by processor 401 Please in embodiment of the method provide white-box testing method.
In some embodiments, white-box testing device is also optional includes:Peripheral device interface and at least one periphery are set It is standby.It can be connected by bus or signal wire between processor 401, memory 402 and peripheral device interface.Each peripheral equipment It can be connected with peripheral device interface by bus, signal wire or circuit board.Schematically, peripheral equipment includes but not limited to: Radio circuit, touch display screen, voicefrequency circuit and power supply etc..
Certainly, white-box testing device can also include fewer or more components, and the present embodiment is not construed as limiting this.
Optionally, the application is also provided with a kind of computer readable storage medium, in the computer readable storage medium It has program stored therein, described program is loaded by processor and executed to realize the white-box testing method of above method embodiment.
Optionally, the application is also provided with a kind of computer product, which includes computer-readable storage medium Matter has program stored therein in the computer readable storage medium, and described program is loaded by processor and executed to realize above-mentioned side The white-box testing method of method embodiment.
Each technical characteristic of embodiment described above can be combined arbitrarily, to keep description succinct, not to above-mentioned reality It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, it is all considered to be the range of this specification record.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, under the premise of not departing from the application design, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the protection domain of the application patent should be determined by the appended claims.

Claims (11)

1. a kind of white-box testing method, which is characterized in that it is used in test controller, the method includes:
Obtain test case and version to be measured to be tested;
The compiling mode of the test case is determined according to the attribute information of test object;
The test case is compiled into the test code executed for the test object by the compiling mode;
It controls the test object and runs the version to be measured;
The test code is sent to the test object;
It controls the test object and executes the test code, obtain the test report of the version to be measured.
2. white-box testing method as described in claim 1, which is characterized in that the attribute information according to the test object Determine the compiling mode of the test case, including:
Obtain the attribute information of the test object;
Determine that the corresponding compiling mode of the attribute information, the correspondence include at least in the correspondence to prestore Correspondence between the attribute information and the compiling mode.
3. white-box testing method as described in claim 1, which is characterized in that the attribute information includes at least in following information At least one:
The language that the version number of the version to be measured of the title of the test object, the test object, the test object are supported Type.
4. white-box testing method as described in claim 1, which is characterized in that waited for described in the control test object operation Version is surveyed, including:
It is remotely connect with test object foundation according to corresponding first communication protocol of the attribute information, first communication Agreement is for test object described in Telnet, to control the test object;
After establishing the long-range connection, the version to be measured is sent to by the test object based on the second communication protocol;
The version to be measured will be run by controlling the test object based on the long-range connection.
5. white-box testing method as claimed in claim 4, which is characterized in that described to control the survey based on the long-range connection It tries object and runs the version to be measured, including:
More newer command is sent to the test object based on the long-range connection, the more newer command is for controlling the test pair As running the version to be measured.
6. white-box testing method as claimed in claim 4, which is characterized in that described that the test code is sent to the survey Object is tried, including:
The test code is sent to the test catalogue of the test object based on the long-range connection, the test catalogue is The test object, which is run, to be established after the version to be measured.
7. such as claim 1 to 6 any one of them white-box testing method, which is characterized in that the control test object The test code is executed, before obtaining test report, further includes:
The resource distribution for changing the test object builds the test environment of the test object.
8. a kind of white-box testing device, which is characterized in that in test controller, described device to include:
First acquisition module, for obtaining test case and version to be measured to be tested;
Mode determining module, the compiling mode for determining the test case according to the attribute information of test object;
Use-case collector, for the test case to be compiled into for test object execution by the compiling mode Test code;
First control module runs the version to be measured for controlling the test object;
Code sending module, for the test code to be sent to the test object;
Second control module executes the test code for controlling the test object, obtains the test of the version to be measured Report.
9. a kind of white-box testing device, which is characterized in that the white-box testing device includes processor and memory;The storage It has program stored therein in device, described program is loaded by the processor and executed as described in any one of claim 1 to 7 to realize White-box testing method.
10. a kind of white-box testing system, which is characterized in that the system comprises test controller, test object, test case libraries And version server;
The test controller is white-box testing device as claimed in claim 8;Or it is whitepack as claimed in claim 9 Test device;
The version server is used to provide version to be measured for the test controller;
The test case library is used to provide test case for the test controller;
The test object obtains test report for being tested the version to be measured according to the test case.
11. a kind of computer readable storage medium, which is characterized in that it has program stored therein in the computer readable storage medium, Described program is loaded by processor and is executed to realize white-box testing method as described in any one of claim 1 to 7.
CN201810365293.1A 2018-04-23 2018-04-23 White box testing method, device and system and storage medium Active CN108563579B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810365293.1A CN108563579B (en) 2018-04-23 2018-04-23 White box testing method, device and system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810365293.1A CN108563579B (en) 2018-04-23 2018-04-23 White box testing method, device and system and storage medium

Publications (2)

Publication Number Publication Date
CN108563579A true CN108563579A (en) 2018-09-21
CN108563579B CN108563579B (en) 2021-06-18

Family

ID=63536396

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810365293.1A Active CN108563579B (en) 2018-04-23 2018-04-23 White box testing method, device and system and storage medium

Country Status (1)

Country Link
CN (1) CN108563579B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109460359A (en) * 2018-10-26 2019-03-12 深圳市鼎阳科技有限公司 A kind of software version test method and system for embedded device
CN109862389A (en) * 2018-11-20 2019-06-07 北京奇艺世纪科技有限公司 A kind of method for processing video frequency, device, server and storage medium
CN110334015A (en) * 2019-06-13 2019-10-15 腾讯科技(成都)有限公司 A kind of white-box testing method, apparatus, equipment and medium
CN111984533A (en) * 2020-08-04 2020-11-24 深圳市拔超科技有限公司 Software automation test system and method
CN112783759A (en) * 2019-11-11 2021-05-11 腾讯科技(深圳)有限公司 White box test task execution method and device, storage medium and computer equipment
CN112783780A (en) * 2021-01-28 2021-05-11 开放智能机器(上海)有限公司 Automatic testing method and system for multi-environment multi-platform embedded system
CN113254328A (en) * 2021-04-29 2021-08-13 厦门国际银行股份有限公司 White box testing method, system, mobile terminal and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420714A (en) * 2011-08-29 2012-04-18 展讯通信(上海)有限公司 Test managing method, test managing system master control center and test managing system
US20120117424A1 (en) * 2010-11-04 2012-05-10 International Business Machines Corporation System-level testcase generation
CN102693183A (en) * 2012-05-30 2012-09-26 瑞斯康达科技发展股份有限公司 Method and system for realizing automatic software testing
CN103365770A (en) * 2012-04-09 2013-10-23 陆兵 Mobile terminal software testing system and software testing method
CN105320598A (en) * 2015-11-24 2016-02-10 广州华多网络科技有限公司 Software testing method and device
CN107704392A (en) * 2017-09-30 2018-02-16 华为技术有限公司 The processing method and server of a kind of test case

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120117424A1 (en) * 2010-11-04 2012-05-10 International Business Machines Corporation System-level testcase generation
CN102420714A (en) * 2011-08-29 2012-04-18 展讯通信(上海)有限公司 Test managing method, test managing system master control center and test managing system
CN103365770A (en) * 2012-04-09 2013-10-23 陆兵 Mobile terminal software testing system and software testing method
CN102693183A (en) * 2012-05-30 2012-09-26 瑞斯康达科技发展股份有限公司 Method and system for realizing automatic software testing
CN105320598A (en) * 2015-11-24 2016-02-10 广州华多网络科技有限公司 Software testing method and device
CN107704392A (en) * 2017-09-30 2018-02-16 华为技术有限公司 The processing method and server of a kind of test case

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109460359A (en) * 2018-10-26 2019-03-12 深圳市鼎阳科技有限公司 A kind of software version test method and system for embedded device
CN109862389A (en) * 2018-11-20 2019-06-07 北京奇艺世纪科技有限公司 A kind of method for processing video frequency, device, server and storage medium
CN110334015A (en) * 2019-06-13 2019-10-15 腾讯科技(成都)有限公司 A kind of white-box testing method, apparatus, equipment and medium
CN110334015B (en) * 2019-06-13 2024-02-13 腾讯科技(成都)有限公司 White box testing method, device, equipment and medium
CN112783759A (en) * 2019-11-11 2021-05-11 腾讯科技(深圳)有限公司 White box test task execution method and device, storage medium and computer equipment
CN112783759B (en) * 2019-11-11 2023-10-03 腾讯科技(深圳)有限公司 White box test task execution method and device, storage medium and computer equipment
CN111984533A (en) * 2020-08-04 2020-11-24 深圳市拔超科技有限公司 Software automation test system and method
CN111984533B (en) * 2020-08-04 2023-02-03 深圳市拔超科技股份有限公司 Software automation test system and method
CN112783780A (en) * 2021-01-28 2021-05-11 开放智能机器(上海)有限公司 Automatic testing method and system for multi-environment multi-platform embedded system
CN113254328A (en) * 2021-04-29 2021-08-13 厦门国际银行股份有限公司 White box testing method, system, mobile terminal and storage medium

Also Published As

Publication number Publication date
CN108563579B (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN108563579A (en) White-box testing method, apparatus, system and storage medium
CN112270149B (en) Verification platform automatic integration method and system, electronic equipment and storage medium
CN108920370B (en) Compatibility problem detection method, device and equipment
CN109302522A (en) Test method, device and computer system and medium
CN107239392A (en) A kind of method of testing, device and terminal
CN109582525A (en) Test code verification method, verifying device, equipment and storage medium
CN108958992A (en) test method and device
CN112256321A (en) Static library packaging method and device, computer equipment and storage medium
CN108733553A (en) Configuration method, the device and system of test device based on docker
CN107122219A (en) The acquisition methods and device of installation file
CN106095415A (en) Exploitation file packing method, Apparatus and system
CN109783340A (en) Test code programming method, IP test method and the device of SoC
CN104133676A (en) Function execution method and function execution device based on scripts
CN111475390A (en) Log collection system deployment method, device, equipment and storage medium
CN110704044A (en) Visual programming system
CN107784230B (en) The restorative procedure and device of page loophole
CN114003451B (en) Interface testing method, device, system and medium
CN111767209A (en) Code testing method, device, storage medium and terminal
CN114201346A (en) HIL (hardware-in-the-loop) testing method and device of CAN (controller area network) communication interface and electronic equipment
CN112729868A (en) Vehicle diagnosis method, device, equipment and medium
CN108259895A (en) set-top box test method, system and terminal device
CN107509215A (en) A kind of wireless authentication automated testing method and system
CN111625291A (en) Automatic iteration method and device of data processing model and electronic equipment
CN115022328B (en) Server cluster, testing method and device of server cluster and electronic equipment
CN110413287A (en) The dispositions method and device of software

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
GR01 Patent grant
GR01 Patent grant