CN112817869A - Test method, test device, test medium, and electronic apparatus - Google Patents

Test method, test device, test medium, and electronic apparatus Download PDF

Info

Publication number
CN112817869A
CN112817869A CN202110214920.3A CN202110214920A CN112817869A CN 112817869 A CN112817869 A CN 112817869A CN 202110214920 A CN202110214920 A CN 202110214920A CN 112817869 A CN112817869 A CN 112817869A
Authority
CN
China
Prior art keywords
test
score
script
equipment
historical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110214920.3A
Other languages
Chinese (zh)
Inventor
刘潇
葛锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Netease Shuzhifan Technology Co ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110214920.3A priority Critical patent/CN112817869A/en
Publication of CN112817869A publication Critical patent/CN112817869A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Abstract

The embodiment of the disclosure provides a test method, a test device, a test medium and electronic equipment, and relates to the technical field of tests. The method comprises the following steps: acquiring an input test script and a preset test equipment list; calculating the association score between each test device in the test device list and the test script; matching a target test device for executing the test script from the list of test devices based on the association score; and distributing the test script to the target test equipment so that the target test equipment executes the test script to complete the test. According to the technical scheme of the embodiment of the disclosure, the test script and the test equipment with higher matching degree can be matched, the running stability of the test script or the test equipment is ensured, and the test efficiency and the test success rate are effectively improved.

Description

