CN112579424A - Automatic testing method and testing execution machine - Google Patents

Automatic testing method and testing execution machine Download PDF

Info

Publication number
CN112579424A
CN112579424A CN201910926856.4A CN201910926856A CN112579424A CN 112579424 A CN112579424 A CN 112579424A CN 201910926856 A CN201910926856 A CN 201910926856A CN 112579424 A CN112579424 A CN 112579424A
Authority
CN
China
Prior art keywords
test
state
upgrading
base station
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910926856.4A
Other languages
Chinese (zh)
Inventor
王桂林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Datang Mobile Communications Equipment Co Ltd
Original Assignee
Datang Mobile Communications Equipment Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Datang Mobile Communications Equipment Co Ltd filed Critical Datang Mobile Communications Equipment Co Ltd
Priority to CN201910926856.4A priority Critical patent/CN112579424A/en
Publication of CN112579424A publication Critical patent/CN112579424A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Abstract

The embodiment of the application provides an automatic testing method and a testing execution machine, wherein the method comprises the following steps: receiving a configuration operation for a test instruction, the test instruction including at least: target version information, reserved downloading time and reserved upgrading time; if the current time reaches the reserved downloading time, downloading a target version file from a preset version server according to the target version information; if the current time reaches the reserved upgrading time, initializing a test base station corresponding to the test execution machine, and upgrading the test base station by adopting the target version file; and carrying out automatic test on the upgraded test base station, and recording test result information. According to the embodiment of the application, the base station test is automatically completed through the pre-configured test instruction, and the labor cost is reduced.

Description

