Test method, device, electronic equipment and storage medium of software
By automatically assigning test input information using software identifiers, the problems of high manual costs and low representativeness of test results in iterative testing of the same software version and initial testing of different software are solved, thereby improving testing efficiency and enhancing the representativeness of results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHIPONE TECHNOLOGY (BEIJING) CO LTD
- Filing Date
- 2022-07-20
- Publication Date
- 2026-07-21
Smart Images

Figure CN115269397B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of information processing, and more particularly to a method, apparatus, electronic device, and storage medium for testing software. Background Technology
[0002] With the development of electronic devices, these devices are compatible with an increasing number of applications, and developers also update these applications to improve their functionality. In practical applications, developers typically need to test new versions of their applications before deploying them to user-side electronic devices. Therefore, how to better test software is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0003] In view of this, this disclosure proposes a technical solution for software testing.
[0004] According to one aspect of this disclosure, a software testing method is provided, the testing method comprising: obtaining a software identifier corresponding to a software to be tested; wherein the software identifier is used to distinguish different software to be tested; determining test input information corresponding to the software to be tested based on the software identifier; and testing the software to be tested based on the test input information to obtain a current test result corresponding to the software to be tested.
[0005] In one possible implementation, determining the test input information corresponding to the software under test based on the software identifier includes: determining first test input information corresponding to the software under test based on the software identifier; determining version information corresponding to the first test input information; wherein the version information is used to represent the version of the software under test last tested by the first test input information; filtering the first test input information whose version information is within a preset version range; determining the test input information corresponding to the software under test based on the filtered first test input information; the testing method further includes: after obtaining the current test result corresponding to the software under test, updating the version information corresponding to the filtered first test input information based on the current version information corresponding to the software under test.
[0006] In one possible implementation, determining the test input information corresponding to the software under test based on the filtered first test input information includes: determining a first total number of the filtered first test input information; determining a second total number corresponding to the first total number based on the first total number and a preset ratio; obtaining a category label corresponding to the software under test; obtaining second test input information corresponding to the category label with a total number equal to the second total number; wherein the second test input information does not overlap with the first test input information; and using the filtered first test input information and the second test input information as the test input information corresponding to the software under test.
[0007] In one possible implementation, determining the test input information corresponding to the software under test based on the software identifier includes: when the total number of test input information corresponding to the software under test is less than a preset threshold, obtaining the category label corresponding to the software under test; determining new test input information corresponding to the software under test based on the third test input information corresponding to the category label; and testing the software under test based on the test input information to obtain the current test result corresponding to the software under test includes: testing the software under test based on the new test input information to obtain the current test result corresponding to the software under test.
[0008] In one possible implementation, determining the new test input information corresponding to the software under test based on the third test input information corresponding to the category label includes: determining the version information and / or the number of corresponding software identifiers corresponding to the third test input information; filtering the third test input information based on the version information and / or the number of corresponding software identifiers; and using the filtered third test input information and / or the test input information corresponding to the software under test as the new test input information corresponding to the software under test.
[0009] In one possible implementation, the testing method further includes: obtaining historical test results corresponding to the software under test; wherein the historical test results are used to represent the test results of the software under test in at least one historical version; generating version iteration results corresponding to the software under test based on the historical test results and the current test results of the software under test; wherein the version iteration results are used to represent the test results of the software under test in different versions.
[0010] In one possible implementation, the testing method includes: acquiring data to be imported into the database; filtering the data to be imported into the database based on its clarity; and using the filtered data to be imported into the database as the test input information.
[0011] According to another aspect of this disclosure, a software testing apparatus is provided, the testing apparatus comprising: a software identifier acquisition module for acquiring a software identifier corresponding to a software under test; wherein the software identifier is used to distinguish different software under test; a test input information determination module for determining test input information corresponding to the software under test based on the software identifier; and a test result generation module for testing the software under test based on the test input information to obtain a current test result corresponding to the software under test.
[0012] According to another aspect of this disclosure, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement any of the above-described test methods when executing instructions stored in the memory.
[0013] According to another aspect of this disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions, when executed by a processor, implement any of the above-described test methods.
[0014] According to another aspect of this disclosure, a computer program product is provided, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs any of the above-described test methods.
[0015] This disclosure provides a software testing method that obtains a software identifier corresponding to the software under test, then determines the test input information corresponding to the software under test based on the software identifier, and finally tests the software under test based on the test input information to obtain the current test result. The testing method provided by this disclosure can distinguish different software under test through software identifiers, and can automatically allocate test input information to the software under test based on the software identifiers. This allows different versions of the same software to reuse test input information, which helps reduce the cost of manually collecting test input information. Furthermore, reusing test input information across different versions of the same software can increase the representativeness of the test results, facilitating timely adjustments to the software by developers. Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0016] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this disclosure together with the specification and serve to explain the principles of this disclosure.
[0017] Figure 1 A schematic diagram of a software testing method according to an embodiment of the present disclosure is shown.
[0018] Figure 2 A flowchart of a software testing method according to an embodiment of the present disclosure is shown.
[0019] Figure 3 A flowchart of a software testing method according to an embodiment of the present disclosure is shown.
[0020] Figure 4 A schematic diagram of a software testing method according to an embodiment of the present disclosure is shown.
[0021] Figure 5 A schematic diagram of a software testing method according to an embodiment of the present disclosure is shown.
[0022] Figure 6 A block diagram of a software testing apparatus according to an embodiment of the present disclosure is shown.
[0023] Figure 7 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0024] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0025] In the description of this disclosure, it should be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this disclosure and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure.
[0026] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise expressly specified.
[0027] In this disclosure, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this disclosure according to the specific circumstances.
[0028] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0029] See Figure 1 As shown, Figure 1 A schematic diagram of a software testing method according to an embodiment of the present disclosure is shown. (In conjunction with...) Figure 1 As shown, in related technologies, version iteration testing of the same software and initial testing of different software typically require manual input of test input information. Electronic devices then acquire this input information, process it (e.g., call the software under test for processing), and finally generate output results. This approach easily leads to the following problems: 1. For version iteration testing of the same software, developers need to re-collect test input information for different versions, increasing labor costs and testing time. Furthermore, because different versions of software use different test input information, the final test results have low representativeness. 2. For initial testing of different software, considering the actual scenario, the development completion time of different software is usually different, meaning the testing time for different software is usually different. This results in different software not being able to reuse test input information, which is not conducive to reducing labor costs and testing time.
[0030] In view of this, embodiments of this disclosure provide a software testing method. This method obtains a software identifier corresponding to the software under test, then determines the test input information corresponding to the software under test based on the software identifier, and finally tests the software under test based on the test input information to obtain the current test result. The testing method provided by embodiments of this disclosure can distinguish different software under test through software identifiers, and can automatically allocate test input information to the software under test based on the software identifiers. This allows different versions of the same software to reuse test input information, which helps reduce the cost of manually collecting test input information. Furthermore, reusing test input information across different versions of the same software can increase the representativeness of the test results, facilitating timely adjustments to the software by developers.
[0031] See Figure 2 , Figure 2 A flowchart illustrating a software testing method according to an embodiment of this disclosure is shown. Figure 2 As shown, the test method includes:
[0032] Step S100: Obtain the software identifier corresponding to the software to be tested. The software identifier is used to distinguish different software to be tested. For example, the software to be tested can be any application that can be deployed on a terminal device or server. For instance, the software to be tested can be any software that needs to be tested, such as trading software, chat software, or game software. The software identifier can be a unique identifier, meaning that different software to be tested have different software identifiers, while the unique identifier can be the same for different versions of the same software to be tested. This embodiment of the disclosure does not limit the specific form of the software identifier; it only needs to be able to distinguish different software to be tested. For example, the software identifier can be a combination of numbers, a combination of letters, or a combination of numbers and letters.
[0033] Step S200: Determine the test input information corresponding to the software under test based on the software identifier. Exemplarily, the test input information can be stored in a local or online database, and developers can set a software identifier for each piece of test input information in the database. In one example, the software identifier of the software under test and the software identifier of its corresponding test input information can be set to be the same, allowing direct querying of the database using the software identifier of the software under test as a search field. In another example, for information security reasons, developers can also set a conversion rule between the software identifier of the software under test and the software identifier of the test input information. That is, the electronic device can convert the software identifier of the software under test into the software identifier of the test input information using the conversion rule before searching the database. This embodiment of the present disclosure does not impose any limitations.
[0034] In one possible implementation, the test input information can be filtered before saving it. In this case, the testing method may include: acquiring data to be added to the database, and then filtering the data based on its clarity. For example, a clarity score can be set, which may be proportional to the clarity of the data to be added. For instance, when the test input information is an image, the image clarity of each test input can be determined manually or through an image clarity detection algorithm in related technologies. Similarly, when the test input information is sound, the sound clarity of each test input can be determined manually or through a sound clarity algorithm in related technologies. This disclosure does not impose limitations on this. Then, data with a clarity score higher than a clarity threshold can be used as the filtered data to be added to the database. This disclosure does not limit the specific value of the clarity threshold; developers can flexibly set it according to actual conditions. Finally, the filtered data to be added to the database is used as the test input information.
[0035] See Figure 3 As shown, Figure 3 A flowchart illustrating a software testing method according to an embodiment of the present disclosure is shown, such as... Figure 3 As shown, in one possible implementation, step S200 may include:
[0036] Step S210: Determine the first test input information corresponding to the software under test based on the software identifier. For example, the first test input information can represent all test input information in the database corresponding to the software identifier. The process of determining the first test input information can refer to the process of determining the test input information corresponding to the software under test described above, and will not be repeated here.
[0037] Step S220: Determine the version information corresponding to the first test input information. The version information indicates the version of the software under test that was last tested with the first test input information. For example, developers can set a field for version information corresponding to each test input information during database maintenance, so that electronic devices can query the version information corresponding to the first test input information.
[0038] This disclosure provides a method for updating version information for reference: After obtaining the current test result corresponding to the software under test, the version information corresponding to the filtered first test input information can be updated according to the current version information corresponding to the software under test. For example, the database can directly use the current version information as the version information corresponding to the filtered first test input information. Developers can also, for data stability considerations (e.g., in scenarios where software performs version rollback), use the major version information corresponding to the current version information, or the most recent minor version information before the current version information, as the version information corresponding to the filtered first test input information. For example, the major version information can be a major version update of the software (e.g., providing new features or adopting a different software architecture), and the minor version information can be a minor version update of the software (e.g., fixing vulnerabilities). For example, version 6.4 of the software compared to version 6.1 can be considered a minor version update. As another example, version 7.1 of the software compared to version 6.2 can be considered a major version update. The embodiments disclosed herein are merely illustrative. Developers may set update conditions for version information corresponding to test input information in the database according to actual circumstances. The embodiments disclosed herein are not limited thereto.
[0039] Continue reading Figure 3 Step S230 involves filtering the first test input information whose version information falls within a preset version range. Exemplarily, the preset version range can be manually entered by the user in each test process, or it can be saved in an electronic device so that the preset version range can be automatically retrieved in each test process. The user can also modify the preset version range saved in the electronic device at any time; this embodiment of the present disclosure does not impose any limitations on this. The preset version range is used to filter test input information with outdated version information. For example, as the software version iterates, in the database, there may be some data with low test value (or insufficient representativeness of the test input information) in the test input information corresponding to the software under test. Developers can adjust the corresponding version information, such as setting it to 0. The preset version range can be set to a range greater than 0 and less than 10 to filter out data with low test value. In practical application scenarios, for example, in face detection software mainly used in nighttime scenarios, if the corresponding test input information contains face images taken in high-brightness environments, it can be determined that the test input information is inconsistent with the application environment of the software under test, and such face images have low test value for the face detection software.
[0040] Step S240: Determine the test input information corresponding to the software under test based on the filtered first test input information. For example, the filtered first test input information can be directly used as the test input information corresponding to the software under test, or the filtered first test input information can be filtered again, and then the re-filtered first test input information can be used as the test input information corresponding to the software under test. In one example, the first test input information can be filtered again based on other fields in the database, such as: the acquisition device parameters corresponding to the test input information (the closer the acquisition device parameters used in the testing phase are to the acquisition device parameters actually used by the user, the more representative the test input information), the number of software identifiers corresponding to the test input information (the more software identifiers corresponding to the test input information, the more representative the test input information), etc. This embodiment of the present disclosure does not impose limitations here.
[0041] In one possible implementation, step S240 may include: determining a first total number of the filtered first test input information, and then determining a second total number corresponding to the first total number based on the first total number and a preset ratio. For example, the value of the second total number may be equal to the first total number multiplied by the preset ratio. This embodiment does not limit the size of the preset ratio; developers can flexibly set it according to the situation. Next, the category label corresponding to the software under test is obtained. The category label is used to indicate the data category of the test input information to be used by the software under test. For example, the software under test may be related to biometric recognition such as fingerprint detection, palm print detection, face detection, pupil detection, and voice detection. The category labels of the corresponding test input information are, in order, fingerprint, palm print, face, pupil, and voice. Then, the second test input information corresponding to the category label, with a total number equal to the second total number, is obtained; wherein the second test input information does not overlap with the first test input information. For example, a category field corresponding to the test input information may be set in the database to record the category label corresponding to the test input information. The category labels of the aforementioned second test input information can be the same as those of the first test input information, but with different data content. This reduces the impact of the filtered first test input information on the current test result, thus improving the representativeness of the current test result. Finally, the filtered first and second test input information are used as the test input information corresponding to the software under test. This embodiment of the disclosure can determine a second total number of second test input information based on the category labels corresponding to the filtered first test input information, thereby achieving data augmentation of the test input information corresponding to the software under test, and thus improving the universality of the current test result corresponding to the software under test, which is beneficial to improving the representativeness of the current test result.
[0042] Continue to refer to Figure 2In one possible implementation, step S200 may include: if the total number of test inputs corresponding to the software under test is less than a preset threshold, obtaining the category label corresponding to the software under test. This embodiment does not limit the size of the preset threshold; developers can determine it according to actual circumstances. Then, based on the third test inputs corresponding to the category label, new test inputs corresponding to the software under test are determined. For example, the third test inputs corresponding to the category label can be directly used as part of the new test inputs; that is, the new test inputs may include the third test inputs and the test inputs corresponding to the software under test. In one example, the third test inputs may not overlap with the test inputs corresponding to the software under test to reduce the impact of filtered test inputs on the current test results, thereby improving the representativeness of the current test results. In practical application scenarios, when the total number of test input information corresponding to the software under test is zero (e.g., the software under test is being tested for the first time) or too small (e.g., the preset version range is too small or there are too many other filtering conditions), this embodiment of the disclosure can broaden the test input information by using category tags corresponding to the software under test. This improves the universality of the current test results corresponding to the software under test, that is, it helps to improve the representativeness of the current test results. In this case, the step of testing the software under test according to the test input information to obtain the current test results corresponding to the software under test may include: testing the software under test according to the new test input information to obtain the current test results corresponding to the software under test.
[0043] In one possible implementation, determining the new test input information corresponding to the software under test based on the third test input information corresponding to the category label may include: determining the version information and / or the number of corresponding software identifiers corresponding to the third test input information. Then, the third test input information is filtered based on the version information and / or the number of corresponding software identifiers. For example, all or part of the third test input information with version information exceeding a version threshold may be used as the filtered third test input information; similarly, all or part of the third test input information with a number of software identifiers exceeding a quantity threshold may be used as the filtered third test input information. This disclosure does not limit the specific values of the version and quantity thresholds; developers can flexibly set them according to actual needs. Finally, the filtered third test input information and / or the test input information corresponding to the software under test are used as the new test input information corresponding to the software under test. This disclosure sets filtering conditions for the third test input information, thereby improving the representativeness of the current test results obtained based on the new test input information.
[0044] In one possible implementation, the above testing method may further include: acquiring historical test results corresponding to the software under test. The historical test results represent the test results of the software under test in at least one historical version. Then, based on the historical test results and the current test results of the software under test, a version iteration result corresponding to the software under test is generated. The version iteration result represents the test results of the software under test in different versions. In practical application scenarios, for version iteration testing of software, the electronic device provided in this disclosure embodiment can automatically record all or part of the historical test results of the software. For example, it can record only the test results of each of the aforementioned major versions, or it can record the test results of each of the aforementioned major and minor versions; this disclosure embodiment does not impose any limitations here. For example, if the aforementioned current test results and historical test results represent recognition accuracy, then the aforementioned version iteration result can be a broken line or curve in a coordinate system established with version information on the horizontal axis and recognition accuracy (i.e., the test results corresponding to each version) on the vertical axis, to intuitively display the test results of the software under test in different versions, which is beneficial for developers to understand the overall performance of the software under test architecture.
[0045] Continue reading Figure 2As shown, in step S300, the software to be tested is tested according to the test input information to obtain the current test result corresponding to the software to be tested. For example, the above-mentioned testing of the software to be tested can be manifested as using the test input information as input data for the software to be tested, processing the input test input information through a partial or complete business process, and then outputting the current test result. In practical application scenarios, if the complete business process of the software to be tested is online banking, the user's face can be detected first. After successful face recognition, the user's pupils can be detected. After successful pupil recognition, the user can be allowed to perform operations such as transfers and withdrawals. In the above example, the partial business process includes face detection and pupil detection, and the current test result can be represented as the confidence score output by any corresponding detection model. In other words, this embodiment of the disclosure allows testing of any one or more of the above detection stages.
[0046] Based on practical application scenarios, refer to Figure 4 , Figure 5 As shown, Figure 4 , Figure 5 A schematic diagram of a software testing method according to an embodiment of the present disclosure is shown, such as... Figure 4 As shown, the electronic device can obtain input information from the developer (i.e., the test input information mentioned above), and then store the input information locally, for example, in the electronic device's local database. Figure 5 As shown, during the software testing phase, local information (i.e., the test input information mentioned above) can be sent to a testing tool, which automatically inputs it into the software under test for processing, ultimately obtaining the output result (i.e., the current test result mentioned above). This embodiment of the disclosure, by storing the test input information, allows it to be used multiple times. For the software under test, the input source is more stable, meaning the test results are more representative. For developers, this embodiment allows them to avoid reselecting test input information for different versions of the software under test each time, improving testing efficiency and reducing labor costs.
[0047] Table 1. Examples of Time Comparison between This Application and Prior Art
[0048]
[0049] Referring to Table 1, which shows an example comparing the time consumption of this application with that of the prior art, as shown in Table 1, taking 10 developers as an example to input test information, if the time consumption for data acquisition and data input in the prior art is 4 hours, then the software testing method provided by this disclosure only requires 30 minutes of information acquisition plus 5 minutes of software testing, which greatly reduces the software testing time. Moreover, only one developer needs to call the above method, which greatly reduces labor costs.
[0050] See Figure 6 As shown, Figure 6 A block diagram of a software testing apparatus according to an embodiment of the present disclosure is shown, such as Figure 6 As shown, the testing device 100 includes: a software identifier acquisition module 110, used to acquire the software identifier corresponding to the software under test; wherein the software identifier is used to distinguish different software under test; a test input information determination module 120, used to determine the test input information corresponding to the software under test according to the software identifier; and a test result generation module 130, used to test the software under test according to the test input information to obtain the current test result corresponding to the software under test.
[0051] In one possible implementation, determining the test input information corresponding to the software under test based on the software identifier includes: determining first test input information corresponding to the software under test based on the software identifier; determining version information corresponding to the first test input information; wherein the version information is used to represent the version of the software under test last tested by the first test input information; filtering the first test input information whose version information is within a preset version range; determining the test input information corresponding to the software under test based on the filtered first test input information; the testing method further includes: after obtaining the current test result corresponding to the software under test, updating the version information corresponding to the filtered first test input information based on the current version information corresponding to the software under test.
[0052] In one possible implementation, determining the test input information corresponding to the software under test based on the filtered first test input information includes: determining a first total number of the filtered first test input information; determining a second total number corresponding to the first total number based on the first total number and a preset ratio; obtaining a category label corresponding to the software under test; obtaining second test input information corresponding to the category label with a total number equal to the second total number; wherein the second test input information does not overlap with the first test input information; and using the filtered first test input information and the second test input information as the test input information corresponding to the software under test.
[0053] In one possible implementation, determining the test input information corresponding to the software under test based on the software identifier includes: when the total number of test input information corresponding to the software under test is less than a preset threshold, obtaining the category label corresponding to the software under test; determining new test input information corresponding to the software under test based on the third test input information corresponding to the category label; and testing the software under test based on the test input information to obtain the current test result corresponding to the software under test includes: testing the software under test based on the new test input information to obtain the current test result corresponding to the software under test.
[0054] In one possible implementation, determining the new test input information corresponding to the software under test based on the third test input information corresponding to the category label includes: determining the version information and / or the number of corresponding software identifiers corresponding to the third test input information; filtering the third test input information based on the version information and / or the number of corresponding software identifiers; and using the filtered third test input information and / or the test input information corresponding to the software under test as the new test input information corresponding to the software under test.
[0055] In one possible implementation, the testing apparatus further includes: a version iteration result generation module, configured to perform any of the following: obtaining historical test results corresponding to the software under test; wherein the historical test results represent the test results of the software under test in at least one historical version; generating version iteration results corresponding to the software under test based on the historical test results and the current test results of the software under test; wherein the version iteration results represent the test results of the software under test in different versions.
[0056] In one possible implementation, the testing device further includes a data filtering module for performing any of the following: acquiring data to be imported; filtering the data to be imported based on the clarity of the data; and using the filtered data to be imported as the test input information.
[0057] For example, the electronic devices in this embodiment include, but are not limited to, desktop computers, televisions, mobile devices with large screens such as mobile phones and tablets, and other common electronic devices that require multiple chips to be cascaded together to achieve driving.
[0058] For example, electronic devices can also be user equipment (UE), mobile devices, user terminals, terminals, handheld devices, computing devices, or in-vehicle devices, etc. Examples of terminals include: displays, smartphones or portable devices, mobile phones, tablets, laptops, PDAs, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, and wireless terminals in vehicle-to-everything (V2X) networks, etc. For example, a server can be a local server or a cloud server.
[0059] Figure 7 A block diagram of an electronic device 1900 according to an embodiment of the present disclosure is shown. For example, the electronic device 1900 may be provided as a server or a terminal device. (Refer to...) Figure 7 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.
[0060] Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input / output (I / O) interface 1958. Electronic device 1900 can operate on an operating system stored in memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.
[0061] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by a processing component 1922 of an electronic device 1900 to perform the above-described method.
[0062] The above description is merely an exemplary embodiment of the present invention and is not intended to limit the scope of protection of the present invention, which is determined by the appended claims.
[0063] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0064] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0065] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0066] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A software testing method, characterized in that, The testing method includes: Obtain the software identifier corresponding to the software to be tested; wherein, the software identifier is used to distinguish different software to be tested; Based on the software identifier, determine the test input information corresponding to the software to be tested; Based on the test input information, the software under test is tested to obtain the current test result corresponding to the software under test; The step of determining the test input information corresponding to the software under test based on the software identifier includes: Based on the software identifier, determine the first test input information corresponding to the software to be tested; Determine the version information corresponding to the first test input information; wherein, the version information is used to indicate the version of the software under test that was last tested by the first test input information; The first test input information whose version information falls within a preset version range is filtered; Based on the filtered first test input information, determine the test input information corresponding to the software to be tested; The testing method further includes: after obtaining the current test result corresponding to the software under test, updating the version information corresponding to the filtered first test input information according to the current version information corresponding to the software under test.
2. The test method as described in claim 1, characterized in that, The step of determining the test input information corresponding to the software to be tested based on the filtered first test input information includes: Determine the first total number of the filtered first test input information; Based on the first total number and the preset ratio, determine the second total number corresponding to the first total number; Obtain the category label corresponding to the software to be tested; Obtain second test input information corresponding to the category label, where the total number is the second total number; wherein the second test input information does not overlap with the first test input information; The filtered first test input information and the second test input information are used as the test input information corresponding to the software to be tested.
3. The test method as described in claim 1 or 2, characterized in that, The step of determining the test input information corresponding to the software under test based on the software identifier includes: If the total number of test input information corresponding to the software under test is less than a preset threshold, the category label corresponding to the software under test is obtained. Based on the third test input information corresponding to the category label, determine the new test input information corresponding to the software to be tested; The step of testing the software under test according to the test input information to obtain the current test result corresponding to the software under test includes: testing the software under test according to the new test input information to obtain the current test result corresponding to the software under test.
4. The test method as described in claim 3, characterized in that, The step of determining the new test input information corresponding to the software under test based on the third test input information corresponding to the category label includes: Determine the number of version information and / or corresponding software identifiers corresponding to the third test input information; The third test input information is filtered based on the version information and / or the number of corresponding software identifiers. The filtered third test input information and / or the test input information corresponding to the software under test are used as the new test input information corresponding to the software under test.
5. The test method as described in claim 1 or 2, characterized in that, The testing method also includes: Obtain the historical test results corresponding to the software under test; wherein, the historical test results are used to represent the test results of the software under test in at least one historical version; Based on the historical test results and the current test results of the software under test, version iteration results are generated for the software under test; wherein, the version iteration results are used to represent the test results of the software under test under different versions.
6. The test method as described in claim 1 or 2, characterized in that, The testing method includes: Retrieve data to be imported into the database; The data to be imported is filtered based on its clarity. The filtered data to be added to the database is used as the test input information.
7. A software testing apparatus, characterized in that, The testing apparatus includes: The software identifier acquisition module is used to acquire the software identifier corresponding to the software under test; wherein, the software identifier is used to distinguish different software under test; The test input information determination module is used to determine the test input information corresponding to the software under test based on the software identifier; The test result generation module is used to test the software under test based on the test input information and obtain the current test result corresponding to the software under test; The test input information determination module is specifically used for: Based on the software identifier, determine the first test input information corresponding to the software to be tested; Determine the version information corresponding to the first test input information; wherein, the version information is used to indicate the version of the software under test that was last tested by the first test input information; The first test input information whose version information falls within a preset version range is filtered; Based on the filtered first test input information, determine the test input information corresponding to the software to be tested; After obtaining the current test result corresponding to the software under test, the version information corresponding to the first test input information after filtering is updated according to the current version information of the software under test.
8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to implement the test method according to any one of claims 1 to 6 when executing instructions stored in the memory.
9. A non-volatile computer-readable storage medium storing computer program instructions thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the test method according to any one of claims 1 to 6.