CN113886245A - System acceptance method and device based on artificial intelligence, computer equipment and medium - Google Patents

System acceptance method and device based on artificial intelligence, computer equipment and medium Download PDF

Info

Publication number
CN113886245A
CN113886245A CN202111157613.2A CN202111157613A CN113886245A CN 113886245 A CN113886245 A CN 113886245A CN 202111157613 A CN202111157613 A CN 202111157613A CN 113886245 A CN113886245 A CN 113886245A
Authority
CN
China
Prior art keywords
script
target
execution record
determining
execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111157613.2A
Other languages
Chinese (zh)
Inventor
冯仰威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202111157613.2A priority Critical patent/CN113886245A/en
Publication of CN113886245A publication Critical patent/CN113886245A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis
    • 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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Abstract

The application relates to the field of artificial intelligence, script comparison is carried out on a script set and a script execution record set through automatically generating the script set and the script execution record set, script coverage rate is obtained, a test case does not need to be manually compiled for verification, and reliability and efficiency of system acceptance check are improved. To a system acceptance method, apparatus, computer device and medium based on artificial intelligence, the method comprising: determining a target system to be checked and accepted, and determining a script set corresponding to the target system; responding to the instruction of the script execution operation, executing the script in the script set according to the instruction of the script execution operation, and generating a script execution record; after the script execution operation is finished, acquiring a script execution record set; comparing the script set with the script execution record set to determine the script coverage rate; and determining the acceptance result of the target system according to the script coverage rate. In addition, the application also relates to a block chain technology, and the script execution record set can be stored in the block chain.

Description