Automatic testing method and testing execution machine
Technical Field
The present application relates to the field of automated testing technologies, and in particular, to an automated testing method and a test execution machine.
Background
In order to ensure the accuracy of the upgraded version, the upgraded version needs to be deployed to the base station for testing.
In the prior art, a tester is usually required to manually download an upgrade version package of a pretest from a version server, and then manually deploy the upgrade version package to a test base station for testing; and finally, summarizing and analyzing the test results.
As can be seen from the above process, the existing testing process is labor-intensive.
Disclosure of Invention
In view of the above, the present application is proposed to provide an automated testing method and a test execution machine that solve the above problems or at least partially solve the above problems.
According to a first aspect of the present application, there is provided an automated testing method applied to a test execution machine, including:
receiving a configuration operation for a test instruction, the test instruction including at least: target version information, reserved downloading time and reserved upgrading time;
if the current time reaches the reserved downloading time, downloading a target version file from a preset version server according to the target version information;
if the current time reaches the reserved upgrading time, initializing a test base station corresponding to the test execution machine, and upgrading the test base station by adopting the target version file;
and carrying out automatic test on the upgraded test base station, and recording test result information.
Optionally, the initializing the test base station corresponding to the test execution machine includes:
backing up a target file and emptying a target directory;
starting an automatic test tool and a file transmission tool;
and stopping running the processes contained in the preset invalid process list.
Optionally, the upgrading the test base station by using the target version file includes:
setting a transmission state as a transmission preparation state;
transmitting the target version file to an upgrading directory, and modifying a transmission state into a transmission state;
if the transmission is finished, modifying the transmission state into a transmission finished state, and determining a target upgrading script according to upgrading contents contained in the target version file;
and calling the target upgrading script to upgrade each test base station one by one.
Optionally, before the calling the target upgrade script to upgrade each of the test base stations one by one, the method further includes:
setting an upgrading state as an upgrading preparation state;
deleting the version sub-package file generated in the last upgrading process, and splitting the target version file into a plurality of version sub-package files;
after the target upgrading script is called to upgrade each test base station one by one, the method further comprises the following steps:
after the upgrade is started, modifying the upgrade state into an upgrade-in state;
and after the upgrading is finished, modifying the upgrading state into an upgrading finishing state.
Optionally, after the upgrading the test base station by using the target version file, the method further includes:
acquiring current version information;
if the current version information is consistent with the target version information, comparing the state of each board card of the test base station with the state of a corresponding target board card in a preset configuration file;
and if the state of each board card of the test base station is consistent with the state of the corresponding target board card in the preset configuration file, performing automatic test on the upgraded test base station, and recording test result information.
Optionally, the object file includes: and updating a pre-version file, and after comparing the state of each board card of the test base station with the state of a corresponding target board card in a preset configuration file, the method further comprises the following steps:
and if the state of one board card of the test base station is inconsistent with the state of a corresponding target board card in a preset configuration file, performing exception handling on the board card, or returning the base station through the version file before upgrading.
Optionally, the performing an automated test on the upgraded test base station, and recording test result information, further includes:
setting a test state as a test preparation state;
starting a terminal control tool, and determining whether a test terminal in the cell range of the base station exists according to the terminal control tool;
if yes, automatically testing the upgraded test base station, and modifying the test state into a test state;
in the process of the automatic test, test result information is extracted from a preset test log according to a preset time period, wherein the test result information comprises: at least one of test case information, case execution results, failure reasons, case operation time and channel parameters;
and after the automatic test is finished, setting the test state as a test finished state.
Optionally, after the automated testing is performed on the upgraded test base station and the test result information is recorded, the method further includes:
summarizing the test result information to obtain summary information and writing the summary information into a result summary file, wherein the summary information comprises: at least one of the number of test cases, the number of failures, the reasons of the failures, the number of successes, the running time of the cases and the access time of the terminal;
and sending the result summary file to a target account.
According to a second aspect of the present application, there is provided a test handler comprising:
a test instruction configuration module, configured to receive a configuration operation for a test instruction, where the test instruction at least includes: target version information, reserved downloading time and reserved upgrading time;
the target version file downloading module is used for downloading a target version file from a preset version server according to the target version information if the current time reaches the reserved downloading time;
the upgrading module is used for initializing the test base station corresponding to the test execution machine if the current time reaches the reserved upgrading time and upgrading the test base station by adopting the target version file;
and the test module is used for carrying out automatic test on the upgraded test base station and recording test result information.
Optionally, the upgrade module includes:
the directory preparation submodule is used for backing up the target file and emptying the target directory;
the tool preparation submodule is used for starting an automatic testing tool and a file transmission tool;
and the process stopping submodule is used for stopping running the processes contained in the preset invalid process list.
Optionally, the upgrade module includes:
a transmission state setting submodule for setting a transmission state as a transmission preparation state;
the transmission submodule is used for transmitting the target version file to an upgrade directory and modifying a transmission state into a transmission state;
the target upgrading script determining submodule is used for modifying the transmission state into a transmission end state if the transmission is ended, and determining a target upgrading script according to upgrading contents contained in the target version file;
and the upgrading submodule is used for calling the target upgrading script to upgrade each test base station one by one.
Optionally, before the upgrading the sub-module, the upgrading module further includes:
the upgrading state setting submodule is used for setting the upgrading state as an upgrading preparation state;
the sub-package processing sub-module is used for deleting the version sub-package file generated in the last upgrading process and splitting the target version file into a plurality of version sub-package files;
after the upgrading the sub-module, the upgrading module further includes:
the first upgrading state modification submodule is used for modifying the upgrading state into an upgrading state after the upgrading starts;
and the second upgrading state modification submodule is used for modifying the upgrading state into an upgrading end state after the upgrading is finished.
Optionally, after upgrading the module, the test execution machine further includes:
the current version information acquisition module is used for acquiring current version information;
the board card detection module is used for comparing the state of each board card of the test base station with the state of a corresponding target board card in a preset configuration file if the current version information is consistent with the target version information;
and the automatic test entering module is used for entering the steps of carrying out automatic test on the upgraded test base station and recording test result information if the state of each board card of the test base station is consistent with the state of the corresponding target board card in the preset configuration file.
Optionally, the object file includes: version file before upgrading, behind the integrated circuit board detection module, the test executor still includes:
and the exception or rollback module is used for performing exception processing on one board card of the test base station or rollback the base station through the version file before upgrading if the state of the board card is inconsistent with the state of a corresponding target board card in a preset configuration file.
Optionally, the test module includes:
the test state setting submodule is used for setting the test state as a test preparation state;
the test terminal determining submodule is used for starting a terminal control tool and determining whether a test terminal in the cell range of the base station exists or not according to the terminal control tool;
the test submodule is used for carrying out automatic test on the upgraded test base station and modifying the test state into a test state if the test submodule exists;
the log extraction submodule is used for extracting test result information from a preset test log according to a preset time period in the automatic test process, and the test result information comprises: at least one of test case information, case execution results, failure reasons, case operation time and channel parameters;
and the test ending submodule is used for setting the test state as a test ending state after the automatic test is ended.
Optionally, after the testing module, the test execution machine further includes:
and the result summarizing module is used for summarizing the test result information to obtain summarizing information and writing the summarizing information into a result summarizing file, wherein the summarizing information comprises: at least one of the number of test cases, the number of failures, the reasons of the failures, the number of successes, the running time of the cases and the access time of the terminal;
and the summary file sending module is used for sending the result summary file to the target account.
The embodiment of the application has the following advantages:
according to the automated testing method and the testing executive machine of the embodiment of the application, the configuration operation aiming at the testing instruction can be received, and the testing instruction at least comprises the following steps: target version information, reserved downloading time and reserved upgrading time; if the current time reaches the reserved downloading time, downloading a target version file from a preset version server according to the target version information; if the current time reaches the reserved upgrading time, initializing a test base station corresponding to the test execution machine, and upgrading the test base station by adopting the target version file; and carrying out automatic test on the upgraded test base station, and recording test result information. According to the embodiment of the application, the base station test is automatically completed through the pre-configured test instruction, so that the labor cost is reduced.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart illustrating the steps of an embodiment one of an automated testing method according to the present application;
FIG. 2 is a flow chart illustrating steps for initializing a test base station according to the present application;
FIG. 3 is a flow chart illustrating steps for upgrading a test base station according to the present application;
FIG. 4 is a flow chart illustrating steps for upgrading a test base station according to another embodiment of the present disclosure;
FIG. 5 is a flowchart illustrating steps for board status determination after upgrading a test base according to the present application;
FIG. 6 is a flow chart illustrating steps for testing a test base station according to the present application;
FIG. 7 is a flowchart illustrating a process for aggregating test result information according to the present application;
FIG. 8 is a block diagram illustrating a second embodiment of a test handler according to the present application;
FIG. 9 illustrates a block diagram of a test base station initialization according to the present application;
FIG. 10 illustrates a block diagram of an upgrade to a test base station according to the present application;
FIG. 11 is a block diagram illustrating another module for upgrading a test base station according to the present application;
FIG. 12 is a block diagram illustrating board status determination after upgrading a test base station according to the present application;
FIG. 13 illustrates a block diagram of a test for a test base station according to the present application;
FIG. 14 illustrates a block diagram of a module for summarizing test result information according to the present application;
fig. 15 shows a schematic structural diagram of a test system of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Example one
Referring to fig. 1, a flowchart illustrating steps of a first embodiment of an automated testing method according to the present application is shown, which may specifically include the following steps:
step 101, receiving a configuration operation for a test instruction, where the test instruction at least includes: target version information, reserved downloading time and reserved upgrading time.
The embodiment of the present application may be applied to software testing of a base station, as shown in fig. 15, a testing system of the present application includes: the version server, the test execution machine, the test base station, a test execution machine can correspond to one or more test base stations, one or more version servers, wherein, the version server is used for storing the version file, and the test execution machine is used for executing the test step of testing the target version file on the test base station, including but not limited to: downloading a target version file from a version server, deploying the target version file to a test base station, executing an automatic test on the test base station, and recording, summarizing, sending and the like test results; the test base station is a base station for a test version. Embodiments of the present disclosure are described in detail later from the test executor side.
In the embodiment of the application, a tester can set target version information, reserved downloading time and reserved upgrading time on a test execution machine in advance. The target version information may be a version number or a path of a target version File, for example, if the version server is an FTP (File Transfer Protocol) server, the target version path may be directly input in a test setting interface provided by the test execution machine; if the version server is a web server, the version number can be directly input in the test setting interface. In addition, the test execution machine can also set the download reservation time and upgrade reservation time in the test setting interface, which are respectively used for controlling the time for downloading and testing the target version file, and the time can be set as non-working time, so that the working time of the tester is saved.
And 102, if the current time reaches the reserved downloading time, downloading a target version file from a preset version server according to the target version information.
In practical application, if the target version information is a target version number, traversing each version from a preset version server according to the target version number, and downloading a version file corresponding to the target version number to obtain a target version file; and if the target version information is the target version path, downloading the corresponding version file from the target version path to obtain the target version file.
Specifically, a directory for storing the target version file may be set on the test execution machine as the first directory in advance, the target version file may be cleaned after the target version file is deployed to the test base station or the test on the target version file is completed, or the file in the first directory may be periodically cleaned.
Step 103, if the current time reaches the reserved upgrading time, initializing the test base station corresponding to the test execution machine, and upgrading the test base station by adopting the target version file.
The initialization of the test base station may include, but is not limited to: and cleaning files which can affect the test result in the test base station, or starting required tools and cleaning unnecessary tools.
The upgrading of the test base station is to deploy the target version file to the test base station, and the target version file can be a software package with a software function or a system software package of the test base station, so that the new version software is installed to the test base station to test whether the new version software operates normally.
In the embodiment of the present application, if the test Base station includes a Remote Radio Unit (RRU) and a Base Band Unit (BBU), the software package may include a software package for the RRU so as to only upgrade the RRU, or may include a software package for the BBU so as to only upgrade the BBU, or may include software packages for the RRU and the BBU at the same time, so that the RRU and the BBU need to be upgraded at the same time.
And 104, carrying out automatic test on the upgraded test base station, and recording test result information.
Specifically, a pre-programmed automatic test case can be called to perform automatic test on the test base station, and the test case can have a log recording function, so as to record test result information.
The test case can be written for the basic function of the test base station so as to determine whether the basic function of the test base station is normal after upgrading, and can also be written for a certain special software function so as to only test whether the function is normal.
Optionally, in another embodiment of the present application, referring to fig. 2, the initializing a test base station corresponding to the test execution machine includes sub-steps 10301 to 10303:
substep 10301 backs up the target file and clears the target directory.
The target file may be any file that needs to be backed up, including but not limited to: version files before upgrade and log files.
The target directory may be a directory used in the upgrading process, so as to ensure normal operation of the upgrading, and the target directory may store a temporary file or a log file in the upgrading process.
In practical application, after a target file to be backed up is backed up to a specified backup directory (for example, a version backup directory and a log backup directory), all files in the target directory are deleted, so that other files except the file to be backed up can be emptied, and the smooth progress of the upgrade can be ensured.
Substep 10302, the automated test tool and the file transfer tool are initiated.
The automatic test tool is used for calling an automatic test case for testing, and the file transfer tool is used for transferring files from one directory to another directory, for example, transferring target version files from a first directory in step 102 to a second directory for upgrading.
Sub-step 10303, stops running the processes contained in the preset invalid process list.
The invalid process list comprises a process list which is not needed by an automatic test tool and a file transmission tool.
The embodiment of the application can stop the invalid process, thereby reducing the occupation of the invalid process on the memory and being beneficial to improving the upgrading and testing speed.
Optionally, in another embodiment of the present application, referring to fig. 3, the upgrading the test base station using the target version file includes sub-steps 10304 to 10307:
a substep 10304 of setting the transmission state to a transmission ready state.
Wherein the transmission state is used for indicating the state of transmitting the target version file from the upgrading directory, and comprises the following steps: a transmission ready state, a transmission in-progress state, and a transmission end state.
Specifically, the transmission state may be named variable Transfer _ state, so that setting the transmission state to the transmission preparation state may be: the Transfer _ state is "0" or "ready", and the transmission state may be set to be the in-transmission state: the Transfer _ state is "1" or "transferring", and the setting of the Transfer state as the Transfer end state may be: transfer _ state is "2" or "Transfer _ over".
And a substep 10305 of transmitting the target version file to an upgrade directory and modifying a transmission state into a transmission state.
Specifically, the opened file transfer tool can be called to realize transmission, and the time can be saved by opening the file transfer tool in advance.
And a substep 10306, if the transmission is finished, modifying the transmission state to be a transmission finished state, and determining a target upgrading script according to the upgrading content contained in the target version file.
The file transfer tool may send a message at the end of the transfer so that the test handler can determine the end of the transfer.
Specifically, determining a target upgrade script according to upgrade content contained in the target version file includes: if the upgrade content only comprises an upgrade package aiming at the RRU, calling a target upgrade script aiming at the RRU upgrade; if the upgrading content only comprises an upgrading packet aiming at the BBU, calling a target upgrading script aiming at the BBU upgrading; and if the upgrading content comprises an upgrading packet aiming at the RRU and the BBU, calling a target upgrading script aiming at the RRU and the BBU for upgrading.
And a substep 10307 of calling the target upgrade script to upgrade each of the test base stations one by one.
Specifically, before upgrading, it is first necessary to determine that the test execution machine corresponds to several test base stations, and if there are a plurality of test execution machines, modify the IP address in the target upgrade script to the IP address of the test base station, and run the target upgrade script to upgrade the test base station; and then modifying the IP address in the target upgrading script as the IP address of the next test base station to upgrade the next test base station, and repeating the steps until all the test base stations are upgraded.
Optionally, in another embodiment of the present application, referring to fig. 4, before the sub-step 10307, sub-steps 10308 to 10309 are further included:
substep 10308 of setting the upgrade state to an upgrade ready state;
wherein, the upgrading state is used for indicating the state in the upgrading process, and comprises the following steps: an upgrade preparation state, an upgrade middle state, and an upgrade end state.
Specifically, the Upgrade status may be named as a variable Upgrade _ state, so that setting the Upgrade status to the Upgrade preparation status may be: when Upgrade _ state is "0" or "ready", the setting of the Upgrade state to the in-Upgrade state may be: the Upgrade _ state is "1" or "Upgrading", and the setting of the Upgrade state as the Upgrade end state may be: update _ state is "2" or "update _ over".
Substep 10309, deleting the version subcontract file generated in the last upgrading process, and splitting the target version file into a plurality of version subcontract files;
in the embodiment of the application, the target version file can be firstly subpackaged according to the functions or the characteristics to obtain a plurality of version subpackage files, so that the parallel upgrading can be realized, the multithreading of different functions or characteristics can be upgraded simultaneously, and the upgrading speed can be improved.
After the sub-step 10307, sub-steps 10310 to 10311 are further included:
a substep 10310, modifying the upgrade state to an upgrade in-progress state after the upgrade is started;
and a substep 10311, modifying the upgrade status to an upgrade end status after the upgrade is ended.
The substeps 10310 to 10311 may refer to the detailed description in step 10308, and are not described herein again.
Optionally, in another embodiment of the present application, referring to fig. 5, after the step 103, steps 105 to 107 are further included:
105, acquiring current version information;
it is understood that obtaining the current version information after upgrading results in upgraded version information, such as upgraded version number, or version size, version description.
Step 106, if the current version information is consistent with the target version information, comparing the state of each board card of the test base station with the state of a corresponding target board card in a preset configuration file;
it can be understood that if all the current version information is consistent with the target version information, the upgrade is successful; and if at least one piece of current version information is inconsistent with the target version information, representing that the upgrading fails.
The target board card state is a normal state, a configuration file can be obtained through pre-configuration, each board card is configured with the target board card state in the configuration file, and the index value can be a slot position of the board card.
And 107, if the state of each board card of the test base station is consistent with the state of the corresponding target board card in the preset configuration file, performing automatic test on the upgraded test base station, and recording test result information.
Specifically, since it takes time for the board card to recover to the normal state after the upgrade, it can be determined whether the board card of the test base station recovers to the normal state after a preset time period, for example, five minutes later.
The embodiment of the application can determine whether the state of the board card is normal after the upgrade is successful, and avoid the following situations: if the upgrade fails, the test base station is still the version before the upgrade, and the board cards of the test base station are all in a normal state, and at the moment, the object of the automatic test is the version before the upgrade, so that the test is wrong.
Optionally, in another embodiment of the present application, referring to fig. 5, the object file includes: updating the previous version file, and after the step 106, further comprising the step 108:
and 108, if the state of one board card of the test base station is inconsistent with the state of a corresponding target board card in a preset configuration file, performing exception handling on the board card, or backing up the base station through the version file before upgrading.
Specifically, exception handling may be prioritized, and rollback may be performed if exception handling is not possible.
Optionally, in another embodiment of the present application, referring to fig. 6, the step 104 includes sub-steps 10401 to 10405:
and a substep 10401 of setting the test state to a test ready state.
Wherein, the test state is used for indicating the state in the test process, including: test preparation state, test in-progress state, and test end state.
Specifically, the Test state may be named variable Test _ state, so that setting the Test state to the Test ready state may be: when the Test _ state is "0" or "ready", the setting of the Test state as the in-Test state may be: when the Test _ state is "1" or "Testing", the setting of the Test state as the Test end state may be: the Test _ state is "2" or "Test _ over".
Sub-step 10402, starting a terminal control tool, and determining whether there is a test terminal in the cell range of the base station according to the terminal control tool.
The terminal control tool can determine the current position of the mobile terminal, so as to determine which base station cell range the terminal is located in, and judge whether the test terminal is started or not.
And a substep 10403, if yes, performing an automated test on the upgraded test base station, and modifying the test state to a test state.
It can be understood that if there is no test terminal in the cell range of the test base station, a dead cycle may occur, and it is always determined whether there is a test interruption in the cell range of the test base station, or if there is no test terminal in the cell range of the test base station after a plurality of cycles, an error message may also be prompted.
Substep 10404, in the process of the automated testing, extracting test result information from a preset test log according to a preset time period, where the test result information includes: at least one of test case information, case execution results, failure reasons, case operation time and channel parameters;
the test case information may include, but is not limited to: the name of the use case, description information of the function of the use case, and the like.
The use case execution results include, but are not limited to: and whether the use case is executed or not, and if the use case is executed, the execution is successful or failed.
The channel parameters may include, but are not limited to: channel interference parameters, channel quality parameters, modulation orders.
The embodiment of the application can periodically output the test result information, so that the test result information can be obtained in real time, and the time consumption of statistics after the test is finished is reduced.
Substep 10405, after the automated testing is finished, setting the testing state to a testing finished state.
This step can refer to the detailed description of sub-step 10401, which is not described herein.
Optionally, in another embodiment of the present application, referring to fig. 7, after step 104, the method further includes steps 109 to 110:
step 109, summarizing the test result information to obtain summary information, and writing the summary information into a result summary file, wherein the summary information includes: at least one of the number of test cases, the number of failures, the reasons for the failures, the number of successes, the running time of the cases and the access time of the terminal.
The number of the test cases is the total number of the cases in the test result information, the number of failures is the number of the cases with failed case execution results, the failure reason is only for the failed cases, and can be the failure reason after classification, the number of the successes is the number of the cases with successful case execution results, the case operation duration can be the operation duration of each case, and can also be the average operation duration, and the terminal access duration can be the duration of accessing the terminal to the test base station, and can be used for analyzing the terminal access difficulty degree.
And step 110, sending the result summary file to a target account.
Among them, the target account includes but is not limited to: a target mailbox account, a target application account, a target terminal account, which may be an account designated by the tester.
The embodiment of the application can send the result summary file to the account designated by the tester, so that the tester can check the result conveniently, and the test result is analyzed.
In an embodiment of the present application, a configuration operation for a test instruction may be received, where the test instruction at least includes: target version information, reserved downloading time and reserved upgrading time; if the current time reaches the reserved downloading time, downloading a target version file from a preset version server according to the target version information; if the current time reaches the reserved upgrading time, initializing a test base station corresponding to the test execution machine, and upgrading the test base station by adopting the target version file; and carrying out automatic test on the upgraded test base station, and recording test result information. According to the embodiment of the application, the base station test is automatically completed through the pre-configured test instruction, so that the labor cost is reduced.
In addition, upgrading or downloading can be carried out by using non-working time, so that the working time is saved; a series of initializations can be carried out on the test execution machine to ensure the smooth progress of upgrading; the invalid process can be stopped, so that the occupation of the invalid process on the memory can be reduced, and the upgrading and testing speed can be improved; the opened file transmission tool can be called to realize transmission, and the time can be saved by opening the file transmission tool in advance; the parallel upgrading can be realized, and the multithreading of different functions or characteristics can be upgraded simultaneously, thereby being beneficial to improving the upgrading speed; whether the state of the board card is normal can be determined after the upgrade is successful, and the following situations are avoided: if the upgrade fails, the test base station is still the version before the upgrade, and the board cards of the test base station are all in a normal state, at the moment, the object of the automatic test is the version before the upgrade, so that the test is wrong; test result information can be periodically output, so that the test result information can be obtained in real time, and the time consumption of statistics after the test is finished is reduced; the result summary file can be sent to the account designated by the tester, so that the tester can check the result conveniently, and the test result is analyzed.
Example two
Referring to fig. 8, a structural block diagram of a second embodiment of a test execution machine according to the present application is shown, which may specifically include the following modules:
a test instruction configuration module 201, configured to receive a configuration operation for a test instruction, where the test instruction at least includes: target version information, reserved downloading time and reserved upgrading time.
And the target version file downloading module 202 is configured to, if the current time reaches the reserved downloading time, download the target version file from a preset version server according to the target version information.
And the upgrading module 203 is configured to initialize the test base station corresponding to the test execution machine if the current time reaches the upgrade reservation time, and upgrade the test base station by using the target version file.
The test module 204 is configured to perform an automated test on the upgraded test base station, and record test result information.
Optionally, in another embodiment of the present application, referring to fig. 9, the upgrade module 203 includes:
the directory preparation sub-module 20301 is configured to backup the target file and empty the target directory.
Tool preparation submodule 20302 is used to launch the automated test tool and the file transfer tool.
The process stopping submodule 20303 is configured to stop running the process included in the preset invalid process list.
Optionally, in another embodiment of the present application, referring to fig. 10, the upgrade module 203 includes:
the transmission state setting sub-module 20304 is configured to set the transmission state to a transmission ready state.
The transmission sub-module 20305 is configured to transmit the target version file to the upgrade directory, and modify the transmission state into a transmission state.
The target upgrade script determining submodule 20306 is configured to, if transmission is finished, modify the transmission state to a transmission finished state, and determine a target upgrade script according to upgrade content included in the target version file.
The upgrade submodule 20307 is configured to invoke the target upgrade script to upgrade each test base station one by one.
Optionally, in another embodiment of the present application, referring to fig. 11, before the upgrading sub-module 20307, the upgrading module 203 further includes:
an upgrade state setting sub-module 20308 for setting an upgrade state as an upgrade preparation state;
the sub-package processing sub-module 20309 is configured to delete the version sub-package file generated in the last upgrade process, and split the target version file into multiple version sub-package files;
after the upgrade submodule 20307, the upgrade module 203 further includes:
a first upgrade state modification sub-module 20310 configured to, after the upgrade starts, modify the upgrade state into an upgrade-in state;
a second upgrade state modification sub-module 20311, configured to modify the upgrade state into an upgrade end state after the upgrade is ended.
Optionally, in another embodiment of the present application, referring to fig. 12, after the upgrading module 203, the test execution machine further includes:
a current version information obtaining module 205, configured to obtain current version information;
the board detection module 206 is configured to compare a state of each board of the test base station with a state of a corresponding target board in a preset configuration file if the current version information is consistent with the target version information;
an automatic test entering module 207, configured to enter the step of performing an automatic test on the upgraded test base station and recording test result information if the state of each board card of the test base station is consistent with the state of a corresponding target board card in a preset configuration file.
Optionally, in another embodiment of the present application, referring to fig. 12, the object file includes: the version file before upgrading, after the board detection module 206, the test execution machine further includes:
an exception or rollback module 208, configured to, if a state of one board of the test base station is inconsistent with a state of a corresponding target board in a preset configuration file, perform exception handling on the board, or rollback the base station through the version file before upgrade.
Optionally, in another embodiment of the present application, referring to fig. 13, the test module 204 includes:
a test state setting submodule 2041 for setting a test state to a test preparation state;
the test terminal determining submodule 2042 is configured to start a terminal control tool, and determine whether a test terminal in a cell range of the base station exists according to the terminal control tool;
the test submodule 2043 is configured to, if the test submodule exists, perform an automated test on the upgraded test base station, and modify the test state to a state under test;
the log extracting submodule 2044 is configured to extract test result information from a preset test log according to a preset time period in the automatic test process, where the test result information includes: at least one of test case information, case execution results, failure reasons, case operation time and channel parameters;
and the end-of-test submodule 2045 is configured to set the test state to be a test end state after the automated test is ended.
Optionally, in another embodiment of the present application, referring to fig. 14, after the testing module 204, the test execution machine further includes:
a result summarizing module 209, configured to summarize the test result information to obtain summarized information, and write the summarized information into a result summarizing file, where the summarized information includes: at least one of the number of test cases, the number of failures, the reasons of the failures, the number of successes, the running time of the cases and the access time of the terminal;
and a summary file sending module 210, configured to send the result summary file to the target account.
In an embodiment of the present application, a configuration operation for a test instruction may be received, where the test instruction at least includes: target version information, reserved downloading time and reserved upgrading time; if the current time reaches the reserved downloading time, downloading a target version file from a preset version server according to the target version information; if the current time reaches the reserved upgrading time, initializing a test base station corresponding to the test execution machine, and upgrading the test base station by adopting the target version file; and carrying out automatic test on the upgraded test base station, and recording test result information. According to the embodiment of the application, the base station test is automatically completed through the pre-configured test instruction, so that the labor cost is reduced.
In addition, upgrading or downloading can be carried out by using non-working time, so that the working time is saved; a series of initializations can be carried out on the test execution machine to ensure the smooth progress of upgrading; the invalid process can be stopped, so that the occupation of the invalid process on the memory can be reduced, and the upgrading and testing speed can be improved; the opened file transmission tool can be called to realize transmission, and the time can be saved by opening the file transmission tool in advance; the parallel upgrading can be realized, and the multithreading of different functions or characteristics can be upgraded simultaneously, thereby being beneficial to improving the upgrading speed; whether the state of the board card is normal can be determined after the upgrade is successful, and the following situations are avoided: if the upgrade fails, the test base station is still the version before the upgrade, and the board cards of the test base station are all in a normal state, at the moment, the object of the automatic test is the version before the upgrade, so that the test is wrong; test result information can be periodically output, so that the test result information can be obtained in real time, and the time consumption of statistics after the test is finished is reduced; the result summary file can be sent to the account designated by the tester, so that the tester can check the result conveniently, and the test result is analyzed.
For the base station embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for relevant points, refer to the partial description of the method embodiment.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with this teaching. The required structure for constructing such a system will be apparent from the description above. In addition, this application is not directed to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the present application as described herein, and any descriptions of specific languages are provided above to disclose the best modes of the present application.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the application, various features of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the application and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: this application is intended to cover such departures from the present disclosure as come within known or customary practice in the art to which this invention pertains. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this application.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the application and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in an automated test equipment according to embodiments of the present application. The present application may also be embodied as apparatus or base station programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present application may be stored on a computer readable medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claim enumerating several base stations, several of these base stations may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (16)