Test method, test device, test medium, and electronic apparatus
Technical Field
Embodiments of the present disclosure relate to the field of test technologies, and in particular, to a test method, a test apparatus, a computer-readable storage medium, and an electronic device.
Background
This section is intended to provide a background or context to the embodiments of the disclosure recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
With the rapid development of science and technology, the automatic test is more and more emphasized by people. The automated testing is a testing mode which sends a pre-compiled automated testing script to different types and brands of testing terminals to automatically run a system or an application program and obtain a running result.
In the related automatic test scheme, the automatic test script is randomly issued to the test equipment for testing.
Disclosure of Invention
However, in the existing automated testing scheme, on one hand, because each testing device may have the situations of device power failure, device network outage, network instability and the like, and the distribution and issuing of the automated testing script are random, the testing device may not execute the automated testing script to complete the testing, and the testing stability of the automated testing script is reduced; meanwhile, the system version in each test device cannot be adapted to the automatic test script, so that the test result is inaccurate; on the other hand, in view of the above reasons, in order to ensure that the automated test script can run in the test equipment and obtain the test result, a failure retry mechanism needs to be added in the test process, but the failure retry mechanism consumes a lot of time, resulting in a long test period and low test efficiency.
In the prior art, it is therefore difficult to achieve a satisfactory automated testing solution.
Therefore, an improved testing method is highly needed, so that the accuracy of the test result can be improved, the testing period can be shortened, and the testing efficiency can be improved while the execution stability of the automated testing script is ensured.
In this context, embodiments of the present disclosure are intended to provide a test method, a test apparatus, a computer-readable storage medium, and an electronic device.
In a first aspect of embodiments of the present disclosure, there is provided a test method, including: acquiring an input test script and a preset test equipment list; calculating the association score between each test device in the test device list and the test script; matching a target test device for executing the test script from the list of test devices based on the association score; and distributing the test script to the target test equipment so that the target test equipment executes the test script to complete the test.
In some embodiments of the present disclosure, calculating an association score between each test device in the test device list and the test script based on the foregoing scheme includes: calculating the current availability score corresponding to each test device in the test device list; acquiring historical execution data corresponding to each test device, and calculating a matching degree score between each test device and the test script according to the historical execution data; and calculating to obtain an association score between the test equipment and the test script based on the current availability score and the matching degree score.
In some embodiments of the present disclosure, based on the foregoing scheme, calculating a current availability score corresponding to each test device in the test device list includes: calculating the current availability score corresponding to each test device in the test device list according to preset options, wherein the preset options comprise one or more of the following combinations: the availability of a private network corresponding to an application to be tested in the test equipment; the performability of a test interface corresponding to the test equipment; and matching the device configuration information of the test device with the lowest running environment corresponding to the application to be tested.
In some embodiments of the present disclosure, based on the foregoing scheme, calculating a current availability score corresponding to each test device in the test device list according to a preset option, further includes: and testing the external network availability corresponding to the test equipment, and calculating the current availability score corresponding to each test equipment in the test equipment list according to the external network availability.
In some embodiments of the present disclosure, based on the foregoing scheme, the historical execution data includes tested application data and historical device data; the obtaining of the historical execution data corresponding to each test device and the calculating of the matching degree score between each test device and the test script according to the historical execution data includes: acquiring tested application data corresponding to the test equipment from a preset database, wherein the tested application data comprise a unique version identifier, and calculating a first matching score between the test equipment and the test script according to the unique version identifier; obtaining historical device data corresponding to the test device from the database, wherein the historical device data comprises a historical availability score and historical device execution data, and calculating a second matching score between the test device and the test script according to the historical availability score and the historical device execution data; and calculating to obtain a matching degree score between the test equipment and the test script according to the first matching score and the second matching score.
In some embodiments of the present disclosure, based on the foregoing scheme, the historical device execution data includes historical execution results and historical device attributes at each test; the calculating a second match score between the test device and the test script according to the historical availability score and the historical device execution data includes: calculating a relevance score of the test script and the historical equipment attribute; and calculating a second matching score between the test equipment and the test script according to the historical execution result, the relevance score and the historical usability score of the test script when the test equipment executes.
In some embodiments of the present disclosure, matching a target test device for executing the test script from the list of test devices based on the association score based on the foregoing scheme includes: determining a list of available test devices from the list of test devices according to the current availability score; and matching target test equipment for executing the test script from the available test equipment list according to the matching degree score.
In some embodiments of the present disclosure, based on the foregoing scheme, matching a target test device for executing the test script from the list of available test devices according to the matching degree score includes: and acquiring a preset matching degree score threshold, and matching the test equipment which is greater than or equal to the matching degree score threshold in the available test equipment list to serve as the target test equipment.
In some embodiments of the present disclosure, matching a target test device for executing the test script from the list of test devices based on the association score based on the foregoing scheme includes: carrying out priority division on the test equipment in the available test equipment list according to the current availability score to obtain available priority; carrying out priority division on the test equipment in the available test equipment list according to the matching degree score to obtain matching priority; and acquiring a preset priority threshold, and matching the available priority in the available test equipment list and/or the test equipment with the matching priority greater than or equal to the priority threshold as the target test equipment.
In some embodiments of the present disclosure, based on the foregoing, the method further comprises: and acquiring current execution data obtained by the target test equipment executing the test script, and storing the current execution data into a preset database so as to update historical execution data in the database.
In some embodiments of the present disclosure, based on the foregoing solution, the distributing the test script to the target test device further includes: and testing the application to be tested running in the target test equipment based on the test script so as to realize the functionality test of the application to be tested.
In some embodiments of the present disclosure, based on the foregoing solution, the distributing the test script to the target test device further includes: and testing the target test equipment and the application to be tested in the target test equipment based on the test script so as to realize compatibility test of the target test equipment and the application to be tested, wherein the compatibility test comprises equipment compatibility test and software compatibility test.
In some embodiments of the present disclosure, based on the foregoing scheme, the matching, from the test device list, a target test device for executing the test script based on the association score includes: determining a matching mapping relation between each test device in the test device list and different test scripts based on the association scores; and determining target test equipment corresponding to the test script according to the matching mapping relation.
In a second aspect of embodiments of the present disclosure, there is provided a test apparatus comprising: the test script acquisition module is used for acquiring an input test script and a preset test equipment list; the association score calculation module is used for calculating the association score between each test device in the test device list and the test script; a test device matching module for matching a target test device for executing the test script from the test device list based on the association score; and the test script execution module is used for distributing the test script to the target test equipment so as to enable the target test equipment to execute the test script to complete the test.
In some embodiments of the present disclosure, based on the foregoing scheme, the association score calculating module includes: the equipment availability score calculating unit is used for calculating the current availability score corresponding to each test equipment in the test equipment list; the matching degree score calculating unit is used for acquiring historical execution data corresponding to each test device and calculating a matching degree score between each test device and the test script according to the historical execution data; and the association score calculation unit is used for calculating and obtaining an association score between the test equipment and the test script based on the current availability score and the matching degree score.
In some embodiments of the present disclosure, based on the foregoing, the device availability score calculating unit is further configured to: calculating the current availability score corresponding to each test device in the test device list according to preset options, wherein the preset options comprise one or more of the following combinations: the availability of a private network corresponding to an application to be tested in the test equipment; the performability of a test interface corresponding to the test equipment; and matching the device configuration information of the test device with the lowest running environment corresponding to the application to be tested.
In some embodiments of the present disclosure, based on the foregoing, the device availability score calculating unit is further configured to: and testing the external network availability corresponding to the test equipment, and calculating the current availability score corresponding to each test equipment in the test equipment list according to the external network availability.
In some embodiments of the present disclosure, based on the foregoing scheme, the historical execution data includes tested application data and historical device data; the matching degree score calculating unit further includes: the first matching score calculating subunit is used for acquiring tested application data corresponding to the test equipment from a preset database, wherein the tested application data comprise a unique version identifier, and calculating a first matching score between the test equipment and the test script according to the unique version identifier; a second matching score calculating subunit, configured to obtain historical device data corresponding to the test device from the database, where the historical device data includes a historical availability score and historical device execution data, and calculate a second matching score between the test device and the test script according to the historical availability score and the historical device execution data; and the matching degree score calculating subunit is used for calculating to obtain a matching degree score between the test equipment and the test script according to the first matching score and the second matching score.
In some embodiments of the present disclosure, based on the foregoing scheme, the historical device execution data includes historical execution results and historical device attributes at each test; the second matching score calculating subunit is further configured to: calculating a relevance score of the test script and the historical equipment attribute; and calculating a second matching score between the test equipment and the test script according to the historical execution result, the relevance score and the historical usability score of the test script when the test equipment executes.
In some embodiments of the present disclosure, based on the foregoing solution, the test device matching module further includes: the test equipment list determining unit is used for determining an available test equipment list from the test equipment list according to the current availability score; and the target test equipment matching unit is used for matching target test equipment for executing the test script from the available test equipment list according to the matching degree score.
In some embodiments of the present disclosure, based on the foregoing solution, the target test device matching unit is further configured to: and acquiring a preset matching degree score threshold, and matching the test equipment which is greater than or equal to the matching degree score threshold in the available test equipment list to serve as the target test equipment.
In some embodiments of the present disclosure, based on the foregoing solution, the test device matching module is further configured to: carrying out priority division on the test equipment in the available test equipment list according to the current availability score to obtain available priority; carrying out priority division on the test equipment in the available test equipment list according to the matching degree score to obtain matching priority; and acquiring a preset priority threshold, and matching the available priority in the available test equipment list and/or the test equipment with the matching priority greater than or equal to the priority threshold as the target test equipment.
In some embodiments of the present disclosure, based on the foregoing solution, the testing apparatus further includes: and the current execution data storage unit is used for acquiring current execution data obtained by the target test equipment executing the test script and storing the current execution data into a preset database so as to update historical execution data in the database.
In some embodiments of the present disclosure, based on the foregoing solution, the test script execution module further includes an interactive function testing unit, and the interactive function testing unit is configured to: and testing the application to be tested running in the target test equipment based on the test script so as to realize the functionality test of the application to be tested.
In some embodiments of the present disclosure, based on the foregoing solution, the test script execution module is further configured to: and testing the target test equipment and the application to be tested in the target test equipment based on the test script so as to realize compatibility test of the target test equipment and the application to be tested, wherein the compatibility test comprises equipment compatibility test and software compatibility test.
In some embodiments of the present disclosure, based on the foregoing solution, the test device matching module is further configured to: determining a matching mapping relation between each test device in the test device list and different test scripts based on the association scores; and determining target test equipment corresponding to the test script according to the matching mapping relation.
In a third aspect of embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when executed by a processor, implements the testing method as described in the first aspect above.
In a fourth aspect of embodiments of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory having computer readable instructions stored thereon which, when executed by the processor, implement the testing method as described above in the first aspect.
According to the technical scheme of the embodiment of the disclosure, on one hand, the execution stability of the test script in the test equipment can be improved by calculating the association score between each test equipment in the test equipment list and the test script and then executing the test through the test equipment with high association score matching and test script matching degree, and the problem of low test script operation success rate caused by the mismatching of the system version of the test equipment and the test script is avoided; on the other hand, because the test equipment with high matching degree with the test script executes the test according to the associated score matching, the execution stability of the test script can be improved, so that an additional failure retry mechanism is not needed or the test using the failure retry mechanism is reduced, the automatic test period is effectively shortened, and the test efficiency is improved; on the other hand, the target test equipment obtained through the association score matching has high matching degree with the test script due to the equipment parameters and other test parameters corresponding to the target test equipment, so that the problem of low accuracy of the test result caused by the fact that the test equipment does not support the related functions of the test script can be effectively avoided, and the accuracy of the test result is improved.
Calculating a correlation score between the test equipment and the test script according to the current availability score and the matching degree score of the test equipment, wherein the current availability score of the test equipment ensures that the target test equipment obtained by screening can successfully run the test script and complete the test, so that the running success rate and the execution stability of the test script are improved, the number of failed retries is avoided or reduced, and the test efficiency is improved; the matching degree grading of the test equipment ensures that the target test equipment is matched with the test script after screening, ensures the stable operation of the test script, improves the accuracy of the test result and improves the test effect.
The current usability score of the testing equipment is comprehensively evaluated through the stability of the special network corresponding to the application to be tested, the performability of the testing interface corresponding to the testing equipment, the matching of the equipment configuration information of the testing equipment and the lowest running environment corresponding to the application to be tested and the usability of the external network of the testing equipment, the running success rate and the execution stability of the testing script can be effectively guaranteed, and the testing efficiency is improved.
After each test, the current execution data is stored and used as subsequent historical execution data, and the database is continuously updated, so that the accuracy of the calculated test script and the correlation score between the test devices can be further ensured, the accuracy of the target test devices obtained by screening can be further ensured, the execution success rate and the operation stability of the test script on the target test devices can be improved, and the accuracy of the test results can be further improved.
By using historical execution data corresponding to the test equipment, such as tested application data, historical equipment data and the like, as options for evaluating the association score between the test equipment and the test script, the test equipment with high adaptability for executing the test script can be screened and obtained, and the test application capable of running stably in the test equipment can be obtained, so that the embodiment of the example can be used for testing the application scene of the functional test of the application to be tested, the functional test of the application to be tested can be performed by using the target test equipment screened and obtained through the association score, the problem that the interactive functional test is inaccurate due to interference factors that the test equipment hardware or software does not support or the application to be tested cannot run stably and the like can be effectively avoided, and the accuracy of the test result of the functional test of the application to be tested is improved.
Through the association score between the test script and the test equipment and the historical execution data corresponding to the test equipment, such as the tested application data, the historical equipment data and other data, the test equipment with higher adaptation degree for executing the test script and each test script capable of stably running by each test equipment can be screened, so that the exemplary embodiment can be used for testing the software compatibility condition of application programs of different types or different versions or application scenes for testing the equipment compatibility condition of different test equipment to each application to be tested, the matching between the test equipment and the application to be tested is quickly realized through the association score between the test script and the test equipment and the historical execution data corresponding to the test equipment, and further the software compatibility test is performed on the application to be tested or the equipment compatibility test is performed on the test equipment, the design complexity of the compatibility test is reduced, and the test efficiency of the compatibility test is improved.
According to the embodiment of the invention, through the association scores between the test scripts and the test devices, not only can the target test device corresponding to the currently input test script be matched, but also the test scripts corresponding to the test devices can be matched, and the mapping relations are stored as the matching mapping relations.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present disclosure will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the present disclosure are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
fig. 1 schematically illustrates a schematic block diagram of a system architecture of an exemplary application scenario, in accordance with some embodiments of the present disclosure;
FIG. 2 schematically illustrates a flow diagram of a testing method according to some embodiments of the present disclosure;
FIG. 3 schematically illustrates a flow diagram for calculating a relevance score, according to some embodiments of the present disclosure;
FIG. 4 schematically illustrates a flow diagram for calculating a resulting match score according to some embodiments of the present disclosure;
FIG. 5 schematically illustrates a flow diagram for calculating a second match score, according to some embodiments of the present disclosure;
FIG. 6 schematically illustrates a flow diagram of matching target test devices, according to some embodiments of the present disclosure;
FIG. 7 schematically illustrates a flow diagram of matching target test devices based on current availability scores and matching degree scores, according to some embodiments of the present disclosure;
FIG. 8 schematically illustrates a flow diagram for determining a target test device based on an association score, according to some embodiments of the present disclosure;
FIG. 9 schematically illustrates a flow diagram for determining a relevance score, according to some embodiments of the present disclosure;
FIG. 10 schematically illustrates a schematic block diagram of a testing device according to some embodiments of the present disclosure;
FIG. 11 schematically shows a schematic view of a storage medium according to an example embodiment of the present disclosure; and
fig. 12 schematically shows a block diagram of an electronic device according to an exemplary embodiment of the invention.
In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Detailed Description
The principles and spirit of the present disclosure will be described below with reference to a number of exemplary embodiments. It is understood that these examples are given solely to enable those skilled in the art to better understand and to practice the present disclosure, and are not intended to limit the scope of the present disclosure in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to an embodiment of the present disclosure, a test method, a test apparatus, a medium, and an electronic device are provided.
In this context, it is to be understood that the terms referred to, such as:
a test script (Testing script) is a series of instructions for a specific test that can be executed by an automated test tool, and is typically an executable program written in a programming language (e.g., Python language, PHP language, etc.).
A test equipment (Testing equipment) refers to a generic term of a terminal, an apparatus, a system, etc. that can execute a test script, and for example, the test equipment may be a smart phone, a personal computer, etc. that is specifically customized for performing a test.
Scheduling refers to a back-end scheduling service for distributing test scripts, and designating the test scripts to run on specific test equipment.
MD5 refers to a cryptographic hash function that generates a 128-bit hash value to ensure that the information is transmitted in a complete and consistent manner, and the same MD5 value of a file means that the file is identical.
Moreover, any number of elements in the drawings are by way of example and not by way of limitation, and any nomenclature is used solely for differentiation and not by way of limitation.
The principles and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure.
Summary of The Invention
In the related test scheme, a test script written by a tester is generally issued to the test equipment, and if the test script is issued to a smart phone equipped with an android system for execution, the test script is generally scheduled in a manner of randomly selecting the test equipment to execute the test script. Since the test device may have failure conditions such as device power failure, device network outage, and network instability, a failure retry mechanism is usually added, that is, the test script is re-executed to improve reliability and reduce false alarm rate.
In the test scheme, although the random scheduling mode can ensure that available test equipment can timely distribute the automatic test tasks, a failure retry mechanism can ensure the reliability of the test script, and failures caused by some unstable conditions are avoided. However, because each test device may have the situations of device power failure, device network outage, network instability, and the like, and the distribution and issuing of the automatic test script are random, the test device may not execute the automatic test script to complete the test, and the test stability of the automatic test script is reduced; meanwhile, the system version in each test device cannot be adapted to the automatic test script, so that the test result is inaccurate; in order to ensure that the automatic test script can run in the test equipment and obtain the test result, a failure retry mechanism needs to be added in the test process, but the failure retry mechanism consumes a large amount of time, which results in long test period and low test efficiency.
Based on the above, the basic idea of the present disclosure is to obtain an input test script, calculate a correlation score between each test device in a test device list and the test script, match a target test device for executing the test script from the test device list based on the correlation score, then distribute the test script to the target test device, and execute the test script through the matched target test device to complete a test, thereby effectively improving the operation stability of the test script, improving the accuracy of a test result, effectively shortening a test period, and improving the test efficiency.
Having described the general principles of the present disclosure, various non-limiting embodiments of the present disclosure are described in detail below.
Application scene overview
Referring first to fig. 1, fig. 1 shows a schematic block diagram of a system architecture of an exemplary application scenario to which a testing method and apparatus of an embodiment of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal devices 101, 102, 103 may be various electronic devices having a display screen, including but not limited to desktop computers, portable computers, smart phones, tablet computers, and the like. It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
The testing method provided by the embodiment of the present disclosure is generally executed by the server 105, and accordingly, the testing apparatus is generally disposed in the server 105. However, it is easily understood by those skilled in the art that the testing method provided in the embodiment of the present disclosure may also be executed by the terminal devices 101, 102, and 103, and accordingly, the testing apparatus may also be disposed in the terminal devices 101, 102, and 103, which is not particularly limited in the exemplary embodiment. For example, in an exemplary embodiment, the terminal devices 101, 102, and 103 may upload the input test script to the server 105, and the server matches the target test device through the test method provided by the embodiment of the present disclosure, and transmits the identification information of the target test device to the terminal devices 101, 102, and 103, so that the terminal devices 101, 102, and 103 issue the test script to the target test device to make the target test device execute the test script to complete the test.
It should be understood that the application scenario illustrated in fig. 1 is only one example in which embodiments of the present disclosure may be implemented. The application scope of the embodiments of the present disclosure is not limited in any way by the application scenario.
Exemplary method
In connection with the application scenario of fig. 1, a test method according to an exemplary embodiment of the present disclosure is described below with reference to fig. 2. It should be noted that the above application scenarios are merely illustrative for the convenience of understanding the spirit and principles of the present disclosure, and embodiments of the present disclosure are not limited in this respect. Rather, embodiments of the present disclosure may be applied to any scenario where applicable.
The present disclosure first provides a testing method, where an execution subject of the method may be a terminal or a server, and the present disclosure is not particularly limited to this, and in this exemplary embodiment, the method executed by the server is taken as an example for description.
Referring to fig. 2, in step S210, an input test script and a preset test device list are acquired.
In an example embodiment, the test script refers to an executable program written in advance by a developer according to requirements of a test task, for example, the test script may be an executable program written in a programming language (e.g., Python language, PHP language, etc.) for testing a User Interface Design (UI) of an application program, may also be an executable program written in the programming language for testing compatibility of various types of devices, and of course, may also be another executable program written in advance by the developer according to requirements of the test task, which is not particularly limited in this example embodiment.
The test device list is a list including all test devices participating in the test task, and the test device list may include identification information corresponding to each test device. In order to improve the efficiency of screening the test equipment, the test equipment can be divided according to different test equipment types to obtain different test equipment lists, and then the test equipment lists matched with the input test scripts can be matched according to the requirements of different test tasks. When the test devices participating in the test task are updated, the test device list may be updated in real time through a preset data interface or other test device detection means, which is not particularly limited in this example embodiment.
In step S220, an association score between each test device in the test device list and the test script is calculated.
In an example embodiment, the association score is a score calculated according to the requirement of the test task corresponding to the test script and the data associated with the test device, and is used for evaluating the matching between the test script and the test device. For example, the association score of the test script with the test device may be 90 (full score may be set to 100) or 90% (full score may be set to 100%), which is not limited in any way by the present exemplary embodiment.
In step S230, a target test device for executing the test script is matched from the test device list based on the association score.
In an example embodiment, the target test device refers to a test device whose matching degree with the test script obtained by screening the test device list through the association score meets the requirement of the test task, for example, the target test device may be a test device whose association score is greater than or equal to a preset threshold, or may be a test device whose association score is the highest in the current test device list, which is not limited in this example embodiment.
In step S240, the test script is distributed to the target test device, so that the target test device executes the test script to complete the test.
In the example embodiment, the test script may be distributed to the target test script through the backend scheduling service, and of course, the test script may also be distributed to the target test script through a wired communication or a wireless communication manner, which is not limited in this example embodiment.
According to the technical scheme of the example embodiment of fig. 2, on one hand, the execution stability of the test script in the test equipment can be improved by calculating the association scores between the test equipment in the test equipment list and the test script and then executing the test through the test equipment with high association score matching and test script matching degrees, and the problem of low test script operation success rate caused by the mismatching of the system version of the test equipment and the test script is avoided; on the other hand, because the test equipment with high matching degree with the test script executes the test according to the associated score matching, the execution stability of the test script can be improved, so that an additional failure retry mechanism is not needed or the test using the failure retry mechanism is reduced, the automatic test period is effectively shortened, and the test efficiency is improved; on the other hand, the target test equipment obtained through the association score matching has high matching degree with the test script due to the equipment parameters and other test parameters corresponding to the target test equipment, so that the problem of low accuracy of the test result caused by the fact that the test equipment does not support the related functions of the test script can be effectively avoided, and the accuracy of the test result is improved.
The following further describes steps S210 to S240 in fig. 2.
In an example embodiment, the calculating of the association score between each test device in the test device list and the test script through the steps in fig. 3 may specifically include, as shown in fig. 3:
step S310, calculating current availability scores corresponding to the test devices in the test device list;
step S320, obtaining historical execution data corresponding to each test device, and calculating a matching degree score between each test device and the test script according to the historical execution data;
step S330, calculating to obtain the association score between the test equipment and the test script based on the current availability score and the matching degree score.
The current availability score may refer to a feasibility degree of the test device that can be used for the test before the automatic test, for example, the current availability score of the test device may be 90 (full score may be set to 100), or may be 90% (full score may be set to 100%), and this is not limited in any way by this example embodiment.
Specifically, the current availability grade may be divided according to the calculated current availability score corresponding to each test device, for example, the current availability score corresponding to each test device may be divided into: gear A: excellent, the current availability score of the test equipment is more than 95 points; b gear: good, the current availability score of the test equipment is between 80 and 95 points; c gear: passing, the current availability score of the test equipment is between 60 and 80 points; d gear: the current availability score of the test device is below 60 points, which is, of course, only illustrative and not limiting. The usability grade division is carried out on the test equipment according to the current usability score, the test equipment set required by the user can be rapidly screened, and the screening efficiency is improved.
Since the test equipment may be aged or failed after each test, the current availability score of the test equipment needs to be calculated before starting the automatic test, and the current availability score is relative to the historical availability score of the test equipment.
The historical execution data refers to relevant data collected by the test device in historical automated testing, for example, the historical execution data may be historical availability scores of the test device, or historical device data (such as hardware parameters and software parameters of the test device) of the test device, and of course, the historical execution data may also be other relevant data collected by the test device in historical automated testing, such as system log data corresponding to each test of the test device, which is not particularly limited in this example.
The matching degree score is a matching degree between a requirement of a test task corresponding to a test script and a test device, for example, among a plurality of test tasks in which historical execution data corresponding to the test device a records historical execution of the test device a, 80% of the test tasks are functional tests of an application program interaction interface, and a test task corresponding to an input test script is a functional test of the application program interaction interface, at this time, it may be considered that the matching degree between the test device a and the input test script is higher, and the calculated matching degree score is also higher.
The association score between the test device and the test script may be obtained by performing weighted calculation on the current availability score and the matching degree score corresponding to the test device through preset weight data, or may be obtained by calculating a variance of the current availability score and the matching degree score corresponding to the test device as the association score between the test device and the test script, or may directly use a combination of the current availability score and the matching degree score as the association score, or of course, may also calculate the association score through other statistical data characteristics corresponding to the current availability score and the matching degree score, which is not particularly limited in this example.
For example, the association score between each test device, such as test device 001, and the input test script may be calculated by the relation (1):
S=A*x+B*y (1)
wherein, S represents the association score corresponding to the test equipment 001, a represents the calculated current availability score of the test equipment 001, x represents the preset weight data corresponding to the current availability score, B represents the calculated matching degree score of the test equipment 001, and y represents the preset weight data corresponding to the matching degree score.
Calculating a correlation score between the test equipment and the test script according to the current availability score and the matching degree score of the test equipment, wherein the current availability score of the test equipment ensures that the target test equipment obtained by screening can successfully run the test script and complete the test, so that the running success rate and the execution stability of the test script are improved, the number of failed retries is avoided or reduced, and the test efficiency is improved; the matching degree grading of the test equipment ensures that the target test equipment is matched with the test script after screening, ensures the stable operation of the test script, improves the accuracy of the test result and improves the test effect.
In an example embodiment, the current availability score corresponding to each test device in the test device list may be calculated according to preset options, where the preset options refer to preset options for evaluating the current availability score corresponding to the test device, and for example, the preset options may include one or more of the following combinations: the availability of the special network corresponding to the application to be tested in the test equipment; testing the performability of a test interface corresponding to the equipment; and matching the device configuration information of the test device with the lowest running environment corresponding to the application to be tested.
The Application to be tested refers to an Application program (APP) that needs to be started when a test task is executed in the test device, and the availability of the private network refers to the availability of the private network connected when the Application to be tested loads the relevant resource, for example, the Application to be tested may be a music playing Application program produced by a certain company, and the private network corresponding to the Application to be tested is a specific network corresponding to a music resource database preset by the company. Private networks are referred to as external networks, i.e. public networks. The network availability can be evaluated through parameters such as the on-off condition of the network, the network connection stability and the like.
The performability of the test interface refers to the performability of an interface for performing an automated test, which is provided in a bottom structure of the test equipment, for example, before a test script is distributed to the test equipment for testing, it is detected that the test interface corresponding to the test equipment is occupied by other executable programs, and at this time, the test interface of the test equipment is considered to have no performability, that is, the test interface cannot run two executable programs at the same time; on the contrary, if the test interface corresponding to the test device is not occupied by other executable programs, the test interface of the test device may be considered to have performability, that is, the test interface may execute the test script.
The device configuration information of the test device may refer to configuration information such as a hardware parameter and a corresponding software parameter corresponding to the test device, and the lowest operating environment corresponding to the application to be tested may refer to device configuration information capable of stably running the application to be tested, for example, the lowest operating environment corresponding to the application to be tested may be a device configuration information in which a frequency of a Central Processing Unit (CPU) corresponding to the test device is at least 1Ghz, and an operating system is at least an android version 6.0.
Further, the availability of the external network corresponding to the test equipment can be detected, and the current availability score corresponding to each test equipment in the test equipment list can be calculated according to the availability of the external network. The external network availability refers to availability corresponding to other networks except a private network corresponding to the application to be tested, for example, the external network may be a public internet, or may also be a local area communication network such as bluetooth and WIFI, which is not particularly limited in this example embodiment.
For example, in an automatic test, if it is detected that the availability of the private network corresponding to the application to be tested in the test equipment 001 is available, the availability score of the private network corresponding to the test equipment 001 is 100 points; when detecting that the executability of the test interface corresponding to the test equipment is executable, the executability of the test interface corresponding to the test equipment 001 is divided into 100 points; when the matching between the device configuration information of the test device and the lowest operation environment corresponding to the application to be tested is detected to be unmatched, the matching between the device configuration information of the test device 001 and the lowest operation environment corresponding to the application to be tested is 0 point; when it is detected that the external network availability corresponding to the testing device 001 is available, the corresponding external network availability score is 100, and the current availability score of the final testing device 001 is "100 × 0.1+100 × 0.3+ 0.4+100 × 0.2+ 60", where 0.1, 0.3, 0.4, and 0.2 respectively represent weight data of stability of a dedicated network corresponding to the application to be tested, executable weight data of a testing interface corresponding to the testing device, matching weight data of device configuration information of the testing device and a lowest operating environment corresponding to the application to be tested, and weight data of external network availability of the testing device, which is only an illustrative example here, the weight data may also be set by self-definition according to an actual testing task requirement, and this exemplary embodiment is not limited thereto.
The current usability score of the testing equipment is comprehensively evaluated through the stability of the special network corresponding to the application to be tested, the performability of the testing interface corresponding to the testing equipment, the matching of the equipment configuration information of the testing equipment and the lowest running environment corresponding to the application to be tested and the usability of the external network of the testing equipment, the running success rate and the execution stability of the testing script can be effectively guaranteed, and the testing efficiency is improved.
In an example embodiment, the historical execution data may include tested application data and historical device data.
The tested application data refers to data corresponding to a test application that the test device has run in a historical automatic test process, for example, the tested application data may be a type corresponding to the historical test application, a lowest running environment corresponding to the historical test application, a version number corresponding to the historical test application, or other application data corresponding to the test application that the test device has run in the historical automatic test process, which is not limited in this example embodiment.
The historical device data may refer to device data corresponding to the historical test script when the historical test script is run in the historical automation test.
Specifically, calculating the matching degree score between each test device and the test script according to the historical execution data may be implemented by the steps in fig. 4, and as shown in fig. 4, the calculating may specifically include:
step S410, obtaining tested application data corresponding to the test equipment from a preset database, wherein the tested application data comprise a unique version identification, and calculating a first matching score between the test equipment and the test script according to the unique version identification;
step S420, obtaining historical device data corresponding to the test device from the database, wherein the historical device data comprises a historical availability score and historical device execution data, and calculating a second matching score between the test device and the test script according to the historical availability score and the historical device execution data;
and step S430, calculating to obtain a matching degree score between the test equipment and the test script according to the first matching score and the second matching score.
The unique version identifier may refer to information uniquely identifying a version number corresponding to the tested application, for example, the unique version identifier may be an MD5 sequence, or may also be a hash value, or of course, may also be information uniquely identifying a version number corresponding to the tested application, which is not particularly limited in this example embodiment. A first matching score between the test equipment and the test script can be calculated according to the unique version identifier, for example, the version number of the test application required to be run by the currently input test script is 2.3, and the unique version identifier in the tested application data corresponding to the test equipment displays that the version number of the test application corresponding to the historical test is 2.3, at this time, it can be considered that the test equipment has run the same test application historically, and further, the first matching score can be calculated according to the test result of this time; if the unique version identifier shows that the version number of the historically tested test application is 2.0, the first matching score may be further calculated by determining the difference between the lowest operating environment required by the test application with the version number of 2.3 and the test application with the version number of 2.0, which is, of course, only illustrated here by way of example, and the exemplary embodiment is not limited thereto.
The historical availability score refers to an availability score corresponding to the test equipment, which is calculated by the test equipment in the historical automatic test, and is relative to the current availability score of the test equipment.
The historical device execution data refers to data obtained after the test script is executed by the test device in a historical manner, for example, the historical device execution data may include a historical execution result, for example, the historical execution result may be a test success or a test failure, and if the test fails, the test script corresponding to the test failure or the code line corresponding to the test failure of the test script is recorded; the historical device execution data may also include historical device attributes (such as an identification information ID corresponding to the test device, a brand model corresponding to the test device, and a system version or a hardware version corresponding to the test device) at each test, and of course, may also be other types of historical device execution data corresponding to the test device, which is not limited in this example embodiment.
Specifically, calculating a second matching score between the test device and the test script according to the historical availability score and the historical device execution data may be implemented by the steps in fig. 5, and as shown in fig. 5, specifically, the calculating may include:
step S510, calculating the relevance score of the test script and the historical equipment attribute;
step S520, calculating a second matching score between the test device and the test script according to the historical execution result, the relevance score and the historical availability score when the test script is executed by the test device.
The relevance score refers to a relevance degree between the test script and the historical device attribute corresponding to the test device, for example, the relevance score may be a score obtained by calculating a relevance between a lowest operating environment corresponding to the application to be tested and associated with the test script and the hardware version or the software version of the historical device attribute, or a score obtained by calculating a relevance between identification information corresponding to the test device that has successfully executed the test script, which is not particularly limited in this exemplary embodiment.
For example, in an automatic test, tested application data corresponding to the test equipment 001 is obtained, and the tested application data including the unique version identifier corresponding to the unique version identifier of the application to be tested in the test task corresponding to the test script is detected, which indicates that the test equipment 001 participates in the test of the application to be tested in the history record, and at this time, the first matching score may be 100; obtaining a historical availability score 60 corresponding to the application to be tested when the testing device 001 tests the application, calculating a relevance score 80 between the testing script and a historical device attribute corresponding to the application to be tested when the testing device 001 tests the application, and calculating a historical execution result score 100 when the historical execution result is successful, wherein a second matching score is 60 x 0.2+80 x 0.3+100 x 0.5-86', wherein 0.2 represents weight data of the historical availability score, 0.3 represents weight data of the testing script and the historical device attribute corresponding to the application to be tested when the testing device 001 tests the application, and 0.5 represents weight data corresponding to the historical execution result. Further, the matching degree between the test script and the history execution data corresponding to the test device 001 is given by "100 × 0.5+86 × 0.5 ═ 93", where the former 0.5 indicates the weight data corresponding to the first matching score, and the latter 0.5 indicates the weight data corresponding to the second matching score. Of course, this is only an exemplary illustration, and this exemplary embodiment is not limited to this specifically.
In an example embodiment, matching a target test device for executing a test script from the test device list based on the association score may be implemented by the steps in fig. 6, and as shown in fig. 6, specifically, the matching may include:
step S610, determining an available test equipment list from the test equipment list according to the current availability score;
and step S620, matching target test equipment for executing the test script from the available test equipment list according to the matching degree score.
The available test equipment list is a list formed by test equipment screened from the test equipment list according to the current availability score, for example, the test equipment in the test equipment list can be divided into a class a, a class B, a class C and a class D according to the current availability score, and the available test equipment list is constructed by the test equipment belonging to the class a, the class B and the class C. Since the current availability of the test device is the lowest criterion for determining whether the test script can be successfully executed in the test device, in the present exemplary embodiment, the test device may be initially screened by the current availability score, and then the target test device that more matches the test script may be screened from the available test device list by the matching degree score.
In an example embodiment, a preset matching degree score threshold may be obtained, and a test device greater than or equal to the matching degree score threshold in the available test device list is matched as a target test device. The matching degree score threshold may be a preset threshold of the testing device for screening the requirement of the matching testing task, for example, the matching degree score threshold may be 95 minutes or 60 minutes, and may be specifically set by self-definition according to the actual requirement of the testing task, which is not limited to this embodiment.
In an example embodiment, matching a target test device for executing a test script from a list of test devices based on an association score may be accomplished by the steps in FIG. 7, including:
step S710, carrying out priority division on the test equipment in the available test equipment list according to the current availability score to obtain available priority;
step S720, carrying out priority division on the test equipment in the available test equipment list according to the matching degree score to obtain matching priority;
step S730, obtaining a preset priority threshold, and matching the available priority in the available test device list and/or the test device whose matching priority is greater than or equal to the priority threshold, as the target test device.
The available priority may be a grouping obtained by dividing the test devices in the available test device list according to the current availability score, for example, the available priority may be divided according to the current availability score corresponding to each test device: gear A: excellent, the current availability score of the test equipment is more than 95 points; b gear: good, the current availability score of the test equipment is between 80 and 95 points; c gear: passing, the current availability score of the test equipment is between 60 and 80 points; d gear: the current availability score of the test device is below 60 points, which is, of course, only illustrative and not limiting.
The matching priority may be a grouping obtained by dividing the test devices in the available test device list according to the matching degree scores, for example, the grouping may be divided according to the matching degree scores corresponding to the test devices: gear A: the quality is excellent, and the matching degree score of the test equipment is more than 95 points; b gear: the matching degree of the test equipment is graded between 80 and 95 points; c gear: passing, wherein the matching degree score of the test equipment is between 60 and 80 points; d gear: the matching degree score of the testing device is below 60 points, which is, of course, only illustrated here schematically, and the present exemplary embodiment is not limited thereto.
The priority threshold may be a threshold set in advance according to the requirement of the test task and used for screening the test device, for example, if a test script corresponding to a certain test task only needs to consider the current availability score of the test device, the priority threshold may be that the available priority is greater than or equal to the B-level; if the test script corresponding to the test task only needs to consider the matching degree score of the test equipment, the priority threshold value at this time can also be that the matching priority is greater than or equal to the B grade; of course, if the test script corresponding to the test task needs to consider not only the matching degree score of the test device but also the current availability score of the test device, the priority threshold may also be that the matching priority is greater than or equal to the B-gear, and the available priority is greater than or equal to the B-gear.
In an example embodiment, after the test is completed, current execution data obtained by the target test device executing the test script may be obtained, and the current execution data may be stored in a preset database, so as to update historical execution data in the database.
After each test, the current execution data is stored and used as subsequent historical execution data, and the database is continuously updated, so that the accuracy of the calculated test script and the correlation score between the test devices can be further ensured, the accuracy of the target test devices obtained by screening can be further ensured, the execution success rate and the operation stability of the test script on the target test devices can be improved, and the accuracy of the test results can be further improved.
In an example embodiment, after the test script is distributed to the screened target test device, the application to be tested running in the target test device may be tested based on the test script, so as to implement a functionality test on the application to be tested.
The functional test refers to that the test script simulates the operation of a user to trigger the test of the corresponding function of the application to be tested by calling a test framework provided in advance in the test equipment, for example, the functional test can be that the test script simulates the interactive operation of the user clicking a control provided on the application to be tested and is used for testing the interactive interface function of the application to be tested; of course, the functional test may also be an interactive operation in which the test script simulates a user to slide a display page provided on the application to be tested, so as to test the rendering rate of the software page of the application to be tested, which is not particularly limited in this example embodiment.
By using historical execution data corresponding to the test equipment, such as tested application data, historical equipment data and the like, as options for evaluating the association score between the test equipment and the test script, the test equipment with high adaptability for executing the test script can be screened and obtained, and the test application capable of running stably in the test equipment can be obtained, so that the embodiment of the example can be used for testing the application scene of the interactive function test of the application to be tested, the target test equipment obtained by screening the association score is used for performing the interactive function test of the application to be tested, the problem that the interactive function test is inaccurate due to interference factors such as the fact that the test equipment hardware or software does not support or the application to be tested cannot run stably and the like can be effectively avoided, and the accuracy of the test result of the interactive function test of the application to be tested is improved.
In an example embodiment, after the test script is distributed to the screened target test device, the target test device and the application to be tested in the target test device may be tested based on the test script, so as to implement a compatibility test on the target test device and the application to be tested.
The compatibility test refers to a test for checking whether interaction and information sharing between software or between software and a device running the software can be performed correctly, for example, the compatibility test may be a software compatibility test or a device compatibility test, which is not limited in this exemplary embodiment.
For example, when performing a software compatibility test, the target test device X of the application a adapted to the software compatibility test task and having an adapted version of 1.0 may be obtained by screening the obtained association score, and the obtained historical availability score and historical execution data corresponding to the test device, and the target test device Y of the application a adapted to the software compatibility test task and having an adapted version of 2.0 may also be obtained by screening the obtained test script adapted to the software compatibility test task and having an adapted version of 2.0. At this time, the test script may be distributed to the target test apparatus X and the target test apparatus Y, so that the test script performs the version compatibility test of the application a on the application a with the version 1.0 and the application a with the version 2.0.
Certainly, the software compatibility test may also be a data sharing function compatibility test between different application programs, and specifically, the target test equipment with higher adaptation degree may be selected for testing according to the correlation score obtained by calculation, the obtained historical availability score and the obtained historical execution data corresponding to the test equipment, so that the test efficiency of the software compatibility test can be effectively improved, and the test effect is ensured.
For example, when performing a device compatibility test, a plurality of test scripts adapted to the test device can be screened and obtained through the correlation score obtained through calculation and the acquired historical availability score and historical execution data corresponding to the test device, and then, according to the to-be-tested application and the test content included in the test task corresponding to each test script and the execution result of the test script in the historical execution data, the compatibility condition of each test device to different to-be-tested applications or different versions of to-be-tested applications is determined. Conversely, the compatibility situation of the application to be tested on different brands and different models of test equipment can also be obtained.
Through the association score between the test script and the test equipment and the historical execution data corresponding to the test equipment, such as the tested application data, the historical equipment data and other data, the test equipment with higher adaptation degree for executing the test script and each test script capable of stably running by each test equipment can be screened, so that the exemplary embodiment can be used for testing the software compatibility condition of application programs of different types or different versions or application scenes for testing the equipment compatibility condition of different test equipment to each application to be tested, the matching between the test equipment and the application to be tested is quickly realized through the association score between the test script and the test equipment and the historical execution data corresponding to the test equipment, and further the software compatibility test is performed on the application to be tested or the equipment compatibility test is performed on the test equipment, the design complexity of the compatibility test is reduced, and the test efficiency of the compatibility test is improved.
In an example embodiment, matching a target test device for executing a test script from the test device list based on the association score may be implemented by the steps in fig. 8, and as shown in fig. 8, specifically, the matching may include:
step S810, determining the matching mapping relation between each test device in the test device list and different test scripts based on the association scores;
and step S820, determining target test equipment corresponding to the test script according to the matching mapping relation.
The matching mapping relation refers to the mapping relation between each test device and different test scripts with the matching relation determined through the association scores.
According to the embodiment of the invention, through the association scores between the test scripts and the test devices, not only can the target test device corresponding to the currently input test script be matched, but also the test scripts corresponding to the test devices can be matched, and the mapping relations are stored as the matching mapping relations.
Fig. 9 schematically illustrates a flow diagram for determining a relevance score according to some embodiments of the present disclosure.
Referring to fig. 9, in step S910, detecting and acquiring the availability of the private network, the performability of the test interface, the device configuration information, and the availability of the external network corresponding to the test device before participating in the automated test, and using these data as the evaluation criteria for calculating the current availability score corresponding to the test device;
step S920, obtaining historical execution data corresponding to the test device, for example, the historical execution data may be tested application information including a unique version identifier, a historical availability score, a historical execution result, and a historical device attribute, and using the historical execution data as a criterion for calculating a matching degree score corresponding to the test device and the input test script;
step S930, sending data serving as evaluation criteria for calculating the current availability score corresponding to the test equipment and historical execution data serving as evaluation criteria for calculating the current availability score corresponding to the test equipment to a calculation thread, so that the calculation thread calculates the current availability score and the matching degree score according to the received data to obtain an association score between the test equipment and the input test script;
in step S940, the calculated association score is stored in a corresponding preset database, for example, the preset database may be a Redis database, which is not limited in this example embodiment.
In this example embodiment, a data model may be generated based on historical execution data, a current availability score, a matching degree score and a classification of the test device may be performed, a test script and the test device may be associated, and a passing rate of the test script on a specific test device, a passing rate in a test device of a specific model, a passing rate in a test device of a specific brand, and an association between a test result and other test device attribute information, such as a resolution, a system version, and the like, may be calculated.
Exemplary devices
Having described the method of the exemplary embodiment of the present disclosure, next, the test apparatus of the exemplary embodiment of the present disclosure is described with reference to fig. 10.
In fig. 10, the test apparatus 1000 may include: the test script obtaining module 1010 is configured to obtain an input test script and a preset test device list; the association score calculation module 1020 is configured to calculate an association score between each test device in the test device list and the test script; the test device matching module 1030 is configured to match a target test device for executing the test script from the test device list based on the association score; the test script execution module 1040 is configured to distribute the test script to the target test device, so that the target test device executes the test script to complete the test.
In some embodiments of the present disclosure, based on the foregoing scheme, the association score calculating module 1020 includes:
the equipment availability score calculating unit is used for calculating the current availability score corresponding to each test equipment in the test equipment list;
the matching degree score calculating unit is used for acquiring historical execution data corresponding to each test device and calculating a matching degree score between each test device and the test script according to the historical execution data;
and the association score calculation unit is used for calculating and obtaining an association score between the test equipment and the test script based on the current availability score and the matching degree score.
In some embodiments of the present disclosure, based on the foregoing, the device availability score calculating unit is further configured to:
calculating the current availability score corresponding to each test device in the test device list according to preset options, wherein the preset options comprise one or more of the following combinations:
the availability of a private network corresponding to an application to be tested in the test equipment;
the performability of a test interface corresponding to the test equipment;
and matching the device configuration information of the test device with the lowest running environment corresponding to the application to be tested.
In some embodiments of the present disclosure, based on the foregoing, the device availability score calculating unit is further configured to:
and testing the external network availability corresponding to the test equipment, and calculating the current availability score corresponding to each test equipment in the test equipment list according to the external network availability.
In some embodiments of the present disclosure, based on the foregoing scheme, the historical execution data includes tested application data and historical device data;
the matching degree score calculating unit further includes:
the first matching score calculating subunit is used for acquiring tested application data corresponding to the test equipment from a preset database, wherein the tested application data comprise a unique version identifier, and calculating a first matching score between the test equipment and the test script according to the unique version identifier;
a second matching score calculating subunit, configured to obtain historical device data corresponding to the test device from the database, where the historical device data includes a historical availability score and historical device execution data, and calculate a second matching score between the test device and the test script according to the historical availability score and the historical device execution data;
and the matching degree score calculating subunit is used for calculating to obtain a matching degree score between the test equipment and the test script according to the first matching score and the second matching score.
In some embodiments of the present disclosure, based on the foregoing scheme, the historical device execution data includes historical execution results and historical device attributes at each test;
the second matching score calculating subunit is further configured to:
calculating a relevance score of the test script and the historical equipment attribute;
and calculating a second matching score between the test equipment and the test script according to the historical execution result, the relevance score and the historical usability score of the test script when the test equipment executes.
In some embodiments of the present disclosure, based on the foregoing solution, the test device matching module 1030 further includes:
the test equipment list determining unit is used for determining an available test equipment list from the test equipment list according to the current availability score;
and the target test equipment matching unit is used for matching target test equipment for executing the test script from the available test equipment list according to the matching degree score.
In some embodiments of the present disclosure, based on the foregoing solution, the target test device matching unit is further configured to:
and acquiring a preset matching degree score threshold, and matching the test equipment which is greater than or equal to the matching degree score threshold in the available test equipment list to serve as the target test equipment.
In some embodiments of the present disclosure, based on the foregoing solution, the test device matching module 1030 is further configured to:
carrying out priority division on the test equipment in the available test equipment list according to the current availability score to obtain available priority;
carrying out priority division on the test equipment in the available test equipment list according to the matching degree score to obtain matching priority;
and acquiring a preset priority threshold, and matching the available priority in the available test equipment list and/or the test equipment with the matching priority greater than or equal to the priority threshold as the target test equipment.
In some embodiments of the present disclosure, based on the foregoing solution, the testing apparatus 1000 further includes:
and the current execution data storage unit is used for acquiring current execution data obtained by the target test equipment executing the test script and storing the current execution data into a preset database so as to update historical execution data in the database.
In some embodiments of the present disclosure, based on the foregoing solution, the test script execution module further includes an interactive function testing unit, and the interactive function testing unit is configured to:
and testing the application to be tested running in the target test equipment based on the test script so as to realize the functionality test of the application to be tested.
In some embodiments of the present disclosure, based on the foregoing solution, the test script execution module 1040 is further configured to:
and testing the target test equipment and the application to be tested in the target test equipment based on the test script so as to realize compatibility test of the target test equipment and the application to be tested, wherein the compatibility test comprises equipment compatibility test and software compatibility test.
In some embodiments of the present disclosure, based on the foregoing solution, the test device matching module 1030 is further configured to:
determining a matching mapping relation between each test device in the test device list and different test scripts based on the association scores;
and determining target test equipment corresponding to the test script according to the matching mapping relation.
In a third aspect of embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when executed by a processor, implements the testing method as described in the first aspect above.
Exemplary Medium
Having described the apparatuses of the exemplary embodiments of the present disclosure, a storage medium of the exemplary embodiments of the present disclosure will be described next.
In some embodiments, aspects of the present disclosure may also be implemented as a medium having stored thereon program code for implementing steps in a test method according to various exemplary embodiments of the present disclosure described in the "exemplary methods" section above of this specification when executed by a processor of a device.
For example, when the processor of the device executes the program code, step S210 shown in fig. 2 may be implemented to obtain an input test script and a preset test device list; step S220, calculating the association score between each test device in the test device list and the test script; step S230, matching target test equipment for executing the test script from the test equipment list based on the association score; step S240, distributing the test script to the target test device, so that the target test device executes the test script to complete the test.
Referring to fig. 11, a program product 1100 for implementing the above-described testing method according to an embodiment of the present disclosure is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. The readable signal medium may also be any readable medium other than a readable storage medium.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN).
Exemplary computing device
Having described the test method, test apparatus, and storage medium of exemplary embodiments of the present disclosure, next, an electronic device according to exemplary embodiments of the present disclosure is described.
As will be appreciated by one skilled in the art, aspects of the present disclosure may be embodied as a system, method or program product. Accordingly, various aspects of the present disclosure may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible embodiments, an electronic device according to the present disclosure may include at least one processing unit, and at least one memory unit. Wherein the storage unit stores program code that, when executed by the processing unit, causes the processing unit to perform the steps in the testing method according to various exemplary embodiments of the present disclosure described in the "exemplary methods" section above in this specification. For example, the processing unit may execute step S210 shown in fig. 2, and obtain an input test script and a preset test device list; step S220, calculating the association score between each test device in the test device list and the test script; step S230, matching target test equipment for executing the test script from the test equipment list based on the association score; step S240, distributing the test script to the target test device, so that the target test device executes the test script to complete the test.
An electronic device 1200 according to an example embodiment of the disclosure is described below with reference to fig. 12. The electronic device 1200 shown in fig. 12 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 12, the electronic device 1200 is embodied in the form of a general purpose computing device. The components of the electronic device 1200 may include, but are not limited to: the at least one processing unit 1201, the at least one storage unit 1202, a bus 1203 connecting different system components (including the storage unit 1202 and the processing unit 1201), and a display unit 1207.
Bus 1203 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.
The memory unit 1202 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)1221 and/or cache memory 1222, and may further include Read Only Memory (ROM) 1223.
Storage unit 1202 may also include a program/utility 1225 having a set (at least one) of program modules 1224, such program modules 1224 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The electronic device 1200 may also communicate with one or more external devices 1204 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 1200, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 1200 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 1205. Also, the electronic device 1200 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) through the network adapter 1206. As shown, the network adapter 1206 communicates with the other modules of the electronic device 1200 over a bus 1203. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 1200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the testing device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module in accordance with embodiments of the present disclosure. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Further, while the operations of the disclosed methods are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
While the spirit and principles of the present disclosure have been described with reference to several particular embodiments, it is to be understood that the present disclosure is not limited to the particular embodiments disclosed, nor is the division of aspects, which is for convenience only as the features in such aspects may not be combined to benefit. The disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

