[go: up one dir, main page]

CN115237816A - 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
CN115237816A
CN115237816A CN202211154491.6A CN202211154491A CN115237816A CN 115237816 A CN115237816 A CN 115237816A CN 202211154491 A CN202211154491 A CN 202211154491A CN 115237816 A CN115237816 A CN 115237816A
Authority
CN
China
Prior art keywords
function
access
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.)
Granted
Application number
CN202211154491.6A
Other languages
Chinese (zh)
Other versions
CN115237816B (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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3604Analysis of software for verifying properties of programs
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
Along with the rapid change of enterprise business, an enterprise information system needs to be updated and iterated rapidly to adapt to the change of business, the complex business causes the business system to be huge and complex, a single system cannot realize all business functions and often depends on other systems, the function verification of the business system needs to be performed by maintenance personnel on the dependent other systems one by one, and the time consumption of 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 station 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 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.
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, by the system configuration information, an update state of the function of the station to be tested 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.
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 normal access verification result on a page, and displaying the 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 cause of 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 an access address of each station function to be tested, a request mode corresponding to the access address 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 station 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 access 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:
monitoring an updating event of the functions of the station to be tested to obtain the updating state of the functions of the station to be tested, and determining whether the main system finishes upgrading 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 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 access addresses of functions of sites to be tested, request modes corresponding to the access addresses and corresponding authentication information.
The present application further provides an electronic device, the 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 further provides a readable storage medium, which is a computer readable storage medium, on which a program for implementing a system function verification method is stored, and when executed by a processor, the program for implementing the system function verification method implements the steps of the system function verification method as described above.
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 the 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 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 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 diagram 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 structural relationship of the functional verification device of the system of 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 should be apparent that the described embodiments are only some embodiments of the present invention, and not all embodiments. 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 result to obtain function analysis information, and outputting the access verification result 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 site 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 re-verified; 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:
acquiring system configuration information which is configured and stored in advance, acquiring an access address of each station function to be tested according to the system configuration information, determining an access method, a corresponding authentication mode, required authentication information and the like corresponding to the access address, determining whether a main system is upgraded or updated by detecting the configured access address corresponding to the station function to be tested and determining the updating state of each station to be tested, and if the main system is upgraded or updated, automatically performing access verification on each station function to be tested according to the system configuration information to acquire access data generated by data exchange in the 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, 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 main 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 one by one on the platform page to display the finally obtained detection result, so as to visually see whether the functions of each site of the main 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, where 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, where 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, and the response packet includes three parts, where the first part is a response line, the second part is a response header, and the 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-bit number describing a situation occurring in the request process, the first bit number of each state code is used for describing a general category of a state, and the reason is a readable version of the response state code for describing a reason of normal or error occurrence, and the detection result determines whether or what kind of error occurs in each function to be detected 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-side error, which represents that an error occurs in processing, and the server-side error is responsible for, for example: 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 main system completes the upgrade includes:
step S21, monitoring the updating event of the functions of the station to be tested to obtain the updating state of the functions of the station to be tested, and determining whether the main system finishes upgrading 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 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.
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 a 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 site function to be tested with the access verification result of normal on a page, and displaying the normal state corresponding to the site function to be tested;
and S52, displaying the site function to be tested with the access verification result as 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.
Exemplarily, steps S51 to S52 include:
and if the access verification result is abnormal, listing the functions of the site to be tested and the corresponding normal state in the display page directly, and if the access verification result is abnormal, listing the functions of the site to be tested and the corresponding abnormal state in the display page, analyzing the reason of the abnormality according to the access verification result, and displaying the reason of the abnormality 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 a message is obtained and analyzed, whether the upgrade function is successful or not is determined, if yes, the related information of the normal state is displayed, if no, the related information of the abnormal state is displayed, and the details of the error of the difference point can be clicked.
After step S50, after the step of outputting the cause of the abnormality, the method further includes:
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 stored 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, 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, the corresponding authentication mode, the required authentication information, etc. can be obtained, where the authentication mode may be Oauth, JWT, etc.
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 station function to be tested from the access data; the method and the device have the advantages that the functions of the sites to be tested are analyzed according to the access verification results to obtain the 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 of function verification is shortened, the efficiency of 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 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 the 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-detected site function through the system configuration information to determine whether the main system is upgraded;
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 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 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 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 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 to be understood that not all illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. 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 by 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 appended claims.
Example four
The present embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon for performing the method for system function verification in the first embodiment.
The computer readable storage medium provided by the embodiments of the present invention may be, for example, a USB flash disk, but is 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 present alone without being incorporated into the electronic device.
The computer readable storage medium carries one or more programs which, when executed by the 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 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.
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 function energy 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 are not described herein again.
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 (10)

1. A system function verification method, comprising:
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 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.
2. The method for verifying system function according to claim 1, wherein 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 during access 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.
3. The system function verification method according to claim 1, wherein the step of determining the access verification result corresponding to each of the station functions 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.
4. 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 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.
5. 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 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.
6. The system function verification method of claim 5, 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.
7. 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.
8. A system function verification apparatus, comprising:
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 station 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.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
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 7.
10. 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 7.
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 true CN115237816A (en) 2022-10-25
CN115237816B 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 (11)

* 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
CN109669855A (en) * 2018-10-26 2019-04-23 上海维信荟智金融科技有限公司 Automated testing method and system based on analog interface
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
CN111176910A (en) * 2018-11-29 2020-05-19 通号城市轨道交通技术有限公司 System function testing method and device
CN112416796A (en) * 2020-12-03 2021-02-26 北京东土科技股份有限公司 Method and device for testing software upgrading
US20210089436A1 (en) * 2019-09-24 2021-03-25 Aetna Inc. Automated web testing framework for generating and maintaining test scripts
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
CN113726808A (en) * 2021-09-06 2021-11-30 杭州安恒信息安全技术有限公司 Website monitoring method, device, equipment and storage medium

Patent Citations (11)

* 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
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
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
US20210089436A1 (en) * 2019-09-24 2021-03-25 Aetna Inc. Automated web testing framework for generating and maintaining test scripts
CN112416796A (en) * 2020-12-03 2021-02-26 北京东土科技股份有限公司 Method and device for testing software upgrading
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
CN113726808A (en) * 2021-09-06 2021-11-30 杭州安恒信息安全技术有限公司 Website monitoring method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SACHIN SHARMA等: "Implementing Quality of Service for the Software Defined Networking Enabled Future Internet", 《2014 THIRD EUROPEAN WORKSHOP ON SOFTWARE DEFINED NETWORKS》 *
马晓宁: "单元测试云平台的研究与设计", 《CNKI优秀硕士学位论文全文库 信息科技辑》 *

Also Published As

Publication number Publication date
CN115237816B (en) 2022-12-27

Similar Documents

Publication Publication Date Title
CN112650685B (en) Automatic test method, device, electronic equipment and computer storage medium
CN104579830A (en) Service monitoring method and device
CN118409915A (en) CAN (controller area network) checksum script automatic generation method, device, equipment and storage medium
CN111736919A (en) Buried point inspection method and device and electronic equipment
CN118713924A (en) Port security automated testing method, device, equipment and storage medium
CA3141546A1 (en) Log-based testing method, device, and computer system
CN112445697B (en) Method and apparatus for testing applications
CN109491908B (en) Page detection method and device, electronic equipment and storage medium
CN116074105B (en) Network attack data set construction method, device, electronic device and storage medium
CN110928801A (en) Role authority test method and device, computer medium and electronic equipment
CN115237816B (en) System function verification method and device, electronic equipment and readable storage medium
CN112084114B (en) Method and apparatus for testing interfaces
CN118133292B (en) System safety detection method, device, electronic device and readable storage medium
CN109818972A (en) A kind of industrial control system information security management method, device and electronic equipment
CN112882948A (en) Stability testing method, device and system for application and storage medium
CN110597724B (en) Calling method and device of application security test component, server and storage medium
CN113986517A (en) API call log acquisition method and device, electronic equipment and storage medium
CN116662193A (en) Page testing method and device
CN116257432A (en) Service system testing method and device
CN108471635B (en) Method and apparatus for connecting wireless access points
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
CN119621594B (en) Method and device for parallel online operation and testing and debugging of authorization process
CN114781567B (en) Detection equipment installation method and device, electronic equipment and readable storage medium
CN115760417B (en) Transaction behavior detection method and device, electronic equipment and 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
GR01 Patent grant
GR01 Patent grant