1. An automatic test method is applied to a test execution machine and is characterized by comprising the following steps:
receiving a configuration operation for a test instruction, the test instruction including at least: target version information, reserved downloading time and reserved upgrading time;
if the current time reaches the reserved downloading time, downloading a target version file from a preset version server according to the target version information;
if the current time reaches the reserved upgrading time, initializing a test base station corresponding to the test execution machine, and upgrading the test base station by adopting the target version file;
and carrying out automatic test on the upgraded test base station, and recording test result information.
2. The method of claim 1, wherein initializing the test base station corresponding to the test execution machine comprises:
backing up a target file and emptying a target directory;
starting an automatic test tool and a file transmission tool;
and stopping running the processes contained in the preset invalid process list.
3. The method of claim 2, wherein the upgrading the test base station using the target version file comprises:
setting a transmission state as a transmission preparation state;
transmitting the target version file to an upgrading directory, and modifying a transmission state into a transmission state;
if the transmission is finished, modifying the transmission state into a transmission finished state, and determining a target upgrading script according to upgrading contents contained in the target version file;
and calling the target upgrading script to upgrade each test base station one by one.
4. The method of claim 3, wherein before invoking the target upgrade script to upgrade each of the test base stations one by one, the method further comprises:
setting an upgrading state as an upgrading preparation state;
deleting the version sub-package file generated in the last upgrading process, and splitting the target version file into a plurality of version sub-package files;
after the target upgrading script is called to upgrade each test base station one by one, the method further comprises the following steps:
after the upgrade is started, modifying the upgrade state into an upgrade-in state;
and after the upgrading is finished, modifying the upgrading state into an upgrading finishing state.
5. The method according to any one of claims 1 to 4, wherein after the upgrading the test base station using the target version file, further comprising:
acquiring current version information;
if the current version information is consistent with the target version information, comparing the state of each board card of the test base station with the state of a corresponding target board card in a preset configuration file;
and if the state of each board card of the test base station is consistent with the state of the corresponding target board card in the preset configuration file, performing automatic test on the upgraded test base station, and recording test result information.
6. The method of claim 5, wherein the target file comprises: and updating a pre-version file, and after comparing the state of each board card of the test base station with the state of a corresponding target board card in a preset configuration file, the method further comprises the following steps:
and if the state of one board card of the test base station is inconsistent with the state of a corresponding target board card in a preset configuration file, performing exception handling on the board card, or returning the base station through the version file before upgrading.
7. The method of claim 6, wherein the performing automated testing on the upgraded test base station and recording test result information further comprises:
setting a test state as a test preparation state;
starting a terminal control tool, and determining whether a test terminal in the cell range of the base station exists according to the terminal control tool;
if yes, automatically testing the upgraded test base station, and modifying the test state into a test state;
in the process of the automatic test, test result information is extracted from a preset test log according to a preset time period, wherein the test result information comprises: at least one of test case information, case execution results, failure reasons, case operation time and channel parameters;
and after the automatic test is finished, setting the test state as a test finished state.
8. The method of claim 7, wherein after the automated testing of the test base station after the upgrading and recording of test result information, the method further comprises:
summarizing the test result information to obtain summary information and writing the summary information into a result summary file, wherein the summary information comprises: at least one of the number of test cases, the number of failures, the reasons of the failures, the number of successes, the running time of the cases and the access time of the terminal;
and sending the result summary file to a target account.
9. A test engine, comprising:
a test instruction configuration module, configured to receive a configuration operation for a test instruction, where the test instruction at least includes: target version information, reserved downloading time and reserved upgrading time;
the target version file downloading module is used for downloading a target version file from a preset version server according to the target version information if the current time reaches the reserved downloading time;
the upgrading module is used for initializing the test base station corresponding to the test execution machine if the current time reaches the reserved upgrading time and upgrading the test base station by adopting the target version file;
and the test module is used for carrying out automatic test on the upgraded test base station and recording test result information.
10. The test engine of claim 9, wherein the upgrade module comprises:
the directory preparation submodule is used for backing up the target file and emptying the target directory;
the tool preparation submodule is used for starting an automatic testing tool and a file transmission tool;
and the process stopping submodule is used for stopping running the processes contained in the preset invalid process list.
11. The test engine of claim 10, wherein the upgrade module comprises:
a transmission state setting submodule for setting a transmission state as a transmission preparation state;
the transmission submodule is used for transmitting the target version file to an upgrade directory and modifying a transmission state into a transmission state;
the target upgrading script determining submodule is used for modifying the transmission state into a transmission end state if the transmission is ended, and determining a target upgrading script according to upgrading contents contained in the target version file;
and the upgrading submodule is used for calling the target upgrading script to upgrade each test base station one by one.
12. The test engine of claim 11, wherein the upgrade sub-module is preceded by the upgrade module, further comprising:
the upgrading state setting submodule is used for setting the upgrading state as an upgrading preparation state;
the sub-package processing sub-module is used for deleting the version sub-package file generated in the last upgrading process and splitting the target version file into a plurality of version sub-package files;
after the upgrading the sub-module, the upgrading module further includes:
the first upgrading state modification submodule is used for modifying the upgrading state into an upgrading state after the upgrading starts;
and the second upgrading state modification submodule is used for modifying the upgrading state into an upgrading end state after the upgrading is finished.
13. The test engine of any of claims 9 to 12, the upgrade module being followed by the test engine further comprising:
the current version information acquisition module is used for acquiring current version information;
the board card detection module is used for comparing the state of each board card of the test base station with the state of a corresponding target board card in a preset configuration file if the current version information is consistent with the target version information;
and the automatic test entering module is used for entering the steps of carrying out automatic test on the upgraded test base station and recording test result information if the state of each board card of the test base station is consistent with the state of the corresponding target board card in the preset configuration file.
14. The test engine of claim 13, wherein the object file comprises: version file before upgrading, behind the integrated circuit board detection module, the test executor still includes:
and the exception or rollback module is used for performing exception processing on one board card of the test base station or rollback the base station through the version file before upgrading if the state of the board card is inconsistent with the state of a corresponding target board card in a preset configuration file.
15. The test engine of claim 14, wherein the test module comprises:
the test state setting submodule is used for setting the test state as a test preparation state;
the test terminal determining submodule is used for starting a terminal control tool and determining whether a test terminal in the cell range of the base station exists or not according to the terminal control tool;
the test submodule is used for carrying out automatic test on the upgraded test base station and modifying the test state into a test state if the test submodule exists;
the log extraction submodule is used for extracting test result information from a preset test log according to a preset time period in the automatic test process, and the test result information comprises: at least one of test case information, case execution results, failure reasons, case operation time and channel parameters;
and the test ending submodule is used for setting the test state as a test ending state after the automatic test is ended.
16. The test engine of claim 15, wherein after the test module, the test engine further comprises:
and the result summarizing module is used for summarizing the test result information to obtain summarizing information and writing the summarizing information into a result summarizing file, wherein the summarizing information comprises: at least one of the number of test cases, the number of failures, the reasons of the failures, the number of successes, the running time of the cases and the access time of the terminal;
and the summary file sending module is used for sending the result summary file to the target account.
CN201910926856.4A 2019-09-27 2019-09-27 Automatic testing method and testing execution machine Pending CN112579424A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910926856.4A CN112579424A (en) 2019-09-27 2019-09-27 Automatic testing method and testing execution machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910926856.4A CN112579424A (en) 2019-09-27 2019-09-27 Automatic testing method and testing execution machine