1. A method of testing, comprising:
acquiring an input test script and a preset test equipment list;
calculating the association score between each test device in the test device list and the test script;
matching a target test device for executing the test script from the list of test devices based on the association score;
and distributing the test script to the target test equipment so that the target test equipment executes the test script to complete the test.
2. The method of claim 1, wherein calculating an association score between each test device in the list of test devices and the test script comprises:
calculating the current availability score corresponding to each test device in the test device list;
acquiring historical execution data corresponding to each test device, and calculating a matching degree score between each test device and the test script according to the historical execution data;
and calculating to obtain an association score between the test equipment and the test script based on the current availability score and the matching degree score.
3. The method of claim 2, wherein calculating the current availability score for each test device in the list of test devices comprises:
calculating the current availability score corresponding to each test device in the test device list according to preset options, wherein the preset options comprise one or more of the following combinations:
the availability of a private network corresponding to an application to be tested in the test equipment;
the performability of a test interface corresponding to the test equipment;
and matching the device configuration information of the test device with the lowest running environment corresponding to the application to be tested.
4. The method of claim 3, wherein calculating the current availability score corresponding to each test device in the list of test devices according to a preset option further comprises:
and testing the external network availability corresponding to the test equipment, and calculating the current availability score corresponding to each test equipment in the test equipment list according to the external network availability.
5. The method of claim 2, wherein the historical execution data includes tested application data and historical device data;
the obtaining of the historical execution data corresponding to each test device and the calculating of the matching degree score between each test device and the test script according to the historical execution data includes:
acquiring tested application data corresponding to the test equipment from a preset database, wherein the tested application data comprise a unique version identifier, and calculating a first matching score between the test equipment and the test script according to the unique version identifier;
obtaining historical device data corresponding to the test device from the database, wherein the historical device data comprises a historical availability score and historical device execution data, and calculating a second matching score between the test device and the test script according to the historical availability score and the historical device execution data;
and calculating to obtain a matching degree score between the test equipment and the test script according to the first matching score and the second matching score.
6. The method of claim 5, wherein the historical device execution data comprises historical execution results and historical device attributes at each test;
the calculating a second match score between the test device and the test script according to the historical availability score and the historical device execution data includes:
calculating a relevance score of the test script and the historical equipment attribute;
and calculating a second matching score between the test equipment and the test script according to the historical execution result, the relevance score and the historical usability score of the test script when the test equipment executes.
7. The method of claim 2, wherein matching a target test device for executing the test script from the list of test devices based on the association score comprises:
determining a list of available test devices from the list of test devices according to the current availability score;
and matching target test equipment for executing the test script from the available test equipment list according to the matching degree score.
8. A test apparatus, comprising:
the test script acquisition module is used for acquiring an input test script and a preset test equipment list;
the association score calculation module is used for calculating the association score between each test device in the test device list and the test script;
a test device matching module for matching a target test device for executing the test script from the test device list based on the association score;
and the test script execution module is used for distributing the test script to the target test equipment so as to enable the target test equipment to execute the test script to complete the test.
9. An electronic device, comprising:
a processor; and
a memory having stored thereon computer readable instructions which, when executed by the processor, implement a testing method according to any one of claims 1 to 7.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the testing method according to any one of claims 1 to 7.
CN202110214920.3A 2021-02-25 2021-02-25 Test method, test device, test medium, and electronic apparatus Pending CN112817869A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110214920.3A CN112817869A (en) 2021-02-25 2021-02-25 Test method, test device, test medium, and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110214920.3A CN112817869A (en) 2021-02-25 2021-02-25 Test method, test device, test medium, and electronic apparatus

