CN115237816B - System function verification method and device, electronic equipment and readable storage medium - Google Patents

System function verification method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN115237816B
CN115237816B CN202211154491.6A CN202211154491A CN115237816B CN 115237816 B CN115237816 B CN 115237816B CN 202211154491 A CN202211154491 A CN 202211154491A CN 115237816 B CN115237816 B CN 115237816B
Authority
CN
China
Prior art keywords
access
function
tested
station
configuration information
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.)
Active
Application number
CN202211154491.6A
Other languages
Chinese (zh)
Other versions
CN115237816A (en
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.)
Shenzhen Mingyuan Cloud Technology Co Ltd
Original Assignee
Shenzhen Mingyuan Cloud Technology 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 Shenzhen Mingyuan Cloud Technology Co Ltd filed Critical Shenzhen Mingyuan Cloud Technology Co Ltd
Priority to CN202211154491.6A priority Critical patent/CN115237816B/en
Publication of CN115237816A publication Critical patent/CN115237816A/en
Application granted granted Critical
Publication of CN115237816B publication Critical patent/CN115237816B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3604Software analysis for verifying properties of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a system function verification method, a device, an electronic device and a readable storage medium, which are applied to the field of function verification, wherein the system function verification method comprises the following steps: reading stored system configuration information, and determining at least one function of a station to be tested according to the system configuration information; detecting the updating state of the functions of the station to be tested through the system configuration information to determine whether the main system finishes upgrading; if the main system is determined to be upgraded, sequentially accessing functions of the sites to be tested based on the system configuration information, and acquiring access data generated by data exchange in an access process; determining an access verification result corresponding to each station function to be tested from the access data; and analyzing the functions of each station to be tested according to the access verification result to obtain function analysis information, and outputting the access verification result and the function analysis information. The technical problem that manual verification of the power consumption of the system is long is solved.

Description

