WO2021135809A1 - 一种测试方法、装置、终端设备及存储介质 - Google Patents

一种测试方法、装置、终端设备及存储介质 Download PDF

Info

Publication number
WO2021135809A1
WO2021135809A1 PCT/CN2020/133633 CN2020133633W WO2021135809A1 WO 2021135809 A1 WO2021135809 A1 WO 2021135809A1 CN 2020133633 W CN2020133633 W CN 2020133633W WO 2021135809 A1 WO2021135809 A1 WO 2021135809A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
test
test case
script data
target test
Prior art date
Application number
PCT/CN2020/133633
Other languages
English (en)
French (fr)
Inventor
焦忠彬
Original Assignee
北京金山云网络技术有限公司
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 北京金山云网络技术有限公司 filed Critical 北京金山云网络技术有限公司
Publication of WO2021135809A1 publication Critical patent/WO2021135809A1/zh

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/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • 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

Definitions

  • the present disclosure relates to the technical field of software testing, in particular to a testing method, device, terminal equipment and storage medium.
  • the purpose of the embodiments of the present disclosure is to provide a test method, device, terminal device, and storage medium to improve test efficiency.
  • the specific technical solutions are as follows:
  • the embodiments of the present disclosure provide a test method, which is applied to a test server in a test system, the system further includes multiple client execution machines, and the method includes: determining target test plan information determined by a user and target customers End-executor; wherein the target test plan information includes identification information of at least one target test case for the software to be tested; the target test case is a test case of a plurality of test cases edited in advance; the identification of each target test case is based Information, obtain the target test case script data of each target test case; send each target test case script data to the target client executor, so that the target client executor, based on each target test case script data, starts and the software to be tested The browser of the corresponding operating system, and the software to be tested is tested through the browser; wherein the target client executor installs at least one browser supported by the operating system.
  • the embodiments of the present disclosure provide a test method, which is applied to any one of the multiple client execution machines included in the test system, and the system further includes a test server, wherein the client execution machine is at least Install a browser supported by an operating system; the method includes:
  • each target test case script data sent by the test server is: after the test server determines the target test plan information determined by the user and the target client executor, it will be tested based on the target test plan information.
  • the embodiments of the present disclosure provide a test method, which is applied to a test server in a test system, the system also includes multiple client execution machines, and the method includes: determining target test plan information determined by a user and target customers End-executor; wherein the target test plan information includes identification information of at least one target test case for the software to be tested; the target test case is a test case of a plurality of test cases edited in advance; the identification of each target test case is based Information, obtain the target test case script data of each target test case; send each target test case script data to the target client executor, so that the target client executor will test the software to be tested based on the target test case script data .
  • an embodiment of the present disclosure provides a test device, which is applied to a test server in a test system, the system further includes a plurality of client-side execution machines, and the device includes: a first obtaining unit configured to determine that the user determines The target test plan information and the target client execution machine; wherein the target test plan information includes identification information of at least one target test case for testing the software to be tested; the target test case is a test case among a plurality of test cases that have been edited and completed in advance; The second obtaining unit is set to obtain the target test case script data of each target test case based on the identification information of each target test case; the script data sending unit is set to send each target test case script data to the target client execution machine, So that the target client executor, based on the script data of each target test case, starts the browser of the operating system corresponding to the software to be tested, and tests the software to be tested through the browser; the target client executor installs at least one operating system support A kind of browser.
  • the embodiments of the present disclosure provide a test device, which is applied to any one of a plurality of client execution machines included in a test system, and the system further includes a test server, wherein the client execution machine is at least Install a browser supported by an operating system;
  • the device includes: a test case script data receiving unit configured to receive each target test case script data sent by the test server; wherein, each target test case script data is: the test server is in After determining the target test plan information determined by the user and the target client executor, the target test case script data of each target test case is obtained based on the identification information of at least one target test case for testing the software to be tested contained in the target test plan information ,
  • the target test case is a test case of multiple test cases that have been edited in advance; the test unit is set to start the browser of the operating system corresponding to the software under test based on the script data of each target test case, and the software to be tested is treated through the browser carry out testing.
  • the embodiments of the present disclosure provide a test device, which is applied to a test server in a test system, the system further includes a plurality of client-side execution machines, and the device includes: a test information obtaining unit configured to determine that the user determines The target test plan information and the target client execution machine; wherein the target test plan information includes identification information of at least one target test case for testing the software to be tested; the target test case is a test case among a plurality of test cases that have been edited and completed in advance;
  • the test data obtaining unit is set to obtain the target test case script data of each target test case based on the identification information of each target test case;
  • the test data sending unit is set to send each target test case script data to the target client execution machine, In order to make the target client execution machine, based on the script data of each target test case, test the software to be tested.
  • the embodiments of the present disclosure provide a business processing system, including a test server and at least one client execution machine; wherein, the test server is used to execute any test method provided in the first aspect or the third aspect, each A client-side execution machine is used to execute any test method provided in the second aspect.
  • embodiments of the present disclosure provide a terminal device, including a processor, a communication interface, a memory, and a communication bus.
  • the processor, the communication interface, and the memory communicate with each other through the communication bus;
  • the memory is set to store A computer program;
  • a processor which is configured to implement any test method provided in the first, second, or third aspect when executing the program stored in the memory.
  • the embodiments of the present disclosure provide a computer-readable storage medium, and a computer program is stored in the computer-readable storage medium.
  • the computer program is executed by a processor to perform any of the above-mentioned first, second, or third aspects.
  • the embodiments of the present disclosure provide a computer program product containing instructions that, when run on a computer, cause the computer to execute any test method provided in the first, second, or third aspect.
  • an embodiment of the present disclosure provides a computer program that, when run on a computer, causes the computer to execute any test method provided in the first, second, or third aspect.
  • the test method, device, terminal equipment, and storage medium provided by the embodiments of the present disclosure are applied to a test server in a test system, the system also includes multiple client execution machines, and the method includes: determining a target test plan determined by a user Information and the target client execution machine; wherein the target test plan information contains identification information of at least one target test case for testing the software to be tested; the target test case is a test case of a plurality of test cases edited in advance; based on each target The identification information of the test case, the target test case script data of each target test case is obtained; the script data of each target test case is sent to the target client executor, so that the target client executor, based on the script data of each target test case, starts The browser of the operating system corresponding to the software to be tested, and the software to be tested is tested through the browser.
  • the test server can obtain target test case script data of each target test case based on the identification information of each target test case.
  • each target test case is determined from multiple test cases that have been edited in advance, the process of editing the test case and testing the software to be tested when the client executor tests the software to be tested through the browser is It is implemented in different devices, thus, the strong coupling between the editing and testing of test cases can be removed, and the testing efficiency can be improved.
  • FIG. 1 is a schematic structural diagram of a test system provided by an embodiment of the disclosure
  • FIG. 2 is a schematic flowchart of a test method applied to a test server in a test system according to an embodiment of the disclosure
  • FIG. 3 is a schematic flowchart of another test method applied to a test server in a test system according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flow chart of a test method applied to any one of the client execution machines included in the test system according to an embodiment of the present disclosure
  • FIG. 5 is a schematic flowchart of another test method applied to any one of a plurality of client execution machines included in a test system according to an embodiment of the present disclosure
  • Figure 6 is a signaling interaction diagram between a test server and a target client executor provided by an embodiment of the disclosure
  • FIG. 7 is a schematic structural diagram of a test device applied to a test server in a test system according to an embodiment of the disclosure
  • FIG. 8 is a schematic structural diagram of a test device applied to any one of a plurality of client execution machines included in a test system according to an embodiment of the present disclosure
  • FIG. 9 is a schematic structural diagram of a test server provided by an embodiment of the disclosure.
  • FIG. 10 is a schematic structural diagram of a client execution machine provided by an embodiment of the disclosure.
  • embodiments of the present disclosure provide a test method, device, test server, client execution machine, system, and storage medium.
  • the test system provided by the embodiments of the present disclosure includes a test server and multiple client-side execution machines; wherein each client-side execution machine installs at least one browser supported by an operating system, and further, through the test server and a plurality of The interaction between the client execution machines can realize the testing of the software to be tested.
  • the target client executor determined by the user is any one of multiple client executors.
  • FIG. 1 is a schematic structural diagram of a test system provided by an embodiment of the present disclosure.
  • the test system includes: a test server 110 and a client execution machine 120, a client execution machine 121 and a client execution machine 122.
  • the client executor 120, the client executor 121, and the client executor 122 are respectively installed with a browser supported by at least one operating system, and further, the test server 110, the client executor 120, and the client execute The interaction between the machine 121 and the client execution machine 122 can realize the test of the software to be tested.
  • the target client executor determined by the user is any one of the client executor 120, the client executor 121, and the client executor 122.
  • the client executor can use the browser to test the software to be tested.
  • each client executor can install only one browser supported by one operating system. In this way, it is avoided that one client executor installs multiple different browsers, and different browsers perform different tasks at the same time. When testing the test cases, the test cases affect each other.
  • each client execution machine can also install multiple browsers supported by one operating system, and further, each client execution machine can also implement the testing method in the embodiments of the present disclosure.
  • the embodiment of the present disclosure does not limit the specific combination of multiple browsers installed on the client execution machine, and will not be described in detail here.
  • the operating system of the client execution machine can be installed with a browser as shown in Table 1, and the corresponding relationship between the operating system and the browser can be as shown in Table 1:
  • the client executor can be a Windows operating system with Firefox installed; it can be a Windows operating system with IE browser installed; it can be a Windows operating system with Google browser installed;
  • It can be a Mac operating system with Firefox browser; it can be a Mac operating system with IE browser; it can be a Mac operating system with Google browser installed.
  • the client executor when the operating system of the client executor is the Windows operating system, the client executor can install the Firefox browser, install at least one of the IE browser and the Google browser; when the client executes the machine When the operating system is the Linux operating system, the client executor can install at least one of the Firefox browser, IE browser and Google browser; when the operating system of the client executor is the Mac operating system, the client executor You can install at least one of Firefox, Internet Explorer and Google Chrome.
  • FIG. 2 is a schematic flowchart of a test method provided by an embodiment of the present disclosure, which is applied to a test server in a test system, and the system also includes multiple client execution machines.
  • the processing flow of the method is Can include:
  • Step S201 Determine the target test plan information and the target client executor determined by the user
  • the target test plan information includes identification information of at least one target test case for testing the software to be tested; the target test case is a test case among multiple test cases that have been edited and completed in advance.
  • the test management platform can be set up in the test server. After the test management platform is running, the test management page can be used to obtain the target test project identification corresponding to the target test plan input by the user and the user from the saved test cases The selected target test case identification; through the execution machine configuration interface, the target client execution machine selected by the user is received.
  • a test management platform can be provided in the test server, and the test management platform has a test management page and an execution machine configuration interface.
  • the user can enter the identification information of the target test item corresponding to the target test plan through the test management page, and the user can select the identification information of the target test case from the saved test cases.
  • the user can select the target client executor from the multiple client executors included in the system through the executor configuration interface set in the test server.
  • the target test plan information is plan information set for the target test plan; and, the target test item corresponding to the target test plan is the test item specified in the target test plan.
  • Step S202 Obtain target test case script data of each target test case based on the identification information of each target test case.
  • Step S203 Send each target test case script data to the target client executor, so that the target client executor, based on the target test case script data, starts the browser of the operating system corresponding to the software to be tested, and browses The software to be tested is tested by the browser; wherein, the target client execution machine installs at least one browser supported by an operating system.
  • the test server can obtain target test case script data of each target test case based on the identification information of each target test case.
  • each target test case is determined from multiple test cases edited in advance, the process of editing the test case and testing the software to be tested when the client executor tests the software to be tested through the browser is It is implemented in different devices, thus, the strong coupling between the editing and testing of test cases can be removed, and the testing efficiency can be improved.
  • FIG. 3 is a schematic diagram of another flow chart of the test method provided by the embodiments of the present disclosure.
  • the method is applied to a test server in a test system, and the system also includes multiple client execution machines.
  • the method can include:
  • Step S301 obtaining target test plan information determined by the user
  • the target test plan information includes identification information of at least one target test case for testing the software to be tested and identification information of a target test item corresponding to the target test plan.
  • the test server may receive the target test item identifier corresponding to the target test plan input by the user and the target test case identifier selected by the user from the saved test cases through a preset test management page.
  • the user wants to perform software testing by formulating a target test plan, he can select the target test case from the test cases that have been pre-saved in the above test management page, and set the execution time of each selected target test case according to actual needs, and then Write a target test plan.
  • Step S302 Determine the target client executor.
  • the test server can receive the target client executor selected by the user from the multiple client executors included in the system through a preset executor configuration interface.
  • Step S303 Obtain the target execution time of each target test case, the execution sequence information of each target test case, and the communication address of the target user.
  • the target user may be the user who receives the test result.
  • the test server may receive the target execution time of each target test case, the execution sequence of each target test case, and the communication address of the target user input by the user through a preset test execution page.
  • the execution time can be set to a certain time on a certain day; it can also be set to a certain time or several moments in a few days; thus, when each set time is reached, the test server triggers the test Implementation process;
  • the execution time is set to trigger the execution process of the test when the user clicks the execution button in the test execution page. That is to say, in this embodiment, the execution process of the test may also be triggered when the user clicks the execution button on the test execution page. In this way, the time when the user manually triggers the execution button is determined as the execution time. In one embodiment, no specific execution time may be set.
  • the test server determines the time when the user clicks the execution button as the execution time, thereby triggering the execution of the test process.
  • the identification information of each target test case, the identification information of each target test item, the execution sequence information of each target test case, the communication address of the target user, and the target execution time of each target test case may be stored in The preset test plan table.
  • the test item list correspondingly saves the identification information of each test item, the identification information of each test case in the test item, and the test case script data of each test case in the test item.
  • the identification information of the target test item is identification 3
  • the identification information of the target test cases used by the target test item are e and f respectively
  • the target execution time of each target test case is time 3
  • the execution of each target test case The sequence is to execute the test case with identification information e first, and then execute the test case with identification information f, and if the communication address of the target user is address 3, save the above information to a test plan table after the test plan table Examples can be shown in Table 2:
  • the number in the execution order information represents the priority.
  • the priority of each test case can be determined according to the size of the number. The smaller the number, the higher the priority of the test case. During the test, the priority can be from high to low. Execute each test case in sequence.
  • the identification information is the test item with identification 1
  • the test cases of the test cases used in this test item are identified as a, b, and c
  • the execution time of each test case is time 1.
  • the execution sequence of each test case is to first execute the test case with identification information a, then execute the test case with identification information c, and finally execute the test case with identification information b.
  • the communication address of the user who receives the test results of the test item is Address 1; and the test item whose identification information is identification 2.
  • the identification information of the test cases used in this test item are a, b, and d, the execution time of each test case is time 2, and the execution order of each test case is first Execute the test case with identification information b, execute the test case with identification information a, and finally execute the test case with identification information d, and the communication address of the user who receives the test result of the test item is address 2.
  • Step S304 Obtain pre-saved browser information of the target client executor.
  • the target client execution machine installs at least one browser supported by an operating system.
  • Step S305 when it is detected that the target execution time has arrived, send a test request to the target client executor
  • the test request includes: the identification information of the target test item, the identification information of each target test case, and the communication address of the target user.
  • Step S306 receiving the test case script data request sent by the target client executor
  • the test case script data request includes: identification information of the target test item and identification information of the target test case.
  • Step S307 Based on the identification information of the target test item and the identification information of the target test case contained in the test case script data request, the target test case script data of each target test case is obtained from the pre-saved test item list.
  • the test item list stores item identification information of each test item, test case identification information, and corresponding test case script data.
  • the test case script data may contain the website information of the software to be tested, so that after the client-side executor receives the website information of the software to be tested, it can access the software to be tested according to the website of the software to be tested. The software is tested.
  • test item list can be as shown in Table 3:
  • test script data A with the test case identifier a is used in the items with the test item identifiers as identifier 1 and identifier 2
  • the test case data A is used in the projects with the test item identifier as identifier 1 and identifier 2.
  • test script data A and B whose identification information is the test item of a and b are used; in the test item whose identification information is mark 2, the mark is used
  • the test script data A, B, C, and D of the test cases with the information as a, b, c, and d; in the test item with the identification information as the indicator 3, the test of the test cases with the identification information as e and f are used Script data E and F.
  • test case script data when the test case script data is saved in the manner shown in Table 3, each test case only needs to save the test case script data in the test item table once, thus, the storage of the test server occupied by the test case script data can be saved space.
  • the parameters in the test case script data can be stored in the common parameter module, so that the common parameters are referenced in the test case script data.
  • the test case is: log in to the website with username a and password b. Then a and b in the test case script data can be stored in the public parameters. In this way, in the test script data, the data a and b in the public parameters can be called in the form of @Usernamea and @Passwordb respectively. In this way, when the test server determines to send the test case to the client executor, it can call the data in the public parameters and send it to the client executor together. In this embodiment, when a test case is used by multiple users, since the test case script data of each test case is stored in a common parameter, the multiple users may not affect each other.
  • Step S308 the browser information of the target client executor, the script data of each target test case, and the execution sequence information of each target test case are sent to the target client executor, so that the target client executor is based on the browser information .
  • the script data of each target test case and the execution sequence information of each target test case start the browser of the operating system corresponding to the software to be tested, and use the browser Test the software to be tested, and send the test results to the target user based on the target user’s communication address; based on the browser information, after detecting the difference between the browser information and the browser information sent by the test server, send a response that the browser does not support Information to the test server.
  • test server receives the response message sent by the target client executor that the browser does not support, it ends the test.
  • test server and the client execution machine can send and receive data based on the HTTP protocol.
  • the test server sends the identification information of the target test item, the identification information of the target test case, the communication address of the target user, the browser information, the script data of each target test case, and the target test case to the client execution machine.
  • the execution sequence information can be pre-set and combined in the test server according to the actual situation. Among them, on the premise that the obtained combination of the above-mentioned various types of information can realize the testing of the software to be tested, the embodiments of the present disclosure do not perform the above-mentioned various types of information. The combination of information is limited.
  • the test server can obtain target test case script data of each target test case based on the identification information of each target test case.
  • each target test case is determined from multiple test cases that have been edited in advance, the process of editing the test case and testing the software to be tested when the client executor tests the software to be tested through the browser is It is implemented in different devices, thus, the strong coupling between the editing and testing of test cases can be removed, and the testing efficiency can be improved.
  • a test request containing the identification information of the target test item and the identification information of the target test case may be sent to the target client executor, and then the test case script data request sent by the target client may be received After that, the script data of each target test case is sent to the target client execution machine.
  • the target client executor can, after determining that it can test each target test case, send the test case script data request to the test server, and the test server then sends each target test case script data. Therefore, it can be avoided that after the test server directly sends data with a large amount of data, such as the script data of each target test case, to the target client executor, each target test case caused by the target client executor is undergoing other tests.
  • the memory occupied by the script data affects the operation of the client execution machine.
  • the test server when the test server may need to send data to multiple target client execution machines, the test server does not need to send the identification information of the target test item and all the data used in this test at the same time.
  • the identification information of the target test case and the script data of each target test case are sent together, thereby reducing the pressure of the test server to transmit data at the same time, and reducing the time for each data transmission.
  • the present disclosure provides another test method applied to the test server in the test system.
  • the processing flow of the method may include:
  • Step 1 Determine the target test plan information and target client executor determined by the user
  • the target test plan information includes identification information of at least one target test case for testing the software to be tested;
  • the target test case is a test case among multiple test cases that have been edited and completed in advance;
  • Step 2 Obtain target test case script data of each target test case based on the identification information of each target test case;
  • Step 3 Send the script data of each target test case to the target client executor, so that the target client executor tests the software to be tested based on the script data of each target test case.
  • the above steps 1-2 are the same as the above steps S201-S202, and will not be repeated here.
  • the target client executor can directly test the software to be tested based on the script data of each target test case.
  • the target client executor can also use other methods to test the software to be tested.
  • the test server can obtain target test case script data of each target test case based on the identification information of each target test case.
  • each target test case is determined from multiple test cases that have been edited in advance, the process of editing the test case and testing the software to be tested when the client executor tests the software to be tested through the browser is It is implemented in different devices, thus, the strong coupling between the editing and testing of test cases can be removed, and the testing efficiency can be improved.
  • a schematic flow diagram of the test method provided by the embodiment of the present disclosure is applied to any one of the client executors included in the test system to execute
  • the system further includes a test server, wherein each client execution machine in the system installs at least one type of browser supported by an operating system; as shown in FIG. 4, the processing flow of this method may include:
  • Step S401 receiving script data of each target test case sent by the test server
  • the script data of each target test case is: after the test server determines the target test plan information determined by the user and the target client executor, identification information of at least one target test case for testing the software to be tested contained in the target test plan information based on the target test plan information , The obtained target test case script data of each target test case; each target test case is a test case among multiple test cases that have been edited in advance.
  • the client executor receives script data of each target test case, and the client executor may only install one browser supported by one operating system. In this way, it is avoided that one client execution machine installs multiple different browsers, and when different browsers perform the test of different test cases at the same time, the test cases affect each other.
  • Step S402 based on the script data of each target test case, start the browser of the operating system corresponding to the software to be tested, and test the software to be tested through the browser.
  • the test server can obtain target test case script data of each target test case based on the identification information of each target test case.
  • each target test case is determined from multiple test cases edited in advance, the process of editing the test case and testing the software to be tested when the client executor tests the software to be tested through the browser is It is implemented in different electronic devices, thus, the strong coupling between the editing and testing of test cases can be removed, and the testing efficiency can be improved.
  • FIG. 5 is a schematic diagram of another flow chart of the test method provided by the embodiment of the present invention.
  • the method is applied to any client executor of the multiple client executors included in the test system, as shown in FIG. 5,
  • the processing flow of this method may include:
  • Step S501 receiving a test request sent by a test server
  • the test request includes: the identification information of the target test item, the identification information of the target test case, and the communication address of the target user.
  • Step S502 Send a test case script data request to the test server; so that the test server obtains from a pre-saved list of test items based on the identification information of the target test item and the identification information of the target test case contained in the test case script data request Target test case script data of each target test case;
  • the test case script data request includes: the identification information of the target test item and the identification information of the target test case; the test item list saves the identification information of each test item, the identification information of each test case, and the test case of each test case Script data.
  • Step S503 Receive browser information, script data of each target test case, and execution sequence information of each target test case sent by the test server.
  • the target test case script data may also include the web page address of the software to be tested.
  • Step S504 It is detected whether the browser information of its own and the browser information sent by the test server are the same. If it is detected that the own browser information is different from the browser information sent by the test server, step S505 is executed; if it is detected that the own browser information is the same as the browser information sent by the test server, step S506 is executed.
  • Step S505 Send response information not supported by the operating system to the test server, so that the test server ends the test. At this point, the operation of testing the software to be tested ends.
  • Step S506 based on the script data of each target test case and the execution sequence information of each target test case, start the browser of the operating system corresponding to the software to be tested, and test the software to be tested through the browser.
  • the client-side execution machine can start a browser, access the web page address of the software to be tested, and test the software to be tested based on the script data of each target test case.
  • the client-side execution machine can call a preset test API (Application Programming Interface), start the browser of the operating system corresponding to the software to be tested, and follow the execution sequence information of each target test case, Run each target test case script one by one to test the software to be tested.
  • a preset test API Application Programming Interface
  • the client executor can call the preset automated test framework selenium, evoke the browser driver of the operating system corresponding to the software to be tested, and start the browser of the operating system corresponding to the software to be tested, according to each target Execution sequence information of test cases, run each target test case script one by one, and test the software to be tested.
  • step S507 the test result is sent to the target user based on the communication address of the target user.
  • the test result is the result obtained by the target client execution machine testing the software to be tested.
  • the communication address can be an email address, and the client execution machine can send the test result to the target user's mailbox by sending an email.
  • the communication address can also be an address in other forms, so that the client-side execution machine can send the test result to the target user according to the sending mode corresponding to the communication address and according to the communication address. In this way, the target user can learn the test result in time, thereby making the user experience higher.
  • the client execution machine receives the identification information of the target test item, the identification information of the target test case, the communication address of the target user, browser information, the script data of each target test case, and the execution sequence information of each target test case Pre-setting and combination can be performed in the test server according to the actual situation.
  • the embodiment of the present disclosure does not perform the combination of the above-mentioned various types of information. limited.
  • the test server can obtain target test case script data of each target test case based on the identification information of each target test case.
  • each target test case is determined from multiple test cases that have been edited in advance, the process of editing the test case and testing the software to be tested when the client executor tests the software to be tested through the browser is It is implemented in different electronic devices, thus, the strong coupling between the editing and testing of test cases can be removed, and the testing efficiency can be improved.
  • test server directly sends data with a large amount of data, such as the script data of each target test case, to the client executor, the client executor is performing other tests.
  • data such as the script data of each target test case
  • the memory occupied by the target test case script data affects the operation of the client execution machine.
  • the test server does not need to send the identification information of the target test item and all the targets used in this test at the same time.
  • the identification information of the test case and the script data of each target test case are sent together, thereby reducing the pressure of the test server to transmit data at the same time and reducing the time for each data transmission.
  • the target test case script data contains the web page address of the software to be tested, and the client executor can start the browser, access the web page address of the software to be tested, and the software to be tested based on each target test case script data
  • the script data of the software to be tested can be tested without being saved to the client execution machine, and there will be no incidents in which the script data of the software to be tested is leaked by others in the client execution machine, and the security is high.
  • the interaction diagram between the test server and the client execution machine includes the following steps:
  • Step S601 the test server receives the target test item identifier corresponding to the target test plan input by the user through the preset test management page and the target test case identifier selected by the user from the saved test cases; through the preset executor configuration interface , Receive the target client execution machine selected by the user; Through the preset test execution page, receive the target execution time of each target test case, the execution order of each target test case and the communication address of the target user input by the user.
  • Step S602 The test server obtains the pre-saved browser information of the target client executor.
  • Step S603 The test server detects whether the target execution time has arrived; if it detects that the execution time has arrived, step S604 is executed.
  • Step S604 the test server sends a test request to the target client executor
  • the test request includes: the identification information of the target test item, the identification information of each target test case, and the communication address of the target user.
  • Step S605 the target client executor sends a test case script data request to the test server;
  • the test case script data request includes: identification information of the target test item and identification information of the target test case.
  • step S606 the test server obtains the target test case script data of each target test case from the pre-saved list of test cases based on the identification information of the target test item and the target test case contained in the test case script data request.
  • step S607 the test server sends the browser information of the target client executor, the script data of each target test case, and the execution sequence information of each target test case to the target client executor.
  • Step S608 the target client executor detects whether its own browser information is the same as the browser information sent by the test server; if it detects that its own browser information is the same as the browser information sent by the test server, perform step S609; if it detects that its own browser information is the same as the browser information sent by the test server The browser information is different from the browser information sent by the test server, and step S612 is executed.
  • Step S609 based on the script data of each target test case and the execution sequence information of each target test case, start the browser of the operating system corresponding to the software to be tested, and test the software to be tested through the browser.
  • step S610 the target client executor sends the test result to the test server.
  • step S611 the test server summarizes the test results.
  • Step S612 Send response information not supported by the operating system to the test server.
  • step S613 the test server ends the test.
  • the test server can obtain target test case script data of each target test case based on the identification information of each target test case.
  • each target test case is determined from multiple test cases that have been edited in advance, the process of editing the test case and testing the software to be tested when the client executor tests the software to be tested through the browser is It is implemented in different devices, thus, the strong coupling between the editing and testing of test cases can be removed, and the testing efficiency can be improved.
  • the embodiment of the present disclosure provides a test device, which is applied to a test server in a test system, and the system further includes a plurality of client execution machines. As shown in FIG. 7, the device may include the following units:
  • the first obtaining unit 701 is configured to determine the target test plan information and the target client executor determined by the user; wherein the target test plan information includes identification information of at least one target test case for testing the software to be tested; the target test case is a predetermined Test cases among multiple test cases that have been edited;
  • the second obtaining unit 702 is configured to obtain target test case script data of each target test case based on the identification information of each target test case;
  • the script data sending unit 703 is configured to send the script data of each target test case to the target client executor, so that the target client executor, based on the script data of each target test case, initiates browsing of the operating system corresponding to the software to be tested
  • the software to be tested is tested through a browser; wherein, the target client executor installs at least one browser supported by an operating system.
  • the target test plan information further includes: identification information of the target test item corresponding to the target test plan; the above-mentioned test device further includes:
  • the test request sending unit is set to send a test request to the target client execution machine before obtaining the target test case script data of each target test case based on the identification information of each target test case;
  • the test request contains: target test item The identification information and the identification information of each target test case;
  • the test case script data request receiving unit is configured to receive the test case script data request sent by the target client; the test case script data request includes: identification information of the target test item and identification information of the target test case;
  • the above-mentioned second obtaining unit 702 includes: a use case script data obtaining module, which is set to be based on the identification information of the target test item contained in the test case script data request and the identification information of each target test case, from a pre-saved list of test items, Obtain target test case script data of each target test case; wherein, the test item list saves the identification information of each test item, the identification information of each test case, and the test case script data of each test case.
  • the above-mentioned test device further includes: an execution sequence information obtaining unit configured to obtain the execution of each target test case before sending a test request to the target client execution machine Sequence information
  • the above script data sending unit 703 includes: a sending module, configured to send each target test case script data and the above execution sequence information to the target client executor, so that the target client executor, based on each target test case script data and With the above execution sequence information, the browser of the operating system corresponding to the software to be tested is started, and the software to be tested is tested through the browser.
  • the above-mentioned test device further includes: a communication address obtaining unit, configured to obtain the communication address of the target user determined by the user before sending the test request to the target client executor; wherein, the test request also includes the target The user's correspondence address;
  • the foregoing sending module includes: a sending sub-module configured to send each target test case script data and the foregoing execution sequence information to the target client executor, so that the target client executor is based on each target test case script data and the foregoing execution Sequence information, start the browser of the operating system corresponding to the software to be tested, test the software to be tested through the browser, and send the test result to the target user based on the target user's communication address.
  • a sending sub-module configured to send each target test case script data and the foregoing execution sequence information to the target client executor, so that the target client executor is based on each target test case script data and the foregoing execution Sequence information, start the browser of the operating system corresponding to the software to be tested, test the software to be tested through the browser, and send the test result to the target user based on the target user's communication address.
  • the above-mentioned test device further includes: an execution time obtaining unit, configured to obtain the target execution time of each target test case before sending the test request to the target client executor;
  • the above test request sending unit includes: a test request sending module, which is configured to send a test request to the target client executor when it is detected that the target test time is reached.
  • the first obtaining unit is configured to receive the identification information of the target test item corresponding to the target test plan input by the user and the target test case selected by the user from the saved test cases through a preset test management page The identification information of the user; and through the preset execution machine configuration interface, the target client execution machine selected by the user is received;
  • the execution time obtaining unit is set to receive the target execution time for each target test case input by the user through the preset test execution page;
  • the foregoing execution sequence information obtaining unit is set to pass the test execution page and receive the execution sequence of each target test case input by the user;
  • the communication address obtaining unit is configured to pass the test execution page to receive the communication address of the target user input by the user.
  • the above-mentioned test device further includes: a browser information obtaining unit configured to obtain pre-saved browser information of the target client executor after obtaining the target test plan information and the target client executor determined by the user ;
  • the sending sub-module is specifically configured to send the browser information of the target client executor, the script data of each target test case, and the execution sequence information to the target client executor, so that the target client executor is based on the browser information , After detecting that its own browser information is the same as the browser information sent by the test server, based on the script data of each target test case and the above execution sequence information, start the browser of the operating system corresponding to the software to be tested, and use the browser to test the software Perform the test and send the test result to the target user based on the target user's communication address; after detecting the difference between the browser information and the browser information sent by the test server based on the browser information, send response information that the browser does not support To the test server; if it receives a response message sent by the target client executor that the browser does not support, the test ends.
  • the test server can obtain target test case script data of each target test case based on the identification information of each target test case.
  • each target test case is determined from multiple test cases edited in advance, the process of editing the test case and testing the software to be tested when the client executor tests the software to be tested through the browser is It is implemented in different devices, thus, the strong coupling between the editing and testing of test cases can be removed, and the testing efficiency can be improved.
  • test device is applied to any one of a plurality of client execution machines included in the test system, the system further includes a test server, wherein the client execution machine at least Install a browser supported by an operating system, as shown in FIG. 8, the device may include the following units:
  • the test case script data receiving unit 801 is configured to receive each target test case script data sent by the test server; wherein, each target test case script data is: after the test server determines the target test plan information determined by the user and the target client execution machine , Based on the identification information of at least one target test case for testing the software to be tested contained in the target test plan information, the target test case script data of each target test case is obtained; the target test case is the pre-edited multiple test case Test case
  • the testing unit 802 is configured to start the browser of the operating system corresponding to the software to be tested based on the script data of each target test case, and to test the software to be tested through the browser.
  • the target test plan information further includes: identification information of the target test item corresponding to the target test plan; the above-mentioned test device further includes:
  • the test request receiving unit is configured to receive the test request sent by the test server before receiving each target test case script data sent by the test server; wherein the test request includes: identification information of the target test item and identification information of the target test case;
  • the script data request sending unit is set to send a test case script data request to the test server; so that the test server can use the identification information of the target test item and the target test case contained in the test case script data request from the pre-saved test
  • the target test case script data of each target test case is obtained; among them, the test case script data request contains: the identification information of the target test project and the identification information of the target test case; the test project list saves the test project Identification information, identification information of each test case, and test case script data of each test case.
  • the above-mentioned test case script data receiving unit 801 includes: a receiving module configured to receive the script data of each target test case and the execution sequence information of each target test case sent by the test server;
  • the test unit 802 is configured to start a browser of the operating system corresponding to the software to be tested based on the script data of each target test case and the execution sequence information, and to test the software to be tested through the browser.
  • the above-mentioned test request further includes the communication address of the target user; the above-mentioned test device further includes:
  • the test result sending unit is set to start the browser of the operating system corresponding to the software to be tested based on the script data of each target test case and the above-mentioned execution sequence information, and test the software to be tested through the browser, based on the target user’s
  • the communication address sends the test result to the target user.
  • the test unit 802 is configured to call a preset test API, start the browser of the operating system corresponding to the software to be tested, and run each target test case script one by one according to the above execution sequence information, and then perform the test on the software to be tested. test.
  • the receiving module is configured to receive browser information, script data of each target test case, and execution sequence information of each target test case sent by the test server; the test device further includes:
  • the detection unit is set to start the browser of the operating system corresponding to the software to be tested based on the script data of each target test case and the above-mentioned execution sequence information, and detect its own browser information and test server before testing the software to be tested through the browser Whether the sent browser information is the same; if they are the same, the above-mentioned test unit 802 is triggered; if they are not the same, the response information not supported by the operating system is sent to the test server, so that the test server ends the test.
  • the test server can obtain target test case script data of each target test case based on the identification information of each target test case.
  • each target test case is determined from multiple test cases edited in advance, the process of editing the test case and testing the software to be tested when the client executor tests the software to be tested through the browser is It is implemented in different devices, thus, the strong coupling between the editing and testing of test cases can be removed, and the testing efficiency can be improved.
  • the embodiment of the present disclosure provides a test device, which is applied to a test server in a test system, and the system further includes a plurality of client execution machines. As shown in FIG. 7, the device may include the following units:
  • the test information obtaining unit is configured to determine the target test plan information determined by the user and the target client executor; wherein the target test plan information includes identification information of at least one target test case for testing the software to be tested; the target test case is pre-edited Test cases among multiple completed test cases; the test data acquisition unit is set to obtain the target test case script data of each target test case based on the identification information of each target test case; the test data sending unit is set to test each target The use case script data is sent to the target client executor, so that the target client executor will test the software to be tested based on each target test case script data.
  • the test server can obtain target test case script data of each target test case based on the identification information of each target test case.
  • each target test case is determined from multiple test cases edited in advance, the process of editing the test case and testing the software to be tested when the client executor tests the software to be tested through the browser is It is implemented in different devices, thus, the strong coupling between the editing and testing of test cases can be removed, and the testing efficiency can be improved.
  • the embodiment of the present invention also provides a business processing system, which may include a test server and at least one client execution machine; wherein, the test server is used to execute the test server applied to the test system provided by the foregoing embodiment of the present disclosure
  • the test server is used to execute the test server applied to the test system provided by the foregoing embodiment of the present disclosure
  • each client executor is used to execute the steps of any test method applied to any one of the multiple client executors included in the test system provided by the embodiment of the present disclosure.
  • the embodiment of the present disclosure also provides a terminal device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete mutual communication through the communication bus; the memory is used to store computer programs;
  • the processor when the terminal device is a test server, the processor is configured to execute the program stored in the memory to implement the steps of any test method applied to the test server in the test system provided by the above embodiment of the present disclosure;
  • the processor is used to execute the program stored in the memory to implement any one of the multiple client execution machines included in the test system provided by the above embodiment of the present disclosure. Perform the steps of any test method of the machine.
  • the embodiment of the present disclosure also provides a test server, as shown in FIG. 9, including a processor 901, a communication interface 902, a memory 903, and a communication bus 904.
  • the processor 901, the communication interface 902, and the memory 903 pass through the communication bus 904.
  • the memory 903 is used to store computer programs; the processor 901 is used to execute the programs stored in the memory 903 to implement the following steps:
  • the target test plan information includes identification information of at least one target test case for testing the software to be tested; the target test case is among the multiple test cases that have been edited in advance Test case; based on the identification information of each target test case, obtain the target test case script data of each target test case; send each target test case script data to the target client executor, so that the target client executor is based on each The target test case script data is used to test the software to be tested.
  • the test server can obtain target test case script data of each target test case based on the identification information of each target test case.
  • each target test case is determined from multiple test cases that have been edited in advance, the process of editing the test case and testing the software to be tested when the client executor tests the software to be tested through the browser is It is implemented in different devices, thus, the strong coupling between the editing and testing of test cases can be removed, and the testing efficiency can be improved.
  • the embodiment of the present disclosure also provides a client-side execution machine, as shown in FIG. 10, including a processor 1001, a communication interface 1002, a memory 1003, and a communication bus 1004.
  • the processor 1001, the communication interface 1002, and the memory 1003 communicate
  • the bus 1004 completes the communication between each other, the memory 1003 is used to store computer programs; the processor 1001 is used to execute the programs stored in the memory 1003, and the following steps are implemented:
  • each target test case script data sent by the test server is: after the test server determines the target test plan information determined by the user and the target client executor, it will be tested based on the target test plan information.
  • the test server can obtain target test case script data of each target test case based on the identification information of each target test case.
  • each target test case is determined from multiple test cases that have been edited in advance, the process of editing the test case and testing the software to be tested when the client executor tests the software to be tested through the browser is It is implemented in different devices, thus, the strong coupling between the editing and testing of test cases can be removed, and the testing efficiency can be improved.
  • the embodiment of the present disclosure also provides a test server, including a processor, a communication interface, a memory, and a communication bus.
  • the processor, the communication interface, and the memory communicate with each other through the communication bus, and the memory is used to store computer programs;
  • the processor is used to execute the program stored in the memory, the following steps are implemented:
  • the target test plan information includes identification information of at least one target test case for testing the software to be tested; the target test case is among the multiple test cases that have been edited in advance Test case; Based on the identification information of each target test case, obtain the target test case script data of each target test case; Send each target test case script data to the target client executor, so that the target client executor is based on each target
  • the test case script data is used to test the software to be tested.
  • the test server can obtain target test case script data of each target test case based on the identification information of each target test case.
  • each target test case is determined from multiple test cases that have been edited in advance, the process of editing the test case and testing the software to be tested when the client executor tests the software to be tested through the browser is It is implemented in different devices, thus, the strong coupling between the editing and testing of test cases can be removed, and the testing efficiency can be improved.
  • test server and client execution machine can be any type of electronic equipment.
  • the communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the above-mentioned electronic device and other devices.
  • the memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk storage.
  • RAM Random Access Memory
  • NVM non-Volatile Memory
  • the memory may also be at least one storage device located far away from the aforementioned processor.
  • the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processing, DSP), a dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • CPU central processing unit
  • NP Network Processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • FPGA Field-Programmable Gate Array
  • a computer-readable storage medium stores a computer program.
  • the above-mentioned embodiments of the present disclosure provide The steps of any test method applied to the test server in the test system, or to implement any test method applied to any one of the multiple client execution machines included in the test system provided by the above embodiment of the present disclosure A step of.
  • a computer program product containing instructions, which when run on a computer, causes the computer to execute the test server application in the test system provided by the foregoing embodiment of the present disclosure.
  • the steps of any test method, or the steps of any test method applied to any one of the multiple client-side executors included in the test system provided by the foregoing embodiment of the present disclosure are implemented.
  • a computer program is also provided.
  • the computer program runs on a computer, the computer executes any one of the test servers in the test system provided by the foregoing embodiments of the present disclosure.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
  • the process of editing test cases and testing the software under test can be implemented in different devices, eliminating the strong interaction between test case editing and testing. Coupling improves test efficiency. Therefore, it is not necessary to implement the process of editing test cases and testing the software under test in the same electronic device, which can improve the test efficiency.