Publications (1)

Publication Number Publication Date
CN112817869A true CN112817869A (en) 2021-05-18

Family

ID=75863936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110214920.3A Pending CN112817869A (en) 2021-02-25 2021-02-25 Test method, test device, test medium, and electronic apparatus

Country Status (1)

Country Link
CN (1) CN112817869A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238765A (en) * 2021-05-20 2021-08-10 北京百度网讯科技有限公司 Method, device and equipment for distributing small programs and storage medium
CN115658550A (en) * 2022-12-09 2023-01-31 合肥高维数据技术有限公司 Automatic testing method and system for improving large-scale sample testing efficiency

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9684579B1 (en) * 2014-12-05 2017-06-20 Amazon Technologies, Inc. Test device selection using multi-pass scoring
CN107766194A (en) * 2017-11-17 2018-03-06 深圳市泉眼网络科技有限公司 Method of testing, device, system, terminal device and computer-readable recording medium
CN110046081A (en) * 2019-03-18 2019-07-23 平安普惠企业管理有限公司 Performance test methods, performance testing device, electronic equipment and storage medium
CN112286808A (en) * 2020-10-29 2021-01-29 北京字节跳动网络技术有限公司 Application program testing method and device, electronic equipment and medium
CN112346965A (en) * 2020-10-12 2021-02-09 天津五八到家货运服务有限公司 Test case distribution method, device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9684579B1 (en) * 2014-12-05 2017-06-20 Amazon Technologies, Inc. Test device selection using multi-pass scoring
CN107766194A (en) * 2017-11-17 2018-03-06 深圳市泉眼网络科技有限公司 Method of testing, device, system, terminal device and computer-readable recording medium
CN110046081A (en) * 2019-03-18 2019-07-23 平安普惠企业管理有限公司 Performance test methods, performance testing device, electronic equipment and storage medium
CN112346965A (en) * 2020-10-12 2021-02-09 天津五八到家货运服务有限公司 Test case distribution method, device and storage medium
CN112286808A (en) * 2020-10-29 2021-01-29 北京字节跳动网络技术有限公司 Application program testing method and device, electronic equipment and medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238765A (en) * 2021-05-20 2021-08-10 北京百度网讯科技有限公司 Method, device and equipment for distributing small programs and storage medium
CN113238765B (en) * 2021-05-20 2024-04-02 北京百度网讯科技有限公司 Method, device, equipment and storage medium for distributing small program
CN115658550A (en) * 2022-12-09 2023-01-31 合肥高维数据技术有限公司 Automatic testing method and system for improving large-scale sample testing efficiency