System function verification method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of function verification technologies, and in particular, to a method and an apparatus for system function verification, an electronic device, and a readable storage medium.
Background
With the rapid change of enterprise services, an enterprise information system needs to be updated and iterated rapidly to adapt to the change of the services, complex services cause a large and complex service system, a single system cannot realize all service functions, other systems are often required to be relied on, the function verification of the service system needs maintenance personnel to perform function verification on the relied other systems one by one, and the time consumed for manual system function verification is too long due to too high complexity of the system.
Disclosure of Invention
The present application mainly aims to provide a method and an apparatus for verifying system functions, an electronic device, and a readable storage medium, and aims to solve the technical problem of long time for manually verifying system power consumption in the prior art.
In order to achieve the above object, the present application provides a system function verification method applied to a system function verification device, where the system function verification method includes:
reading stored system configuration information, and determining at least one function of a station to be tested according to the system configuration information;
detecting the updating state of the functions of the station to be tested through the system configuration information to determine whether the main system finishes upgrading;
if the main system is determined to be upgraded, sequentially accessing functions of the sites to be tested based on the system configuration information, and acquiring access data generated by data exchange in an access process;
determining an access verification result corresponding to each site function to be tested from the access data;
and analyzing the functions of the sites to be tested according to the access verification result to obtain function analysis information, and outputting the access verification result and the function analysis information.
Optionally, the step of sequentially accessing each function of the station to be tested based on the system configuration information to obtain access data generated by data exchange in an access process includes:
determining an access address, a corresponding request mode and corresponding authentication information of each site function to be tested according to the system configuration information;
initiating data requests to the access addresses in sequence according to the request mode, and authenticating through the authentication information in the data request process;
and acquiring access data generated by data exchange in the access process of each access address.
Optionally, the step of determining an access verification result corresponding to each station function to be tested from the access data includes:
acquiring a response message corresponding to the function of the station to be tested from the access data;
extracting a response state code and a reason phrase from a state line in the response message according to a preset analysis rule, and taking the response state code and the reason phrase as state information of the function of the station to be tested;
if the station to be tested is determined to be normal in function according to the state information, determining that the access verification result is normal;
and if the abnormal function of the station to be tested is determined according to the state information, determining that the access verification result is abnormal, and storing an abnormal response state code and the reason phrase into the access verification result.
Optionally, the step of detecting an update state of the to-be-tested site function through the system configuration information to determine whether the host system completes upgrading includes:
acquiring the updating state of the functions of the station to be tested by monitoring the updating events of the functions of the station to be tested, and determining whether the main system finishes upgrading or not according to the updating state; and/or
And acquiring the version number of the main system, determining the updating state of the functions of the site to be tested according to the version number and the configuration version number in the system configuration information, and determining whether the main system finishes upgrading according to the updating state.
Optionally, the step of analyzing the functions of each station to be tested according to the access verification result to obtain function analysis information, and outputting the access verification result and the function analysis information includes:
displaying the station function to be tested with the access verification result of normal on a page, and displaying a normal state corresponding to the station function to be tested;
and displaying the site function to be tested with the access verification result being abnormal on a page, analyzing the abnormal reason of the site function to be tested according to the response state code and the reason phrase in the access verification result, and outputting the abnormal reason.
Optionally, after the step of outputting the reason for the abnormality, the method further includes:
if the access verification result of each site function to be tested is abnormal, rolling back the main system to the version before upgrading according to the configuration version number in the system configuration information, and executing the following steps: and detecting the updating state of the functions of the station to be tested through the system configuration information to determine whether the main system finishes upgrading.
Optionally, before the step of reading the saved system configuration information, the method further includes:
the method comprises the steps of obtaining input system configuration information through a configuration interface and storing the system configuration information, wherein the system configuration information at least comprises access addresses of functions of sites to be tested, request modes corresponding to the access addresses and corresponding authentication information.
In order to achieve the above object, the present application further provides a system function verifying apparatus, where the system function verifying apparatus is applied to a system function verifying device, and the system function verifying apparatus includes:
the acquisition configuration module is used for reading the stored system configuration information and determining at least one function of the station to be tested according to the system configuration information;
the upgrade detection module is used for detecting the update state of the functions of the station to be tested through the system configuration information so as to determine whether the main system finishes upgrading;
the function access module is used for sequentially accessing the functions of the sites to be tested based on the system configuration information and acquiring access data generated by data exchange in the access process if the main system is determined to be upgraded;
the function verification module is used for determining an access verification result corresponding to each site function to be tested from the access data;
and the result output module is used for analyzing the functions of the sites to be tested according to the access verification result to obtain function analysis information and outputting the access verification result and the function analysis information.
Optionally, the function accessing module is further configured to:
determining an access address, a corresponding request mode and corresponding authentication information of each site function to be tested according to the system configuration information;
initiating data requests to the access addresses in sequence according to the request mode, and authenticating through the authentication information in the data request process;
and acquiring access data generated by data exchange in the access process of each access address.
Optionally, the function verification module is further configured to:
acquiring a response message corresponding to the function of the station to be tested from the access data;
extracting a response state code and a reason phrase from a state line in the response message according to a preset analysis rule, and taking the response state code and the reason phrase as state information of the function of the station to be tested;
if the station to be tested is determined to be normal in function according to the state information, determining that the access verification result is normal;
and if the station to be tested is determined to be abnormal in function according to the state information, determining that the access verification result is abnormal, and storing an abnormal response state code and the reason phrase into the access verification result.
Optionally, the upgrade detection module is further configured to:
acquiring the updating state of the functions of the station to be tested by monitoring the updating events of the functions of the station to be tested, and determining whether the main system finishes upgrading or not according to the updating state; and/or
And acquiring the version number of the main system, determining the updating state of the functions of the site to be tested according to the version number and the configuration version number in the system configuration information, and determining whether the main system finishes upgrading according to the updating state.
Optionally, the result output module is further configured to:
displaying the station function to be tested with the access verification result of normal on a page, and displaying a normal state corresponding to the station function to be tested;
and displaying the site function to be tested with the abnormal access verification result on a page, analyzing the abnormal reason of the site function to be tested according to the response state code and the reason phrase in the access verification result, and outputting the abnormal reason.
Optionally, the system function verifying device is further configured to:
if the access verification result of each site function to be tested is abnormal, rolling back the main system to the version before upgrading according to the configuration version number in the system configuration information, and executing the following steps: and detecting the updating state of the functions of the station to be tested through the system configuration information to determine whether the main system finishes upgrading.
Optionally, the system function verifying device is further configured to:
the method comprises the steps of obtaining input system configuration information through a configuration interface and storing the system configuration information, wherein the system configuration information at least comprises an access address of each station function to be tested, a request mode corresponding to the access address and corresponding authentication information.
The present application further provides an electronic device, including: a memory, a processor and a program of the system function verification method stored on the memory and executable on the processor, the program of the system function verification method when executed by the processor implementing the steps of the system function verification method as described above.
The present application also provides a readable storage medium, which is a computer readable storage medium, on which a program for implementing the system function verification method is stored, and when the program of the system function verification method is executed by a processor, the steps of the system function verification method as described above are implemented.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of the system function verification method as described above.
The application provides a system function verification method, a system function verification device, electronic equipment and a readable storage medium, namely reading stored system configuration information, and determining at least one function of a station to be tested according to the system configuration information; detecting the updating state of the functions of the station to be tested through the system configuration information to determine whether the main system finishes upgrading; if the main system is determined to be upgraded, sequentially accessing functions of the sites to be tested based on the system configuration information, and acquiring access data generated by data exchange in an access process; determining an access verification result corresponding to each station function to be tested from the access data; the method and the device have the advantages that functions of all the sites to be tested are analyzed according to the access verification results to obtain function analysis information, the access verification results and the function analysis information are output, the updating state of the main system is continuously monitored through configuration in advance, the functions of the configured sites are automatically verified after the main system is monitored and upgraded, manual verification is replaced, the time length of function verification is shortened, meanwhile, the updating state of the main system can be automatically monitored, the process of manually determining version upgrading is omitted, and the efficiency of function verification is further improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a schematic flow chart illustrating a first embodiment of a system function verification method according to the present application;
FIG. 2 is a flow chart of a method of using the tool provided in an embodiment of the present application;
FIG. 3 is a flow chart of the operation of the tool provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of the structure of a system function verification device according to the present application;
fig. 5 is a schematic device structure diagram of a hardware operating environment related to a system function verification method in an embodiment of the present application.
The objectives, features, and advantages of the present application will be further described with reference to the accompanying drawings.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
In a first embodiment of the system function verification method according to the present application, with reference to fig. 1, the system function verification method includes:
step S10, reading the stored system configuration information, and determining at least one function of a station to be tested according to the system configuration information;
step S20, detecting the updating state of the functions of the station to be tested through the system configuration information to determine whether the main system finishes upgrading;
step S30, if the main system is determined to be upgraded, sequentially accessing the functions of the sites to be tested based on the system configuration information, and acquiring access data generated by data exchange in the access process;
step S40, determining an access verification result corresponding to each station function to be tested from the access data;
and S50, analyzing the functions of the sites to be tested according to the access verification results to obtain function analysis information, and outputting the access verification results and the function analysis information.
In this embodiment, it should be noted that the present application may provide an upgrade automation verification tool, which may be a browser plug-in, and after a host system is upgraded, whether the upgrade of the host system is finished may be automatically detected through an access address of a function of each site, and if the upgrade is finished, the operation of the automatic verification tool is triggered to verify the site and the function of the upgraded host system. The system configuration information is configuration information of a system input by a user through a configuration interface in advance, such as access addresses, request modes and corresponding authentication keys of various sites and functions, namely authentication information, the functions of the sites to be tested can be a main system and other associated system sites or system functions, each site and function corresponds to one access address, whether each site and function of the main system are normal or not can be visually seen through the access verification result, and the abnormal sites and functions can be clicked to view detailed conditions or be verified again; the feedback access data is usually a response message obtained after access, wherein the response message may include a response status code, the response status code may determine a detection result of the function of the station to be tested, the access verification result is whether the verification of the function of the station to be tested at each access address is successful or not determined by the access data, and the function analysis information may be a cause of the abnormal function of the station.
Illustratively, steps S10 to S50 include:
the method comprises the steps of obtaining system configuration information which is configured and stored in advance, obtaining access addresses of functions of sites to be tested according to the system configuration information, determining access methods, corresponding authentication modes, required authentication information and the like corresponding to the access addresses, determining whether a main system is upgraded or updated or not by detecting the functions of the sites to be tested corresponding to the configured access addresses and determining the updating states of the sites to be tested, automatically carrying out access verification on the functions of the sites to be tested according to the system configuration information if the main system is upgraded or updated, and obtaining access data generated by data exchange in the access process; determining an access verification result corresponding to each station to be tested in the access data; and analyzing the functions of each station to be tested according to the access verification result to obtain function analysis information, outputting the access verification result and the function analysis information, and displaying the access verification result and the function analysis information on a page.
Specifically, as shown in fig. 2, after the system is upgraded, a user may open the host system through a browser, then automatically open the acceptance plug-in, trigger the system site and the function verification, and after the verification is completed, arrange the access verification results on the platform page one by one to display the finally obtained detection result, so as to visually see whether the functions of each site of the host system are normal, thereby implementing the rapid detection of the upgraded functions.
In step S30, the step of sequentially accessing each function of the station under test based on the system configuration information and acquiring access data generated by data exchange in an access process includes:
step S31, determining the access address, the corresponding request mode and the corresponding authentication information of each station function to be tested according to the system configuration information;
step S32, sequentially initiating data requests to the access addresses according to the request mode, and authenticating through the authentication information in the data request process;
and step S33, acquiring access data generated by data exchange in the access process of each access address.
In this embodiment, it should be noted that the system configuration information is configured with an access address of a station function to be tested, and a corresponding request manner and authentication information in advance, where the request manner initiates an access request to acquire data based on an HTTP protocol, for example, a GET method, a POST method, a PUT method, an HEAD method, and the like, and in the process, it is necessary to verify whether the access request has a right to access the required data from the server, and when sending the request, the system configuration information generally needs to include authentication information such as parameters and the like to ensure that the request has a right to access and return the required data, and only if the request has a right to access and return the required data, the system configuration information transmits the authentication information to the server according to the request manner, the access data such as a response message and the like may be successfully accessed in the access process.
Exemplarily, steps S31 to S33 include:
determining an access address of a site function to be tested, a corresponding request mode configured by each access address and authentication information required in the request process from system configuration information, sequentially initiating a data request to the access address according to the request mode, authenticating through the authentication information in the data request process, and collecting access data generated by data exchange in the access process.
In step S40, the step of determining an access verification result corresponding to each station function to be tested from the access data includes:
step S41, acquiring a response message corresponding to the function of the station to be tested from the access data;
step S42, extracting a response state code and a reason phrase from a state line in the response message according to a preset analysis rule, and taking the response state code and the reason phrase as state information of the function of the station to be detected;
step S43, if the station to be tested is determined to be normal in function according to the state information, determining that the access verification result is normal;
step S44, if the station to be tested is determined to be abnormal in function according to the state information, determining that the access verification result is abnormal, and storing an abnormal response state code and the reason phrase into the access verification result.
In this embodiment, it should be noted that the access data is usually a response packet, the response packet refers to response information after a data exchange platform (site) receives a packet in a transmission process, and after the request packet requests an action from a Web server, a request result is returned to a client, the state information is usually a response state code, the preset packet parsing rule is a rule for extracting required information from an obtained response packet, the response packet includes three parts, a first part is a response line, a second part is a response header, and a third part is a response body, where the response line includes a response protocol and protocol version number, a response state code, and a response state descriptor, the response protocol and version number describe an http version used in the table, the response state code is a three-digit number that describes a situation occurring in the request process, a first digit of each state code is used for describing a general category of a state, a reason phrase is a readable version of the response state code and is used for describing a reason of occurrence of normal or error, and the detection result can determine whether each function to be detected and what kind of error occurs according to the response state code.
The response status code is classified and explained according to the first bit, the first bit is 1 to represent that the request is received in the response, the first bit is 2 to represent success, the request is successfully received, the processing is completed, and the first bit is 3 to represent redirection to other places: it lets the client send a request again to complete the whole process, the first bit 4 represents the client error, which represents the error occurred in the process, and the responsibility is at the client, such as: the client requests a non-existent resource, the client is not authorized, access is prohibited, etc., the first bit 5 represents a server error, which indicates that processing error occurs, and is responsible for the server, such as: the server throws out the exception, the routing is wrong, the HTTP version does not support and the like, and the last two bits of the response status code can be combined to determine the access result.
Exemplarily, steps S41 to S44 include:
acquiring response messages corresponding to functions of the sites to be tested generated by accessing from access data obtained by accessing the functions of the sites to be tested, extracting response state codes and reason phrases from state lines in the response messages according to preset analysis rules, taking the response state codes and the reason phrases as state information of the functions of the sites to be tested, and determining that an access verification result is normal if the functions of the sites to be tested are determined to be normal according to the state information; and if the abnormal function of the station to be tested is determined according to the state information, determining that the access verification result is abnormal, and storing the abnormal response state code and the reason phrase into the access verification result.
In step S20, the step of detecting the update state of the to-be-tested site function through the system configuration information to determine whether the host system completes upgrading includes:
step S21, acquiring the updating state of the functions of the station to be tested by monitoring the updating events of the functions of the station to be tested, and determining whether the main system finishes upgrading or not according to the updating state; and/or
Step S22, obtaining the version number of the main system, determining the updating state of the function of the station to be tested according to the version number and the configuration version number in the system configuration information, and determining whether the main system finishes updating according to the updating state.
In this embodiment, it should be noted that the update event may be a flag indicating an update state of a record in a station to be tested, where the version number is a version number of a main system, and the version number changes after each update, and in system configuration information, a configuration version number of a current main system may be configured in advance to serve as a basis for whether to complete an upgrade when the version number changes, and the update state may be an update complete state, where monitoring obtains a record after a change of an event.
Exemplarily, steps S21 to S22 include:
monitoring the update event of the functions of the station to be detected, if the update event is monitored, automatically acquiring the update state of the station to be detected and/or acquiring the current version number of the main system, comparing the version number with the configuration version number configured in advance in the system configuration information, determining the update state of the functions of the station to be detected, if the version of the functions of the station to be detected is determined to be changed according to the obtained update state, determining that the main system is upgraded, then performing access detection on the functions of the station to be detected, and if the version is not changed, not triggering a function detection tool.
In step S50, the step of analyzing the functions of each station to be tested according to the access verification result to obtain function analysis information, and outputting the access verification result and the function analysis information includes:
step S51, displaying the station function to be tested with the access verification result of normal on a page, and displaying the normal state corresponding to the station function to be tested;
and S52, displaying the functions of the station to be tested with the abnormal access verification result on a page, analyzing the abnormal reasons of the functions of the station to be tested according to the response state codes and the reason phrases in the access verification result, and outputting the abnormal reasons.
Exemplarily, steps S51 to S52 include:
and if the access verification result is abnormal, the functions of the station to be tested and the corresponding normal state are listed in the display page directly, and if the access verification result is abnormal, the functions of the station to be tested and the corresponding abnormal state are listed in the display page, and meanwhile, the reason of the abnormality is analyzed according to the access verification result, and the reason of the abnormality is also displayed on the page.
In a specific embodiment, as shown in fig. 3, in the upgrade automatic verification tool, if it is detected that the system completes the upgrade, the tool is first opened, the configuration information configured in advance is read, and the application and the function to be detected are displayed at the same time, authentication and request are sequentially performed according to the configured address, a response status code or message is obtained and analyzed, whether the upgrade function is successful or not is determined, if yes, the relevant information in the normal state is displayed, if not, the relevant information in the abnormal state is displayed, and the details of the error of the difference point can be clicked.
After step S50, the method further includes, after the step of outputting the cause of the abnormality:
step S60, if the access verification result of each station function to be tested is abnormal, rolling back the main system to the version before upgrading according to the configuration version number in the system configuration information, and executing the steps of: and detecting the updating state of the functions of the station to be tested through the system configuration information to determine whether the main system finishes upgrading.
Illustratively, step S60 includes:
if all the access verification results are detected to be abnormal, the whole version of the main system needs to be subjected to version rollback, the version state before upgrading is recovered, and after the rollback is completed, the detection steps in the application are continuously executed.
Before step S10, before the step of reading the saved system configuration information, the method further includes:
and S01, acquiring input system configuration information through a configuration interface, and storing the system configuration information, wherein the system configuration information at least comprises an access address of each station function to be tested, a request mode corresponding to the access address and corresponding authentication information.
In this embodiment, it should be noted that before using the automated verification tool, the configuration of the system needs to be performed in advance, where the configured content includes access addresses of sites or functions related to the host system, each access address may be requested and accessed in a different request manner, and if the access needs to be authenticated, authentication information needs to be configured at the same time.
Illustratively, through the configuration interface, the configuration of the system can be performed, and stored as system configuration information, and according to the system configuration information, the access address and the access method of each site and each function, as well as the corresponding authentication manner, the required authentication information, and the like can be obtained, where the authentication manner may be Oauth, JWT, and the like.
The embodiment of the application provides a system function verification method, namely, reading stored system configuration information, and determining at least one function of a station to be tested according to the system configuration information; detecting the updating state of the functions of the station to be tested through the system configuration information to determine whether the main system finishes upgrading; if the main system is determined to be upgraded, sequentially accessing functions of the sites to be tested based on the system configuration information, and acquiring access data generated by data exchange in an access process; determining an access verification result corresponding to each site function to be tested from the access data; the method and the device have the advantages that the functions of all the sites to be tested are analyzed according to the access verification result to obtain function analysis information, the access verification result and the function analysis information are output, the updating state of the main system is continuously monitored through advanced configuration, the functions of the configured sites are automatically verified after the main system is monitored to be upgraded, manual verification is replaced, the time length of the function verification is shortened, the efficiency of the function verification is improved, meanwhile, the updating state of the main system can be automatically monitored, the process of manually determining version upgrading is omitted, and the efficiency of the function verification is further improved.
Example two
An embodiment of the present application further provides a system function verifying apparatus as shown in fig. 4, where the system function verifying apparatus is applied to a system function verifying device, and the system function verifying apparatus includes:
the acquisition configuration module A10 is used for reading the stored system configuration information and determining at least one function of a station to be tested according to the system configuration information;
the upgrade detection module a20 is configured to detect an update state of the to-be-tested site function through the system configuration information to determine whether the main system completes upgrading;
a function access module a30, configured to, if it is determined that the main system has been upgraded, sequentially access the functions of the sites to be tested based on the system configuration information, and acquire access data generated by data exchange in an access process;
a function verification module a40, configured to determine, from the access data, an access verification result corresponding to each station function to be tested;
and the result output module A50 is used for analyzing the functions of the stations to be tested according to the access verification result to obtain function analysis information, and outputting the access verification result and the function analysis information.
Optionally, the function access module a30 is further configured to:
determining an access address, a corresponding request mode and corresponding authentication information of each site function to be tested according to the system configuration information;
initiating data requests to the access addresses in sequence according to the request mode, and authenticating through the authentication information in the data request process;
and acquiring access data generated by data exchange in the access process of each access address.
Optionally, the function verification module a40 is further configured to:
acquiring a response message corresponding to the function of the station to be tested from the access data;
extracting a response state code and a reason phrase from a state line in the response message according to a preset analysis rule, and taking the response state code and the reason phrase as state information of the function of the station to be tested;
if the station to be tested is determined to be normal in function according to the state information, determining that the access verification result is normal;
and if the abnormal function of the station to be tested is determined according to the state information, determining that the access verification result is abnormal, and storing an abnormal response state code and the reason phrase into the access verification result.
Optionally, the upgrade detection module a20 is further configured to:
acquiring the updating state of the functions of the station to be tested by monitoring the updating events of the functions of the station to be tested, and determining whether the main system finishes upgrading or not according to the updating state; and/or
And acquiring the version number of the main system, determining the updating state of the functions of the station to be tested according to the version number and the configuration version number in the system configuration information, and determining whether the main system finishes upgrading according to the updating state.
Optionally, the result output module a50 is further configured to:
displaying the station function to be tested with the access verification result of normal on a page, and displaying a normal state corresponding to the station function to be tested;
and displaying the site function to be tested with the access verification result being abnormal on a page, analyzing the abnormal reason of the site function to be tested according to the response state code and the reason phrase in the access verification result, and outputting the abnormal reason.
Optionally, the system function verifying device is further configured to:
if the access verification result of each site function to be tested is abnormal, rolling back the main system to the version before upgrading according to the configuration version number in the system configuration information, and executing the following steps: and detecting the updating state of the functions of the station to be tested through the system configuration information to determine whether the main system finishes upgrading.
Optionally, the system function verifying device is further configured to:
the method comprises the steps of obtaining input system configuration information through a configuration interface and storing the system configuration information, wherein the system configuration information at least comprises an access address of each station function to be tested, a request mode corresponding to the access address and corresponding authentication information.
The system function verification device provided by the invention adopts the system function verification method in the first embodiment, and solves the technical problem of long time for manually verifying the system power consumption. Compared with the prior art, the system function verification device provided by the embodiment of the invention has the same beneficial effects as the system function verification method provided by the embodiment, and other technical features in the system function verification device are the same as those disclosed by the embodiment method, which are not repeated herein.
EXAMPLE III
An embodiment of the present invention provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the system function verification method in the first embodiment.
Referring now to FIG. 5, shown is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the electronic apparatus B90 may include a processing device B10 (e.g., a central processing unit, a graphic processor, etc.) that can perform various appropriate actions and processes according to a program stored in a read only memory B20 (ROM) or a program loaded from a storage device into a random access memory B30 (RAM). In the RAMB30, various programs and data necessary for the operation of the electronic device are also stored. The processing devices B10, ROMB20, and RAMB30 are connected to each other via a bus. An input/output B40 (I/O) interface is also connected to the bus.
Generally, the following systems may be connected to the I/O interface: an input device B50 including, for example, a touch screen, a touch panel, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, or the like; an output device B60 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; a storage device B70 including, for example, a magnetic tape, a hard disk, or the like; and a communication device B80. The communication device B80 may allow the electronic apparatus B90 to perform wireless or wired communication with other apparatuses to exchange data. While the figures illustrate an electronic device with various systems, it is understood that implementing or having all of the illustrated systems is not a requirement. More or fewer systems may alternatively be implemented or provided.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such embodiments, the computer program may be downloaded and installed from the network via the communication device, or installed from the storage device B70, or installed from the ROMB 20. The computer program, when executed by the processing device B10, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
The electronic device provided by the invention adopts the system function verification method in the first embodiment, and the technical problem of long time for manually verifying the system power consumption is solved. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the present invention are the same as the beneficial effects of the system function verification method provided by the first embodiment, and other technical features of the electronic device are the same as those disclosed in the method of the first embodiment, which are not repeated herein.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the foregoing description of embodiments, the particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present invention, and shall cover the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Example four
The present embodiment provides a computer-readable storage medium having stored thereon computer-readable program instructions for performing the method of system functional verification in the first embodiment.
Embodiments of the present invention provide a computer readable storage medium, such as a USB flash drive, but are not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or any combination thereof. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present embodiment, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer-readable storage medium may be embodied in an electronic device; or may be separate and not incorporated into the electronic device.
The computer-readable storage medium carries one or more programs which, when executed by an electronic device, cause the electronic device to: reading stored system configuration information, and determining at least one function of a station to be tested according to the system configuration information; detecting the updating state of the functions of the station to be tested through the system configuration information to determine whether the main system finishes upgrading; if the main system is determined to be upgraded, sequentially accessing functions of the sites to be tested based on the system configuration information, and acquiring access data generated by data exchange in an access process; determining an access verification result corresponding to each site function to be tested from the access data; and analyzing the functions of each station to be tested according to the access verification result to obtain function analysis information, and outputting the access verification result and the function analysis information.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the names of the modules do not in some cases constitute a limitation of the unit itself.
The computer readable storage medium provided by the invention stores the computer readable program instruction for executing the system function verification method, and solves the technical problem of long time for manually verifying the system power consumption. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiment of the present invention are the same as the beneficial effects of the system function verification method provided by the first embodiment, and are not described herein again.
EXAMPLE five
The present application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of the system function verification method as described above.
The computer program product solves the technical problem of long power consumption of a manual verification system. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present invention are the same as the beneficial effects of the system function verification method provided by the first embodiment, and details are not repeated herein.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all equivalent structures or equivalent processes, which are directly or indirectly applied to other related technical fields, and which are not limited by the present application, are also included in the scope of the present application.