Landscapes

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

Abstract

一种测试方法、装置、终端设备及存储介质,该方法应用于测试系统中的测试服务器,该系统还包含多个客户端执行机,该方法包括:确定用户确定的目标测试计划信息和目标客户端执行机(S201);基于各个目标测试用例的标识信息,获得各个目标测试用例脚本数据(S202);将各个目标测试用例脚本数据发送至目标客户端执行机,以使目标客户端执行机,启动与待测软件对应的操作系统的浏览器,通过浏览器对待测试软件进行测试(S203)。该方法在客户端执行机通过浏览器对待测试软件进行测试时,编辑测试用例和对待测软件进行测试的过程是在不同设备中实现的,可以去除测试用例的编辑和测试之间的强耦合性,提高测试效率。

Description

一种测试方法、装置、终端设备及存储介质
本公开要求于2019年12月30日提交中国专利局、申请号为201911393052.9发明名称为“一种测试方法、装置、终端设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开涉及软件测试的技术领域,特别是涉及一种测试方法、装置、终端设备及存储介质。
背景技术
目前,在相关技术的测试过程中,需要先在要进行软件测试的电子设备上编辑测试用例,进而,在该电子设备上进行测试。然而,上述将测试用例的编辑和测试由同一台电子设备实现的方式,会使得测试用例的编辑和测试具有强耦合性,从而,导致测试效率较低。
发明内容
本公开实施例的目的在于提供一种测试方法、装置、终端设备及存储介质,以提高测试效率。具体技术方案如下:
第一方面,本公开实施例提供了一种测试方法,应用于测试系统中的测试服务器,该系统还包含多个客户端执行机,该方法包括:确定用户确定的目标测试计划信息和目标客户端执行机;其中,目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息;目标测试用例为预先编辑完成的多个测试用例中的测试用例;基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据;将各个目标测试用例脚本数据发送至目标客户端执行机,以使目标客户端执行机,基于各个目标测试用例脚本数据,启动与待测软件对应的操作系统的浏览器,并通过浏览器对待测试软件进行测试;其中,目标客户端执行机至少安装一种操作系统支持的一种浏览器。
第二方面,本公开实施例提供了一种测试方法,应用于测试系统包含的多个客户端执行机中的任一客户端执行机,该系统还包含测试服务器,其中,客户端执行机至少安装一种操作系统支持的一种浏览器;该方法包括:
接收测试服务器发送的各个目标测试用例脚本数据;其中,各个目标测试用例脚本数据为:测试服务器在确定用户确定的目标测试计划信息和目标客户端执行机后,基于目标测试计划信息包含的对待测试软件进行测试的至少一个目标测试用例的标识信息,获得的各个目标测试用例的目标测试用例脚本数据;目标测试用例为预先编辑完成的多个测试用例中的测试用例;基于各个目标测试用例脚本数据,启动与待测软件对应的操作系统的浏览器,通过浏览器对所述待测试软件进行测试。
第三方面,本公开实施例提供了一种测试方法,应用于测试系统中的测试服务器,该系统还包含多个客户端执行机,该方法包括:确定用户确定的目标测试计划信息和目标客户端执行机;其中,目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息;目标测试用例为预先编辑完成的多个测试用例中的测试用例;基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据;将各个目标测试用例脚本数据发送至目标客户端执行机,以使目标客户端执行机,基于各个目标测试用例脚本数据,对待测试软件进行测试。
第四方面,本公开实施例提供了一种测试装置,应用于测试系统中的测试服务器,该系统还包含多个客户端执行机,该装置包括:第一获得单元,设置为确定用户确定的目标测试计划信息和目标客户端执行机;其中,目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息;目标测试用例为预先编辑完成的多个测试用例中的测试用例;第二获得单元,设置为基于各个目标测试用 例的标识信息,获得各个目标测试用例的目标测试用例脚本数据;脚本数据发送单元,设置为将各个目标测试用例脚本数据发送至目标客户端执行机,以使目标客户端执行机,基于各个目标测试用例脚本数据,启动与待测软件对应的操作系统的浏览器,通过浏览器对待测试软件进行测试;目标客户端执行机至少安装一种操作系统支持的一种浏览器。
第五方面,本公开实施例提供了一种测试装置,应用于测试系统包含的多个客户端执行机中的任一客户端执行机,该系统还包含测试服务器,其中,客户端执行机至少安装一种操作系统支持的一种浏览器;该装置包括:测试用例脚本数据接收单元,设置为接收测试服务器发送的各个目标测试用例脚本数据;其中,各个目标测试用例脚本数据为:测试服务器在确定用户确定的目标测试计划信息和目标客户端执行机后,基于目标测试计划信息包含的对待测试软件进行测试的至少一个目标测试用例的标识信息,获得的各个目标测试用例的目标测试用例脚本数据,目标测试用例为预先编辑完成的多个测试用例中的测试用例;测试单元,设置为基于各个目标测试用例脚本数据,启动与待测软件对应的操作系统的浏览器,通过浏览器对待测试软件进行测试。
第六方面,本公开实施例提供了一种测试装置,应用于测试系统中的测试服务器,该系统还包含多个客户端执行机,该装置包括:测试信息获得单元,设置为确定用户确定的目标测试计划信息和目标客户端执行机;其中,目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息;目标测试用例为预先编辑完成的多个测试用例中的测试用例;测试数据获得单元,设置为基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据;测试数据发送单元,设置为将各个目标测试用例脚本数据发送至目标客户端执行机,以使目标客户端执行机,基于各个目标测试用例脚本数据,对待测试软件进行测试。
第七方面,本公开实施例提供了一种业务处理系统,包含测试服务器和至少一个客户端执行机;其中,测试服务器用于执行上述第一方面或第三方面提供的任一测试方法,每个客户端执行机用于执行上述第二方面提供的任一测试方法。
第八方面,本公开实施例提供了一种终端设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;存储器,设置为存放计算机程序;处理器,设置为执行存储器上所存放的程序时,实现上述第一方面、第二方面或第三方面提供的任一测试方法。
第九方面,本公开实施例提供了一种计算机可读存储介质,计算机可读存储介质内存储有计算机程序,计算机程序被处理器执行上述第一方面、第二方面或第三方面提供的任一测试方法。
第十方面,本公开实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面、第二方面或第三方面提供的任一测试方法。
第十一方面,本公开实施例提供了一种计算机程序,所述计算机程序在计算机上运行时,使得计算机执行上述第一方面、第二方面或第三方面提供的任一测试方法。
本公开实施例提供的一种测试方法、装置、终端设备及存储介质,应用于测试系统中的测试服务器,该系统还包含多个客户端执行机,该方法包括:确定用户确定的目标测试计划信息和目标客户端执行机;其中,目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息;目标测试用例为预先编辑完成的多个测试用例中的测试用例;基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据;将各个目标测试用例脚本数据发送至目标客户端执行机,以使目标客户端执行机,基于各个目标测试用例脚本数据,启动与待测软件对应的操作系统的浏览器,并通过浏览 器对待测试软件进行测试。
可见,应用本公开实施例,测试服务器可以基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据。其中,由于各个目标测试用例是从预先编辑完成的多个测试用例中确定的,因此,在客户端执行机通过浏览器对待测试软件进行测试时,编辑测试用例和对待测试软件进行测试的过程是在不同的设备中实现的,从而,可以去除测试用例的编辑和测试之间的强耦合性,提高测试效率。
当然,实施本公开的任一产品或方法并不一定需要同时达到以上所述的所有优点。
附图说明
为了更清楚地说明本发明实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,本领域普通技术人员来讲还可以根据这些附图获得其他的附图。
图1为本公开实施例提供的测试系统的结构示意图;
图2为本公开实施例提供的应用于测试系统中的测试服务器的一种测试方法的流程示意图;
图3为本公开实施例提供的应用于测试系统中的测试服务器的另一种测试方法的流程示意图;
图4为本公开实施例提供的应用于测试系统包含的多个客户端执行机中的任一客户端执行机的一种测试方法的流程示意图;
图5为本公开实施例提供的应用于测试系统包含的多个客户端执行机中的任一客户端执行机的另一种测试方法的流程示意图;
图6为本公开实施例提供的测试服务器和目标客户端执行机的信令交互图;
图7为本公开实施例提供的应用于测试系统中的测试服务器的一种测试装置的结构示意图;
图8为本公开实施例提供的应用于测试系统包含的多个客户端执行机中的任一客户端执行机的一种测试装置的结构示意图;
图9为本公开实施例提供的一种测试服务器的结构示意图;
图10为本公开实施例提供的一种客户端执行机的结构示意图。
具体实施方式
为使本公开的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本公开进一步详细说明。显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
为了提高测试效率,本公开实施例提供了一种测试的方法、装置、测试服务器、客户端执行机、系统及存储介质。
本公开实施例提供的测试系统中,包括测试服务器和多个客户端执行机;其中,每个客户端执行机至少安装一种操作系统支持的一种浏览器,进而,通过测试服务器和多个客户端执行机之间的交互,可以实现对待测试软件的测试。并且,用户确定的目标客户端执行机为多个客户端执行机中的任一个。
例如,参见图1,为本公开实施例提供的一种测试系统的结构示意图,该测试系统中包括:测试服务器110和客户端执行机120、客户端执行机121和客户端执行机122。
其中,客户端执行机120、客户端执行机121和客户端执行机122分别安装有至少一种操作系统支持 的一种浏览器,进而,通过测试服务器110和客户端执行机120、客户端执行机121和客户端执行机122之间的交互,可以实现对待测试软件的测试。用户确定的目标客户端执行机为客户端执行机120、客户端执行机121和客户端执行机122中的任一个。
客户端执行机在对待测试软件进行测试时,可以利用浏览器进行测试。
在一实施方式中,每个客户端执行机可以仅安装一种操作系统支持的一种浏览器,这样,避免一个客户端执行机安装多个不同的浏览器,同一时间不同的浏览器进行不同的测试用例的测试时,各测试用例之间互相影响。
在一实施方式中,每个客户端执行机也可以安装一种操作系统支持的多种浏览器,进而,每个客户端执行机也可以实现本公开实施例中的测试方法。其中,本公开实施例不对客户端执行机所安装的多种浏览器的具体组合方式进行限定,这里不再详细阐述。
在一实施方式中,客户端执行机的操作系统可以安装如表一的浏览器,操作系统和浏览器的对应关系可以如表一所示:
表一
操作系统 浏览器
Windows操作系统 火狐浏览器
Windows操作系统 IE浏览器
Windows操作系统 谷歌浏览器
Linux操作系统 火狐浏览器
Linux操作系统 IE浏览器
Linux操作系统 谷歌浏览器
Mac操作系统 火狐浏览器
Mac操作系统 IE浏览器
Mac操作系统 谷歌浏览器
如表一所示,客户端执行机可以是Windows操作系统,安装火狐浏览器Firefox;可以是Windows操作系统,安装IE浏览器;可以是Windows操作系统,安装谷歌浏览器;
可以是Linux操作系统,安装火狐浏览器;可以是Linux操作系统,安装IE浏览器;可以是Linux操作系统,安装谷歌浏览器;
可以是Mac操作系统,安装火狐浏览器;可以是Mac操作系统,安装IE浏览器;可以是Mac操作系统,安装谷歌浏览器。
也就是说,当客户端执行机的操作系统是Windows操作系统时,客户端执行机可以安装火狐浏览器Firefox、安装IE浏览器和谷歌浏览器中的至少一个浏览器;当客户端执行机的操作系统是Linux操作系统时,客户端执行机可以安装火狐浏览器、IE浏览器和谷歌浏览器中的至少一个浏览器;当客户端执行机的操作系统是Mac操作系统时,客户端执行机可以安装火狐浏览器、IE浏览器和谷歌浏览器中的至少一个浏览器。
参见图2,为本公开实施例提供的一种测试方法的流程示意图,应用于测试系统中的测试服务器,该系统还包含多个客户端执行机,如图2所示,该方法的处理流程可以包括:
步骤S201,确定用户确定的目标测试计划信息和目标客户端执行机;
其中,目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息;目标测试用例为预先编辑完成的多个测试用例中的测试用例。
在一实施方式中,可以在测试服务器中设置测试管理平台,测试管理平台运行后,可以通过测试管理页面,获得用户输入的目标测试计划对应的目标测试项目标识及用户从已保存的测试用例中选中的目标测试用例标识;通过执行机配置界面,接收用户选中的目标客户端执行机。
也就是说,测试服务器中可以设置有测试管理平台,测试管理平台具有测试管理页面和执行机配置界面。遮掩个,在测试管理平台运行后,用户可以通过测试管理页面,输入目标测试计划对应的目标测试项目的标识信息,并且,用户可以从已保存的测试用例中选中目标测试用例的标识信息。进而,用户可以通过测试服务器中设置的执行机配置界面,从该系统中所包含的多个客户端执行机中选择目标客户端执行机。
其中,目标测试计划信息是为目标测试计划设定的计划信息;并且,目标测试计划对应的目标测试项目为该目标测试计划中所指定的测试项目。
步骤S202,基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据。
步骤S203,将各个目标测试用例脚本数据发送至目标客户端执行机,以使目标客户端执行机,基于各个目标测试用例脚本数据,启动与待测软件对应的操作系统的浏览器,并通过浏览器对待测试软件进行测试;其中,目标客户端执行机至少安装一种操作系统支持的一种浏览器。
可见,应用本公开实施例,测试服务器可以基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据。其中,由于各个目标测试用例是从预先编辑完成的多个测试用例中确定的,因此,在客户端执行机通过浏览器对待测试软件进行测试时,编辑测试用例和对待测软件进行测试的过程是在不同的设备中实现的,从而,可以去除测试用例的编辑和测试之间的强耦合性,提高测试效率。
参见图3,为本公开实施例提供的测试方法的另一种流程示意图,该方法应用于测试系统中的测试服务器,该系统还包含多个客户端执行机,如图3所示,该方法的处理流程可以包括:
步骤S301,获得用户确定的目标测试计划信息;
其中,目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息和目标测试计划对应的目标测试项目的标识信息。
在一实施方式中,测试服务器可以通过预设的测试管理页面,接收用户输入的目标测试计划对应的目标测试项目标识及用户从已保存的测试用例中选中的目标测试用例标识。
当用户想通过制定目标测试计划进行软件测试时,可以从上述测试管理页面中已经预先保存的各个测试用例中选择目标测试用例,并根据实际需求设置所选中的各个目标测试用例的执行时间,进而编写目标测试计划。
可见,用户只要了解目标测试计划的业务类型,知道需要用到的目标测试用例,就可以在测试管理页面中已经预先保存的各个测试用例中选中目标测试用例,从而,可以方便用户编写目标测试计划;并且,当测试管理页面中没有需要用到的目标测试用例时,用户还可以在测试管理页面中编写该目标测试用例,并保存所编写的目标测试用例。
步骤S302,确定目标客户端执行机。
在一实施方式中,测试服务器可以通过预设的执行机配置界面,接收用户在该系统包含的多个客 户端执行机中选中的目标客户端执行机。
步骤S303,获得各个目标测试用例的目标执行时间、各个目标测试用例的执行顺序信息以及目标用户的通信地址。
其中,目标用户可以是接收测试结果的用户。
在一实施方式中,测试服务器可以通过预设的测试执行页面,接收用户输入的针对各个目标测试用例的目标执行时间、各个目标测试用例的执行顺序以及目标用户的通信地址。
在一实施方式中,执行时间可以设置为某一天的某一个时刻;也可以设置为某几天中的某一时刻或几个时刻;从而,到达所设置的各个时刻时,测试服务器触发测试的执行过程;
在一实施方式中,执行时间设置为用户在测试执行页面中,当用户点击执行按钮时,触发测试的执行过程。也就是说,在该实施例中,测试的执行过程也可以是用户点击测试执行页面中的执行按钮时触发的,这样,将用户手动触发执行按钮的时间确定为执行时间。在一实施方式中,可以不设置具体的执行时间,在用户浏览测试执行页面的过程中,当用户点击执行按钮时,测试服务器将用户点击执行按钮的时间确定为执行时间,进而触发测试的执行过程。
其中,上述步骤S301、步骤S302和步骤S303之间没有先后顺序,根据用户实际的选择确定。
在一实施方式中,可以将上述各个目标测试用例的标识信息、各个目标测试项目的标识信息、各个目标测试用例的执行顺序信息、目标用户的通信地址和各个目标测试用例的目标执行时间保存在预设的测试计划表中。其中,测试项目列表中对应保存有每一测试项目的标识信息、该测试项目中各个测试用例的标识信息,以及该测试项目中各个测试用例的测试用例脚本数据。
例如,如果目标测试项目的标识信息为标识3,该目标测试项目所用的目标测试用例的标识信息分别为e和f,各个目标测试用例的目标执行时间均为时间3,各个目标测试用例的执行顺序为先执行标识信息为e的测试用例,再执行标识信息为f的测试用例,以及,目标用户的通信地址为地址3,则将上述信息保存至测试计划表后的一种测试计划表的示例可以如表二所示:
表二
Figure PCTCN2020133633-appb-000001
其中,执行顺序信息中的数字代表优先级,可以按照数字大小确定各个测试用例的优先级,数字越小则测试用例的优先级越高,在测试过程中,可以按照优先级从高到低的顺序执行各个测试用例。
可见,在表二中,已经预先保存了:标识信息为标识1的测试项目,该测试项目所用的测试用例的测试用例标识为a、b和c,各个测试用例的执行时间均为时间1,各个测试用例的执行顺序为先执行标识 信息为a的测试用例,再执行标识信息为c的测试用例,最后执行标识信息为b的测试用例,接收该测试项目的测试结果的用户的通信地址为地址1;以及标识信息为标识2的测试项目,该测试项目所用的测试用例的标识信息分别为a、b和d,各个测试用例的执行时间均为时间2,各个测试用例的执行顺序为先执行标识信息为b的测试用例,再执行标识信息为a的测试用例,最后执行标识信息为d的测试用例,接收该测试项目的测试结果的用户的通信地址为地址2。
步骤S304,获取预先保存的目标客户端执行机的浏览器信息。
在一实施方式中,目标客户端执行机至少安装一种操作系统支持的一种浏览器。
步骤S305,当检测到目标执行时间到达时,向目标客户端执行机发送测试请求;
其中,测试请求中包含:目标测试项目的标识信息、各个目标测试用例的标识信息和目标用户的通信地址。
步骤S306,接收目标客户端执行机发送的测试用例脚本数据请求;
其中,测试用例脚本数据请求中包含:目标测试项目的标识信息和目标测试用例的标识信息。
步骤S307,基于测试用例脚本数据请求中包含的目标测试项目的标识信息和目标测试用例的标识信息,从预先保存的测试项目列表中,获得各个目标测试用例的目标测试用例脚本数据。
其中,测试项目列表中保存有各个测试项目的项目标识信息、测试用例标识信息及对应的测试用例脚本数据。
在一实施方式中,测试用例脚本数据中可以包含待测试软件的网址信息,以使客户端执行机接收到待测试软件的网址信息后,可以根据待测试软件的网址访问待测试软件,对待测试软件进行测试。
在一实施方式中,与表二相对应,一种测试项目列表的示例可以如表三所示:
表三
Figure PCTCN2020133633-appb-000002
在表三中,在测试项目标识为标识1和标识2的项目中,用到了测试用例标识为a的测试脚本数据A;在测试项目标识为标识1和标识2的项目中,用到了测试用例标识为b的测试脚本数据B;在测试项目标识为标识2的项目中,用到了测试用例标识为c的测试脚本数据C;在测试项目标识为标识2的项目中,用到了测试用例标识为d的测试脚本数据D;在测试项目标识为标识3的项目中,用到了测试用例标识为e的测试脚本数据E;在测试项目标识为标识3的项目中,用到了测试用例标识为f的测试脚本数据F。
也就是说,在标识信息为标识1的测试项目中,用到了标识信息为分别为a和b的测试项目的测试脚本数据A和B;在标识信息为标识2的测试项目中,用到了标识信息分别为a、b、c和d的测试用例的测试脚本数据A、B、C和D;在标识信息为标识3的测试项目中,用到了标识信息分别为e和f的测试用例的 测试脚本数据E和F。
可见,当按照表3所示的方式保存测试用例脚本数据时,每一个测试用例在测试项目表中只保存一遍测试用例脚本数据即可,从而,可以节省测试用例脚本数据占用的测试服务器的存储空间。
在一实施方式中,因为每一个测试用例可能被多个用户使用,因此,测试用例脚本数据中的参数可以保存在公共参数模块中,从而,在测试用例脚本数据中引用公共参数。
例如,测试用例为:以用户名a,密码b,登录网站一。则测试用例脚本数据中的a和b可以保存在公共参数中。这样,在测试脚本数据中,可以分别以@用户名a,@密码b的形式调用公共参数中的数据a和b。这样,测试服务器在确定要发送该测试用例至客户端执行机时,便可以将公共参数中的数据调用出来,一起发送至客户端执行机。在本实施例中,当一个测试用例被多个用户使用时,由于每个测试用例的测试用例脚本数据均保存在公共参数中,因此,该多个用户之间可以互不影响。
步骤S308,将目标客户端执行机的浏览器信息、各个目标测试用例脚本数据和各个目标测试用例的执行顺序信息发送至目标客户端执行机,以使目标客户端执行机,在基于浏览器信息,检测自身浏览器信息和测试服务器发送的浏览器信息相同后,基于各个目标测试用例脚本数据和各个目标测试用例的执行顺序信息,启动与待测软件对应的操作系统的浏览器,通过浏览器对待测试软件进行测试,并基于目标用户的通信地址将测试结果发送至目标用户;在基于浏览器信息,检测自身浏览器信息和测试服务器发送的浏览器信息不同后,发送浏览器不支持的响应信息至测试服务器。
测试服务器若接收到目标客户端执行机发送的浏览器不支持的响应信息,则结束测试。
在一实施方式中,测试服务器和客户端执行机之间可以基于HTTP协议发送和接收数据。
在一实施方式中,测试服务器向客户端执行机发送的目标测试项目的标识信息、目标测试用例的标识信息、目标用户的通信地址、浏览器信息、各个目标测试用例脚本数据和各个目标测试用例的执行顺序信息,可以根据实际情况在测试服务器中进行预先设置和组合,其中,在所得到的上述各类信息的组合能够实现对待测试软件进行测试的前提下,本公开实施例不对上述各类信息的组合方式进行限定。
可见,应用本公开实施例,测试服务器可以基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据。其中,由于各个目标测试用例是从预先编辑完成的多个测试用例中确定的,因此,在客户端执行机通过浏览器对待测试软件进行测试时,编辑测试用例和对待测试软件进行测试的过程是在不同的设备中实现的,从而,可以去除测试用例的编辑和测试之间的强耦合性,提高测试效率。
而且,在本公开实施例中,可以先将包含目标测试项目的标识信息和目标测试用例的标识信息的测试请求发送至目标客户端执行机,再接收到目标客户端发送的测试用例脚本数据请求后,再将各个目标测试用例脚本数据发送至目标客户端执行机。
这样,目标客户端执行机便可以在确定自身可以对各个目标测试用例进行测试后,将测试用例脚本数据请求发送至测试服务器,测试服务器再发送各个目标测试用例脚本数据。从而,可以避免测试服务器将各个目标测试用例脚本数据这种数据量较大的数据直接发送给目标客户端执行机后,出现由于目标客户端执行机正在进行其他测试,所导致的各个目标测试用例脚本数据占用内存影响客户端执行机的运行的情况。
并且,利用上述分两次发送的方式,在测试服务器可能需要向多个目标客户端执行机发送数据时,测试服务器可以不用在同一时间将目标测试项目的标识信息、本次测试所用到的所有目标测试用例的标 识信息和各个目标测试用例脚本数据一起发送,从而,可以减少测试服务器在同一时间传输数据的压力,并减少每次传输数据的时间。
同时,应用本公开实施例,测试人员只要懂需要测试的业务,就可以从预先编辑完成的多个测试用例中选择目标用例标识,对待测试软件进行测试,从而,可以降低对测试人员开发能力的要求,提高用户体验度。
与上述应用于测试系统中的测试服务器执行的测试方法相对应,本公开提供了另一种应用于测试系统中的测试服务器的测试方法,该方法的处理流程可以包括:
步骤1:确定用户确定的目标测试计划信息和目标客户端执行机;
其中,目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息;目标测试用例为预先编辑完成的多个测试用例中的测试用例;
步骤2:基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据;
步骤3:将各个目标测试用例脚本数据发送至目标客户端执行机,以使目标客户端执行机基于各个目标测试用例脚本数据对待测试软件进行测试。
其中,上述步骤1-2与上述步骤S201-S202相同,在此不再赘述。在上述步骤3中,测试服务器将各个目标测试用例脚本数据发送至目标客户端执行机后,目标客户端执行机可以直接基于各个目标测试用例脚本数据对待测试软件进行测试。
也就是说,目标客户端执行机除了可以利用所安装的浏览器对待测试软件进行测试外,也可以采用其他方式对待测试软件进行测试。
可见,应用本公开实施例,测试服务器可以基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据。其中,由于各个目标测试用例是从预先编辑完成的多个测试用例中确定的,因此,在客户端执行机通过浏览器对待测试软件进行测试时,编辑测试用例和对待测试软件进行测试的过程是在不同的设备中实现的,从而,可以去除测试用例的编辑和测试之间的强耦合性,提高测试效率。
与上述应用于测试系统中的测试服务器执行的测试方法相对应,本公开实施例提供的测试方法的一种流程示意图,应用于测试系统包含的多个客户端执行器中的任一客户端执行机,该系统还包含测试服务器,其中,该系统中的每个客户端执行机至少安装一种操作系统支持的一种浏览器;如图4所示,该方法的处理流程可以包括:
步骤S401,接收测试服务器发送的各个目标测试用例脚本数据;
其中,各个目标测试用例脚本数据为:测试服务器在确定用户确定的目标测试计划信息和目标客户端执行机后,基于目标测试计划信息包含的对待测试软件进行测试的至少一个目标测试用例的标识信息,获得的各个目标测试用例的目标测试用例脚本数据;各个目标测试用例为预先编辑完成的多个测试用例中的测试用例。
在一实施方式中,客户端执行机接收各个目标测试用例脚本数据,该客户端执行机可以仅安装一种操作系统支持的一种浏览器。这样,避免一个客户端执行机安装多个不同的浏览器,同一时间不同的浏览器进行不同的测试用例的测试时,各测试用例之间互相影响。
步骤S402,基于各个目标测试用例脚本数据,启动与待测软件对应的操作系统的浏览器,通过浏览器对待测试软件进行测试。
可见,应用本公开实施例,测试服务器可以基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据。其中,由于各个目标测试用例是从预先编辑完成的多个测试用例中确定的,因此,在客户端执行机通过浏览器对待测试软件进行测试时,编辑测试用例和对待测软件进行测试的过程是在不同的电子设备中实现的,从而,可以去除测试用例的编辑和测试之间的强耦合性,提高测试效率。
参见图5,为本发明实施例提供的测试方法的另一种流程示意图,该方法应用于测试系统所包含的多个客户端执行机中的任一客户端执行机,如图5所示,该方法的处理流程可以包括:
步骤S501,接收测试服务器发送的测试请求;
其中,测试请求中包含:目标测试项目的标识信息、目标测试用例的标识信息和目标用户的通信地址。
步骤S502,向测试服务器发送测试用例脚本数据请求;以使测试服务器基于测试用例脚本数据请求中包含的目标测试项目的标识信息和目标测试用例的标识信息,从预先保存的测试项目列表中,获得各个目标测试用例的目标测试用例脚本数据;
其中,测试用例脚本数据请求中包含:目标测试项目的标识信息和目标测试用例的标识信息;测试项目列表中保存有各个测试项目的标识信息、各个测试用例的标识信息及各个测试用例的测试用例脚本数据。
步骤S503,接收测试服务器发送的浏览器信息、各个目标测试用例脚本数据和各个目标测试用例的执行顺序信息。
在一实施方式中,目标测试用例脚本数据中也可以包含待测试软件的网页地址。
步骤S504,检测自身浏览器信息和测试服务器发送的浏览器信息是否相同。如果检测出自身浏览器信息和测试服务器发送的浏览器信息不相同,则执行步骤S505;如果检测出自身浏览器信息和测试服务器发送的浏览器信息相同,则执行步骤S506。
步骤S505,向测试服务器发送操作系统不支持的响应信息,以使测试服务器结束测试。至此,对待测试软件进行测试的操作结束。
步骤S506,基于各个目标测试用例脚本数据和各个目标测试用例的执行顺序信息,启动与待测软件对应的操作系统的浏览器,通过浏览器对待测试软件进行测试。
在一实施方式中,客户端执行机可以启动浏览器,访问待测试软件的网页地址,基于各个目标测试用例脚本数据对待测试软件进行测试。
在一实施方式中,客户端执行机可以调用预设的测试API(Application Programming Interface,应用程序接口),启动与待测软件对应的操作系统的浏览器,按照各个目标测试用例的执行顺序信息,逐一运行各个目标测试用例脚本,对待测试软件进行测试。
在一实施方式中,客户端执行机可以调用预设的自动化测试框架selenium,唤起与待测软件对应的操作系统的浏览器驱动,启动与待测软件对应的操作系统的浏览器,按照各个目标测试用例的执行顺序信息,逐一运行各个目标测试用例脚本,对待测试软件进行测试。
步骤S507,基于目标用户的通信地址将测试结果发送至目标用户。
其中,测试结果为:目标客户端执行机对待测试软件进行测试所得到的结果。
该通信地址可以为邮箱地址,客户端执行机可以将测试结果通过发送邮件的方式,发送至目标用户 的邮箱。当然,该通信地址也可以是其他形式的地址,从而,客户端执行机可以按照与通信地址对应的发送方式,按照通信地址,将测试结果发送至目标用户。这样,目标用户可以及时获知测试结果,从而,使得用户体验较高。
在一实施方式中,客户端执行机接收目标测试项目的标识信息、目标测试用例的标识信息、目标用户的通信地址、浏览器信息、各个目标测试用例脚本数据和各个目标测试用例的执行顺序信息可以根据实际情况在测试服务器中进行预先设置和组合,其中,在所得到的上述各类信息的组合能够实现对待测试软件进行测试的前提下,本公开实施例不对上述各类信息的组合方式进行限定。
可见,应用本公开实施例,测试服务器可以基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据。其中,由于各个目标测试用例是从预先编辑完成的多个测试用例中确定的,因此,在客户端执行机通过浏览器对待测试软件进行测试时,编辑测试用例和对待测试软件进行测试的过程是在不同的电子设备中实现的,从而,可以去除测试用例的编辑和测试之间的强耦合性,提高测试效率。
在本公开实施例中,可以避免测试服务器将各个目标测试用例脚本数据这种数据量较大的数据直接发送给客户端执行机后,出现由于客户端执行机正在进行其他测试,所导致的各个目标测试用例脚本数据占用内存影响客户端执行机的运行的情况。
并且,利用上述分两次发送的方式,在测试服务器可能需要向多个客户端执行机发送数据时,测试服务器可以不用在同一时间将目标测试项目的标识信息、本次测试所用到的所有目标测试用例的标识信息和各个目标测试用例脚本数据一起发送,从而,可以减少测试服务器在同一时间传输数据的压力,并减少每次传输数据的时间。
而且,在本公开实施例中,目标测试用例脚本数据中包含待测试软件的网页地址,客户端执行机可以启动浏览器,访问待测试软件的网页地址,基于各个目标测试用例脚本数据对待测试软件进行测试,待测试软件的脚本数据无需保存到客户端执行机就可以对待测试软件进行测试,不会出现待测试软件脚本数据在客户端执行机中被他人泄漏的事件,安全性较高。
如图6所示,为测试服务器和客户端执行机的交互图,包括以下步骤:
步骤S601,测试服务器通过预设的测试管理页面,接收用户输入的目标测试计划对应的目标测试项目标识及用户从已保存的测试用例中选中的目标测试用例标识;通过预设的执行机配置界面,接收用户选中的目标客户端执行机;通过预设的测试执行页面,接收用户输入的针对各个目标测试用例的目标执行时间、各个目标测试用例的执行顺序以及目标用户的通信地址。
步骤S602,测试服务器获取预先保存的目标客户端执行机的浏览器信息。
步骤S603,测试服务器检测目标执行时间是否到达;如果检测出执行时间到达,执行步骤S604。
步骤S604,测试服务器发送测试请求至目标客户端执行机;
其中,测试请求中包含:目标测试项目的标识信息、各个目标测试用例的标识信息和目标用户的通信地址。
步骤S605,目标客户端执行机发送测试用例脚本数据请求至测试服务器;
其中,测试用例脚本数据请求中包含:目标测试项目的标识信息和目标测试用例的标识信息。
步骤S606,测试服务器基于测试用例脚本数据请求中包含的目标测试项目的标识信息和目标测试用例的标识信息,从预先保存的测试项目列表中,获得各个目标测试用例的目标测试用例脚本数据。
步骤S607,测试服务器发送目标客户端执行机的浏览器信息、各个目标测试用例脚本数据和各个目标测试用例的执行顺序信息至目标客户端执行机。
步骤S608,目标客户端执行机检测自身浏览器信息和测试服务器发送的浏览器信息是否相同;如果检测出自身浏览器信息和测试服务器发送的浏览器信息相同,执行步骤S609;如果检测出自身浏览器信息和测试服务器发送的浏览器信息不相同,执行步骤S612。
步骤S609,基于各个目标测试用例脚本数据和各个目标测试用例的执行顺序信息,启动与待测软件对应的操作系统的浏览器,通过浏览器对待测试软件进行测试。
步骤S610,目标客户端执行机发送测试结果至测试服务器。
步骤S611,测试服务器汇总测试结果。
步骤S612,发送操作系统不支持的响应信息至测试服务器。
步骤S613,测试服务器结束测试。
可见,应用本公开实施例,测试服务器可以基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据。其中,由于各个目标测试用例是从预先编辑完成的多个测试用例中确定的,因此,在客户端执行机通过浏览器对待测试软件进行测试时,编辑测试用例和对待测试软件进行测试的过程是在不同的设备中实现的,从而,可以去除测试用例的编辑和测试之间的强耦合性,提高测试效率。
本公开实施例提供了一种测试装置,该测试装置应用于测试系统中的测试服务器,该系统还包含多个客户端执行机,如图7所示,该装置可以包括如下单元:
第一获得单元701,设置为确定用户确定的目标测试计划信息和目标客户端执行机;其中,目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息;目标测试用例为预先编辑完成的多个测试用例中的测试用例;
第二获得单元702,设置为基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据;
脚本数据发送单元703,设置为将各个目标测试用例脚本数据发送至目标客户端执行机,以使目标客户端执行机,基于各个目标测试用例脚本数据,启动与待测软件对应的操作系统的浏览器,通过浏览器对待测试软件进行测试;其中,目标客户端执行机至少安装一种操作系统支持的一种浏览器。
在一实施方式中,目标测试计划信息中,还包含:目标测试计划对应的目标测试项目的标识信息;上述测试装置还包括:
测试请求发送单元,设置为在基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据之前,向目标客户端执行机发送测试请求;其中,测试请求中包含:目标测试项目的标识信息和各个目标测试用例的标识信息;
测试用例脚本数据请求接收单元,设置为接收目标客户端发送的测试用例脚本数据请求;其中,测试用例脚本数据请求中包含:目标测试项目的标识信息和目标测试用例的标识信息;
上述第二获得单元702,包括:用例脚本数据获得模块,设置为基于测试用例脚本数据请求中包含的目标测试项目的标识信息和各个目标测试用例的标识信息,从预先保存的测试项目列表中,获得各个目标测试用例的目标测试用例脚本数据;其中,测试项目列表中保存有各个测试项目的标识信息、各个测试用例的标识信息及各个测试用例的测试用例脚本数据。
在一实施方式中,若目标测试用例的数量为多个,则上述测试装置还包括:执行顺序信息获得单元,设置为在向目标客户端执行机发送测试请求之前,获得各个目标测试用例的执行顺序信息;
上述脚本数据发送单元703,包括:发送模块,设置为将各个目标测试用例脚本数据和上述执行顺序信息发送至目标客户端执行机,以使目标客户端执行机,基于各个目标测试用例脚本数据和上述执行顺序信息,启动与待测软件对应的操作系统的浏览器,并通过浏览器对待测试软件进行测试。
在一实施方式中,上述测试装置还包括:通信地址获得单元,设置为在向目标客户端执行机发送测试请求之前,获得用户确定的目标用户的通信地址;其中,上述测试请求中还包含目标用户的通信地址;
上述发送模块,包括:发送子模块,设置为将各个目标测试用例脚本数据和上述执行顺序信息发送至目标客户端执行机,以使目标客户端执行机,基于各个目标测试用例脚本数据和上述执行顺序信息,启动与待测软件对应的操作系统的浏览器,并通过浏览器对待测试软件进行测试,并基于目标用户的通信地址将测试结果发送至目标用户。
在一实施方式中,上述测试装置还包括:执行时间获得单元,设置为在向目标客户端执行机发送测试请求之前,获得各个目标测试用例的目标执行时间;
上述测试请求发送单元,包括:测试请求发送模块,设置为当检测到目标测试时间到达时,向目标客户端执行机发送测试请求。
在一实施方式中,上述第一获得单元设置为通过预设的测试管理页面,接收用户输入的目标测试计划对应的目标测试项目的标识信息及用户从已保存的测试用例中选中的目标测试用例的标识信息;并通过预设的执行机配置界面,接收用户选中的目标客户端执行机;
上述执行时间获得单元设置为通过预设的测试执行页面,接收用户输入的针对各个目标测试用例的目标执行时间;
上述执行顺序信息获得单元设置为通过测试执行页面,接收用户输入的各个目标测试用例的执行顺序;
上述通信地址获得单元设置为通过测试执行页面,接收用户输入的目标用户的通信地址。
在一实施方式中,上述测试装置还包括:浏览器信息获取单元,设置为在获得用户确定的目标测试计划信息和目标客户端执行机之后,获取预先保存的目标客户端执行机的浏览器信息;
上述发送子模块具体设置为将目标客户端执行机的浏览器信息、各个目标测试用例脚本数据和上述执行顺序信息发送至目标客户端执行机,以使目标客户端执行机,在基于浏览器信息,检测自身浏览器信息和测试服务器发送的浏览器信息相同后,基于各个目标测试用例脚本数据和上述执行顺序信息,启动与待测软件对应的操作系统的浏览器,并通过浏览器对待测试软件进行测试,并基于目标用户的通信地址将测试结果发送至目标用户;在基于所述浏览器信息,检测自身浏览器信息和测试服务器发送的浏览器信息不同后,发送浏览器不支持的响应信息至测试服务器;若接收到目标客户端执行机发送的浏览器不支持的响应信息,则结束测试。
可见,应用本公开实施例,测试服务器可以基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据。其中,由于各个目标测试用例是从预先编辑完成的多个测试用例中确定的,因此,在客户端执行机通过浏览器对待测试软件进行测试时,编辑测试用例和对待测软件进行测试的过程是在不同的设备中实现的,从而,可以去除测试用例的编辑和测试之间的强耦合性,提高测试效率。
本公开实施例提供了另一种测试装置,该测试装置应用于测试系统包含的多个客户端执行机中的任一客户端执行机,该系统还包含测试服务器,其中,客户端执行机至少安装一种操作系统支持的一种浏览器,如图8所示,该装置可以包括如下单元:
测试用例脚本数据接收单元801,设置为接收测试服务器发送的各个目标测试用例脚本数据;其中,各个目标测试用例脚本数据为:测试服务器在确定用户确定的目标测试计划信息和目标客户端执行机后,基于目标测试计划信息包含的对待测试软件进行测试的至少一个目标测试用例的标识信息,获得的各个目标测试用例的目标测试用例脚本数据;目标测试用例为预先编辑完成的多个测试用例中的测试用例;
测试单元802,设置为基于各个目标测试用例脚本数据,启动与待测软件对应的操作系统的浏览器,并通过浏览器对待测试软件进行测试。
在一实施方式中,目标测试计划信息中,还包含:目标测试计划对应的目标测试项目的标识信息;上述测试装置还包括:
测试请求接收单元,设置为在接收测试服务器发送的各个目标测试用例脚本数据之前,接收测试服务器发送的测试请求;其中,测试请求中包含:目标测试项目的标识信息和目标测试用例的标识信息;
脚本数据请求发送单元,设置为向测试服务器发送测试用例脚本数据请求;以使测试服务器基于测试用例脚本数据请求中包含的目标测试项目的标识信息和目标测试用例的标识信息,从预先保存的测试项目列表中,获得各个目标测试用例的目标测试用例脚本数据;其中,测试用例脚本数据请求中包含:目标测试项目的标识信息和目标测试用例的标识信息;测试项目列表中保存有各个测试项目的标识信息、各个测试用例的标识信息及各个测试用例的测试用例脚本数据。
在一实施方式中,上述测试用例脚本数据接收单元801,包括:接收模块,设置为接收测试服务器发送的各个目标测试用例脚本数据和各个目标测试用例的执行顺序信;
上述测试单元802设置为基于各个目标测试用例脚本数据和上述执行顺序信息,启动与待测软件对应的操作系统的浏览器,通过浏览器对待测试软件进行测试。
在一实施方式中,上述测试请求中还包含目标用户的通信地址;上述测试装置还包括:
测试结果发送单元,设置为在测试模块基于各个目标测试用例脚本数据和上述执行顺序信息,启动与待测软件对应的操作系统的浏览器,通过浏览器对待测试软件进行测试之后,基于目标用户的通信地址将测试结果发送至目标用户。
在一实施方式中,上述测试单元802设置为调用预设的测试API,启动与待测软件对应的操作系统的浏览器,按照上述执行顺序信息,逐一运行各个目标测试用例脚本,对待测试软件进行测试。
在一实施方式中,上述接收模块设置为接收测试服务器发送的浏览器信息、各个目标测试用例脚本数据和各个目标测试用例的执行顺序信息;上述测试装置还包括:
检测单元设置为在基于各个目标测试用例脚本数据和上述执行顺序信息,启动与待测软件对应的操作系统的浏览器,并通过浏览器对待测试软件进行测试之前,检测自身浏览器信息和测试服务器发送的浏览器信息是否相同;如果相同,则触发上述测试单元802;如果不相同,则向测试服务器发送操作系统不支持的响应信息,以使测试服务器结束测试。
可见,应用本公开实施例,测试服务器可以基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据。其中,由于各个目标测试用例是从预先编辑完成的多个测试用例中确定 的,因此,在客户端执行机通过浏览器对待测试软件进行测试时,编辑测试用例和对待测软件进行测试的过程是在不同的设备中实现的,从而,可以去除测试用例的编辑和测试之间的强耦合性,提高测试效率。
本公开实施例提供了一种测试装置,该测试装置应用于测试系统中的测试服务器,该系统还包含多个客户端执行机,如图7所示,该装置可以包括如下单元:
测试信息获得单元,设置为确定用户确定的目标测试计划信息和目标客户端执行机;其中,目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息;目标测试用例为预先编辑完成的多个测试用例中的测试用例;测试数据获得单元,设置为基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据;测试数据发送单元,设置为将各个目标测试用例脚本数据发送至目标客户端执行机,以使目标客户端执行机,基于各个目标测试用例脚本数据,对待测试软件进行测试。
可见,应用本公开实施例,测试服务器可以基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据。其中,由于各个目标测试用例是从预先编辑完成的多个测试用例中确定的,因此,在客户端执行机通过浏览器对待测试软件进行测试时,编辑测试用例和对待测软件进行测试的过程是在不同的设备中实现的,从而,可以去除测试用例的编辑和测试之间的强耦合性,提高测试效率。
本发明实施例还提供了一种业务处理系统,该系统中可以包含测试服务器和至少一个客户端执行机;其中,测试服务器用于执行上述本公开实施例提供的应用于测试系统中的测试服务器的任一测试方法的步骤,每个客户端执行机用于执行上述本公开实施例提供的应用于测试系统包含的多个客户端执行机中的任一执行机的任一测试方法的步骤。
本公开实施例还提供了一种终端设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;存储器,用于存放计算机程序;
其中,当该终端设备为测试服务器时,该处理器,用于执行存储器上所存放的程序时,实现上述本公开实施例提供的应用于测试系统中的测试服务器的任一测试方法的步骤;当该终端设备为客户端执行机时,该处理器,用于执行存储器上所存放的程序时,实现上述本公开实施例提供的应用于测试系统包含的多个客户端执行机中的任一执行机的任一测试方法的步骤。
本公开实施例还提供了一种测试服务器,如图9所示,包括处理器901、通信接口902、存储器903和通信总线904,其中,处理器901,通信接口902,存储器903通过通信总线904完成相互间的通信,存储器903,用于存放计算机程序;处理器901,用于执行存储器903上所存放的程序时,实现如下步骤:
确定用户确定的目标测试计划信息和目标客户端执行机;其中,目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息;目标测试用例为预先编辑完成的多个测试用例中的测试用例;基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据;将各个目标测试用例脚本数据发送至目标客户端执行机,以使目标客户端执行机,基于各个目标测试用例脚本数据,对待测试软件进行测试。
可见,应用本公开实施例,测试服务器可以基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据。其中,由于各个目标测试用例是从预先编辑完成的多个测试用例中确定的,因此,在客户端执行机通过浏览器对待测试软件进行测试时,编辑测试用例和对待测试软件进行测 试的过程是在不同的设备中实现的,从而,可以去除测试用例的编辑和测试之间的强耦合性,提高测试效率。
本公开实施例还提供了一种客户端执行机,如图10所示,包括处理器1001、通信接口1002、存储器1003和通信总线1004,其中,处理器1001,通信接口1002,存储器1003通过通信总线1004完成相互间的通信,存储器1003,用于存放计算机程序;处理器1001,用于执行存储器1003上所存放的程序时,实现如下步骤:
接收测试服务器发送的各个目标测试用例脚本数据;其中,各个目标测试用例脚本数据为:测试服务器在确定用户确定的目标测试计划信息和目标客户端执行机后,基于目标测试计划信息包含的对待测试软件进行测试的至少一个目标测试用例的标识信息,获得的各个目标测试用例的目标测试用例脚本数据;目标测试用例为预先编辑完成的多个测试用例中的测试用例;基于各个目标测试用例脚本数据,对待测试软件进行测试。
可见,应用本公开实施例,测试服务器可以基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据。其中,由于各个目标测试用例是从预先编辑完成的多个测试用例中确定的,因此,在客户端执行机通过浏览器对待测试软件进行测试时,编辑测试用例和对待测试软件进行测试的过程是在不同的设备中实现的,从而,可以去除测试用例的编辑和测试之间的强耦合性,提高测试效率。
本公开实施例还提供了一种测试服务器,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信,存储器,用于存放计算机程序;处理器,用于执行存储器上所存放的程序时,实现如下步骤:
确定用户确定的目标测试计划信息和目标客户端执行机;其中,目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息;目标测试用例为预先编辑完成的多个测试用例中的测试用例;基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据;将各个目标测试用例脚本数据发送至目标客户端执行机,以使目标客户端执行机基于各个目标测试用例脚本数据对待测试软件进行测试。
可见,应用本公开实施例,测试服务器可以基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据。其中,由于各个目标测试用例是从预先编辑完成的多个测试用例中确定的,因此,在客户端执行机通过浏览器对待测试软件进行测试时,编辑测试用例和对待测试软件进行测试的过程是在不同的设备中实现的,从而,可以去除测试用例的编辑和测试之间的强耦合性,提高测试效率。
上述提到的测试服务器和客户端执行机可以为任一种类型的电子设备。
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述电子设备与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。在一实施方式中,存储器还可以是至少 一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
在本公开提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述本公开实施例提供的应用于测试系统中的测试服务器的任一测试方法的步骤,或者,实现上述本公开实施例提供的应用于测试系统包含的多个客户端执行机中的任一执行机的任一测试方法的步骤。
在本公开提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述本公开实施例提供的应用于测试系统中的测试服务器的任一测试方法的步骤,或者,实现上述本公开实施例提供的应用于测试系统包含的多个客户端执行机中的任一执行机的任一测试方法的步骤。
在本公开提供的又一实施例中,还提供了一种计算机程序,所述计算机程序在计算机上运行时,使得计算机执行上述本公开实施例提供的应用于测试系统中的测试服务器的任一测试方法的步骤,或者,实现上述本公开实施例提供的应用于测试系统包含的多个客户端执行机中的任一执行机的任一测试方法的步骤。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、终端设备、业务处理系统、计算机可读存储介质及计算机程序产品等实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本公开的较佳实施例而已,并非用于限定本公开的保护范围。凡在本公开的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本公开的保护范围内。
工业实用性
基于本公开实施例提供的测试方法、装置、终端设备及存储介质,能够使得编辑测试用例和对待测软件进行测试的过程在不同的设备中实现,去除了测试用例的编辑和测试之间的强耦合性,提高了测试效率。因此不需要在同一台电子设备中实现测试用例的编辑和对待测软件进行测试的过程,可以提高测试效率。