Similar Documents

Publication Publication Date Title
CN108073519B (en) Test case generation method and device
US8381184B2 (en) Dynamic test coverage
CN108959059B (en) Test method and test platform
US9442832B2 (en) User workflow replication for execution error analysis
US8745590B2 (en) Testing an application
RU2767143C2 (en) Decision-making control using machine learning in case of alerts coming from current control systems
US11327742B2 (en) Affinity recommendation in software lifecycle management
US9292423B1 (en) Monitoring applications for compatibility issues
CN109633351B (en) Intelligent IT operation and maintenance fault positioning method, device, equipment and readable storage medium
US20210342146A1 (en) Software defect prediction model
CN112817869A (en) Test method, test device, test medium, and electronic apparatus
JP2017532660A (en) Automatic tenant upgrade for multi-tenant services
CN111241111B (en) Data query method and device, data comparison method and device, medium and equipment
CN110674047A (en) Software testing method and device and electronic equipment
CN111654495B (en) Method, apparatus, device and storage medium for determining traffic generation source
US11169910B2 (en) Probabilistic software testing via dynamic graphs
CN109408361A (en) Monkey tests restored method, device, electronic equipment and computer readable storage medium
CN111309570A (en) Pressure testing method, medium, device and computing equipment
CN113495843A (en) Method and device for testing play-starting performance of video player
CN109240928A (en) A kind of test method, device, equipment and storage medium
CN113138934A (en) Automatic test method, medium, device and computing equipment
CN111190791A (en) Application exception reporting method and device and electronic equipment
JP2009277110A (en) Software test/development support device, and program for device
CN115712571A (en) Interactive service test device, interactive service test device, computer equipment and storage medium
CN114911706A (en) Use case recommendation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20211014