Publications (1)

Publication Number Publication Date
CN112579424A true CN112579424A (en) 2021-03-30

Family

ID=75110563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910926856.4A Pending CN112579424A (en) 2019-09-27 2019-09-27 Automatic testing method and testing execution machine

Country Status (1)

Country Link
CN (1) CN112579424A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130174126A1 (en) * 2011-12-30 2013-07-04 Cellco Partnership D/B/A Verizon Wireless Automated testing of programming code for a web service
CN103546912A (en) * 2012-07-09 2014-01-29 中兴通讯股份有限公司 Method, device and system for upgrading version of base station
CN106155907A (en) * 2016-07-04 2016-11-23 厦门美图移动科技有限公司 A kind of automated testing method, device and computing device
CN106294150A (en) * 2016-08-09 2017-01-04 北京神州绿盟信息安全科技股份有限公司 A kind of test loading method and device
CN109002307A (en) * 2018-06-27 2018-12-14 郑州云海信息技术有限公司 A kind of upgrading and automated testing method automatically
CN109218139A (en) * 2018-10-23 2019-01-15 京信通信系统(中国)有限公司 Gateway test macro

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130174126A1 (en) * 2011-12-30 2013-07-04 Cellco Partnership D/B/A Verizon Wireless Automated testing of programming code for a web service
CN103546912A (en) * 2012-07-09 2014-01-29 中兴通讯股份有限公司 Method, device and system for upgrading version of base station
CN106155907A (en) * 2016-07-04 2016-11-23 厦门美图移动科技有限公司 A kind of automated testing method, device and computing device
CN106294150A (en) * 2016-08-09 2017-01-04 北京神州绿盟信息安全科技股份有限公司 A kind of test loading method and device
CN109002307A (en) * 2018-06-27 2018-12-14 郑州云海信息技术有限公司 A kind of upgrading and automated testing method automatically
CN109218139A (en) * 2018-10-23 2019-01-15 京信通信系统(中国)有限公司 Gateway test macro