System acceptance method and device based on artificial intelligence, computer equipment and medium
Technical Field
The present application relates to the field of artificial intelligence, and in particular, to a system acceptance method and apparatus, a computer device, and a medium based on artificial intelligence.
Background
The coverage rate is used for evaluating the reliability, stability and performance of the system and is an important index for acceptance of the system. In a traditional system acceptance mode, test cases are generally manually compiled, and each test case is verified one by one. When all test cases are verified, the system meets the acceptance criteria. However, in the system acceptance mode, because the test case is manually written, some scenes which are not directly related to the service function are easily missed, and the reliability of the system acceptance is reduced. In addition, the system verification efficiency is low due to the fact that the test cases are manually written for verification.
Therefore, how to improve the reliability and efficiency of system acceptance becomes an urgent problem to be solved.
Disclosure of Invention
The application provides a system acceptance method, a system acceptance device, computer equipment and a medium based on artificial intelligence, a test case does not need to be manually compiled for verification, scene omission is avoided, and reliability and efficiency of system acceptance are improved.
In a first aspect, the present application provides a method for artificial intelligence based system acceptance, the method comprising:
determining a target system to be checked and accepted, and determining a script set corresponding to the target system, wherein the script set comprises at least one script;
responding to an instruction of script execution operation, executing the script in the script set according to the instruction of the script execution operation, and generating a script execution record;
after the script execution operation is completed, acquiring a script execution record set, wherein the script execution record set comprises execution records corresponding to each executed script;
comparing the script set with the script execution record set to determine the script coverage rate of the target system;
and determining the acceptance result of the target system according to the script coverage rate.
In a second aspect, the present application further provides a system acceptance device, the device comprising:
the script set acquisition module is used for determining a target system to be checked and accepted and determining a script set corresponding to the target system, wherein the script set comprises at least one target script;
the script execution module is used for responding to a script execution operation instruction, executing the script in the script set according to the script execution operation instruction and generating a script execution record;
the record set acquisition module is used for acquiring a script execution record set after the script execution operation is finished, wherein the script execution record set comprises execution records corresponding to each executed script;
the coverage rate determining module is used for carrying out script comparison on the script set and the script execution record set to determine the script coverage rate of the target system;
and the acceptance result determining module is used for determining the acceptance result of the target system according to the script coverage rate.
In a third aspect, the present application further provides a computer device comprising a memory and a processor;
the memory for storing a computer program;
the processor is used for executing the computer program and realizing the system acceptance method based on artificial intelligence when the computer program is executed.
In a fourth aspect, the present application also provides a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to implement the artificial intelligence based system acceptance method as described above.
The application discloses a system acceptance method, a system acceptance device, computer equipment and a medium based on artificial intelligence, which are used for automatically generating a script set of a target system by determining the target system to be accepted and determining the script set corresponding to the target system, and subsequently verifying the target system according to the scripts in the script set without manually writing a test case to verify the target system; by responding to the instruction of the script execution operation and executing the script in the script set according to the instruction of the script execution operation, the function verification of the target system can be realized through the execution script, and scene omission is avoided; by generating the script execution records, the execution record set of the execution record script corresponding to each executed script can be obtained after the script execution operation is completed; script coverage rate of the target system can be conveniently and accurately determined by comparing the script set with the script execution record set; the acceptance result of the target system is determined according to the script coverage rate, so that the reliability and efficiency of the acceptance of the system are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a system acceptance method based on artificial intelligence provided by an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram of substeps of determining a script set provided by an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram of substeps of obtaining a set of script execution records provided by an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a script comparison between a script set and a script execution record set according to an embodiment of the present application;
FIG. 5 is a schematic block diagram of a system acceptance device provided in an embodiment of the present application;
fig. 6 is a schematic block diagram of a structure of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. 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 application.
The flow diagrams depicted in the figures are merely illustrative and do not necessarily include all of the elements and operations/steps, nor do they necessarily have to be performed in the order depicted. For example, some operations/steps may be decomposed, combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It is to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
The embodiment of the application provides a system acceptance method, a system acceptance device, computer equipment and a medium based on artificial intelligence. The system acceptance method based on artificial intelligence can be applied to a server or a terminal, scripts in the script set are executed and a script execution record set is generated by automatically generating the script set of a target system, and then script comparison can be carried out on the script set and the script execution record set to obtain script coverage rate, a test case does not need to be manually written for verification, scene omission is avoided, and reliability and efficiency of system acceptance are improved.
The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like. The terminal can be an electronic device such as a smart phone, a tablet computer, a notebook computer, a desktop computer and the like.
It should be noted that, the embodiment of the present application may acquire and process related data based on an artificial intelligence technique. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result. The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
As shown in fig. 1, the artificial intelligence based system acceptance method includes steps S10 to S50.
Step S10, determining a target system to be checked and accepted, and determining a script set corresponding to the target system, wherein the script set comprises at least one script.
In the embodiment of the application, system acceptance can be performed on a system acceptance interface of a server or a terminal; firstly, automatically generating a script set of a target system, executing scripts in the script set and generating a script execution record set; then, script comparison is carried out on the script set and the script execution record set to obtain script coverage rate; and finally, determining the acceptance result of the target system according to the script coverage rate, and outputting the acceptance result on a system acceptance interface.
For example, the system loaded on the system acceptance interface of the server or the terminal can be determined as the target system to be accepted. It should be noted that the target system may be various business systems, such as a claims settlement system, a policy system, a payment system, a registration system, a visit system, and the like. Wherein the target system may be a newly developed or updated system.
Illustratively, scripts may include, but are not limited to, select scripts, update scripts, detete scripts, insert scripts, and the like. Wherein, different scripts execute different functions. It should be noted that a script is a plain text saving program, and each script is a word command. In the embodiment of the application, the function of the target system can be verified by executing the script.
The script set of the target system is automatically generated by determining the script set corresponding to the target system, the target system can be verified subsequently according to the scripts in the script set, a test case does not need to be manually compiled to verify the target system, and scene omission is avoided.
Referring to fig. 2, fig. 2 is a schematic flowchart of a sub-step of determining a script set corresponding to a target system according to an embodiment of the present application, and specifically includes the following steps S101 to S104.
And S101, acquiring a source code file from a code library corresponding to the target system according to preset source code information.
It should be noted that the source code file refers to all code written in the target system, and includes pictures, xml files, and other types of files.
For example, the preset source code information may include a corresponding repository address and version number of the source code file. The repository address refers to an address or a path for storing a source code file in a code base corresponding to the target system; the version number is used to determine the version of the source code file.
Illustratively, the source code file may be downloaded from the code library in an HTTP (HyperText Transfer Protocol) manner according to the repository address and the version number corresponding to the source code file.
The source code file is obtained from the code base corresponding to the target system according to the source code information, and then the script set can be generated according to the source code file. It can be understood that, because the source code file constitutes each function of the target system, the situation of scene omission caused by manually writing a test case can be avoided by automatically generating a script according to the source code file and executing the script to perform function verification on the target file.
And step S102, extracting at least one extensible markup language file from the source code file according to preset script path information.
The extensible Markup language file is an xml (extensible Markup language) file. Wherein the extensible markup language file is used for transmitting and storing data. In an embodiment of the present application, the contents of the script are stored in an extensible markup language file.
Illustratively, the script path information may include a storage path of the extensible markup language file in the source code file. The script path information may be pre-configured and stored in a local database or a local disk.
In some embodiments, the source code file may be scanned through the IO stream according to the script path information to obtain at least one xml file. It should be noted that the IO stream includes an Input (Input) stream and an Output (Output) stream; wherein the input stream is used for reading external data into the program, and the output stream is used for writing data to the outside. In the embodiment of the application, the extensible markup language file can be extracted from the source code file through the input stream and the output stream.
Step S103, analyzing each extensible markup language file to obtain at least one script corresponding to each extensible markup language file.
The parsing means reading related information in the xml file, for example, reading tags and text in the xml file.
In some embodiments, parsing each xml file to obtain at least one script corresponding to each xml file may include: determining a first label and a second label corresponding to each script in each extensible markup language file; extracting a text between a first label and a second label corresponding to each script from each extensible markup language file to obtain a target text corresponding to each script; and based on a preset format processing strategy, performing format processing on the target text corresponding to each script, and determining the target text after the format processing as each script.
Note that, in the xml file, one or more scripts exist. Each script is provided with a corresponding first label and a corresponding second label; the first label and the second label are used for distinguishing corresponding scripts, the first label is located at the beginning of the script, and the second label is located at the end of the script.
For example, the first tag and the second tag corresponding to each script in each xml file may be determined in turn. For example, the first tag corresponding to the select script is < select >, and the second tag is </select >; the first label corresponding to the update script is < update >, and the second label is </update >; the first label corresponding to the detete script is < delete >, and the second label is </delete >; the first label corresponding to the insert script is < insert >, and the second label is </insert >.
For example, the text between the first tag and the second tag corresponding to each script may be determined as the target text corresponding to each script. For example, the text "SELECT a. list _ NAME" PARTYNAME ", a. ID" ID NO ", a. list _ ID" part NO "FROM L _ entry _ ID _ MAS A WHERE a. appl _ NO # applNo #" between the first tag < SELECT > and the second tag </SELECT > may be determined as the target text corresponding to the SELECT script. For another example, the text "update cfs _ application _ process cap set cap current _ state [ # state #, cap current _ follow [ # follow #, cap process sequence no, # where cap current _ no, # apply #", between the first tag < update > and the second tag </update > may be determined as the target text corresponding to the update script.
By determining the first label and the second label corresponding to each script in each extensible markup language file, the text between the first label and the second label corresponding to each script can be accurately extracted from each extensible markup language file.
For example, after the target text corresponding to each script is obtained, format processing may be performed on the target text corresponding to each script based on a preset format processing policy, and the target text after format processing is determined as each script.
Wherein the format handling policy includes at least one of character deletion, character replacement, label deletion, and label replacement.
In the embodiment of the present application, the special characters in the target text may be deleted or replaced. For example, an enter character, a line feed character in the target text are deleted, and a "#. #" character in the target text is replaced with a "#." -character. For example, delete < isNotEmpty > tag, </isNotEmpty > tag, < | in the target text! [ CDATA [ ] ] > tags, < isEqual > tags, and </isEqual > tags, and the like. For another example, the "< operation >, </operation >" tag in the target text is replaced with a "()" character.
By deleting or replacing the special characters in the target text, on one hand, the comparison logic of the subsequent script set and the script execution record set can be simplified, and on the other hand, the problem that the script set and the script execution record set cannot be accurately compared due to different encoding modes of the special characters can be avoided. It should be noted that, by deleting the special characters, the script set can be directly compared with the script execution record set, thereby simplifying the comparison logic. Because the special characters adopt different coding modes in different systems, the accuracy of comparing the script set with the script execution record set can be improved by deleting the special characters.
And step S104, adding each obtained script to a preset first array to obtain the script set.
Illustratively, each script may be added to the first array, so that a set of scripts may be obtained. For example, the script set is shown in Table 1.
TABLE 1
select script
update script
delete script
insert script
And step S20, responding to the instruction of the script executing operation, executing the script in the script set according to the instruction of the script executing operation, and generating a script executing record.
It should be noted that, in the embodiment of the present application, a user may execute a script in a script set on a system acceptance interface according to an actual requirement, so as to perform function verification on a target system. For example, the user may execute a portion of the scripts in the script set, or may execute all of the scripts in the script set. In addition, the user may execute the scripts in the script set sequentially or may execute the scripts in the script set in batches.
In some embodiments, when an instruction of a script execution operation of a user is detected, a script in the script set is executed according to the instruction of the script execution operation, and a script execution record is generated. The script execution record may include a script type and an execution time corresponding to the executed script. After the script execution record is generated, the script execution record may be stored to a database.
By executing the script in the script set according to the instruction of the script execution operation, the function verification of the target system can be realized according to the script, and scene omission is avoided; by generating the script execution record, the execution record set of the execution record script corresponding to each executed script can be further acquired after the script execution operation is completed.
And step S30, after the script execution operation is completed, acquiring a script execution record set, wherein the script execution record set comprises execution records corresponding to each executed script.
It should be noted that when the user finishes executing the script in the script set on the system acceptance interface, this function verification is completed. At this time, a script execution record set corresponding to the function verification may be obtained.
By obtaining the script execution record set, the execution record corresponding to each executed script can be obtained, and script comparison can be performed on the script execution record set and the script set subsequently, so that the script coverage rate can be determined.
Referring to fig. 3, fig. 3 is a schematic flowchart of a sub-step of acquiring a script execution record set according to an embodiment of the present application, and specifically includes the following steps S301 to S303.
Step S301, according to preset database configuration information, determining a target database and logging in the target database, wherein the target database stores execution records corresponding to a plurality of scripts.
The database configuration information may be configured in advance to determine a target database storing the execution record of the script and a login target database. The database configuration information may include a database address, a user name, a user password, and the like.
Illustratively, the target database may be determined based on the database address; and logging in a target database according to the user name and the user password based on a database connection technology.
The database connection technology is jdbc (java Data Base connectivity) technology. It should be noted that JDBC is a Java API (Application Programming Interface) for SQL statements, and is composed of a set of classes and interfaces, and by calling methods provided by these classes and interfaces, standard SQL (Structured Query Language) can be used to access data in a database.
Step S302, according to script configuration information corresponding to the target system, querying the target database after logging in to obtain at least one target execution record, wherein the script configuration information comprises script type information and a script execution time period.
It should be noted that the script configuration information is configured in advance, and is used to screen the target execution record meeting the condition from the target database. The script configuration information may include script type information and a script execution time period. The script type information may include, but is not limited to, update, insert, select, delete, and the like; the script execution time period can be determined according to the starting time and the ending time corresponding to the script in the script set executed by the user on the system acceptance interface.
For example, the logged target database may be queried according to the script type information and the script execution time period to obtain at least one target execution record. The target execution record may include script type, script execution time, script content, and the like.
By querying the logged target database according to the script type information and the script execution time period, the target execution record can be accurately obtained.
Step S303, determining the script execution record set according to the at least one target execution record.
It should be noted that after at least one target execution record is obtained, format processing needs to be performed on the target execution record; and generating a script execution record set according to the at least one object execution record after the format processing.
In some embodiments, determining a set of script execution records based on at least one target execution record may include: performing character replacement on each target execution record based on a preset character replacement strategy to obtain an execution record after the character replacement; and adding the execution record after the character replacement to a preset second array to obtain a script execution record set.
For example, character replacement may be performed on script content in the target execution record. For example, when character replacement is performed on the script content in each target execution record, special characters such as a carriage return character, a line feed character, and a placeholder in each target execution record may be replaced with a space character. And then, according to the script execution time of the execution record, adding the execution record after the character replacement to a preset second array to obtain a script execution record set.
To further ensure privacy and security of the script execution record set, the script execution record set may be stored in a node of a block chain.
By replacing the special characters of the script content in the target execution record, the comparison logic of the subsequent script set and the script execution record set can be simplified, and the accuracy and the efficiency of comparison are improved.
And step S40, comparing the script set with the script execution record set to determine the script coverage rate of the target system.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating script comparison between a script set and a script execution record set according to an embodiment of the present application. As shown in FIG. 4, the script set includes a plurality of scripts, e.g., script 1, script 2, and script 3, among others; the script execution record combination includes a plurality of execution records, for example, execution record 1, execution record 2, and execution record 3, and so on.
In some embodiments, the script comparing the script set with the script execution record set to determine the script coverage of the target system may include: performing script execution record matching on each script in the script set based on the script execution record set; and determining the number of scripts corresponding to the scripts successfully matched, and determining the script coverage rate according to the ratio of the number of the scripts to the total number of the scripts of the script set.
The script execution record matching is to determine whether a corresponding script execution record exists in the scripts in the script set. In the matching process, the scripts in the script set can be compared with the script contents in the script execution record, and if the scripts have the same script contents, it is determined that the scripts are successfully matched, that is, the scripts are executed scripts. And if the script does not have the same script content, determining that the script fails to be matched, namely that the script is an unexecuted script.
For example, after determining the number of scripts corresponding to the successfully matched scripts in the script set, the script coverage rate may be determined according to the number of scripts corresponding to the successfully matched scripts and the total number of scripts in the script set. For example, if the number of scripts corresponding to the successfully matched scripts is a, and the total number of scripts in the script set is K, the script coverage rate can be calculated by the following formula.
Figure BDA0003288858030000111
In the formula, R represents a script coverage.
In other embodiments, the script comparing the script set with the script execution record set to determine the script coverage of the target system may include: performing script execution record matching on each script in the script set based on the script execution record set; determining the number of first scripts corresponding to the scripts which are successfully matched, and determining the number of second scripts corresponding to the scripts which are failed to be matched; and determining the script coverage rate according to the first script quantity and the second script quantity.
Illustratively, if the number of the first scripts corresponding to the successfully matched scripts is A1The number of the second scripts corresponding to the scripts with failed matching is A2Then the script coverage rate R can be calculated by the following formula.
Figure BDA0003288858030000112
Script coverage rate of the target system can be conveniently and accurately determined by comparing the script set with the script execution record set.
And step S50, determining the acceptance result of the target system according to the script coverage rate.
Illustratively, when the script coverage rate is greater than or equal to a preset coverage rate threshold value, determining that the acceptance result of the target system is passing acceptance; and when the script coverage rate is smaller than the coverage rate threshold value, determining that the acceptance result of the target system is not passed acceptance. The preset coverage rate threshold may be set according to an actual situation, and a specific numerical value is not limited herein.
Illustratively, the acceptance results may be displayed on a system acceptance interface.
By means of the script coverage rate, the acceptance result of the target system can be accurately determined, and therefore reliability and efficiency of system acceptance are improved.
In the embodiment of the application, a script analysis result can be generated according to the script coverage rate, the executed script and the unexecuted script, and the script analysis result is output. The script analysis result can be displayed in a report form. Illustratively, when the script analysis result is output, the script analysis result can be directly displayed on a system acceptance interface; and sending the script analysis result to the user terminal of the target user based on a preset sending mode. For example, the script analysis result may be sent to the user terminal in a short message, an email, an instant message, or the like.
The script analysis result is generated according to the script coverage rate, the executed script and the unexecuted script and is sent to the target user, so that the target user can conveniently and visually check the condition of the functional verification of the target system, further, whether the target system can be on-line or not can be determined according to the script coverage rate, the functional verification is carried out on the target system again according to the unexecuted script, and scene omission is avoided.
The artificial intelligence based system acceptance method provided by the embodiment realizes automatic generation of the script set of the target system by determining the target system to be accepted and determining the script set corresponding to the target system, and subsequently can verify the target system according to the scripts in the script set without manually compiling a test case to verify the target system; the script is automatically generated according to the source code file, and the script is executed to perform function verification on the target file, so that the situation of scene omission caused by manual test case compiling can be avoided; by deleting or replacing the special characters in the target text, on one hand, the comparison logic of the subsequent script set and the script execution record set can be simplified, and on the other hand, the situation that the script set and the script execution record set cannot be accurately compared due to different encoding modes of the special characters can be avoided; by acquiring the script execution record set, the execution record corresponding to each executed script can be acquired, and script comparison can be performed on the script execution record set and the script set subsequently, so that the script coverage rate can be determined; script comparison is carried out on the script set and the script execution record set, so that the script coverage rate of the target system can be conveniently and accurately determined, the acceptance result of the target system can be accurately determined according to the script coverage rate, and the reliability and the efficiency of system acceptance are improved; the script analysis result is generated according to the script coverage rate, the executed script and the unexecuted script and is sent to the target user, so that the target user can conveniently and visually check the condition of the functional verification of the target system, further, whether the target system can be on-line or not can be determined according to the script coverage rate, the functional verification is carried out on the target system again according to the unexecuted script, and scene omission is avoided.
Referring to fig. 5, fig. 5 is a schematic block diagram of a system acceptance device 1000 for executing the artificial intelligence based system acceptance method according to an embodiment of the present application. Wherein, the system acceptance device can be configured in the server or the terminal.
As shown in fig. 5, the system acceptance device 1000 includes: a script set acquisition module 1001, a script execution module 1002, a record set acquisition module 1003, a coverage determination module 1004, and an acceptance result determination module 1005.
The script set obtaining module 1001 is configured to determine a target system to be checked and accepted, and determine a script set corresponding to the target system, where the script set includes at least one target script.
The script execution module 1002 is configured to, in response to an instruction of a script execution operation, execute a script in the script set according to the instruction of the script execution operation, and generate a script execution record.
A record set obtaining module 1003, configured to obtain a script execution record set after the script execution operation is completed, where the script execution record set includes an execution record corresponding to each executed script.
A coverage rate determining module 1004, configured to perform script comparison on the script set and the script execution record set, and determine a script coverage rate of the target system.
And an acceptance result determining module 1005, configured to determine an acceptance result of the target system according to the script coverage.
It should be noted that, as will be clear to those skilled in the art, for convenience and brevity of description, the specific working processes of the apparatus and the modules described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The apparatus described above may be implemented in the form of a computer program which is executable on a computer device as shown in fig. 6.
Referring to fig. 6, fig. 6 is a schematic block diagram of a computer device according to an embodiment of the present disclosure.
Referring to fig. 6, the computer device includes a processor and a memory connected by a system bus, wherein the memory may include a storage medium and an internal memory. The storage medium includes both nonvolatile storage media and volatile storage media.
The processor is used for providing calculation and control capability and supporting the operation of the whole computer equipment.
The internal memory provides an environment for the execution of a computer program on a storage medium, which when executed by the processor causes the processor to perform any one of the artificial intelligence based system acceptance methods.
It should be understood that the Processor may be a Central Processing Unit (CPU), and the Processor may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein, in one embodiment, the processor is configured to execute a computer program stored in the memory to implement the steps of:
determining a target system to be checked and accepted, and determining a script set corresponding to the target system, wherein the script set comprises at least one script; responding to an instruction of script execution operation, executing the script in the script set according to the instruction of the script execution operation, and generating a script execution record; after the script execution operation is completed, acquiring a script execution record set, wherein the script execution record set comprises execution records corresponding to each executed script; comparing the script set with the script execution record set to determine the script coverage rate of the target system; and determining the acceptance result of the target system according to the script coverage rate.
In one embodiment, the processor, when implementing determining the script set corresponding to the target system, is configured to implement:
acquiring a source code file from a code library corresponding to the target system according to preset source code information; extracting at least one extensible markup language file from the source code file according to preset script path information; analyzing each extensible markup language file to obtain at least one script corresponding to each extensible markup language file; and adding each obtained script to a preset first array to obtain the script set.
In an embodiment, when the processor implements parsing on each xml file to obtain at least one script corresponding to each xml file, the processor is configured to implement:
determining a first label and a second label corresponding to each script in each extensible markup language file; extracting a text between a first label and a second label corresponding to each script from each extensible markup language file to obtain a target text corresponding to each script; and performing format processing on the target text corresponding to each script based on a preset format processing strategy, and determining the target text after the format processing as each script.
In one embodiment, the processor, when implementing obtaining the set of script execution records, is configured to implement:
determining a target database and logging in the target database according to preset database configuration information, wherein the target database stores execution records corresponding to a plurality of scripts; querying the logged target database according to script configuration information corresponding to the target system to obtain at least one target execution record, wherein the script configuration information comprises script type information and a script execution time period; and determining the script execution record set according to the at least one target execution record.
In one embodiment, the processor, when implementing the determining the set of script execution records according to the at least one target execution record, is configured to implement:
performing character replacement on each target execution record based on a preset character replacement strategy to obtain an execution record after character replacement; and adding the execution record after the character replacement to a preset second array to obtain the script execution record set.
In one embodiment, the processor, when performing script comparison of the script set with the script execution record set to determine script coverage of the target system, is configured to perform:
performing script execution record matching on each script in the script set based on the script execution record set; and determining the script number corresponding to the script successfully matched, and determining the script coverage rate according to the ratio of the script number to the total script number of the script set.
The embodiment of the application also provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, the computer program comprises program instructions, and the processor executes the program instructions to realize any artificial intelligence-based system acceptance method provided by the embodiment of the application.
For example, the program is loaded by a processor and may perform the following steps:
determining a target system to be checked and accepted, and determining a script set corresponding to the target system, wherein the script set comprises at least one script; responding to an instruction of script execution operation, executing the script in the script set according to the instruction of the script execution operation, and generating a script execution record; after the script execution operation is completed, acquiring a script execution record set, wherein the script execution record set comprises execution records corresponding to each executed script; comparing the script set with the script execution record set to determine the script coverage rate of the target system; and determining the acceptance result of the target system according to the script coverage rate.
The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, for example, a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital Card (SD Card), a Flash memory Card (Flash Card), and the like provided on the computer device.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A system acceptance method based on artificial intelligence is characterized by comprising the following steps:
determining a target system to be checked and accepted, and determining a script set corresponding to the target system, wherein the script set comprises at least one script;
responding to an instruction of script execution operation, executing the script in the script set according to the instruction of the script execution operation, and generating a script execution record;
after the script execution operation is completed, acquiring a script execution record set, wherein the script execution record set comprises execution records corresponding to each executed script;
comparing the script set with the script execution record set to determine the script coverage rate of the target system;
and determining the acceptance result of the target system according to the script coverage rate.
2. The artificial intelligence based system acceptance method of claim 1, wherein the determining the script set corresponding to the target system comprises:
acquiring a source code file from a code library corresponding to the target system according to preset source code information;
extracting at least one extensible markup language file from the source code file according to preset script path information;
analyzing each extensible markup language file to obtain at least one script corresponding to each extensible markup language file;
and adding each obtained script to a preset first array to obtain the script set.
3. The artificial intelligence based system acceptance method of claim 2, wherein the parsing each of the xml files to obtain at least one script corresponding to each of the xml files comprises:
determining a first label and a second label corresponding to each script in each extensible markup language file;
extracting a text between a first label and a second label corresponding to each script from each extensible markup language file to obtain a target text corresponding to each script;
and performing format processing on the target text corresponding to each script based on a preset format processing strategy, and determining the target text after the format processing as each script.
4. The artificial intelligence based system acceptance method of claim 3 wherein the format handling policy includes at least one of character deletion, character replacement, label deletion and label replacement.
5. The artificial intelligence based system acceptance method of claim 1 wherein the obtaining a set of script execution records comprises:
determining a target database and logging in the target database according to preset database configuration information, wherein the target database stores execution records corresponding to a plurality of scripts;
querying the logged target database according to script configuration information corresponding to the target system to obtain at least one target execution record, wherein the script configuration information comprises script type information and a script execution time period;
and determining the script execution record set according to the at least one target execution record.
6. The artificial intelligence based system acceptance method of claim 5, wherein the determining the set of script execution records from the at least one target execution record comprises:
performing character replacement on each target execution record based on a preset character replacement strategy to obtain an execution record after character replacement;
and adding the execution record after the character replacement to a preset second array to obtain the script execution record set.
7. The artificial intelligence based system acceptance method of claim 1, wherein the script comparing the script set with the script execution record set to determine the script coverage of the target system comprises:
performing script execution record matching on each script in the script set based on the script execution record set;
and determining the script number corresponding to the script successfully matched, and determining the script coverage rate according to the ratio of the script number to the total script number of the script set.
8. A system acceptance device, comprising:
the script set acquisition module is used for determining a target system to be checked and accepted and determining a script set corresponding to the target system, wherein the script set comprises at least one target script;
the script execution module is used for responding to a script execution operation instruction, executing the script in the script set according to the script execution operation instruction and generating a script execution record;
the record set acquisition module is used for acquiring a script execution record set after the script execution operation is finished, wherein the script execution record set comprises execution records corresponding to each executed script;
the coverage rate determining module is used for carrying out script comparison on the script set and the script execution record set to determine the script coverage rate of the target system;
and the acceptance result determining module is used for determining the acceptance result of the target system according to the script coverage rate.
9. A computer device comprising a memory and a processor, the memory for storing a computer program; characterized in that the processor is adapted to execute the computer program and to implement the artificial intelligence based system acceptance method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, causes the processor to carry out the artificial intelligence based system acceptance method according to any one of claims 1 to 7.
CN202111157613.2A 2021-09-30 2021-09-30 System acceptance method and device based on artificial intelligence, computer equipment and medium Pending CN113886245A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111157613.2A CN113886245A (en) 2021-09-30 2021-09-30 System acceptance method and device based on artificial intelligence, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111157613.2A CN113886245A (en) 2021-09-30 2021-09-30 System acceptance method and device based on artificial intelligence, computer equipment and medium

