Nothing Special   »   [go: up one dir, main page]

CN108563579B - White box testing method, device and system and storage medium - Google Patents

White box testing method, device and system and storage medium Download PDF

Info

Publication number
CN108563579B
CN108563579B CN201810365293.1A CN201810365293A CN108563579B CN 108563579 B CN108563579 B CN 108563579B CN 201810365293 A CN201810365293 A CN 201810365293A CN 108563579 B CN108563579 B CN 108563579B
Authority
CN
China
Prior art keywords
test
test object
version
tested
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.)
Active
Application number
CN201810365293.1A
Other languages
Chinese (zh)
Other versions
CN108563579A (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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a white box testing method, a white box testing device, a white box testing system and a white box testing storage medium, which belong to the field of computers, and the white box testing method comprises the following steps: acquiring a test case and a to-be-tested version to be tested; determining the compiling mode of the test case according to the attribute information of the test object; compiling the test case into test codes for the test object to execute through the compiling mode; controlling the test object to run the version to be tested; sending the test code to the test object; controlling the test object to execute the test code to obtain a test report of the version to be tested; the problem that the efficiency of white box testing is low due to the fact that test cases are manually compiled into different language types can be solved, the efficiency of software testing can be improved, and the workload of testing personnel is reduced.

Description

White box testing method, device and system and storage medium
Technical Field
The application relates to a white box testing method, a white box testing device, a white box testing system and a white box testing storage medium, and belongs to the field of computers.
Background
The white box test is one of software test methods, and the white box test system at present at least comprises: the system comprises a test case, a test controller and a test object. The test case is used for describing a test task of the version to be tested and is used for embodying a test scheme, a test method, a test technology, a test strategy and the like of the version to be tested; the test controller can control the test object to test the version to be tested.
When writing the test case of the white-box test, the test case can be written by adopting a script language, and can also be written by adopting the same language as the test object. After the tester writes a test case, the tester needs to compile the test case into a test code that can be executed by the test object, so that the test object executes the test code to test the version to be tested.
However, since the language types of the test codes that can be executed by different test objects may be different, a tester may need to compile the same test case into different types of test codes, and the efficiency of manually compiling the test case is low, which may result in the low efficiency of the white-box test.
Disclosure of Invention
The application provides a white box testing method, a white box testing device, a white box testing system and a white box testing storage medium, and can solve the problem that efficiency of white box testing is low due to the fact that test cases are compiled into different language types manually. The application provides the following technical scheme:
in a first aspect, a white-box testing method is provided, which is used in a test controller, and includes the following steps:
a white-box testing method, for use in a test controller, the method comprising:
acquiring a test case and a to-be-tested version to be tested;
determining the compiling mode of the test case according to the attribute information of the test object;
compiling the test case into test codes for the test object to execute through the compiling mode;
controlling the test object to run the test version;
sending the test code to the test object;
and controlling the test object to execute the test code to obtain a test report of the version to be tested.
Optionally, the determining the compiling mode of the test case according to the attribute information of the test object includes:
acquiring attribute information of the test object;
and determining the compiling mode corresponding to the attribute information in a pre-stored corresponding relationship, wherein the corresponding relationship at least comprises the corresponding relationship between the attribute information and the compiling mode.
Optionally, the attribute information at least includes at least one of the following information:
the name of the test object, the version number of the version to be tested of the test object and the language type supported by the test object.
Optionally, the controlling the test object to run the version to be tested includes:
establishing remote connection with the test object according to a first communication protocol corresponding to the attribute information, wherein the first communication protocol is used for remotely logging in the test object so as to control the test object;
after the remote connection is established, sending the version to be tested to the test object based on a second communication protocol;
controlling the test object to run the version to be tested based on the remote connection.
Optionally, the controlling the test object to run the version to be tested based on the remote connection includes:
and sending an updating command to the test object based on the remote connection, wherein the updating command is used for controlling the test object to run the version to be tested.
Optionally, the sending the test code to the test object includes:
and sending the test code to a test directory of the test object based on the remote connection, wherein the test directory is established after the test object runs the version to be tested.
Optionally, before controlling the test object to execute the test code and obtaining the test report, the method further includes:
and modifying the resource configuration of the test object, and constructing the test environment of the test object.
Optionally, the controlling the test object to execute the test code, and after obtaining the test report, further includes:
and downloading the test report to a specified directory.
In a second aspect, there is provided a white box testing apparatus for use in a test controller, the apparatus comprising:
the first acquisition module is used for acquiring a test case and a to-be-tested version to be tested;
the mode determining module is used for determining the compiling mode of the test case according to the attribute information of the test object;
the case compiling module is used for compiling the test case into a test code for the test object to execute through the compiling mode;
the first control module is used for controlling the test object to run the version to be tested;
the code sending module is used for sending the test code to the test object;
and the second control module is used for controlling the test object to execute the test code to obtain the test report of the version to be tested.
Optionally, the mode determining module is configured to:
acquiring attribute information of the test object;
and determining the compiling mode corresponding to the attribute information in a pre-stored corresponding relationship, wherein the corresponding relationship at least comprises the corresponding relationship between the attribute information and the compiling mode.
Optionally, the attribute information at least includes at least one of the following information:
the name of the test object, the version number of the version to be tested of the test object and the language type supported by the test object.
Optionally, the first control module includes: a protocol unit and a first control unit.
The protocol unit is used for establishing remote connection with the test object according to a first communication protocol corresponding to the attribute information, and the first communication protocol is used for remotely logging in the test object so as to control the test object;
the protocol unit is further configured to send the version to be tested to the test object based on a second communication protocol after the remote connection is established;
and the first control unit is used for controlling the test object to run the version to be tested based on the remote connection.
Optionally, the first control unit is configured to:
and sending an updating command to the test object based on the remote connection, wherein the updating command is used for controlling the test object to run the version to be tested.
Optionally, the code sending module is configured to:
and sending the test code to a test directory of the test object based on the remote connection, wherein the test directory is established after the test object runs the version to be tested.
Optionally, the apparatus further comprises: and configuring a modification module.
And the configuration modification module is used for controlling the test object to execute the test code, modifying the resource configuration of the test object before a test report is obtained, and constructing a test environment of the test object.
Optionally, the apparatus further comprises: and a report downloading module.
And the report downloading module is used for downloading the test report to a specified directory after controlling the test object to execute the test code and obtaining the test report.
In a third aspect, a white-box testing apparatus is provided, the white-box testing apparatus comprising a processor and a memory; the memory has stored therein a program that is loaded and executed by the processor to implement the white-box testing method of the first aspect.
In a fourth aspect, a white-box testing system is further provided, where the system includes a test controller, a test object, a test case library, and a version server;
the test controller is the white-box testing device of the second aspect; or the white-box test apparatus of the third aspect;
the version server is used for providing a version to be tested for the test controller;
the test case library is used for providing test cases for the test controller;
and the test object is used for testing the version to be tested according to the test case to obtain a test report.
In a fifth aspect, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a program, and the program is loaded by a processor and executes the white-box testing method according to the first aspect.
The beneficial effect of this application lies in:
automatically acquiring a version to be tested and a test case for testing the version to be tested by a test controller, and automatically compiling the test case into a test code which can be executed on a test object; executing the test code by the test object running with the version to be tested to test the version to be tested; the problem that the efficiency of software testing is low due to manual compiling of the test cases can be solved; because the test personnel are not required to participate in the test process, the test personnel only need to concentrate on compiling the test case, so that the software test efficiency can be improved, and the workload of the test personnel is reduced.
The foregoing description is only an overview of the technical solutions of the present application, and in order to make the technical solutions of the present application more clear and clear, and to implement the technical solutions according to the content of the description, the following detailed description is made with reference to the preferred embodiments of the present application and the accompanying drawings.
Drawings
FIG. 1 is a schematic diagram of a white box test system according to an embodiment of the present application;
FIG. 2 is a flow chart of a white-box testing method provided by one embodiment of the present application;
FIG. 3 is a block diagram of a white box testing apparatus provided in one embodiment of the present application;
fig. 4 is a block diagram of a white box testing apparatus according to an embodiment of the present application.
Detailed Description
The following detailed description of embodiments of the present application will be described in conjunction with the accompanying drawings and examples. The following examples are intended to illustrate the present application but are not intended to limit the scope of the present application.
First, several nouns to which the present application relates are explained.
And (3) version to be tested: refers to the version of software that requires software testing. The version to be tested can be a version obtained by updating (or called as upgrading) developed software; alternatively, the version to be tested may be a version of software developed for the first time. Optionally, the version to be tested is composed of at least one line of code.
Test case: the description of the testing task of the version to be tested is referred to. Optionally, the test case may embody at least one of a test scheme, a test method, a test technique, and a test policy. The contents of the test case include, but are not limited to: at least one of a test target, a test environment, input data, a test step, an expected result, and a test script.
Test objects: and the object is used for running the version to be tested and testing the version to be tested. The test object may be hardware; alternatively, it may be software; alternatively, a combination of hardware and software may be used.
And (3) test report: refers to a document that provides a basis for correcting the problem of the version under test. The contents of the test report include, but are not limited to, the following: the process of testing, the results of testing, the evaluation of product quality, the evaluation of the testing process. Optionally, the test report is obtained based on data collection during the test and analysis of the final test result.
Fig. 1 is a schematic structural diagram of a white box testing system according to an embodiment of the present application, and as shown in fig. 1, the system at least includes: a test controller 110, a test object 120, a test case library 130, and a version server 140.
The test controller 110 may be part or all of a terminal or a server, and the terminal may be a mobile phone, a computer, a wearable device, a portable computer, and the like, which is not limited in this embodiment.
The test controller 110 establishes a communication connection with the test case library 130 in a wired or wireless manner. The test controller 110 is used to obtain test cases from the test case library 130. Alternatively, the test case library 130 and the test controller 110 may be deployed in the same device; alternatively, the test case library 130 and the test controller 110 may be deployed in different devices.
The test controller 110 also establishes a communication connection with the version server 140 by wire or wirelessly. Test controller 110 is also used to retrieve the version under test from version server 140. Alternatively, test controller 110 and version server 140 may be deployed in the same device; alternatively, the test controller 110 and the version server 140 may be deployed in different devices.
Optionally, the test controller 110 establishes a remote connection with the test object 120 based on a first communication protocol corresponding to the attribute information of the test object, where the first communication protocol is used to remotely log in the test object to control the test object; after establishing the remote connection, the version under test is sent to the test object 120 based on the second communication protocol.
Illustratively, the first communication protocol may be a remote terminal protocol (Telnet); alternatively, the protocol may be Secure Shell (SSH), and of course, other types of protocols capable of implementing remote control may also be used, and this embodiment is not limited to this.
Illustratively, the second communication Protocol may be a File Transfer Protocol (FTP); alternatively, other types of protocols for implementing file transfer may be used, and this embodiment is not limited thereto.
The test controller 110 is also used to control the test object 120 to run the version under test.
The test controller 110 is further configured to determine a compiling mode of the test case according to the attribute information of the test object 120; compiling the test case into test code for the test object 120 to execute through the compiling mode; sending the test code to the test object 120; and controlling the test object 120 to execute the test code to obtain a test report of the version to be tested.
Alternatively, the test controller may be managed by Jenkins and/or a persistent integration platform with similar functionality to Jenkins.
It should be added that, in this embodiment, only one of the number of the test object 120, the number of the test case library 130, and the number of the version server 140 are used as an example, and in actual implementation, the number of the test object 120, the number of the test case library 130, and the number of the version server 140 may be multiple, which is not limited in this embodiment.
Fig. 2 is a flowchart of a white box testing method according to an embodiment of the present application, where the white box testing system shown in fig. 1 is applied with the method, and the main execution body of each step is the test controller 110 in the system. The method at least comprises the following steps:
and S1, acquiring a test case and a to-be-tested version to be tested.
Optionally, the test controller obtains the test case from a test case catalog of the test case library according to the attribute information of the test object. Wherein, the attribute information is sent to the test controller by the test object; alternatively, the attribute information is pre-stored in the test controller.
Illustratively, the attribute information includes, but is not limited to, at least one of the following: the name of the test object, the version number of the version to be tested of the test object and the language type supported by the test object.
The test cases may be stored in a test case library, which may optionally be managed using, for example, Jenkins and/or a persistent integration platform with similar functionality to Jenkins.
Optionally, the test controller obtains the version to be tested from the version server.
Optionally, the test controller may first obtain the test case from the test case library, and then obtain the version to be tested from the version server; or, the test controller may also obtain the version to be tested from the version server first, and then obtain the test case from the test case library; or, the test controller may also obtain the test case and the version to be tested at the same time, and this embodiment does not limit the sequence of obtaining the test case and the version to be tested by the test controller.
And S2, determining the compiling mode of the test case according to the attribute information of the test object.
Optionally, the test controller acquires attribute information of the test object; and determining a compiling mode corresponding to the attribute information in the pre-stored corresponding relation.
Wherein, the corresponding relation at least comprises the corresponding relation between the attribute information of the test object and the compiling mode.
Such as: the corresponding relation is the corresponding relation between the name of the test object and the compiling mode.
And S3, compiling the test case into test codes for the test object to execute through the determined compiling mode.
Since the test controller records the corresponding relationship between the test object and the compiling mode in advance, the test case is compiled by the compiling mode obtained based on the corresponding relationship, and the test code executable by the test object can be obtained.
And S4, controlling the test object to run the version to be tested.
Optionally, the controlling, by the test controller, the test object to run the version to be tested includes: establishing remote connection with the test object according to a first communication protocol corresponding to the attribute information; after the remote connection is established, the version to be tested is sent to a test object based on a second communication protocol; controlling the test object to run the version to be tested based on the remote connection.
The first communication protocol is used for remotely logging in the test object so as to control the test object. Illustratively, the first communication protocol may be a remote terminal protocol (Telnet); alternatively, the protocol may be Secure Shell (SSH), and of course, other types of protocols capable of implementing remote control may also be used, and this embodiment is not limited to this.
Optionally, the test server further prestores a correspondence between the attribute information and the first communication protocol, for example: and the test server determines the first communication protocol for establishing communication connection with the test object according to the corresponding relation.
The second communication protocol is used for transmitting data to the test object, such as: version to be tested, test code, etc. Illustratively, the second communication Protocol may be a File Transfer Protocol (FTP); alternatively, other types of protocols for implementing file transfer may be used, and this embodiment is not limited thereto.
Optionally, controlling the test object to run the version to be tested based on the remote connection includes: and sending an update command to the test object based on the remote connection, wherein the update command is used for controlling the test object to run the version to be tested.
Illustratively, the update command may be a shell command.
Optionally, after the test object runs the version to be tested, a test directory for storing the test code and/or a test result directory for storing the test report is also generated by the test object.
Alternatively, this step may be performed before S2 and S3; alternatively, it may be performed after S2 and S3; alternatively, the execution may be performed simultaneously with S2 and S3, and the present embodiment does not limit the execution sequence between S4 and S2 and S3.
And S5, sending the test code to the test object.
Optionally, the test controller sends the test code to a test catalog of the test object based on a remote connection with the test object. The test directory is established after the test object runs the version to be tested.
And S6, controlling the test object to execute the test code to obtain a test report of the version to be tested.
Optionally, the test object collects test data obtained in the test process to obtain a test report of the version to be tested. Illustratively, the test report is in HyperText Markup Language (HTML) format.
In summary, the present embodiment provides a white-box testing method, in which a test controller automatically obtains a version to be tested and a test case for testing the version to be tested, and the test case is automatically compiled into a test code that can be executed on a test object; executing the test code by the test object running with the version to be tested to test the version to be tested; the problem that the efficiency of software testing is low due to manual compiling of the test cases can be solved; because the test personnel are not required to participate in the test process, the test personnel only need to concentrate on compiling the test case, so that the software test efficiency can be improved, and the workload of the test personnel is reduced.
Optionally, based on the above embodiment, the test controller may further configure the test environment of the test object before executing S6.
Illustratively, the resource configuration of the test object is modified, and the test environment of the test object is constructed. At this time, in S6, the test controller controls the test object to execute the test code in the constructed test environment, so as to obtain the test report of the version to be tested.
Among them, the resource configuration includes but is not limited to: at least one of a network configuration, a hardware configuration, a software configuration, and a database configuration.
In this embodiment, by modifying the resource configuration of the test object, the test object can be tested in an environment suitable for testing the version to be tested, and the accuracy of the test result can be ensured.
Alternatively, based on the above embodiment, after step S6, the test controller may download the test report obtained by the test object to the specified directory, so that the persistent integration platform can perform the same management on the test report in the specified directory.
Illustratively, the test controller may download the test report to a designated directory based on a second communication protocol (e.g., FTP).
Alternatively, the specified directory may be a directory local to the test controller; alternatively, it may be a directory in other devices. Optionally, the specified directory is set before the test controller downloads the test report, such as: factory default settings, or specified or created by a tester.
Optionally, based on the above embodiment, after step S6, the test controller may further delete the test directory in the test object and restore the resource configuration of the test object.
Fig. 3 is a block diagram of a white box testing apparatus according to an embodiment of the present application, and this embodiment takes as an example that the apparatus is applied to the test controller 110 in the white box testing system shown in fig. 1. The device at least comprises the following modules: the system comprises an information acquisition module 310, a mode determination module 320, a use case compiling module 330, a first control module 340, a code sending module 350 and a second control module 360.
An information obtaining module 310, configured to obtain a test case and a to-be-tested version to be tested;
a mode determining module 320, configured to determine a compiling mode of the test case according to the attribute information of the test object;
the use case compiling module 330 is configured to compile the test use case into a test code for the test object to execute through the compiling manner;
the first control module 340 is configured to control the test object to run the version to be tested;
a code sending module 350, configured to send the test code to the test object;
the second control module 360 is configured to control the test object to execute the test code, so as to obtain a test report of the version to be tested.
Optionally, the use case compiling module 320 includes a multi-platform and multi-language compiling method, which is used to compile the test case to be executed to obtain the test code that can be executed by the test object, and identify the test object by the product name and the version number of the test object to realize compatibility with the multi-platform and multi-language test object.
Based on the embodiment described in fig. 3, the manner determining module 320 is configured to:
acquiring attribute information of the test object;
and determining the compiling mode corresponding to the attribute information in a pre-stored corresponding relationship, wherein the corresponding relationship at least comprises the corresponding relationship between the attribute information and the compiling mode.
Optionally, the attribute information at least includes at least one of the following information:
the name of the test object, the version number of the version to be tested of the test object and the language type supported by the test object.
Optionally, the first control module includes: a protocol unit and a first control unit.
The protocol unit is used for establishing remote connection with the test object according to a first communication protocol corresponding to the attribute information, and the first communication protocol is used for remotely logging in the test object so as to control the test object;
the protocol unit is further configured to send the version to be tested to the test object based on a second communication protocol after the remote connection is established;
and the first control unit is used for controlling the test object to run the version to be tested based on the remote connection.
Optionally, the protocol unit includes multiple protocols, such as SSH, TELNET, FTP, etc. for establishing a connection with the version server and the test object to upload, download, send commands, etc.
Optionally, the first control unit is configured to:
and sending an updating command to the test object based on the remote connection, wherein the updating command is used for controlling the test object to run the version to be tested.
Optionally, the code sending module 350 is configured to:
and sending the test code to a test directory of the test object based on the remote connection, wherein the test directory is established after the test object runs the version to be tested.
Optionally, the apparatus further comprises: and configuring a modification module.
And the configuration modification module is used for controlling the test object to execute the test code, modifying the resource configuration of the test object before a test report is obtained, and constructing a test environment of the test object.
Optionally, the apparatus further comprises: and a report downloading module.
And the report downloading module is used for downloading the test report to a specified directory after controlling the test object to execute the test code and obtaining the test report.
It should be noted that: in the white box testing apparatus provided in the above embodiments, when performing the white box test, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the white box testing apparatus may be divided into different functional modules to complete all or part of the functions described above. In addition, the white box testing device provided by the above embodiment and the white box testing method embodiment belong to the same concept, and the specific implementation process thereof is described in the method embodiment and is not described herein again.
Fig. 4 is a block diagram of a white box testing apparatus provided in an embodiment of the present application, which may be an apparatus including the test controller 110 in the white box testing system shown in fig. 1, such as: a smartphone, a tablet, a laptop, or a desktop computer. The white box testing apparatus may also be referred to as a user equipment, a portable terminal, a laptop terminal, a desktop terminal, a control terminal, etc., and this embodiment is not limited thereto. The apparatus includes at least a processor 410 and a memory 420.
Processor 401 may include one or more processing cores such as: 4 core processors, 8 core processors, etc. The processor 401 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 401 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 402 may include one or more computer-readable storage media, which may be non-transitory. Memory 402 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 402 is used to store at least one instruction for execution by processor 401 to implement the white-box testing method provided by the method embodiments herein.
In some embodiments, the white box testing device may further include: a peripheral interface and at least one peripheral. The processor 401, memory 402 and peripheral interface may be connected by bus or signal lines. Each peripheral may be connected to the peripheral interface via a bus, signal line, or circuit board. Illustratively, peripheral devices include, but are not limited to: radio frequency circuit, touch display screen, audio circuit, power supply, etc.
Of course, the white box testing device may also include fewer or more components, and this embodiment is not limited thereto.
Optionally, the present application further provides a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the white box testing method of the above method embodiment.
Optionally, the present application further provides a computer product comprising a computer readable storage medium, in which a program is stored, the program being loaded and executed by a processor to implement the white box testing method of the above-mentioned method embodiments.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (9)

1. A white-box testing method, for use in a test controller, the method comprising:
acquiring a test case and a to-be-tested version to be tested;
determining the compiling mode of the test case according to the attribute information of the test object, namely: acquiring attribute information of the test object, and determining the compiling mode corresponding to the attribute information in a pre-stored corresponding relationship, wherein the corresponding relationship at least comprises the corresponding relationship between the attribute information and the compiling mode; the attribute information includes at least one of the following information: the name of the test object, the version number of the version to be tested of the test object and the language type supported by the test object;
compiling the test case into test codes for the test object to execute through the compiling mode;
controlling the test object to run the version to be tested;
sending the test code to the test object;
and controlling the test object to execute the test code to obtain a test report of the version to be tested.
2. The white-box testing method of claim 1, wherein said controlling the test object to run the version under test comprises:
establishing remote connection with the test object according to a first communication protocol corresponding to the attribute information, wherein the first communication protocol is used for remotely logging in the test object so as to control the test object;
after the remote connection is established, sending the version to be tested to the test object based on a second communication protocol;
and controlling the test object to run the version to be tested based on the remote connection.
3. The white-box testing method of claim 2, wherein said controlling the test object to run the version under test based on the remote connection comprises:
and sending an updating command to the test object based on the remote connection, wherein the updating command is used for controlling the test object to run the version to be tested.
4. The white-box testing method of claim 3, wherein said sending the test code to the test object comprises:
and sending the test code to a test directory of the test object based on the remote connection, wherein the test directory is established after the test object runs the version to be tested.
5. The white-box testing method of any one of claims 1 to 4, wherein before controlling the test object to execute the test code to obtain a test report, further comprising:
and modifying the resource configuration of the test object, and constructing the test environment of the test object.
6. A white-box testing apparatus, for use in a test controller, the apparatus comprising:
the first acquisition module is used for acquiring a test case and a to-be-tested version to be tested;
a mode determining module, configured to determine a compiling mode of the test case according to the attribute information of the test object, that is: acquiring attribute information of the test object, and determining the compiling mode corresponding to the attribute information in a pre-stored corresponding relationship, wherein the corresponding relationship at least comprises the corresponding relationship between the attribute information and the compiling mode; the attribute information includes at least one of the following information: the name of the test object, the version number of the version to be tested of the test object and the language type supported by the test object;
the case compiling module is used for compiling the test case into a test code for the test object to execute through the compiling mode;
the first control module is used for controlling the test object to run the version to be tested;
the code sending module is used for sending the test code to the test object;
and the second control module is used for controlling the test object to execute the test code to obtain the test report of the version to be tested.
7. A white-box testing device, characterized in that it comprises a processor and a memory; the memory has stored therein a program that is loaded and executed by the processor to implement the white-box testing method of any one of claims 1 to 5.
8. The white box test system is characterized by comprising a test controller, a test object, a test case library and a version server;
the test controller is the white-box test device of claim 6; or a white-box test device according to claim 7;
the version server is used for providing a version to be tested for the test controller;
the test case library is used for providing test cases for the test controller;
and the test object is used for testing the version to be tested according to the test case to obtain a test report.
9. A computer-readable storage medium, in which a program is stored, which is loaded and executed by a processor to implement the white-box testing method according to any one of claims 1 to 5.
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 CN108563579A (en) 2018-09-21
CN108563579B true 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)

