Electronic equipment integrated testing system and method
By obtaining and building the source code and test description files of electronic devices, the test process is automated and the problem of understanding differences between electronic device firmware and test software teams is solved, enabling accurate testing and reducing test complexity.
Patent Information
- Application Number
- CN201810709690.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-07-02
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2038-07-02
AI Technical Summary
Since electronic device firmware and test software are developed by different teams, differences in understanding of the characteristics of the device under test make it difficult for the test software to accurately obtain device characteristics and set wrong acceptance criteria, increasing test complexity and collaboration issues.
By obtaining the source code and test description files of electronic devices, building executable code, and installing and executing test cases on test resources, using test description files and resource libraries to automate the test process to ensure the accuracy and consistency of test resources and use cases .
It achieves accurate testing of electronic equipment, reduces testing errors, improves testing efficiency and accuracy, and reduces the complexity of tool system collaboration issues.
Smart Images

Figure CN110674024B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to testing technology, and in particular to an integrated testing system for testing electronic devices having multiple versions in a development phase and a testing method used in the integrated testing system. Background Art
[0002] The software or firmware running in some electronic devices (for the purpose of clarity and conciseness, collectively referred to as firmware below, and the instruction sequence running in a computer or server outside the electronic device for testing the electronic device is referred to as test software) needs to be fully tested to ensure the quality and reliability of the electronic devices.
[0003] As the firmware of electronic devices is iteratively developed, the functions of electronic devices become increasingly complex, and the targets to be checked by the test software also change accordingly. The test software needs to fully understand the characteristics provided by the firmware of the electronic device currently being tested, so as to know what features to be tested of the electronic device currently being tested, as well as the acceptance criteria for these features to be tested.
[0004] In the Chinese patent application with application number 2018106300065 and invention name “Electronic Equipment Testing Method and Device”, a technical solution for testing electronic equipment is provided. Summary of the invention
[0005] However, the test software and the firmware of the electronic device are often developed by different teams. Due to their respective development progress, different teams often have different understandings of the characteristics of the current electronic device being tested, which makes it difficult for the test software to accurately know the test characteristics of the storage device, and / or sets incorrect acceptance criteria. For example, the test software needs to test the multi-namespace feature of the storage device, but the firmware of the storage device being tested does not yet support the multi-namespace feature. In this case, the test software prompts that the test failed, but it cannot confirm any defects in the storage device based on this. As electronic devices become more complex and development cycles become longer, the number of hardware and firmware versions of electronic devices increases, which brings further problems to the collaboration between test software and electronic devices.
[0006] The electronic device development process also uses a variety of tool systems, such as version management systems and continuous integration systems. The electronic device testing process also involves a variety of computers and servers used to perform tests, as well as samples of the tested devices, tools for installing software on the tested devices, etc. These tool systems provide a comprehensive environment for testing electronic devices. They also add further complexity to the testing process, making it easier for the testing process to introduce coordination issues among various tool systems.
[0007] The above problems need to be solved.
[0008] According to the first aspect of the present application, an integrated testing method for a first electronic device according to the first aspect of the present application is provided, comprising: obtaining source code and a test description file for the electronic device; according to the test description file, obtaining test resources and test cases to be used; obtaining executable code constructed according to the source code; the test resources installing the executable code on the electronic device, and executing the test cases to test the electronic device.
[0009] According to the integration testing method of the first electronic device of the first aspect of the present application, there is provided an integration testing method of the second electronic device of the first aspect of the present application, which also includes: in response to obtaining the source code for the electronic device, constructing an executable code with the source code, and storing the constructed executable code in an executable code library; in response to successfully constructing the executable code with the source code, storing the source code in a source code library; wherein the source code stored in the source code library is tagged.
[0010] According to the integrated testing method of the first or second electronic device of the first aspect of the present application, an integrated testing method of the third electronic device of the first aspect of the present application is provided, wherein the test case is obtained from a test case library according to the instructions of the test description file.
[0011] According to one of the integrated testing methods of the first to third electronic devices of the first aspect of the present application, an integrated testing method of the fourth electronic device of the first aspect of the present application is provided, which also includes: identifying a test resource for testing the electronic device according to an instruction of the test description file, wherein the test resource is coupled to the electronic device; instructing the test resource to install the executable code on the electronic device and execute the test case to test the electronic device.
[0012] According to the integrated testing method of the fourth electronic device of the first aspect of the present application, an integrated testing method of the fifth electronic device of the first aspect of the present application is provided, wherein the test resource obtains the executable code from the executable code library and obtains the test case from the test case library according to the instructions of the test file.
[0013] According to the integrated testing method of the fourth or fifth electronic device of the first aspect of the present application, an integrated testing method of the sixth electronic device of the first aspect of the present application is provided, wherein according to the type of test indicated by the test file, a test resource corresponding to the type is selected; and the test resource obtains a test case of the corresponding type from the executable code library according to the indication of the test file.
[0014] According to one of the integration testing methods of the second to sixth electronic devices of the first aspect of the present application, an integration testing method of the seventh electronic device according to the first aspect of the present application is provided, wherein a label of the source code is obtained from a source code library, and the test resources to be used and the type of test are determined according to the business rules corresponding to the label; test resources corresponding to the type are selected, and the test cases of the corresponding type are obtained from the executable code library.
[0015] According to the integration testing method of the seventh electronic device of the first aspect of the present application, there is provided an integration testing method of the eighth electronic device of the first aspect of the present application, further comprising: in response to executing the test case to test the electronic device and obtaining an expected result, storing the source code in the source code library and adding a second tag to the source code.
[0016] According to one of the integrated testing methods of the first to eighth electronic devices of the first aspect of the present application, an integrated testing method of the ninth electronic device according to the first aspect of the present application is provided, which also includes: in response to updating the source code for the electronic device, obtaining the source code and the test description file for the electronic device, wherein the test description file and the source code are updated together.
[0017] According to one of the integrated testing methods for the first to eighth electronic devices of the first aspect of the present application, an integrated testing method for the tenth electronic device of the first aspect of the present application is provided, which also includes: in response to receiving a test task, obtaining source code and a test description file for the electronic device, wherein the test task indicates the source code to be tested, and storing the test description file in association with the source code.
[0018] According to one of the integration testing methods of the first to tenth electronic devices of the first aspect of the present application, an integration testing method of the eleventh electronic device according to the first aspect of the present application is provided, which also includes: according to the test description file, obtaining a second test case from a test case library, and executing the second test case to analyze whether the source code meets the requirements.
[0019] According to one of the integrated testing methods of the first to eleventh electronic devices of the first aspect of the present application, an integrated testing method of the twelfth electronic device according to the first aspect of the present application is provided, which also includes: obtaining multiple test tasks according to a test description file; obtaining the test resources and test cases to be used for each test task; and installing the executable code on the electronic device of each acquired test resource, and executing the corresponding test cases to execute the multiple test tasks simultaneously.
[0020] According to the second aspect of the present application, an integrated testing system for a first electronic device according to the second aspect of the present application is provided, comprising: a source code acquisition module for acquiring source code and a test description file for the electronic device; a test agent module for acquiring test resources and test cases to be used according to the test description file; a construction module for acquiring executable code constructed according to the source code; and an execution module for installing the executable code on the electronic device using the test resources and executing the test cases to test the electronic device.
[0021] According to the third aspect of the present application, an integrated testing system for a first electronic device according to the third aspect of the present application is provided, comprising: a build server for obtaining source code and a test description file for the electronic device; a continuous integration server for obtaining test resources and test cases to be used according to the test description file; and obtaining executable code built according to the source code; a test agent for installing the executable code on the electronic device coupled to the test resources, and executing the test case to test the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0023] Figure 1 A block diagram of a testing system for an electronic device according to an embodiment of the present application is shown;
[0024] Figure 2 A flowchart showing a test system implementing a test according to an embodiment of the present application; and
[0025] Figure 3 A block diagram of a testing system for an electronic device according to yet another embodiment of the present application is shown. DETAILED DESCRIPTION
[0026] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0027] Figure 1 A block diagram of a testing system for an electronic device according to an embodiment of the present application is shown.
[0028] according to Figure 1 The test system of the illustrated embodiment includes a build server (110), an executable code library 120, a source code library 130, a test case library 140, and one or more test resource groups. Figure 1 , test resource groups 160, 162, and 166 are shown. Each test resource group includes one or more test resources, and a test agent. Test resource group 160 includes test resource 1-1, test resource 1-2, and test resource 1-3. Test resource group 162 includes test resource 2-1, test resource 2-2, and test resource 2-3. Test resource group 166 includes test resource 3-1, test resource 3-2, and test resource 3-3. The test resource is, for example, a computer or server for testing electronic devices. Optionally, the test resource includes a dedicated test device for the electronic device being tested, and / or the electronic device being tested.
[0029] The build server is used to receive updated source code and test description files, and compile / build the source code to generate executable code for the electronic device. The build server also parses the test description file and instructs the test agent of the test resource group to implement related tests according to the content of the test description file.
[0030] According to an embodiment of the present application, a test description file is published to a build server together with the updated source code. The test description file describes information such as the test resources, test software and / or test methods to be used for testing the test equipment using the currently updated source code.
[0031] As an example, the test description file indicates that for the currently updated source code, the test resources used are a server including the electronic device under test, and the test is implemented by running the specified test software. The test description file uses, for example, an IP address to identify the server as a test resource, a hardware serial number to identify the electronic device under test as a test resource, and a test software name (and optionally a version number) to identify the test software. As another example, the test description file indicates that a server and an electronic device are used as test resources, and the build server obtains available test resources, for example, by querying a test agent.
[0032] In response to receiving the updated source code, the build server 110 stores the executable code generated by compiling / building the source code in the executable code library 120. Optionally, the build server 110 also generates a version identifier (e.g., version number) for each build, and stores the generated version identifier in association with the generated executable code in the executable code library 120, so that the corresponding executable code can be obtained from the executable code library 120 according to the version identifier.
[0033] The build server 110 also stores the received source code in association with the version identifier in the source code repository 130. Optionally, only when the executable code is successfully generated from the received source code, the received source code is stored in the source code repository 130. As an example, the source code repository 130 is a server running a GIT system or an SVN system (version management system).
[0034] The test case library stores a variety of test cases such as test software. The test resource implements the test on the electronic device under test by executing the test case. The test description file indicates the test case to be used. For example, the test description file indicates the name of the test case, or indicates the type of the test case (for example, unit test, smoke test, regression test), and the test case of the indicated type is obtained from the test case library.
[0035] The build server 110 obtains a test resource group (e.g., test resource group 166) having the test resource according to the test resource (e.g., test resource 3-1) indicated by the test description file. The build server 110 communicates with the test agent 180 of the test management test resource group 166 to instruct the test agent 180 to perform a test on the test resource 3-1. According to the instruction of the build server 110, the test agent 180 obtains the executable file E corresponding to the updated source code version number to be tested from the executable code library 120, and installs the executable file E to the electronic device under test of the test resource 3-1. The build server 110 also obtains the test software from the test case library 140 according to the test description file, and sends the obtained test software to the test agent 180, and the test agent 180 runs the received test software on the test resource 3-1 to implement the test on the electronic device under test.
[0036] In an optional implementation, the build server 110 obtains a test resource group (e.g., test resource group 166) having the test resource (e.g., test resource 3-1) according to the test resource indicated by the test description file. The build server obtains the access interface of the test resource 3-1 from the test agent 180 of the test resource group 166, and provides the executable file E to be tested and the test software obtained from the test database 140 to the test resource 3-1. The test resource 3-1 obtains the executable file E to be tested, installs the executable file E to the electronic device under test, and runs the test software to test the electronic device under test.
[0037] Optionally, the test description file also instructs to analyze the source code to check whether the source code meets the requirements (for example, whether it meets the coding rules, whether there is a memory leak, whether the author information is correctly marked, etc.). In response to the test description file instructing to analyze the source code, the test agent also obtains the specified source code from the source code library 130, and analyzes whether the obtained source code meets the requirements through, for example, the test resource 3-1. Optionally, the test agent also obtains software for analyzing whether the source code meets the requirements from the test case library 140.
[0038] The updated source code indicates an updated version of the electronic device. According to an embodiment of the present application, a test description file is provided together with the updated source code, so that the test description file reflects the test requirements required for the updated source code. Preferably, the test description file is provided by the developer of the updated source code, so that the content of the test description file is consistent with the test requirements of the updated source code. By requiring the test description file to be provided at the same time as the updated source code is provided to the build server, the same provider (such as a developer) provides the updated source code and the test description file, thereby avoiding inconsistencies between the test description file and the version of the electronic device being tested.
[0039] Figure 2 A flow chart of implementing a test by a test system according to an embodiment of the present application is shown.
[0040] The user sends a request to, for example, a build server 110 (see also Figure 1 ) provides updated source code and test description files, and the build server obtains the updated source code and test description files (210). The build server generates a version number for the obtained source code and stores the source code in the source code library 130 (220). Optionally, the build server 110 generates a unique version number in response to each acquisition of updated source code. The build server 110 compiles / builds the obtained source code, generates executable code for the electronic device under test, and stores the generated executable code in the executable code library 120 (230). Optionally, the build server 110 also stores the version number corresponding to the executable code in the executable code library. For example, the version number corresponding to the executable code is, for example, the version number of the source code used to build the executable code, or the version number generated by the build server for each build of the executable code.
[0041] The build server 110 also continues to obtain the test description file together with the source code, and obtains the test resources and test cases required for implementing the test from the test description file (240). The test resources are, for example, the identification of the server used to perform the test (e.g., IP address, operating system account information, etc.), the identification of the electronic device used to run the test (e.g., hardware serial number) or type (e.g., memory size). The test case is, for example, the test software to be run, and the test stimulus is applied to the electronic device being tested by running the test software through the server as the test resource. The build server 110 also obtains a test agent (e.g., test agent 180) that manages the test resources based on the test resources obtained from the test file.
[0042] The build server 110 instructs the test resources recorded in the test description file to implement the test through the test agent (250). In one example, the build server 110 obtains the executable code of the specified version from the executable code library 120, and provides the obtained executable code to the test agent (e.g., the test agent 180); the build server 110 obtains the test software from the test case library 140, and provides the obtained test software to the test agent 180. The build server 110 also provides the specified test resource identifier (e.g., test resource 3-1) to the test agent 180. In response, the test agent 180 installs the received specified version of the executable code to the electronic device under test bound to the test resource 3-1 (e.g., the test server), and runs the received test software using the test resource 3-1 to implement the test on the electronic device under test. In another example, the build server 110 provides the executable code version specified by the test description file, the specified test software identifier, and the specified test resource identifier to, for example, the test agent 180. The test agent 180 provides the received specified executable code version and the specified test software identifier to the test resource 3-1 (for example, a test server). The test resource 3-1 obtains the specified version of the executable code from the executable code library 120 and installs it on the electronic device under test coupled to itself based on the received specified executable code version and the specified test software identifier, obtains the specified test software from the test case library 140, and runs the obtained test software to test the electronic device under test.
[0043] Figure 3 A block diagram of a testing system for an electronic device according to yet another embodiment of the present application is shown.
[0044] according to Figure 3 The test system of the illustrated embodiment includes a build server (310), an executable code library 320, a source code library 330, a test case library 340, a continuous integration server 350, and optionally a business rule library 380 and one or more test resource groups. Figure 33 shows test resource groups 360, 362 and 366. Each test resource group includes one or more test resources and a test agent.
[0045] The build server 310 is used to receive updated source code and test description files, and compile / build the source code to generate executable code for the electronic device. The build server 310 stores the executable code generated by compiling / building the source code in the executable code library 320. Optionally, the source code provided to the build server 310 also indicates a version identifier (e.g., version number) of the source code, and the build server 310 stores the version identifier in association with the generated executable code in the executable code library 320. The source code (including the test description file) provided to the build server 310 is also stored in the source code library 330.
[0046] Optionally, the updated source code (including the test description file) is first stored in the source code repository 330 , and the build server obtains the updated source code (including the test description file) from the source code repository 330 .
[0047] Still optionally, the test system according to an embodiment of the present application further includes a version management server (not shown). The updated source code (including the test description file) is submitted to the version management server. The version management server generates a version identifier for the updated source code (including the test description file) and submits it to the build server 310. The version management server stores the source code (including the test description file) in the source code library 330 only when the build server 310 indicates to the version management server that the executable code is successfully generated according to the received source code.
[0048] In the source code library 330 , source codes of various versions are organized into a tree structure. Figure 3 The source code version tree with two branches (trunk branch and DEV branch) is shown. The branches of the version tree record multiple versions of source code. The direction of the arrow on the branch of the version tree indicates the direction in which the version is updated. In the direction in which the version is updated, the source code of the later version is an update of the source code of the previous version. In the version tree, some important versions of the source code are marked with tags. Figure 3 It shows tags 1, 2, and 4 on the trunk branch, and tag 3 on the DEV branch. The version indicated by tag 3 is derived from the modification of the version indicated by tag 2. The version indicated by tag 4 is derived from the version obtained by merging the version indicated by tag 3 into the trunk. The tag indicates, for example, the type of the current version (test version, baseline version, release version, performance upgrade version, etc.). For example, the version indicated by tag 3 is a test version, and the version indicated by tag 4 is a release version.
[0049] The build server 310 indicates the success of the source code build to the continuous integration server 350. In response to receiving the instruction from the build server 310, the continuous integration server 350 obtains the test description file from the build server 310 or the source code library 330. The continuous integration server 350 also parses the test description file and instructs the test agent of the test resource group to implement the relevant test according to the content of the test description file.
[0050] According to an embodiment of the present application, a test description file is published to a build server together with the updated source code. The test description file describes information such as the test resources, test software and / or test methods to be used for testing the test equipment using the currently updated source code.
[0051] As an example, the test description file indicates the test resource type used for the currently updated source code. The continuous integration server selects a test resource group that can provide the indicated test resource type according to the test resource type indicated in the test description file. For example, the indicated test resource type is a test server bound to the electronic device under test, and the continuous integration server 350 queries the business rule library 380 to learn which test resource group can provide the indicated test resource type.
[0052] As another example, the test description file indicates the identification of the test resource (eg, IP address), and the continuous integration server 350 accesses the test resource according to the test resource identification without querying the business rule library 380 .
[0053] The test case library 340 stores a variety of test cases such as test software. The continuous integration server 350 obtains the test case from the test case library 340 according to the instruction of the test description file and provides it to the test resource. The test resource implements the test on the electronic device under test by executing the test case. The test description file indicates the test case to be used. For example, the test description file indicates the name of the test case, or indicates the type of the test case (for example, unit test, smoke test, regression test), and obtains the test case of the indicated type from the test case library.
[0054] Optionally, the continuous integration server 350 identifies the type of test case to be used based on the label of the current version of the source code obtained from the source code library 330. For example, if the label of the source code of the current version indicates "test version", the continuous integration server 350 queries the business rule library 380 to obtain the test cases of the unit test and smoke test types to be executed for the "test version" source code. If the label of the source code of the current version indicates "release version", the continuous integration server 350 queries the business rule library 360 to obtain the test cases of the regression test type to be executed for the "release version" source code. Optionally, instead of using a separate business rule library 380, the continuous integration server 350 provides the function of the business rule library.
[0055] Still optionally, the business rule library 380 further indicates the association between the label of the current version of the source code and the test resource. For example, the business rules of the business rule library 380 indicate that the test resource group 360 is used to perform the test on the "test version" source code, the test resource group 362 is used to perform the test on the "benchmark version" source code, and the test resource group 366 is used to perform the test on the "release version" source code. The continuous integration server 350 selects the test resource group according to the label of the current version of the source code.
[0056] As an example, the source code development of a new function is completed. The newly developed source code also includes a test description file. The build server 310 indicates to the continuous integration server 350 that the newly developed source code is successfully built. The developed source code is recorded in the DEV branch of the source code library 330, and "label 3" is also attached to the version source code. The continuous integration server 350 identifies the test case corresponding to the "test version" according to the label of the source code corresponding to the version of "label 3" obtained from the source code library 330. The program integration server 350 instructs the test agent to execute the test case corresponding to the "test version". In response to the test agent indicating that the test execution is successful, the continuous integration server records the source code corresponding to the version of "label 3" to the trunk branch of the source code library 330, and adds "label 4" to the version source code. Optionally, the source code corresponding to the version of "label 3" is also merged with the source code on the trunk branch to obtain the source code corresponding to the version of "label 4". The continuous integration server 350 identifies the test case corresponding to the "release version" according to the label of the source code corresponding to the version of "label 4" obtained from the source code library 330. The program integration server 350 instructs the test agent to execute the test cases corresponding to the “release version”.
[0057] Still optionally, the business rule library 380 indicates the association between the label of the current version of the source code and the test resources / test cases. For example, label 3 corresponds to the test case of the test version, and label 4 corresponds to the test case of the release version; and after the source code of the new version is updated, it must first be recorded in the DEV branch of the source code library 330, and then the corresponding test case is implemented. After the test passes, the new version of the source code is recorded in the trunk branch of the source code library 340, and the corresponding test case is implemented again. Optionally, the business rule library 380 also defines business rules for the case where the test fails. For example, in response to the failure to execute the test case of the corresponding release version, a task to modify the source code of the current version is generated. Still optionally, the business rules defined in the business rule library 380 indicate that after the test case of the corresponding test version is successfully executed, the test case of the corresponding release version continues to be executed, and after the test case of the corresponding release version is successfully executed, the updated source code is recorded in the trunk branch of the source code library 340 and the label is attached.
[0058] The continuous integration server 350 obtains the required test resource group and the required test case from the business rule library 380 according to the tag of the current version of the source code, thereby eliminating the need for a test description file.
[0059] Still optionally, the continuous integration service 350 initiates testing of the specified version of the source code in response to the test task submitted by the user through the client, without relying on the instructions provided by the build server 310. In one example, the test task submitted by the user indicates the test description file to be used. In another example, the test resource group and test case to be used are obtained according to the instructions of the business rule library 380 based on the tag corresponding to the version of the source code indicated by the test task submitted by the user.
[0060] The continuous integration server 350 communicates with the test agent (e.g., test agent 380) that manages the selected test resource group to instruct the test agent 380 to execute the test on the test resource. According to the instruction of the build server 350, the test agent 380 selects an available test resource (e.g., the currently idle test resource 3-1) from the test resource group managed by itself, obtains the executable file corresponding to the updated source code version number to be tested from the executable code library 320, and installs the obtained executable file to the electronic device under test of the test resource 3-1.
[0061] The test agent 380 also obtains the test software from the continuous integration server 350, and instructs the test resource 3-1 to run the received test software to test the electronic device under test. As an example, the test description file indicates the test software to be used to perform the test. Accordingly, the test agent 380 obtains the test software to be used according to the instructions of the test description file. Optionally, the test agent directly obtains the test software from the test case library 340 according to the instructions of the test description file.
[0062] Optionally, in response to the test description file indicating to analyze the source code, the test agent 380 also obtains the specified source code from the source code library 330, and analyzes whether the obtained source code meets the requirements through, for example, the test resource 3-1. Optionally, the test agent also obtains software for analyzing whether the source code meets the requirements from the test case library 340.
[0063] Still optionally, the continuous integration server 350 simultaneously initiates tests on multiple test resources. For example, the continuous integration server 350 obtains multiple test tasks submitted by the user, and instructs the test agent to implement the corresponding test according to each test task. As an example, the test agent 380 instructs the test resource 3-1 to execute one test task, and instructs the test resource 3-2 to execute another test task, and the continuous integration server 350 also instructs the test agent of the test resource group 2 to process another test task simultaneously.
[0064] As another example, the continuous integration server 350 obtains instructions for updated source code of multiple versions from the build server 310. For each updated source code, the continuous integration server 350 selects a test resource group required for implementing the test, and instructs the test agent of the test resource group to execute the test on the test resource. The test agent obtains the available test resources in the test resource group where it is located, deploys the updated code of each version to the corresponding available test resources, and executes each test software to implement the test.
[0065] As another example, in the test system, a single test agent manages all test resource groups. The continuous integration server 350 instructs the single test agent to execute a test, and the test agent selects a test resource group suitable for executing the current test according to the instruction of the continuous integration server 350, selects test resources from the selected test resource group, and executes the test.
[0066] The test agent also collects the results of the test execution from the test resources, indicates the completion of the test execution to the continuous integration server 350, and optionally displays the execution results.
[0067] According to an embodiment of the present application, a version management identifier of the source code is introduced into the test system, and the test process is combined with the version management process. According to the meaning of the source code version, appropriate tests corresponding to the same version are performed to ensure that source codes of different versions meet the quality requirements of each version. In addition, through the unified management of test resources, test resources are divided into test resource groups according to the labels of the source code versions (which reflect the purpose of the test), and similar resources in the test resource groups are selected and used according to the usage, thereby improving the utilization rate of test resources.
[0068] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application. Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. An integrated testing method for electronic equipment, It is characterized in that The method includes: Acquire source code and a test description file for an electronic device; wherein the test description file indicates the source code currently updated; According to the test description file, the test resources and test cases to be used are obtained, the test resources include a server of the electronic device under test, and the test is implemented by running the specified test software; In response to acquiring the source code for the electronic device, constructing executable code using the source code, and storing the constructed executable code in an executable code library; In response to the executable code being built successfully using the source code, the source code is stored in a source code repository; wherein the source code stored in the source code repository is tagged, the tag of the current version of the source code is associated with a test resource / test case, and the type of test case to be used is identified according to the tag of the current version of the source code; Obtaining executable code constructed according to the source code; The test resource installs the executable code on the electronic device and executes the test case to test the electronic device.
2. The method according to claim 1, It is characterized in that According to the instruction of the test description file, the test case is obtained from a test case library.
3. The method according to claim 1 or 2, It is characterized in that Also includes: identifying, according to an instruction of the test description file, a test resource for testing the electronic device, wherein the test resource is coupled to the electronic device; The test resource is instructed to install the executable code on the electronic device and execute the test case to test the electronic device.
4. The method according to claim 3, It is characterized in that in The test resource obtains the executable code from an executable code library and the test case from a test case library according to the instruction of the test description file.
5. The method according to claim 3, It is characterized in that in According to the type of test indicated by the test description file, selecting a test resource corresponding to the type; The test resource obtains a test case of a corresponding type from an executable code library according to instructions of the test description file.
6. The method according to claim 5, It is characterized in that in Obtain a label of the source code from a source code library, and determine a test resource to be used and a test type according to a business rule corresponding to the label; A test resource corresponding to the type is selected, and the test case of the corresponding type is obtained from an executable code library.
7. The method according to claim 6, It is characterized in that Also includes: In response to executing the test case to test the electronic device and obtaining an expected result, the source code is stored in the source code library and a second tag is added to the source code.
8. The method according to claim 7, It is characterized in that Also includes: In response to updating the source code for the electronic device, the source code and a test description file for the electronic device are acquired, wherein the test description file and the source code are updated together.
9. The method according to claim 8, It is characterized in that Also includes: In response to receiving a test task, a source code and a test description file for an electronic device are acquired, wherein the test task indicates the source code to be tested, and the test description file is stored in association with the source code.
10. The method according to claim 9, It is characterized in that Also includes: According to the test description file, a second test case is obtained from a test case library, and the second test case is executed to analyze whether the source code meets the requirements.
11. The method according to claim 10, It is characterized in that Also includes: According to the test description file, obtain multiple test tasks; Get the test resources and test cases to be used for each test task; as well as The executable code is installed on the electronic device of each acquired test resource, and the corresponding test case is executed to simultaneously execute the multiple test tasks.
12. An integrated test system for electronic equipment, It is characterized in that The method according to any one of claims 1 to 11 is implemented, the system comprising: A build server for obtaining source code and test description files for electronic devices; A continuous integration server is used to obtain test resources and test cases to be used according to the test description file; and to obtain executable code built according to the source code; A test agent is used to install the executable code on the electronic device coupled to the test resource and execute the test case to test the electronic device.