Claims (9)

1. A system function verification method, comprising:
reading stored system configuration information, and determining at least one site function to be tested according to the system configuration information, wherein the system configuration information comprises an access address, a request mode and authentication information;
detecting the updating state of the functions of the station to be tested through the system configuration information to determine whether the main system finishes upgrading;
if the main system is determined to be upgraded, sequentially accessing functions of the sites to be tested based on the system configuration information, and acquiring access data generated by data exchange in an access process, wherein the access data is a response message obtained after access;
determining an access verification result corresponding to each station function to be tested from the access data;
analyzing the functions of each station to be tested according to the access verification result to obtain function analysis information, and outputting the access verification result and the function analysis information;
the step of sequentially accessing each station function to be tested based on the system configuration information and acquiring access data generated by data exchange in an access process includes:
determining an access address, a corresponding request mode and corresponding authentication information of each station function to be tested according to the system configuration information;
initiating data requests to the access addresses in sequence according to the request mode, and authenticating through the authentication information in the data request process;
and acquiring access data generated by data exchange in the access process of each access address.
2. The method for system function verification according to claim 1, wherein the step of determining the access verification result corresponding to each station function to be tested from the access data includes:
acquiring a response message corresponding to the function of the station to be tested from the access data;
extracting a response state code and a reason phrase from a state line in the response message according to a preset analysis rule, and taking the response state code and the reason phrase as state information of the function of the station to be tested;
if the station to be tested is determined to be normal in function according to the state information, determining that the access verification result is normal;
and if the station to be tested is determined to be abnormal in function according to the state information, determining that the access verification result is abnormal, and storing an abnormal response state code and the reason phrase into the access verification result.
3. The method for verifying system function according to claim 1, wherein the step of detecting the update status of the station function under test through the system configuration information to determine whether the host system completes the upgrade includes:
acquiring the updating state of the functions of the station to be tested by monitoring the updating events of the functions of the station to be tested, and determining whether the main system finishes upgrading or not according to the updating state; and/or
And acquiring the version number of the main system, determining the updating state of the functions of the station to be tested according to the version number and the configuration version number in the system configuration information, and determining whether the main system finishes upgrading according to the updating state.
4. The method according to claim 1, wherein the step of analyzing the functions of each station to be tested according to the access verification result to obtain function analysis information, and outputting the access verification result and the function analysis information comprises:
displaying the station function to be tested with the access verification result of normal on a page, and displaying a normal state corresponding to the station function to be tested;
and displaying the site function to be tested with the access verification result being abnormal on a page, analyzing the abnormal reason of the site function to be tested according to the response state code and the reason phrase in the access verification result, and outputting the abnormal reason.
5. The system function verification method of claim 4, wherein the step of outputting the cause of the abnormality is followed by further comprising:
if the access verification result of each site function to be tested is abnormal, rolling back the main system to the version before upgrading according to the configuration version number in the system configuration information, and executing the following steps: and detecting the updating state of the functions of the station to be tested through the system configuration information to determine whether the main system finishes upgrading.
6. The system function verification method of claim 1, wherein the step of reading the saved system configuration information is preceded by the step of:
the method comprises the steps of obtaining input system configuration information through a configuration interface and storing the system configuration information, wherein the system configuration information at least comprises an access address of each station function to be tested, a request mode corresponding to the access address and corresponding authentication information.
7. A system function verification apparatus, comprising:
the system comprises an acquisition configuration module, a configuration module and a test module, wherein the acquisition configuration module is used for reading stored system configuration information and determining at least one station function to be tested according to the system configuration information, and the system configuration information comprises an access address, a request mode and authentication information;
the upgrade detection module is used for detecting the update state of the functions of the station to be tested through the system configuration information so as to determine whether the main system finishes upgrading;
the function access module is used for sequentially accessing the functions of the sites to be tested based on the system configuration information and acquiring access data generated by data exchange in the access process if the main system is determined to be upgraded, wherein the access data is a response message obtained after access;
the function verification module is used for determining an access verification result corresponding to each station function to be tested from the access data;
the result output module is used for analyzing the functions of the sites to be tested according to the access verification result to obtain function analysis information and outputting the access verification result and the function analysis information;
the function access module is specifically configured to determine an access address, a corresponding request mode, and corresponding authentication information of each station function to be tested according to the system configuration information, sequentially initiate a data request to the access address according to the request mode, perform authentication through the authentication information in a data request process, and acquire access data generated by data exchange in an access process of each access address.
8. An electronic device, characterized in that the electronic device comprises:
at least one processor; and (c) a second step of,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the system function verification method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a program for implementing a system function verification method, the program being executed by a processor to implement the steps of the system function verification method according to any one of claims 1 to 6.
CN202211154491.6A 2022-09-22 2022-09-22 System function verification method and device, electronic equipment and readable storage medium Active CN115237816B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211154491.6A CN115237816B (en) 2022-09-22 2022-09-22 System function verification method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211154491.6A CN115237816B (en) 2022-09-22 2022-09-22 System function verification method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN115237816A CN115237816A (en) 2022-10-25
CN115237816B true CN115237816B (en) 2022-12-27