Families Citing this family (8)

* 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
CN109862389B (en) * 2018-11-20 2021-08-20 北京奇艺世纪科技有限公司 Video processing method, device, server and storage medium
CN110334015B (en) * 2019-06-13 2024-02-13 腾讯科技(成都)有限公司 White box testing method, device, equipment and medium
CN112783759B (en) * 2019-11-11 2023-10-03 腾讯科技(深圳)有限公司 White box test task execution method and device, storage medium and computer equipment
CN111984533B (en) * 2020-08-04 2023-02-03 深圳市拔超科技股份有限公司 Software automation test system and method
CN112650670B (en) * 2020-12-17 2024-07-16 京东科技信息技术有限公司 Application testing method, device, system, electronic equipment and storage medium
CN112783780A (en) * 2021-01-28 2021-05-11 开放智能机器(上海)有限公司 Automatic testing method and system for multi-environment multi-platform embedded system
CN113254328B (en) * 2021-04-29 2022-08-09 厦门国际银行股份有限公司 White box testing method, system, mobile terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420714A (en) * 2011-08-29 2012-04-18 展讯通信(上海)有限公司 Test management method, test management system master control center and test management system
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8868976B2 (en) * 2010-11-04 2014-10-21 International Business Machines Corporation System-level testcase generation
CN105320598B (en) * 2015-11-24 2018-06-15 广州华多网络科技有限公司 Method for testing software and device
CN107704392B (en) * 2017-09-30 2021-05-18 华为技术有限公司 Test case processing method and server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420714A (en) * 2011-08-29 2012-04-18 展讯通信(上海)有限公司 Test management method, test management system master control center and test management 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