Similar Documents

Publication Publication Date Title
CN103942063B (en) Centralized configuration and remote deployment method for Java Web application
CN107302476B (en) Automatic testing method and system for testing asynchronous interactive system
JP2007528534A (en) Using a loader to notify system software update services
CN109992283B (en) Method and system for synchronously downloading and upgrading test firmware in batch
WO2017198156A1 (en) Service deployment method, apparatus and system
CN110865944A (en) Data analysis method and device for test case, storage medium and test equipment
CN113312064A (en) Installation configuration method and device of physical machine and computer readable medium
CN113849272A (en) Method and device for adding GPU (graphics processing Unit) resources in virtual machine
CN111324365A (en) Method and equipment for upgrading super-converged system
CN112732285B (en) Upgrading method and device suitable for cloud computing linux operating system and electronic equipment
CN113535214A (en) Algorithm file upgrading method and device, electronic device and storage medium
CN108009086B (en) System automation test method based on case decomposition and function learning
CN111628910B (en) TTCN software testing system of cellular communication terminal protocol stack
CN112579424A (en) Automatic testing method and testing execution machine
CN112564956A (en) Remote upgrading method, equipment and device for client and storage medium
CN114500348B (en) CDN gateway testing method and system
CN116382735A (en) Progress display and exception handling method for domain controller upgrading, system and equipment thereof
CN112559349B (en) Program running method and running device
CN112596750B (en) Application testing method and device, electronic equipment and computer readable storage medium
CN113110991A (en) Page element positioning method and device, storage medium and electronic device
CN110365627B (en) Application program synchronization method and device, computing equipment and storage medium
CN112667506A (en) Interface testing method and related device
CN112015436A (en) Short message platform deployment method and device, computing equipment and computer storage medium
CN109375928B (en) Method and device for integrating and managing third-party driving software based on NSIS script
CN111597101A (en) SDK access state detection method, computer device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210330