Family

ID=83667241

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211154491.6A Active CN115237816B (en) 2022-09-22 2022-09-22 System function verification method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115237816B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001093043A1 (en) * 2000-03-27 2001-12-06 Accenture Llp System, method, and article of manufacture for an automated scripting solution for enterprise testing
CN109828914A (en) * 2018-12-28 2019-05-31 宁波瓜瓜农业科技有限公司 Whole process distributed system automated testing method and test macro
CN110209577A (en) * 2019-05-20 2019-09-06 深圳壹账通智能科技有限公司 A kind of test method and device
CN112631932A (en) * 2020-12-30 2021-04-09 交控科技股份有限公司 Sub-function independent test method of automatic train monitoring system based on interface
CN113626795A (en) * 2021-08-11 2021-11-09 工银科技有限公司 Verification method and device of distributed system architecture, electronic equipment and storage medium
CN113704089A (en) * 2021-07-26 2021-11-26 中国铁道科学研究院集团有限公司通信信号研究所 Full-scene GSM-R interface server test platform system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669855A (en) * 2018-10-26 2019-04-23 上海维信荟智金融科技有限公司 Automated testing method and system based on analog interface
CN111176910A (en) * 2018-11-29 2020-05-19 通号城市轨道交通技术有限公司 System function testing method and device
US11138097B2 (en) * 2019-09-24 2021-10-05 Aetna Inc. Automated web testing framework for generating and maintaining test scripts
CN112416796B (en) * 2020-12-03 2023-11-17 北京东土科技股份有限公司 Software upgrading test method and device
CN113726808A (en) * 2021-09-06 2021-11-30 杭州安恒信息安全技术有限公司 Website monitoring method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001093043A1 (en) * 2000-03-27 2001-12-06 Accenture Llp System, method, and article of manufacture for an automated scripting solution for enterprise testing
CN109828914A (en) * 2018-12-28 2019-05-31 宁波瓜瓜农业科技有限公司 Whole process distributed system automated testing method and test macro
CN110209577A (en) * 2019-05-20 2019-09-06 深圳壹账通智能科技有限公司 A kind of test method and device
CN112631932A (en) * 2020-12-30 2021-04-09 交控科技股份有限公司 Sub-function independent test method of automatic train monitoring system based on interface
CN113704089A (en) * 2021-07-26 2021-11-26 中国铁道科学研究院集团有限公司通信信号研究所 Full-scene GSM-R interface server test platform system
CN113626795A (en) * 2021-08-11 2021-11-09 工银科技有限公司 Verification method and device of distributed system architecture, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115237816A (en) 2022-10-25