Claims (16)

  1. 一种测试方法,应用于测试系统中的测试服务器,所述系统还包含多个客户端执行机,所述方法包括:
    确定用户确定的目标测试计划信息和目标客户端执行机;其中,所述目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息;所述目标测试用例为预先编辑完成的多个测试用例中的测试用例;
    基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据;
    将所述各个目标测试用例脚本数据发送至所述目标客户端执行机,以使所述目标客户端执行机,基于所述各个目标测试用例脚本数据,启动与所述待测软件对应的操作系统的浏览器,并通过所述浏览器对所述待测试软件进行测试;所述目标客户端执行机至少安装一种操作系统支持的一种浏览器。
  2. 根据权利要求1所述的方法,其中,所述目标测试计划信息中,还包含:目标测试计划对应的目标测试项目的标识信息;
    在所述基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据的步骤之前,所述方法还包括:
    向所述目标客户端执行机发送测试请求;其中,所述测试请求中包含:所述目标测试项目的标识信息和各个目标测试用例的标识信息;
    接收所述目标客户端执行机发送的测试用例脚本数据请求;其中,所述测试用例脚本数据请求中包含:所述目标测试项目的标识信息和各个目标测试用例的标识信息;
    所述基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据的步骤,包括:
    基于所述测试用例脚本数据请求中包含的所述目标测试项目的标识信息和各个目标测试用例的标识信息,从预先保存的测试项目列表中,获得各个目标测试用例的目标测试用例脚本数据;其中,所述测试项目列表中保存有各个测试项目的标识信息、各个测试用例的标识信息及各个测试用例的测试用例脚本数据。
  3. 根据权利要求2所述的方法,其中,若目标测试用例的数量为多个,则在所述向所述目标客户端执行机发送测试请求的步骤之前,所述方法还包括:
    获得各个目标测试用例的执行顺序信息;
    所述将各个目标测试用例脚本数据发送至所述目标客户端执行机,以使所述目标客户端执行机,基于所述各个目标测试用例脚本数据,启动与所述待测软件对应的操作系统的浏览器,并通过所述浏览器对所述待测试软件进行测试的步骤,包括:
    将各个目标测试用例脚本数据和所述执行顺序信息发送至所述目标客户端执行机,以使所述目标客户端执行机,基于所述各个目标测试用例脚本数据和所述执行顺序信息,启动与所述待测软件对应的操作系统的浏览器,并通过所述浏览器对所述待测试软件进行测试。
  4. 根据权利要求3所述的方法,其中,在所述向所述目标客户端执行机发送测试请求的步骤之前,所述方法还包括:
    获得用户确定的目标用户的通信地址;
    所述测试请求中还包含所述目标用户的通信地址;
    所述将各个目标测试用例脚本数据和所述执行顺序信息发送至所述目标客户端执行机,以使所述目标客户端执行机,基于所述各个目标测试用例脚本数据和所述执行顺序信息,启动与所述待测软件对应的操作系统的浏览器,并通过所述浏览器对所述待测试软件进行测试的步骤,包括:
    将各个目标测试用例脚本数据和所述执行顺序信息发送至所述目标客户端执行机,以使所述目标客户端执行机,基于各个目标测试用例脚本数据和所述执行顺序信息,启动与所述待测软件对应的操作系统的浏览器,并通过所述浏览器对所述待测试软件进行测试,并基于所述目标用户的通信地址将测试结果发送至所述目标用户;其中,所述测试结果为:所述目标客户端执行机对所述待测试软件进行测试所得到的结果。
  5. 根据权利要求4所述的方法,其中,在所述向所述目标客户端执行机发送测试请求的步骤之前,所述方法还包括:
    获得各个目标测试用例的目标执行时间;
    所述向所述目标客户端执行机发送测试请求的步骤,包括:
    当检测到所述目标执行时间到达时,向所述目标客户端执行机发送测试请求。
  6. 根据权利要求5所述的方法,其中,
    所述确定用户确定的目标测试计划信息和目标客户端执行机的步骤,包括:
    通过预设的测试管理页面,接收用户输入的目标测试计划对应的目标测试项目的标识信息及用户从已保存的测试用例中选中的目标测试用例的标识信息;并通过预设的执行机配置界面,确定用户选中的目标客户端执行机;
    所述获得各个目标测试用例的目标执行时间的步骤,包括:
    通过预设的测试执行页面,接收用户输入的针对各个目标测试用例的目标执行时间;
    所述获得各个目标测试用例的执行顺序信息的步骤,包括:
    通过所述测试执行页面,接收用户输入的各个目标测试用例的执行顺序;
    所述获得用户确定的目标用户的通信地址的步骤,包括:
    通过所述测试执行页面,接收用户输入的目标用户的通信地址。
  7. 一种测试方法,应用于测试系统包含的多个客户端执行机中的任一客户端执行机,所述系统还包含测试服务器,所述客户端执行机至少安装一种操作系统支持的一种浏览器;所述方法包括:
    接收所述测试服务器发送的各个目标测试用例脚本数据;其中,各个目标测试用例脚本数据为:所述测试服务器在确定用户确定的目标测试计划信息和目标客户端执行机后,基于所述目标测试计划信息包含的对待测试软件进行测试的至少一个目标测试用例的标识信息,获得的各个目标测试用例的目标测试用例脚本数据;所述目标测试用例为预先编辑完成的多个测试用例中的测试用例;
    基于所述各个目标测试用例脚本数据,启动与所述待测软件对应的操作系统的浏览器,并通过所述浏览器对所述待测试软件进行测试。
  8. 一种测试方法,应用于测试系统中的测试服务器,所述系统还包含多个客户端执行机,所述方法包括:
    确定用户确定的目标测试计划信息和目标客户端执行机;其中,所述目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息;所述目标测试用例为预先编辑完成的多个测试用例中的测试用例;
    基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据;
    将各个目标测试用例脚本数据发送至所述目标客户端执行机,以使所述目标客户端执行机基于各个目标测试用例脚本数据对所述待测试软件进行测试。
  9. 一种测试装置,应用于测试系统中的测试服务器,所述系统还包含多个客户端执行机,所述装置包括:
    第一获得单元,设置为确定用户确定的目标测试计划信息和目标客户端执行机;其中,所述目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息;所述目标测试用例为预先编辑完成的多个测试用例中的测试用例;第二获得单元,设置为基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据;
    脚本数据发送单元,设置为将各个目标测试用例脚本数据发送至所述目标客户端执行机,以使所述目标客户端执行机,基于所述各个目标测试用例脚本数据,启动与所述待测软件对应的操作系统的浏览器,并通过所述浏览器对所述待测试软件进行测试;其中,所述目标客户端执行机至少安装一种操作系统支持的一种浏览器。
  10. 一种测试装置,应用于测试系统包含的多个客户端执行机中的任一客户端执行机,所述系统还包含测试服务器,其中,所述客户端执行机至少安装一种操作系统支持的一种浏览器;所述装置包括:
    测试用例脚本数据接收单元,设置为接收所述测试服务器发送的各个目标测试用例脚本数据;其中,各个目标测试用例脚本数据为:所述测试服务器在确定用户确定的目标测试计划信息和目标客户端执行机后,基于所述目标测试计划信息包含的对待测试软件进行测试的至少一个目标测试用例的标识信息,获得的各个目标测试用例的目标测试用例脚本数据,所述目标测试用例为预先编辑完成的多个测试用例中的测试用例;
    测试单元,设置为用于基于所述各个目标测试用例脚本数据,启动与所述待测软件对应的操作系统的浏览器,并通过所述浏览器对所述待测试软件进行测试。
  11. 一种测试装置,应用于测试系统中的测试服务器,所述系统还包含多个客户端执行机,所述装置包括:
    测试信息获得单元,设置为确定用户确定的目标测试计划信息和目标客户端执行机;其中,所述目标测试计划信息包含对待测试软件进行测试的至少一个目标测试用例的标识信息;所述目标测试用例为预先编辑完成的多个测试用例中的测试用例;
    测试数据获得单元,设置为基于各个目标测试用例的标识信息,获得各个目标测试用例的目标测试用例脚本数据;
    测试数据发送单元,设置为将各个目标测试用例脚本数据发送至所述目标客户端执行机,以使所述目标客户端执行机,基于所述各个目标测试用例脚本数据,对所述待测试软件进行测试。
  12. 一种业务处理系统,包括:测试服务器和至少一个客户端执行机;其中,所述测试服务器执行权利要求1-6或8中任一项所述的方法步骤,每个客户端执行机执行权利要求7所述的方法步骤。
  13. 一种终端设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
    存储器,设置为存放计算机程序;
    处理器,设置为执行存储器上所存放的程序时,实现权利要求1-6或8中任一所述的方法步骤,或者 实现权利要求7所述的方法步骤。
  14. 一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-6或8中任一所述的方法步骤;或实现权利要求7所述的方法步骤。
  15. 一种计算机程序,所述计算机程序在计算机上运行时,使得计算机执行权利要求1-6或8中任一所述的方法步骤,或者实现权利要求7所述的方法步骤。
  16. 一种包含指令的计算机程序产品,所述包含指令的计算机程序产品在计算机上运行时,实现权利要求1-6或8中任一所述的方法步骤,或者实现权利要求7所述的方法步骤。
