Test scene configuration method and device, electronic equipment and storage medium
Through automated testing preparation, the cumbersome problem of testers manually configuring test equipment in multi-project, multi-software versions and multi-test project test scenarios is solved, achieving efficient testing equipment configuration and improving work efficiency.
Patent Information
- Application Number
- CN202411857140.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-03-14
AI Technical Summary
In multi-project, multi-software versions and multi-test test scenarios, testers need to manually configure multiple test equipment, resulting in large labor consumption and impact on progress.
Through automated testing preparation, testers only need to enter the necessary configuration information, and the system will generate and apply the configuration information of the test equipment to automatically complete the preparation of the test equipment.
This greatly improves the efficiency of testing, reduces the labor investment in the early stage of testing, and can configure multiple testing equipment at the same time, improving the testing progress.
Smart Images

Figure CN119621192A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of testing technology, and in particular to a configuration method, device, electronic device, and computer-readable storage medium for a test scenario. Background Art
[0002] In daily special tests, there are often multiple projects, multiple software versions, and multiple test items that need to be tested at the same time. This requires testers to prepare a large number of test devices in a short period of time and ensure that each device meets specific test conditions. Testers need to perform a series of preparations before formal testing, such as flashing, going through the setup wizard, writing device parameters, and importing settings and instructions. These steps are not only cumbersome, but also often beyond the ability of testers when multiple devices and different preset contents are concurrent.
[0003] Due to the complexity and diversity of test scenarios, testers need to manually configure equipment for each test item, which results in a lot of manpower consumption. Especially when test resources are limited, the test progress may be seriously affected. Summary of the invention
[0004] The embodiments of the present disclosure provide a configuration method, device, electronic device, and computer-readable storage medium for a test scenario, which automates the test preparation work. In this way, the tester only needs to input the necessary configuration information to automatically complete the preparation work of the test equipment, which greatly improves the work efficiency. The configuration of test scenarios for multiple test devices can be realized at the same time, effectively reducing the manpower input in the early stage of the test and improving the work efficiency.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for configuring a test scenario, the method comprising:
[0006] In response to the completion of configuration of the first configuration information corresponding to each test device, generating second configuration information corresponding to each test device based on the first configuration information and the configuration file;
[0007] A test scenario is configured for the test device based on the second configuration information.
[0008] In a second aspect, an embodiment of the present disclosure further provides a test scenario configuration device, the device comprising:
[0009] A generating module, configured to generate second configuration information corresponding to each test device based on the first configuration information and a configuration file in response to the first configuration information corresponding to each test device being configured;
[0010] A configuration module is used to configure a test scenario for the test device based on the second configuration information.
[0011] In a third aspect, an embodiment of the present disclosure further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps in the configuration method of the above-mentioned test scenario when executed by the processor.
[0012] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the configuration method of the above-mentioned test scenario are implemented.
[0013] In a fifth aspect, the embodiments of the present disclosure further provide a computer program product or a computer program, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the various optional implementations described in the embodiments of the present disclosure.
[0014] In summary, the disclosed embodiment first responds to the completion of the configuration of the first configuration information corresponding to each test device, generates the second configuration information corresponding to each of the test devices based on the first configuration information and the configuration file, and then configures the test scenario for the test device based on the second configuration information. As a result, the test preparation work is automated. In this way, the tester only needs to input the necessary configuration information to automatically complete the preparation of the test equipment, which greatly improves work efficiency. The configuration of test scenarios for multiple test devices can be realized at the same time, effectively reducing the manpower investment in the early stage of the test and improving work efficiency.
[0015] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 is a flowchart of a method for configuring a test scenario provided in the first embodiment of the present disclosure;
[0018] Figure 2 is a schematic diagram of a user operation interface for configuring first configuration information provided by an embodiment of the present disclosure;
[0019] Figure 3is a flowchart of a method for configuring a test scenario provided in the second embodiment of the present disclosure;
[0020] Figure 4 is a structural diagram of a configuration device for a test scenario provided in an embodiment of the present disclosure;
[0021] Figure 5 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] Some embodiments of the present disclosure will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. Various changes, modifications and equivalents of the methods, devices and / or systems described herein will become apparent after understanding the present disclosure. For example, the order of operations described herein is merely an example and is not limited to those orders set forth herein, but can be changed as becomes apparent after understanding the present disclosure, except for operations that must be performed in a specific order. In addition, for clarity and brevity, descriptions of features known in the art may be omitted.
[0023] The embodiments described in some embodiments of the present disclosure below do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0024] It should be noted that the execution subject of the test scenario configuration method of this embodiment may be a test scenario configuration device or a server, which is not limited here.
[0025] In the embodiments of the present disclosure, the configuration method of executing the test scenario will be described with the "server" as the execution subject, and no limitation is made here. It should be noted that the description order of the following embodiments is not used as a limitation on the priority order of the embodiments.
[0026] Figure 1 It is a flowchart of a method for configuring a test scenario provided according to the first embodiment of the present disclosure.
[0027] like Figure 1 As shown, the method includes:
[0028] Step 101 , in response to the completion of configuration of the first configuration information corresponding to each test device, second configuration information corresponding to each test device is generated based on the first configuration information and a configuration file.
[0029] The first configuration information may be the test configuration information set by the user for each test device. The first configuration information corresponding to different test devices may be the same or different, which is not limited here.
[0030] The first configuration information includes at least one of the following:
[0031] Project identification;
[0032] The version of the software to be tested;
[0033] the type of test; or
[0034] The screen brightness value corresponding to the battery life test.
[0035] The project identifier may be a project serial number, project name, project code, project type, etc., which is used to characterize any project information and is not limited here.
[0036] The software to be tested may be any type of software. It is understandable that the software to be tested corresponding to different test devices may be of the same type, or may be of different types, which is not limited here. For the same type of software to be tested, the versions may also be different, such as some may be the first version, some may be the second version, some may have version numbers 001, and some may have version numbers 002, which are not limited here.
[0037] Among them, the test types are mainly divided into battery life test and stability test. Furthermore, the test types at least include: whole machine battery life test, power consumption single test, random test, and mean time between failures test.
[0038] Among them, the whole machine battery life test, also known as the DOU battery life test, is a battery endurance test under the digital operating unit (Daily Operational Usage). It is a test of battery capacity. This test simulates daily usage scenarios, such as browsing the web, playing videos, etc., to examine the battery life of the device under normal use.
[0039] Among them, the power consumption test is a special test for the energy consumed by the device or application during operation. The power consumption test is designed to measure the energy consumption of the device or application under specific conditions to evaluate its energy efficiency, stability and long-term reliability. Through the test, you can understand the power consumption characteristics of the device in different working modes, and provide data support for optimizing design, reducing energy consumption and extending the service life of the device.
[0040] The principle of random testing (Monkey testing) is to traverse and stress test the software by simulating random user operation behaviors, such as clicking, sliding, inputting, etc., to find potential bugs, crashes and performance issues. It does not require prior knowledge of the internal logic of the software, but triggers various possible operations through randomly generated input sequences to detect the responsiveness and stability of the system. Monkey testing can be applied to software testing in various fields, including but not limited to: mobile application testing, game testing, website testing, and desktop software testing.
[0041] Among them, the MTBF (Mean Time Between Failures) test is used to evaluate the reliability of the device during long-term use, that is, the average time the device runs without failure. In this test phase, it is also necessary to turn on the developer mode and enter instructions, as well as set it to not sleep, to ensure the continuity and accuracy of the test. The MTBF test is a test method used to evaluate the reliability and stability of a device over a period of time. By recording the failure time and number of failures of the device during actual operation, the average trouble-free operation time of the device can be measured.
[0042] In the battery life test, "nits value writing" is a key step, which ensures the consistency and comparability of the test environment. Nits is the unit of measurement for screen brightness, and screen brightness is one of the important factors affecting the battery life of the device. Therefore, when conducting a battery life test, the screen brightness must be clarified and fixed, that is, the corresponding nits value must be written. The screen brightness will directly affect the power consumption and battery life of the device. If the screen brightness is inconsistent during the test, the test results will lack comparability. By fixing the screen brightness, the interference of brightness changes on the battery life test results can be eliminated, thereby improving the accuracy of the test. When conducting battery life tests between multiple devices or different versions of software, fixing the screen brightness can ensure the fairness and comparability of the test results.
[0043] Optionally, before conducting a battery life test, you need to determine a suitable screen brightness standard. This standard can be determined based on the type of device, its purpose, and the actual needs of the user. Generally speaking, you can choose a moderate brightness value, such as 200nits or 300nits, to ensure the universal applicability of the test results, which is not limited here.
[0044] The test equipment may be equipment used for testing, such as electronic equipment, mechanical equipment, network equipment, etc., which is not limited here.
[0045] The configuration file represents the basic configuration of the test device and related tools and projects. For example, the configuration file can cover key settings such as the installation path of the flash tool, project information, software path, Wi-Fi connection information, and server login credentials, which are not limited here.
[0046] As a possible implementation method, the configuration file may be generated according to the file configuration information input by the user. Alternatively, the configuration file may be updated according to the file configuration information input by the user.
[0047] The file configuration information may be code information for generating or updating a configuration file. For example, when generating a configuration file for the first time, it is usually necessary to input complete file configuration information of each part, and then update or modify part of the file configuration information to update the configuration file.
[0048] The file configuration information includes at least one of the following:
[0049] Flash tool configuration information;
[0050] Device connection configuration information;
[0051] Server login configuration information; or
[0052] Resource bundle path configuration information.
[0053] The flashing tool configuration information may specify the installation path of the flashing tool.
[0054] The device connection configuration information may include the name and password of the wifi account used to connect to the device. This information may be used to connect the device to a specific Wi-Fi network during the flashing process to perform firmware updates or other operations.
[0055] The server login configuration information may be the flashing software server login credentials, which provide the account and password for logging into the flashing software server. These credentials are used to access resources on the server, such as firmware files, update packages, etc.
[0056] The resource package path configuration information can be a resource file path, which should specify the storage location of the resource files (such as firmware packages, configuration files, etc.) required during the flashing process. However, in this configuration file, the resource file path is marked as a placeholder, which means that the user needs to fill in the specific path according to the actual situation.
[0057] Optionally, the user can enter file configuration information from the command line input interface.
[0058] As a possible implementation method, the first configuration information corresponding to each test device input by the user in the user operation interface can be first received. If the server then detects that the user touches the scene preset control in the user operation interface, it determines that the configuration of the first configuration information corresponding to each test device is completed.
[0059] Among them, the user interface (UI) is a graphical interface for users to interact with computer systems. In this interface, users can input information, select options, trigger actions, etc.
[0060] The scene preset control is a specific element in the user operation interface, which is used to indicate that the user has completed the input of the first configuration information of each test device and is ready to submit the information to the server for processing.
[0061] like Figure 2 As shown, Figure 2 This is a diagram of a user interface, which includes 6 test devices. Users can select software type, project name, version number, test type and Nit value (screen brightness value) in this interface. Users can choose "Lock", "Remove" and "Unlock". And they can refresh the device through the "Refresh Device" control to update the device list information. After clicking the "Refresh Device" control, you need to reconfigure the options.
[0062] Among them, "open preset" is a scene preset control. If the user clicks the scene preset control, it means that the configuration of the first configuration information corresponding to each test device is completed.
[0063] The second configuration information may be configuration information generated by combining the configuration file and the first configuration information.
[0064] Specifically, the server may merge the first configuration information input by the user with the information in the loaded configuration file. This process may involve overwriting the default values in the configuration file with specific values in the first configuration information, or adding new settings in the first configuration information to the configuration file. The merging logic may vary depending on factors such as the priority, data type, and constraints of the configuration items.
[0065] Further, based on the merged information, the server generates corresponding second configuration information for each test device. The second configuration information may include all configuration details required for the test device, including user-defined settings and common configurations inherited from the configuration file. The second configuration information may exist in the same format as the configuration file, or may be converted into other formats according to the requirements of the test device, which is not limited here.
[0066] Step 102: configure a test scenario for the test device based on the second configuration information.
[0067] Specifically, the server may first obtain the second configuration information generated for each test device from the storage location. The second configuration information may include all configuration details required for the test device, including test parameters, environment settings, dependencies, etc. Then, the server may parse the second configuration information to extract configuration items related to the test scenario, such as parsing the structure of the configuration file, reading specific key-value pairs, parsing nested data structures, etc.
[0068] Furthermore, based on the parsed configuration items, the server can prepare corresponding test scenarios. Test scenarios may include test scripts, test cases, test data, simulation environments, etc. The server may dynamically generate test scenarios based on the conditional logic in the configuration information, or select appropriate scenarios from a predefined test scenario library.
[0069] Furthermore, the server can configure the prepared test scenario to the test device, such as uploading the test script to the device, setting the device's environment variables, starting the simulation service, etc. During the configuration process, the server may communicate with the test device to ensure the correctness and completeness of the configuration.
[0070] After the configuration is complete, the server may perform verification steps to ensure that the test device has correctly configured the test scenario. For example, check the status of the device, verify the execution results of the test script, confirm whether the simulation environment runs as expected, etc. Once the verification is passed, the system can start the test scenario on the test device and start the test. During the test, the system may monitor the status of the test device, collect test results, record logs, etc.
[0071] As a possible implementation method, when conducting a whole-machine battery life test and a one-way power consumption test, you first need to install the software or application to be tested on the test device, and then you need to disable the specified APK, that is, after the software to be tested is installed, you may need to disable certain specified APKs (Android application packages) to avoid them interfering with the test results. In addition, you can also set the device not to automatically sleep or lock the screen during the test to ensure the continuity of the test. In addition, you also need to write the brightness value, that is, the brightness value required for the battery life test. Optionally, you can also disable some other specific functions, which can be set according to actual conditions and are not limited here.
[0072] As a possible implementation method, when performing MTBF tests and random tests, it is necessary to turn on developer mode, enter instructions and set no sleep. Among them, developer mode (Developer Options) is a series of tools and information provided to developers for debugging, optimizing and testing applications. In developer mode, users can send instructions to the device through tools such as ADB (Android Debug Bridge). ADB is a command line tool that allows developers to communicate with connected Android devices or emulators. Optionally, no sleep can be turned on. In this way, the device will not automatically lock the screen or enter sleep mode when charging or under certain conditions.
[0073] In summary, the disclosed embodiment first responds to the completion of the configuration of the first configuration information corresponding to each test device, generates the second configuration information corresponding to each of the test devices based on the first configuration information and the configuration file, and then configures the test scenario for the test device based on the second configuration information. In this way, the test preparation work is automated. In this way, the tester only needs to input the necessary configuration information to automatically complete the preparation of the test equipment, which greatly improves work efficiency. The configuration of test scenarios for multiple test devices can be achieved at the same time, effectively reducing the manpower investment in the early stage of the test and improving work efficiency. Therefore, by automatically generating the second configuration information based on the first configuration information and the configuration file, the workload of manual configuration is greatly reduced and the configuration efficiency is improved.
[0074] In summary, when the test equipment or test requirements change, you only need to update the first configuration information or configuration file to quickly generate new second configuration information without having to configure from scratch. The first configuration information allows users to customize the configuration according to specific needs, while the configuration file provides a general configuration template. The combination of the two realizes a flexible configuration method. When you need to add new test equipment or test scenarios, you only need to update the configuration file or add new first configuration information to easily expand the system. By automating the configuration process, ensuring configuration accuracy, and providing flexibility and scalability.
[0075] Figure 3 It is a flowchart of a method for configuring a test scenario provided according to the second embodiment of the present disclosure.
[0076] like Figure 3 As shown, the method includes:
[0077] Step 201, determining a plurality of devices in an online state.
[0078] As a possible implementation, a list or database of all possible devices can be created first. Then, a status query instruction or request can be sent to each device, usually through network communication (such as TCP / IP, Bluetooth, Zigbee, etc.). After that, a response from the device can be waited for and received, and the device can be judged whether it is online based on the response content.
[0079] If the device is online, add the online device to the "Online Device List" and display it on the user operation interface.
[0080] Step 202: Select a device that meets a preset condition from a plurality of devices as a test device.
[0081] The preset conditions may be preset test requirements, such as device type, operating system and version, hardware configuration (CPU model, memory size), network conditions, software compatibility, etc., which are not limited here.
[0082] It is understandable that the collected device information of each online device can be matched with the preset conditions. If the matching degree is greater than a preset threshold (such as 87%), it can be used as a test device. Otherwise, it cannot be used as a test device. This is not limited here.
[0083] Optionally, you can also select the required test device from the devices that meet the preset conditions based on the matching results. If there are multiple devices that meet the conditions, you can sort them according to priority (such as the age of the device, performance, etc.), and then select the device with the highest priority. If all devices have the same priority, you can randomly select one or more devices as test devices.
[0084] It is understood that when selecting test equipment, it is important to ensure that the equipment is available during the test, i.e. not occupied by other tests or tasks. It is also necessary to ensure that the selected equipment is in good working condition and is not damaged or faulty. If remote access or control of the equipment is required, it is important to ensure that sufficient permissions are available to perform these operations.
[0085] Step 203 , in response to the completion of configuration of the first configuration information corresponding to each test device, second configuration information corresponding to each test device is generated based on the first configuration information and the configuration file.
[0086] It should be noted that the specific implementation of step 203 may refer to the above embodiment and will not be described in detail here.
[0087] Step 204: based on the resource package path configuration information included in the second configuration information, download the software to be tested corresponding to the test device from the software server.
[0088] Specifically, resource package path configuration information, such as the URL (network address) of the software server, the name or ID (identifier) of the resource package, and possible access credentials (such as user name and password) can be extracted from the second configuration information.
[0089] The extracted information can then be used to establish a connection with a software server, perhaps via HTTP / HTTPS protocol. The software to be tested corresponding to the test device can then be downloaded from the server, for example, in the form of an APK file (for Android), an IPA file (for iOS), or an installation package in another format.
[0090] Optionally, after the download is complete, verify the integrity of the package, typically by checking the file size, hash value, or digital signature.
[0091] Step 205 , in response to the completion of downloading the software to be tested, based on the flashing tool configuration information included in the second configuration information, calling the flashing tool to flash the device to be tested.
[0092] Optionally, the flashing tool configuration information can be extracted from the second configuration information, including the path of the flashing tool, required parameters (such as device ID, flashing mode, etc.), and possible dependencies. Then, it can be ensured that the dependencies required by the flashing tool are installed and the device is connected to the test system and is in a flashable state. After that, the flashing tool can be called using the extracted information and the necessary parameters can be passed to start the flashing process. After that, the progress of the flashing process can be monitored to ensure that no errors occur. After the flashing is completed, verify whether the device has been successfully flashed with the new software and can be started normally.
[0093] Step 206 , in response to the completion of the flashing of the test device, corresponding test resources are configured for the test device based on the test type included in the second configuration information.
[0094] Specifically, the test type information can be extracted from the second configuration information, which determines which test resources need to be configured. Then, corresponding test resources such as test cases, test scripts, test data, etc. can be selected from a predefined test resource library according to the test type.
[0095] Then, you can configure the necessary test environment for the test device, such as installing test tools, setting network parameters, configuring device permissions, etc.
[0096] After the test resource configuration is completed, it can be determined that the test equipment is ready for testing, which may include starting the test tool, loading the test data, etc.
[0097] In the disclosed embodiment, a plurality of devices that are online are first determined, and then a device that meets preset conditions is selected from the plurality of devices as a test device. Then, in response to the completion of configuration of the first configuration information corresponding to each test device, second configuration information corresponding to each test device is generated based on the first configuration information and the configuration file. Then, based on the resource package path configuration information included in the second configuration information, the software to be tested corresponding to the test device is downloaded from the software server. Then, in response to the completion of downloading the software to be tested, based on the flashing tool configuration information included in the second configuration information, the flashing tool is called to flash the device to be tested. Then, in response to the completion of flashing the test device, corresponding test resources are configured for the test device based on the test type included in the second configuration information.
[0098] The disclosed embodiment embodies an automated test process for screening, configuring, downloading software, flashing, and configuring test resources for online devices. By automatically screening online devices and selecting devices that meet preset conditions as test devices, devices that can be used for testing can be quickly located, avoiding the tedious and time-consuming manual screening. Automated configuration, software downloading, flashing, and configuration of test resources significantly reduce manual intervention, thereby speeding up the test process and improving overall test efficiency. The automated test process reduces labor costs because many tasks that originally required manual execution can now be completed automatically by computers. Through precise configuration and optimized use of test resources, unnecessary waste of resources can be avoided and costs can be further reduced. The automated test process reduces the possibility of human error because all steps are executed according to preset scripts and programs. Through precise configuration and allocation of test resources, it can be ensured that each test device is tested under the same conditions, thereby improving the accuracy and comparability of test results. The automated test process can easily adapt to different test needs and scenarios because the preset conditions and configuration files can be adjusted as needed. By adding new test devices and test types, the test process can be easily expanded to adapt to changing products and needs. Automated testing processes ensure that more devices are tested, because the screening and configuration steps are automated, covering more devices and test scenarios. By accurately configuring test resources, you can ensure that each device is fully tested, thereby improving test coverage.
[0099] In order to better implement the test scenario configuration method of the present disclosure, the present disclosure also provides a test scenario configuration device based on the test scenario configuration method. The meanings of the terms are the same as those in the test scenario configuration method, and the specific implementation details can refer to the description in the method embodiment.
[0100] See also Figure 4 , Figure 44 is a schematic diagram of a configuration device for a test scenario provided in an embodiment of the present disclosure. The configuration device 400 for the test scenario includes:
[0101] A generating module 410, configured to generate second configuration information corresponding to each test device based on the first configuration information and a configuration file in response to the first configuration information corresponding to each test device being configured;
[0102] The configuration module 420 is used to configure a test scenario for the test device based on the second configuration information.
[0103] Optionally, the generating module is specifically used for:
[0104] Receiving first configuration information corresponding to each test device input by a user in a user operation interface;
[0105] In response to detecting that the user touches the scene preset control in the user operation interface, determining that the first configuration information corresponding to each test device is configured completely,
[0106] The first configuration information includes at least one of the following:
[0107] Project identification;
[0108] The version of the software to be tested;
[0109] the type of test; or
[0110] The screen brightness value corresponding to the battery life test.
[0111] Optionally, the build module is also used to:
[0112] Generate the configuration file according to the file configuration information input by the user;
[0113] or,
[0114] Update the configuration file according to the file configuration information input by the user,
[0115] The file configuration information includes at least one of the following:
[0116] Flash tool configuration information;
[0117] Device connection configuration information;
[0118] Server login configuration information; or
[0119] Resource bundle path configuration information.
[0120] Optionally, the configuration module 420 is specifically used to:
[0121] Based on the resource package path configuration information included in the second configuration information, download the software to be tested corresponding to the test device from the software server;
[0122] In response to the completion of downloading the software to be tested, based on the flashing tool configuration information included in the second configuration information, calling the flashing tool to flash the device to be tested;
[0123] In response to the completion of flashing the test device, corresponding test resources are configured for the test device based on the test type included in the second configuration information.
[0124] Optionally, the test type at least includes:
[0125] Battery life test of the whole machine;
[0126] Power consumption single test;
[0127] Random testing;
[0128] Mean time between failures testing.
[0129] Optionally, the build module is also used to:
[0130] Identify multiple devices that are online;
[0131] A device that meets a preset condition is selected from the plurality of devices as a test device.
[0132] In summary, the embodiment of the present disclosure first responds to the completion of the configuration of the first configuration information corresponding to each test device, generates the second configuration information corresponding to each test device based on the first configuration information and the configuration file, and then configures the test scenario for the test device based on the second configuration information. In this way, the configuration of test scenarios for multiple test devices can be realized at the same time, effectively reducing the manpower investment in the early stage of the test and improving work efficiency.
[0133] In addition, the present disclosure also provides an electronic device, such as Figure 5 As shown, it shows a schematic diagram of the structure of the electronic device involved in the present disclosure, specifically:
[0134] The electronic device may include components such as a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will appreciate that Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0135] The processor 501 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 502, and calling data stored in the memory 502, the processor 501 performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 501.
[0136] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.
[0137] The electronic device also includes a power supply 503 for supplying power to various components. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 503 can also include one or more DC or AC power supplies, recharging systems, power supply device debugging circuits, power converters or inverters, power status indicators and other arbitrary components.
[0138] The electronic device may further include an input unit 504, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0139] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 501 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 502 according to the following instructions, and the processor 501 will run the application programs stored in the memory 502, thereby implementing the steps in the configuration method of any test scenario provided in the embodiments of the present disclosure.
[0140] In summary, the embodiment of the present disclosure first responds to the completion of the configuration of the first configuration information corresponding to each test device, generates the second configuration information corresponding to each test device based on the first configuration information and the configuration file, and then configures the test scenario for the test device based on the second configuration information. In this way, the configuration of test scenarios for multiple test devices can be realized at the same time, effectively reducing the manpower investment in the early stage of the test and improving work efficiency.
[0141] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0142] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0143] To this end, the present disclosure provides a computer-readable storage medium, on which a computer program is stored. The computer program can be loaded by a processor to execute the steps in the configuration method of any test scenario provided by the present disclosure.
[0144] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0145] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0146] Since the instructions stored in the computer-readable storage medium can execute the steps in the configuration method of any test scenario provided in the present disclosure, the beneficial effects that can be achieved by the configuration method of any test scenario provided in the present disclosure can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0147] The above is a detailed introduction to the configuration method, device, electronic device and computer-readable storage medium of a test scenario provided by the present disclosure. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for configuring a test scenario, characterized in that: include: In response to the completion of configuration of the first configuration information corresponding to each test device, generating second configuration information corresponding to each test device based on the first configuration information and the configuration file; A test scenario is configured for the test device based on the second configuration information.
2. The method according to claim 1, characterized in that: The configuration of the first configuration information corresponding to each test device is completed, including: Receiving first configuration information corresponding to each test device input by a user in a user operation interface; In response to detecting that the user touches the scene preset control in the user operation interface, determining that the first configuration information corresponding to each test device is configured completely, The first configuration information includes at least one of the following: Project identification; The version of the software to be tested; the type of test; or The screen brightness value corresponding to the battery life test.
3. The method according to claim 1, characterized in that: Before the configuration of the first configuration information corresponding to each test device is completed, the method further includes: Generate the configuration file according to the file configuration information input by the user; or, Update the configuration file according to the file configuration information input by the user, The file configuration information includes at least one of the following: Flash tool configuration information; Device connection configuration information; Server login configuration information; or Resource bundle path configuration information.
4. The method according to claim 1, characterized in that: The configuring a test scenario for the test device based on the second configuration information includes: Based on the resource package path configuration information included in the second configuration information, download the software to be tested corresponding to the test device from the software server; In response to the completion of downloading the software to be tested, based on the flashing tool configuration information included in the second configuration information, calling the flashing tool to flash the device to be tested; In response to the completion of flashing the test device, corresponding test resources are configured for the test device based on the test type included in the second configuration information.
5. The method according to claim 4, characterized in that The test types include at least: Battery life test of the whole machine; Power consumption single test; Random testing; Mean time between failures testing.
6. The method according to claim 1, characterized in that Before the configuration of the first configuration information corresponding to each test device is completed, the method further includes: Identify multiple devices that are online; A device that meets a preset condition is selected from the plurality of devices as a test device.
7. A test scenario configuration device, characterized in that: include: A generating module, configured to generate second configuration information corresponding to each test device based on the first configuration information and a configuration file in response to the first configuration information corresponding to each test device being configured; A configuration module is used to configure a test scenario for the test device based on the second configuration information.
8. The device according to claim 7, characterized in that The generating module is specifically used for: Receiving first configuration information corresponding to each test device input by a user in a user operation interface; In response to detecting that the user touches the scene preset control in the user operation interface, determining that the first configuration information corresponding to each test device is configured completely, The first configuration information includes at least one of the following: Project identification; The version of the software to be tested; the type of test; or The screen brightness value corresponding to the battery life test.
9. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 6 are implemented.