Similar Documents

Publication Publication Date Title
CN113485918B (en) Test method, test device, electronic equipment and storage medium
CN104579830A (en) Service monitoring method and device
CN109491908B (en) Page detection method and device, electronic equipment and storage medium
CN111177732B (en) System debugging mode control method and system and electronic equipment
CN109818972B (en) Information security management method and device for industrial control system and electronic equipment
CN115665009B (en) DNS root server state monitoring method and device, electronic equipment and medium
CN115237816B (en) System function verification method and device, electronic equipment and readable storage medium
CN110597724B (en) Calling method and device of application security test component, server and storage medium
CN112882948A (en) Stability testing method, device and system for application and storage medium
CN111741046B (en) Data reporting method, data acquisition method, device, equipment and medium
CN111736919A (en) Buried point inspection method and device and electronic equipment
CN109714371B (en) Industrial control network safety detection system
CN108471635B (en) Method and apparatus for connecting wireless access points
CN113656301A (en) Interface testing method, device, equipment and storage medium
CN112799957A (en) User behavior based fault handling method, system, device and medium
CN110928801A (en) Role authority test method and device, computer medium and electronic equipment
CN113986517B (en) API call log acquisition method and device, electronic equipment and storage medium
CN111163155A (en) Account checking file transmission method, account checking file transmission system, account checking file transmission server and storage medium
CN115168690B (en) Data query method and device based on browser plug-in, electronic equipment and medium
CN115543391B (en) Application platform upgrading method and device, electronic equipment and readable storage medium
CN114781567B (en) Detection equipment installation method and device, electronic equipment and readable storage medium
CN110471841B (en) Method, device, medium and electronic equipment for comparing drawing information
CN114936387B (en) Text file reading method, text file writing method, electronic equipment and readable storage medium
CN115374488B (en) Vehicle-mounted terminal program checking method and device
CN112596966B (en) Chip verification method, device, equipment and 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
GR01 Patent grant
GR01 Patent grant