Publications (1)

Publication Number Publication Date
CN113886245A true CN113886245A (en) 2022-01-04

Family

ID=79004742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111157613.2A Pending CN113886245A (en) 2021-09-30 2021-09-30 System acceptance method and device based on artificial intelligence, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN113886245A (en)

Similar Documents

Publication Publication Date Title
US10467316B2 (en) Systems and methods for web analytics testing and web development
CN108628748B (en) Automatic test management method and automatic test management system
CN111858727B (en) Multi-data source data export system and method based on template configuration
CN110928802A (en) Test method, device, equipment and storage medium based on automatic generation of case
CN112559354A (en) Front-end code specification detection method and device, computer equipment and storage medium
CN111026670B (en) Test case generation method, test case generation device and storage medium
CN111651468A (en) Data updating method and device based on SQL analysis, electronic equipment and storage medium
CN113076104A (en) Page generation method, device, equipment and storage medium
CN113448862B (en) Software version testing method and device and computer equipment
CN111694749A (en) Automatic interface testing method and device, computer equipment and readable storage medium
CN111858376A (en) Request message generation method and interface test method
CN111400170A (en) Data permission testing method and device
CN110941779A (en) Page loading method and device, storage medium and electronic equipment
CN113157315A (en) Method, device, equipment and medium for identifying difference information of different versions of software
CN112256318A (en) Construction method and equipment for dependent product
CN115328759A (en) Form verification method and device
CN113434217B (en) Vulnerability scanning method, vulnerability scanning device, computer equipment and medium
CN113112270B (en) Data organization method based on block chain
CN113886245A (en) System acceptance method and device based on artificial intelligence, computer equipment and medium
CN114386853A (en) Data auditing processing method, device and equipment based on universal auditing model
WO2017143931A1 (en) Method and apparatus for identifying smart card, method and apparatus for processing smart card identification data, and device
CN114115856A (en) Code multiplexing method, device, storage medium and computer equipment
CN113722225A (en) Page testing method and device, computer equipment and storage medium
CN112417020A (en) Method and device for realizing service expansion, computer equipment and storage medium
CN114205276B (en) Performance test method and device for product management system and electronic equipment

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