Also Published As

Publication number Publication date
CN108563579A (en) 2018-09-21

Similar Documents

Publication Publication Date Title
CN108563579B (en) White box testing method, device and system and storage medium
CN109302522B (en) Test method, test device, computer system, and computer medium
CN109324857B (en) User guide implementation method, device and storage medium
CN113553257B (en) Test method, device, storage medium and electronic equipment
CN111352836A (en) Pressure testing method and related device
CN113608812B (en) Remote control method, device, system and storage medium
CN111274512A (en) Page loading method, device and medium
CN112015654A (en) Method and apparatus for testing
CN111694550B (en) Page display control method, device and system
CN112729868A (en) Vehicle diagnosis method, device, equipment and medium
CN108351638B (en) Programmable display, information processing device, storage medium, and screen display system
KR20180061589A (en) Software build system and software build method using the system
CN116257438A (en) Updating method of interface test case and related equipment
CN108023905B (en) Internet of things application system and method
CN110618814A (en) Data visualization method and device, electronic equipment and computer readable storage medium
CN115129574A (en) Code testing method and device
CN107203471B (en) Joint debugging method, service platform and computer storage medium
CN108717357A (en) Page presentation code conversion method, device, equipment and computer storage media
CN115167874B (en) Automatic driving software mirror image deployment method and device, electronic equipment and readable medium
CN115190057A (en) Automatic testing method and device and electronic equipment
CN114610446A (en) Method, device and system for automatically injecting probe
CN112433938A (en) Method and device for testing application of mobile terminal
CN111858234A (en) Task execution method, device, equipment and medium
CN116501449B (en) Method and system for managing container files in cloud primary environment
CN114398038A (en) Page construction method and device

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