PCT/CN2020/133633 2019-12-30 2020-12-03 一种测试方法、装置、终端设备及存储介质 WO2021135809A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911393052.9 2019-12-30
CN201911393052.9A CN113127323A (zh) 2019-12-30 2019-12-30 一种测试方法、装置、终端设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021135809A1 true WO2021135809A1 (zh) 2021-07-08

Family

ID=76686422

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/133633 WO2021135809A1 (zh) 2019-12-30 2020-12-03 一种测试方法、装置、终端设备及存储介质

Country Status (2)

Country Link
CN (1) CN113127323A (zh)
WO (1) WO2021135809A1 (zh)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656304A (zh) * 2021-08-16 2021-11-16 上海浦东发展银行股份有限公司 一种前端应用程序的测试方法、设备和存储介质
CN113656286A (zh) * 2021-07-27 2021-11-16 厦门雅基软件有限公司 软件测试方法、装置、电子设备及可读存储介质
CN113742228A (zh) * 2021-09-02 2021-12-03 杭州网易云音乐科技有限公司 测试、数据回放及录制方法、系统、装置、设备及介质
CN113890846A (zh) * 2021-09-23 2022-01-04 深圳Tcl新技术有限公司 一种配网检测方法、装置、系统及存储介质和终端设备
CN114567571A (zh) * 2022-03-14 2022-05-31 Oppo广东移动通信有限公司 性能测试方法、装置、电子设备和计算机可读存储介质
CN114610599A (zh) * 2022-01-18 2022-06-10 阿里云计算有限公司 测试方法以及系统
CN115396501A (zh) * 2022-08-31 2022-11-25 北京奇艺世纪科技有限公司 一种信息处理方法、装置、电子设备及可读存储介质
WO2023221004A1 (zh) * 2022-05-18 2023-11-23 北京小米移动软件有限公司 测试数据处理方法、装置、电子设备及存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117112391A (zh) * 2022-11-15 2023-11-24 领悦数字信息技术有限公司 用于功能测试的方法和系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150181447A1 (en) * 2012-07-24 2015-06-25 Borqs Wireless Ltd. Wireless automation test apparatus and method for mobile device
CN105260299A (zh) * 2015-09-17 2016-01-20 安一恒通(北京)科技有限公司 软件测试方法、装置及系统
CN105302732A (zh) * 2015-12-10 2016-02-03 广东欧珀移动通信有限公司 一种移动终端的自动测试方法及装置
CN106897207A (zh) * 2015-12-17 2017-06-27 北京奇虎科技有限公司 用户界面测试方法与装置
CN107590075A (zh) * 2017-09-19 2018-01-16 郑州云海信息技术有限公司 一种软件测试方法及装置
CN109144857A (zh) * 2018-08-01 2019-01-04 武汉普利商用机器有限公司 跨平台的算法测试方法及系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2381596A1 (en) * 2002-04-12 2003-10-12 Ibm Canada Limited-Ibm Canada Limitee Generating and managing test plans for testing computer software
US7313564B2 (en) * 2002-12-03 2007-12-25 Symbioware, Inc. Web-interactive software testing management method and computer system including an integrated test case authoring tool
CN101246448A (zh) * 2008-03-17 2008-08-20 中兴通讯股份有限公司 一种自动化脚本实现方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150181447A1 (en) * 2012-07-24 2015-06-25 Borqs Wireless Ltd. Wireless automation test apparatus and method for mobile device
CN105260299A (zh) * 2015-09-17 2016-01-20 安一恒通(北京)科技有限公司 软件测试方法、装置及系统
CN105302732A (zh) * 2015-12-10 2016-02-03 广东欧珀移动通信有限公司 一种移动终端的自动测试方法及装置
CN106897207A (zh) * 2015-12-17 2017-06-27 北京奇虎科技有限公司 用户界面测试方法与装置
CN107590075A (zh) * 2017-09-19 2018-01-16 郑州云海信息技术有限公司 一种软件测试方法及装置
CN109144857A (zh) * 2018-08-01 2019-01-04 武汉普利商用机器有限公司 跨平台的算法测试方法及系统

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656286A (zh) * 2021-07-27 2021-11-16 厦门雅基软件有限公司 软件测试方法、装置、电子设备及可读存储介质
CN113656304A (zh) * 2021-08-16 2021-11-16 上海浦东发展银行股份有限公司 一种前端应用程序的测试方法、设备和存储介质
CN113656304B (zh) * 2021-08-16 2024-04-30 上海浦东发展银行股份有限公司 一种前端应用程序的测试方法、设备和存储介质
CN113742228A (zh) * 2021-09-02 2021-12-03 杭州网易云音乐科技有限公司 测试、数据回放及录制方法、系统、装置、设备及介质
CN113742228B (zh) * 2021-09-02 2023-12-15 杭州网易云音乐科技有限公司 测试、数据回放及录制方法、系统、装置、设备及介质
CN113890846A (zh) * 2021-09-23 2022-01-04 深圳Tcl新技术有限公司 一种配网检测方法、装置、系统及存储介质和终端设备
CN114610599A (zh) * 2022-01-18 2022-06-10 阿里云计算有限公司 测试方法以及系统
CN114567571A (zh) * 2022-03-14 2022-05-31 Oppo广东移动通信有限公司 性能测试方法、装置、电子设备和计算机可读存储介质
CN114567571B (zh) * 2022-03-14 2023-11-10 Oppo广东移动通信有限公司 性能测试方法、装置、电子设备和计算机可读存储介质
WO2023221004A1 (zh) * 2022-05-18 2023-11-23 北京小米移动软件有限公司 测试数据处理方法、装置、电子设备及存储介质
CN115396501A (zh) * 2022-08-31 2022-11-25 北京奇艺世纪科技有限公司 一种信息处理方法、装置、电子设备及可读存储介质
CN115396501B (zh) * 2022-08-31 2024-01-30 北京奇艺世纪科技有限公司 一种信息处理方法、装置、电子设备及可读存储介质