Address after: 310052 Room 301, Building No. 599, Changhe Street Network Business Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: HANGZHOU LANGHE TECHNOLOGY Ltd.

Applicant after: NETEASE (HANGZHOU) NETWORK Co.,Ltd.

Address before: 310052 Building No. 599, Changhe Street Network Business Road, Binjiang District, Hangzhou City, Zhejiang Province, 4, 7 stories

Applicant before: NETEASE (HANGZHOU) NETWORK Co.,Ltd.

TA01 Transfer of patent application right
CB02 Change of applicant information

Address after: 310052 Room 301, Building No. 599, Changhe Street Network Business Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Hangzhou NetEase Shuzhifan Technology Co.,Ltd.

Applicant after: NETEASE (HANGZHOU) NETWORK Co.,Ltd.

Address before: 310052 Room 301, Building No. 599, Changhe Street Network Business Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant before: HANGZHOU LANGHE TECHNOLOGY Ltd.

Applicant before: NETEASE (HANGZHOU) NETWORK Co.,Ltd.

CB02 Change of applicant information
TA01 Transfer of patent application right

Effective date of registration: 20231113

Address after: 310052 Room 301, Building No. 599, Changhe Street Network Business Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Hangzhou NetEase Shuzhifan Technology Co.,Ltd.

Address before: 310052 Room 301, Building No. 599, Changhe Street Network Business Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant before: Hangzhou NetEase Shuzhifan Technology Co.,Ltd.

Applicant before: NETEASE (HANGZHOU) NETWORK Co.,Ltd.

TA01 Transfer of patent application right