Smoking test method and related device
By automatically obtaining, upgrading and executing smoke test cases, the high cost and inefficiency problems caused by manual operations are solved, achieving more efficient and accurate testing.
Patent Information
- Application Number
- CN202510382333.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-04
AI Technical Summary
Existing smoke testing solutions rely on manual operations, resulting in high labor and time costs, and are prone to errors, with low testing efficiency and accuracy.
Provide an automated smoke testing method, by obtaining the firmware package of the software version to be tested, upgrading the equipment to be tested, reading and executing preset test cases, and finally feedback the execution results, the entire process is automated.
Reduces labor and time costs, reduces human errors, and improves testing efficiency and accuracy.
Smart Images

Figure CN120256307A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software testing technology, and in particular to a smoke testing method and related devices. Background Art
[0002] Software testing is to use manual operation or automatic software operation to verify whether the software meets the requirements and find defects, errors and non-compliant behaviors in the software. Smoke testing is to test the basic and core functions of the software program in the early stages of development to determine whether the released software version is stable and reliable. Software testing is a comprehensive and systematic process aimed at ensuring the quality and reliability of software products. Smoke testing, as an important part of it, provides an important reference for subsequent detailed testing by quickly verifying the basic functions and stability of the software.
[0003] The current smoke test solution is based on manual testing by testers, which has high manpower and time costs and is prone to errors, resulting in low test efficiency and accuracy.
[0004] Therefore, how to provide an automated smoke test solution to reduce labor costs and time costs, reduce human errors, and thus improve test efficiency and accuracy has become a technical problem that technical personnel in this field need to solve urgently. Summary of the invention
[0005] In view of the above problems, this application provides a smoke test method and related devices to achieve the purpose of reducing labor costs and time costs, reducing human errors, and thus improving test efficiency and accuracy. The specific plan is as follows:
[0006] The first aspect of the present application provides a smoke test method, comprising:
[0007] Get the firmware package of the software version to be tested;
[0008] Upgrading the firmware package of the software version to be tested on the device to be tested;
[0009] After the firmware package of the software version to be tested is successfully upgraded, according to the name of the target smoke test case corresponding to the smoke test scenario set in the preset test case configuration file, the corresponding target smoke test case is read from the preset test case library;
[0010] Execute each of the target smoke test cases to obtain execution results of each of the smoke test cases;
[0011] Feedback the execution results of each smoke test case to the smoke tester.
[0012] In a possible implementation, the obtaining of the firmware package of the software version to be tested includes:
[0013] Obtain a pre - set firmware package configuration file, where the address of the firmware package of the software version to be tested is included in the firmware package configuration file;
[0014] Parse the firmware package configuration file to obtain the address of the firmware package of the software version to be tested;
[0015] Download the firmware package of the software version to be tested according to the address of the firmware package of the software version to be tested.
[0016] In a possible implementation, the obtaining of the firmware package of the software version to be tested includes:
[0017] Read the email account and email password in the pre - set email configuration file for testing;
[0018] Use the email account and email password to log in to the pre - installed email on the test device;
[0019] Obtain the smoke - testing email for testing in the inbox of the email;
[0020] Parse the smoke - testing email for testing to obtain the address of the firmware package of the software version to be tested;
[0021] Download the firmware package of the software version to be tested according to the address of the firmware package of the software version to be tested.
[0022] In a possible implementation, after upgrading the firmware package of the software version to be tested on the device to be tested, the method further includes:
[0023] Obtain the upgrade result;
[0024] Send the upgrade result to the email of the smoke - testing personnel for testing in the form of an email.
[0025] In a possible implementation, the feedback of the execution results of each of the smoke - testing cases to the smoke - testing personnel for testing includes:
[0026] Send the execution results of each of the smoke - testing cases to the email of the smoke - testing personnel for testing in the form of an email.
[0027] In a possible implementation, the execution of each of the target smoke - testing cases to obtain the execution results of each of the smoke - testing cases includes:
[0028] Read the smoke - testing execution time in the pre - set smoke - testing execution time configuration file;
[0029] At the moment of performing the smoke test, execute each of the target smoke test cases.
[0030] The second aspect of this application provides a smoke test device, including:
[0031] An acquisition unit, configured to acquire a firmware package of the software version to be tested;
[0032] An upgrade unit, configured to upgrade the firmware package of the software version to be tested on the device to be tested;
[0033] A smoke test case reading unit, configured to, after the upgrade of the firmware package of the software version to be tested is successful, read the corresponding target smoke test cases from a preset test case library according to the names of the target smoke test cases corresponding to the smoke test scenarios set in a preset test case configuration file;
[0034] A smoke test case execution unit, configured to execute each of the target smoke test cases to obtain the execution results of each of the smoke test cases;
[0035] A smoke test case execution result feedback unit, configured to feedback the execution results of each of the smoke test cases to the smoke test submitter.
[0036] In a possible implementation, the acquisition unit is specifically configured to:
[0037] Acquire a preset firmware package configuration file, where the firmware package configuration file includes the address of the firmware package of the software version to be tested;
[0038] Parse the firmware package configuration file to obtain the address of the firmware package of the software version to be tested;
[0039] Download the firmware package of the software version to be tested according to the address of the firmware package of the software version to be tested.
[0040] In a possible implementation, the acquisition unit is specifically configured to:
[0041] Read the email account and email password in a preset test submission email configuration file;
[0042] Log in to the email pre-installed on the test device using the email account and email password;
[0043] Acquire the smoke test submission email in the email inbox;
[0044] Parse the smoke test submission email to obtain the address of the firmware package of the software version to be tested;
[0045] Download the firmware package of the software version to be tested according to the address of the firmware package of the software version to be tested.
[0046] In a possible implementation, the device further includes an upgrade result feedback unit;
[0047] The upgrade result feedback unit is specifically configured to obtain an upgrade result after upgrading the firmware package of the software version to be tested on the device to be tested; and send the upgrade result to the email of the person submitting the smoke test in the form of an email.
[0048] In a possible implementation, the smoke test case execution result feedback unit is specifically configured to:
[0049] Send the execution results of each of the smoke test cases to the email of the person submitting the smoke test in the form of an email.
[0050] In a possible implementation, the smoke test case execution unit is specifically configured to:
[0051] Read the smoke test execution time from the pre-set smoke test execution time configuration file;
[0052] Execute each of the target smoke test cases at the smoke test execution time.
[0053] A third aspect of the present application provides a computer program product, including computer-readable instructions, which when running on an electronic device, enable the electronic device to implement the smoke test method according to the first aspect or any implementation manner of the first aspect.
[0054] A fourth aspect of the present application provides an electronic device, including at least one processor and a memory connected to the processor, where:
[0055] The memory is used to store a computer program;
[0056] The processor is used to execute the computer program so that the electronic device can implement the smoke test method according to the first aspect or any implementation manner of the first aspect.
[0057] A fifth aspect of the present application provides a computer-readable storage medium, which carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, can enable the electronic device to implement the smoke test method according to the first aspect or any implementation manner of the first aspect.
[0058] With the above technical solution, for the smoke testing method and related device provided by this application, after obtaining the firmware package of the software version to be tested; first, upgrade the firmware package of the software version to be tested on the device to be tested; after the upgrade of the firmware package of the software version to be tested is successful, according to the name of the target smoke test case corresponding to the smoke test scenario set in the preset test case configuration file, read the corresponding target smoke test case from the preset test case library; and execute each target smoke test case to obtain the execution results of each smoke test case; finally, feedback the execution results of each smoke test case to the smoke test submitter. In this solution, the acquisition of the firmware package of the software version to be tested, the upgrade of the firmware package of the software version to be tested, the reading of the smoke test case, the execution of the smoke test case, and the feedback of the smoke test result are all automatically executed. Therefore, this solution can reduce labor costs and time costs, reduce human errors, and thus improve test efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and the elements and components are not necessarily drawn to scale.
[0060] Figure 1 It is a flowchart of a smoke testing method provided by an embodiment of this application;
[0061] Figure 2 It is a flowchart of a method for obtaining a firmware package of a software version to be tested provided by an embodiment of this application;
[0062] Figure 3 It is a flowchart of another method for obtaining a firmware package of a software version to be tested provided by an embodiment of this application;
[0063] Figure 4 It is a flowchart of a method for executing each target smoke test case to obtain the execution results of each smoke test case provided by an embodiment of this application;
[0064] Figure 5 It is a schematic structural diagram of a smoke testing device provided by an embodiment of this application;
[0065] Figure 6 It is a schematic structural diagram of an electronic device provided by an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0066] The following describes the embodiments of this application with reference to the accompanying drawings in the embodiments of this application. The terms used in the embodiments part of this application are only for explaining the specific embodiments of this application and are not intended to limit this application.
[0067] The embodiments of the present application will be described below with reference to the accompanying drawings. As is known to those of ordinary skill in the art, with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
[0068] Terms such as "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, which is only a way of distinguishing objects with the same attributes when describing the embodiments of the present application. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product or device including a series of units does not have to be limited to those units, but may include other units that are not clearly listed or are inherent to these processes, methods, products or devices.
[0069] Smoke testing is a basic testing method in software testing, used to verify whether the basic functions of the software can work properly. It is usually carried out in the early stage of software development, aiming to quickly check whether the software meets the basic requirements for further testing.
[0070] The main purpose of smoke testing is to verify whether the key functions of the software work properly and to check for serious errors or defects. It does not involve detailed functional testing, but focuses on verifying the stability and usability of the system. Through smoke testing, serious problems existing in the software can be discovered and solved as early as possible, so as to reduce the workload and time cost of subsequent testing.
[0071] The object of smoke testing is each newly compiled software version that needs to be formally tested. Through smoke testing, before the software code is formally compiled and delivered for testing, try to eliminate its surface errors as much as possible to reduce the burden of later testing. The executor of smoke testing is the version compiler.
[0072] Smoke testing is to test the most basic functions of the software version after the development of a new version is completed, to ensure that the basic functions and processes can work. If the test fails, it will be sent back to the development side for re-development. If the test passes, the next step of testing (functional testing, integration testing, system testing, etc.) will be carried out.
[0073] The current smoke testing solution is based on manual testing by testers, which has high labor costs and time costs, and is prone to errors, resulting in low testing efficiency and accuracy.
[0074] To solve the above problems, an embodiment of the present application provides a smoke testing method. In the present application, a tester can pre-write a smoke testing script, which is used to perform a smoke test on the software version to be tested of the device to be tested by the smoke testing method of the present application. The smoke testing script contains multiple instructions, which are used to execute each step in the smoke testing method. In the present application, the test device can be an IFPD (Interactive Flat Panel Displays) product (such as a commercial display large screen), or other electronic devices. The software to be tested can be any software on the device to be tested.
[0075] It should be noted that the smoke testing script can be written in various scripting languages, such as Perl, Python, Ruby, etc. Assuming that the device to be tested is a commercial large screen as an example, the name of the smoke testing script written in the Python scripting language can be "Screen_brush.py". The following will introduce the smoke testing method of the embodiment of the present application in detail with reference to the accompanying drawings.
[0076] Refer to Figure 1 , Figure 1 is a schematic flow chart of a smoke testing method provided by an embodiment of the present application. As Figure 1 shown, a smoke testing method provided by an embodiment of the present application may include the following steps, and these steps will be described in detail below.
[0077] S101: Obtain the firmware package of the software version to be tested;
[0078] In the present application, the firmware package of the software version to be tested can be an OTA (Over The Air) package. In the present application, the acquisition method of the firmware package of the software version to be tested is automatically obtained by the instructions in the smoke testing script, and instructions can be set in the smoke testing script to obtain the firmware package of the software version to be tested.
[0079] S102: Upgrade the firmware package of the software version to be tested on the device to be tested;
[0080] Firmware package upgrade instructions can be preset in the smoke testing script, and the firmware package of the software version to be tested can be upgraded on the device to be tested by using the firmware package upgrade instructions.
[0081] In this application, a preset automated test framework can be used to invoke the upgrade tool to upgrade the firmware package of the software version to be tested on the device to be tested. In a possible implementation, if the system in the device to be tested is a Windows system, the preset automated test framework can be the Artemis test framework, where the Artemis test framework is a python test framework under the local Windows system. In a possible implementation, the upgrade tool can be the software debugging assistant in the device to be tested.
[0082] S103: After the upgrade of the firmware package of the software version to be tested is successful, according to the name of the target smoke test case corresponding to the smoke test scenario set in the preset test case configuration file, read the corresponding target smoke test case from the preset test case library.
[0083] In this application, testers can pre-write smoke test cases and upload them to the test case library, and can also preset the test case configuration file. The smoke test cases should cover the main functions of the software of this version, and the testing focus should be on the core functions to ensure the basic normal operation of the software of this version. The names of the target smoke test cases corresponding to the smoke test scenarios are set in the test case configuration file. After the upgrade of the firmware package of the software version to be tested is successful, the corresponding target smoke test cases can be read from the test case library according to the names of the target smoke test cases in the test case configuration file.
[0084] It should be noted that the format of the test case configuration file can be any format, and can be specifically set based on the scenario requirements. Considering that the YML (YAML Ain't Markup Language) file is a data serialization format commonly used for configuration files, it is data-centered and uses indentation to represent the hierarchical relationship, with the characteristics of being concise and easy to read. Therefore, in a possible implementation, the format of the test case configuration file can be a YML file.
[0085] For ease of understanding, an example of a test case configuration file is given in the embodiment of this application. The format of this test case configuration file is YML, and its name can be config_st_case.yml.
[0086] In this application, a smoke test case reading instruction can be preset in the smoke test script. By using the smoke test case reading instruction, after the upgrade of the firmware package of the software version to be tested is successful, according to the name of the target smoke test case corresponding to the smoke test scenario set in the preset test case configuration file, read the corresponding target smoke test case from the preset test case library.
[0087] S104: Execute each of the target smoke test cases to obtain the execution results of each of the smoke test cases.
[0088] In this application, a test case execution instruction can be preset in the smoke test script, and each of the target smoke test cases can be executed by using this test case execution instruction to obtain the execution results of each of the smoke test cases.
[0089] S105: Feed back the execution results of each of the smoke test cases to the smoke test submitter.
[0090] In this application, a test result return instruction can be preset in the smoke test script, and the execution results of each of the smoke test cases can be fed back to the smoke test submitter by using this test result return instruction.
[0091] Considering that smoke test submitters often send test requests by means of test submission emails. Then, the step of feeding back the execution results of each of the smoke test cases to the smoke test submitter includes: sending the execution results of each of the smoke test cases to the email of the smoke test submitter in the form of an email.
[0092] In this application, a smoke test report email template can be preset, and a smoke test report email can be generated by using the smoke test report email template and the execution results of each of the smoke test cases, and this smoke test report email can be sent to the email of the smoke test submitter.
[0093] It should be noted that the format of the smoke test report email template can be set according to the scenario requirements. Considering that a TPL file refers to a template file, which is a file used to store page layouts, styles, and dynamic content. Then, in this application, the format of the smoke test report email template can be a TPL file, and the smoke test report email template is, for example, report.tpl.
[0094] The smoke testing method provided in this embodiment, after obtaining the firmware package of the software version to be tested; first upgrade the firmware package of the software version to be tested on the device to be tested; after the upgrade of the firmware package of the software version to be tested is successful, according to the name of the target smoke test case corresponding to the smoke test scenario set in the preset test case configuration file, read the corresponding target smoke test case from the preset test case library; and execute each target smoke test case to obtain the execution results of each smoke test case; finally, feedback the execution results of each smoke test case to the smoke test submitter. In this solution, the acquisition of the firmware package of the software version to be tested, the upgrade of the firmware package of the software version to be tested, the reading of the smoke test case, the execution of the smoke test case, and the feedback of the smoke test result are all automatically executed. Therefore, this solution can reduce labor costs and time costs, reduce human errors, and thus improve test efficiency and accuracy. This is particularly important for enterprises that frequently conduct smoke tests.
[0095] As mentioned in the above embodiment, the firmware package of the software version to be tested is automatically obtained. In another embodiment of the present application, the acquisition method of the firmware package of the software version to be tested is introduced in detail.
[0096] In a possible implementation, referring to Figure 2 , Figure 2 is a schematic flowchart of a method for obtaining a firmware package of a software version to be tested provided by an embodiment of the present application. The method may include the following steps:
[0097] S201: Obtain a preset firmware package configuration file, where the firmware package configuration file includes the address of the firmware package of the software version to be tested;
[0098] In the present application, a firmware package configuration file acquisition instruction may be preset in the smoke test script, and the preset firmware package configuration file can be obtained by using this firmware package configuration file acquisition instruction.
[0099] In the present application, the format of the firmware package configuration file can be any format, and it can be specifically set based on the scenario requirements. Considering that the YML (YAML Ain't Markup Language) file is a data serialization format commonly used for configuration files, it is data-centered and uses indentation to represent hierarchical relationships, with the characteristics of being concise and easy to read. Therefore, in a possible implementation, the format of the firmware package configuration file can also be a YML file.
[0100] S202: Parse the firmware package configuration file to obtain the address of the firmware package of the software version to be tested;
[0101] In the present application, the address of the firmware package of the software version to be tested can be the server storage path of the firmware package of the software version to be tested.
[0102] In this application, a firmware package configuration file parsing instruction can be preset in the smoke test script, and the firmware package configuration file can be parsed by using this firmware package configuration file parsing instruction to obtain the address of the firmware package of the software version to be tested.
[0103] S203: Download the firmware package of the software version to be tested according to the address of the firmware package of the software version to be tested.
[0104] In this application, a firmware package download instruction can be preset in the smoke test script, and the firmware package of the software version to be tested can be downloaded according to the address of the firmware package of the software version to be tested by using this firmware package download instruction.
[0105] Considering that the testers for smoke testing often send test requests via test emails. Then, in another possible implementation, referring to Figure 3 , Figure 3 FIG. is a schematic flow chart of another method for obtaining the firmware package of the software version to be tested provided by an embodiment of the present application. This method may include the following steps:
[0106] S301: Read the email account and email password in the preset test email configuration file;
[0107] In this application, in the preset test email configuration file, test email information is configured. The test email information includes at least the email account and the email password. In a possible implementation, it may further include email server information and recipient information. In this regard, the present application does not make any limitations.
[0108] In this application, the format of the test email configuration file can be any format, and it can be specifically set based on the scenario requirements. Considering that the YML (YAML Ain't Markup Language) file is a data serialization format commonly used for configuration files, it is data-centered and uses indentation to represent hierarchical relationships, with the characteristics of being concise and easy to read. Therefore, in a possible implementation, the format of the test email configuration file can also be a YML file.
[0109] For ease of understanding, an embodiment of the present application gives an example of a test email configuration file. The format of this test email configuration file is YML, and its name can be config.yml.
[0110] In this application, a test email configuration file reading instruction can be preset in the smoke test script, and the email account and email password in the preset test email configuration file can be read by using the test email configuration file reading instruction.
[0111] S302: Log in to the mailbox pre-installed on the test device using the mailbox account and password.
[0112] In this application, a mailbox needs to be pre-installed on the test device. This mailbox can be any mailbox that can log in to the mailbox information in the mailbox profile, and can be specifically determined based on the scenario requirements. This application does not make any limitations in this regard.
[0113] In this application, a mailbox login instruction can be preset in the smoke test script, and the mailbox pre-installed on the test device can be logged in using the mailbox login instruction.
[0114] S303: Obtain the smoke test submission email in the mailbox inbox.
[0115] In this application, the smoke test submission email in the mailbox inbox can be the latest smoke test submission email in the mailbox inbox.
[0116] In this application, a smoke test submission email acquisition instruction can be preset in the smoke test script, and the smoke test submission email in the mailbox inbox can be obtained using the smoke test submission email acquisition instruction.
[0117] S304: Parse the smoke test submission email to obtain the address of the firmware package of the software version to be tested.
[0118] In this application, the address of the firmware package of the software version to be tested can be the server storage path of the firmware package of the software version to be tested.
[0119] In this application, a smoke test submission email parsing instruction can be preset in the smoke test script, and the smoke test submission email can be parsed using this smoke test submission email parsing instruction to obtain the address of the firmware package of the software version to be tested.
[0120] S305: Download the firmware package of the software version to be tested according to the address of the firmware package of the software version to be tested.
[0121] In this application, a firmware package download instruction can be preset in the smoke test script, and the firmware package of the software version to be tested can be downloaded according to the address of the firmware package of the software version to be tested using this firmware package download instruction.
[0122] In another embodiment of this application, after upgrading the firmware package of the software version to be tested on the device to be tested, the method further includes: obtaining the upgrade result; sending the upgrade result to the mailbox of the smoke test submitter in the form of an email.
[0123] In this application, an upgrade success email template and an upgrade failure email template can be preset. The upgrade result can indicate success or failure. If the upgrade result indicates success, the upgrade success email template is read, an upgrade success notification email is generated according to the upgrade success email template, and the upgrade success notification email is sent to the email address of the person who submits the smoke test. If the upgrade result indicates failure, the upgrade failure email template is read, an upgrade failure notification email is generated according to the upgrade failure email template, and the upgrade failure notification email is sent to the email address of the person who submits the smoke test.
[0124] It should be noted that the formats of the upgrade success email template and the upgrade failure email template can be set according to the scenario requirements. Considering that the TPL file refers to a template file, which is a file used to store page layouts, styles, and dynamic content. In this application, the formats of the upgrade success email template and the upgrade failure email template can be TPL files. The upgrade success email template is, for example, brush_fail_report.tpl, and the upgrade failure email template is, for example, brush_version_equal_report.tpl.
[0125] In another embodiment of this application, the specific implementation manner of executing each of the target smoke test cases to obtain the execution results of each of the smoke test cases is described.
[0126] Refer to Figure 4 , Figure 4 FIG. is a schematic flowchart of a method for executing each target smoke test case to obtain the execution results of each smoke test case provided by an embodiment of this application. The method may include the following steps:
[0127] S401: Read the smoke test execution time in the preset smoke test execution time configuration file;
[0128] In this application, a smoke test execution time configuration file reading instruction can be preset in the smoke test script, and the smoke test execution time in the preset smoke test execution time configuration file can be read by using this instruction.
[0129] In this application, the format of the smoke test execution time configuration file can be any format, and can be specifically set based on the scenario requirements. Considering that the YML (YAML Ain't Markup Language) file is a data serialization format commonly used for configuration files, it is data-centric and uses indentation to represent hierarchical relationships, and has the characteristics of being concise and easy to read. Therefore, in a possible implementation, the format of the smoke test execution time configuration file can also be a YML file. An example is "timing.pyconfig.yml".
[0130] S402: At the moment of performing the smoke test, execute each of the target smoke test cases;
[0131] In this application, a test case execution instruction is preset in the smoke test script, which can specifically indicate that at the moment of performing the smoke test, each of the target smoke test cases is executed. Using this instruction, each of the target smoke test cases can be executed at the moment of performing the smoke test.
[0132] S403: After each of the target smoke test cases is executed, obtain the execution results of each of the smoke test cases.
[0133] The above introduces a smoke test method provided by an embodiment of this application. Next, a device for executing the above smoke test method will be introduced.
[0134] Please refer to Figure 5 , Figure 5 , which is a schematic structural diagram of a smoke test device provided by an embodiment of this application. As Figure 5 shown, the smoke test device includes:
[0135] An acquisition unit 11, configured to acquire a firmware package of a software version to be tested;
[0136] An upgrade unit 12, configured to upgrade the firmware package of the software version to be tested on the device to be tested;
[0137] A smoke test case reading unit 13, configured to, after the upgrade of the firmware package of the software version to be tested is successful, read corresponding target smoke test cases from a preset test case library according to the names of the target smoke test cases corresponding to the smoke test scenarios set in a preset test case configuration file;
[0138] A smoke test case execution unit 14, configured to execute each of the target smoke test cases to obtain the execution results of each of the smoke test cases;
[0139] A smoke test case execution result feedback unit 15, configured to feedback the execution results of each of the smoke test cases to the smoke test requester.
[0140] In a possible implementation, the acquisition unit is specifically configured to:
[0141] Acquire a preset firmware package configuration file, where the firmware package configuration file includes the address of the firmware package of the software version to be tested;
[0142] Parse the firmware package configuration file to obtain the address of the firmware package of the software version to be tested;
[0143] Download the firmware package of the software version to be tested according to the address of the firmware package of the software version to be tested.
[0144] In a possible implementation, the obtaining unit is specifically configured to:
[0145] Read the email account and email password in the pre-set email configuration file for testing;
[0146] Log in to the pre-installed email on the test device using the email account and email password;
[0147] Obtain the smoke test submission email in the email inbox;
[0148] Parse the smoke test submission email to obtain the address of the firmware package of the software version to be tested;
[0149] Download the firmware package of the software version to be tested according to the address of the firmware package of the software version to be tested.
[0150] In a possible implementation, the device further includes: an upgrade result feedback unit;
[0151] The upgrade result feedback unit is specifically configured to obtain the upgrade result after upgrading the firmware package of the software version to be tested on the device to be tested; and send the upgrade result to the email of the smoke test submission personnel in the form of an email.
[0152] In a possible implementation, the smoke test case execution result feedback unit is specifically configured to:
[0153] Send the execution results of each of the smoke test cases to the email of the smoke test submission personnel in the form of an email.
[0154] In a possible implementation, the smoke test case execution unit is specifically configured to:
[0155] Read the smoke test execution time in the pre-set smoke test execution time configuration file;
[0156] Execute each of the target smoke test cases at the smoke test execution time.
[0157] An electronic device is further provided in an embodiment of the present application. Refer to Figure 6 As shown, it shows a schematic structural diagram of an electronic device suitable for implementing the electronic device in an embodiment of the present application. The electronic device in an embodiment of the present application may include, but is not limited to, fixed terminals such as mobile phones, laptop computers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), desktop computers, and the like. Figure 6 The shown electronic device is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0158] As shown Figure 6 in the figure, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0159] Generally, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 6 an electronic device with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.
[0160] In an embodiment of the present application, there is also provided a computer program product including computer-readable instructions. When the computer-readable instructions run on an electronic device, the electronic device implements any one of the smoke test methods provided in the embodiments of the present application.
[0161] In an embodiment of the present application, there is also provided a computer-readable storage medium. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any one of the smoke test methods provided in the embodiments of the present application.
[0162] In addition, it should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the device embodiments provided in the present application, the connection relationships between the modules indicate that they have communication connections, which may be specifically implemented as one or more communication buses or signal lines.
[0163] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions accomplished by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be various, such as analog circuits, digital circuits, or dedicated circuits, etc. However, for the present application, software program implementation is a better embodiment in more cases. Based on such an understanding, the technical solution of the present application, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disc of a computer, etc., and includes several instructions to enable a computer device (which can be a personal computer, training device, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0164] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.
[0165] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general computer, a dedicated computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, training device, or data center to another website, computer, training device, or data center in a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that a computer can store, or a data storage device such as a training device or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
Claims
1. A smoke testing method, characterized in that, Including: Obtain the firmware package of the software version to be tested; Upgrade the firmware package of the software version to be tested on the device to be tested; After the upgrade of the firmware package of the software version to be tested is successful, according to the name of the target smoke test case corresponding to the smoke test scenario set in the preset test case configuration file, read the corresponding target smoke test case from the preset test case library; Execute each of the target smoke test cases to obtain the execution results of each of the smoke test cases; Feed back the execution results of each of the smoke test cases to the smoke test submitter.
2. The method according to claim 1, wherein The obtaining of the firmware package of the software version to be tested includes: Obtain the preset firmware package configuration file, where the firmware package configuration file includes the address of the firmware package of the software version to be tested; Parse the firmware package configuration file to obtain the address of the firmware package of the software version to be tested; Download the firmware package of the software version to be tested according to the address of the firmware package of the software version to be tested.
3. The method according to claim 1, characterized in that, The obtaining of the firmware package of the software version to be tested includes: Read the email account and email password in the preset test submission email configuration file; Log in to the pre-installed email on the test device using the email account and email password; Obtain the smoke test submission email in the email inbox; Parse the smoke test submission email to obtain the address of the firmware package of the software version to be tested; Download the firmware package of the software version to be tested according to the address of the firmware package of the software version to be tested.
4. The method according to claim 3, wherein After the upgrade of the firmware package of the software version to be tested on the device to be tested, the method further includes: Obtain the upgrade result; Send the upgrade result to the email of the smoke test submitter in the form of an email.
5. The method according to claim 3, wherein The feeding back of the execution results of each of the smoke test cases to the smoke test submitter includes: Send the execution results of each of the smoke test cases to the email of the smoke test submitter in the form of an email.
6. The method according to claim 1, characterized in that, The executing of each of the target smoke test cases to obtain the execution results of each of the smoke test cases includes: Read the smoke test execution time in the preset smoke test execution time configuration file; At the smoke test execution time, execute each of the target smoke test cases; After each of the target smoke test cases is executed, obtain the execution results of each of the smoke test cases.
7. A smoke testing device, characterized in that, Including: An obtaining unit for obtaining the firmware package of the software version to be tested; An upgrade unit for upgrading the firmware package of the software version to be tested on the device to be tested; A smoke test case reading unit for, after the upgrade of the firmware package of the software version to be tested is successful, according to the name of the target smoke test case corresponding to the smoke test scenario set in the preset test case configuration file, read the corresponding target smoke test case from the preset test case library; A smoke test case execution unit for executing each of the target smoke test cases to obtain the execution results of each of the smoke test cases; A smoke test case execution result feedback unit for feeding back the execution results of each of the smoke test cases to the smoke test submitter.
8. A computer program product, characterized in that, Comprising computer-readable instructions which, when run on an electronic device, cause the electronic device to implement the smoke test method according to any one of claims 1 to 6.
9. An electronic device, characterized in that, Comprising at least one processor and a memory connected to the processor, wherein: The memory is used for storing a computer program; The processor is used for executing the computer program so that the electronic device can implement the smoke test method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The storage medium carries one or more computer programs which, when executed by an electronic device, can cause the electronic device to implement the smoke test method according to any one of claims 1 to 6.