Also Published As

Publication number Publication date
CN113127323A (zh) 2021-07-16

Similar Documents

Publication Publication Date Title
WO2021135809A1 (zh) 一种测试方法、装置、终端设备及存储介质
CN109062809B (zh) 一种线上测试用例生成方法、装置及电子设备
CN110851308A (zh) 一种测试方法、装置、电子设备及存储介质
WO2018000607A1 (zh) 一种识别测试用例失败原因的方法及电子设备
CN110798380B (zh) 一种数据获取方法、系统、装置、测试设备及测试服务器
CN109885786B (zh) 数据缓存处理方法、装置、电子设备及可读存储介质
CN112199300B (zh) 一种接口测试方法、装置、电子设备及存储介质
CN105099811A (zh) 一种接口测试方法和装置
CN109889511B (zh) 进程dns活动监控方法、设备及介质
CN109995612B (zh) 一种服务巡检方法、装置及电子设备
US20180248898A1 (en) Method and apparatus for identifying malicious website, and computer storage medium
CN110704311B (zh) 一种应用程序测试方法、装置、电子设备及可读存储介质
US20230267228A1 (en) Detection method and apparatus, and non-transitory computer readable storage medium
CN109522202B (zh) 一种软件测试的方法和装置
CN113162937A (zh) 应用安全自动化检测方法、系统、电子设备及存储介质
CN109951549B (zh) 网络页面的访问方法、装置及计算机可读存储介质
CN107807885B (zh) 任务信息显示方法及装置
CN114050990B (zh) 一种网络隔离设备的测试方法、装置、存储介质和电子设备
CN115408298A (zh) 测试方法、装置、系统
CN111444451B (zh) 一种文档获取方法、装置、电子设备及可读存储介质
CN115086214A (zh) 一种套片检测系统、方法、电子设备及存储介质
CN109165127B (zh) 问题接口的定位方法、装置及电子设备
CN115774581A (zh) 执行机器人脚本方法及相关装置
CN109039813B (zh) 一种检测因特网接入的方法、系统及设备
CN110674386B (zh) 资源推荐方法、装置及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20909778

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20909778

Country of ref document: EP

Kind code of ref document: A1