CN117648252A - Function test method and device for software application, electronic equipment and storage medium - Google Patents

Function test method and device for software application, electronic equipment and storage medium Download PDF

Info

Publication number
CN117648252A
CN117648252A CN202311618686.6A CN202311618686A CN117648252A CN 117648252 A CN117648252 A CN 117648252A CN 202311618686 A CN202311618686 A CN 202311618686A CN 117648252 A CN117648252 A CN 117648252A
Authority
CN
China
Prior art keywords
software application
tested
test
determining
function
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
CN202311618686.6A
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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202311618686.6A priority Critical patent/CN117648252A/en
Publication of CN117648252A publication Critical patent/CN117648252A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a functional test method, a device, electronic equipment and a storage medium of a software application, and relates to the technical field of automatic test, wherein the method comprises the following steps: determining attribute information of a software application to be tested deployed in a target environment; determining whether the software application to be tested is a target software application or not based on the attribute information and the reference attribute information; if the software application to be tested is the target software application, determining an evaluation parameter and a test script set of the software application to be tested based on a function set to be tested of the software application to be tested; and determining a functional test result of the software application to be tested based on the evaluation parameters and the running data of each test script. According to the method and the device for testing the application, the evaluation parameters and the test script set of the software application to be tested can be determined according to the function to be tested of the software application to be tested, the function test result of the software application to be tested is determined based on the running data and the evaluation parameters of each test script, the application can be automatically tested, human resources are saved, and the test efficiency and the test accuracy of the application are improved.

Description

Function test method and device for software application, electronic equipment and storage medium
Technical Field
The present invention relates to the field of automated testing technologies, and in particular, to a method and apparatus for testing functions of a software application, an electronic device, and a storage medium.
Background
With the development of society and the improvement of scientific technology, the performance requirements of people on information service systems (namely applications) are higher and higher, the information service system is more and more complex, the data level is more and more huge, and the accuracy and efficiency of the performance or function test of the service system are one of the key problems which are concerned by related people.
Currently, a general method for performance testing is project group deployment application, a tester formulates an evaluation index based on test experience, and determines a functional test result of the application based on test data applied to the relevant evaluation index. However, in the prior art, quantitative indexes of performance or function tests of each application and unified evaluation standards of planning are not defined, generally, a tester determines the evaluation indexes according to evaluation experience and evaluates the evaluation indexes, the test efficiency of the application function is low, the evaluation result is not comprehensive and accurate enough, a large amount of manpower resources are wasted, and then, once the test level of the tester is limited or the tester is doped with subjective consciousness in the test process, the test result of the application is seriously affected.
Disclosure of Invention
The invention provides a functional test method, a functional test device, electronic equipment and a storage medium of a software application, which aim to automatically test the software application, save human resources and improve the test efficiency and the test accuracy of the software application.
According to an aspect of the present invention, there is provided a method of testing a function of a software application, the method comprising:
determining attribute information of a software application to be tested deployed in a target environment;
determining whether the software application to be tested is a target software application or not based on the attribute information and the reference attribute information;
if the software application to be tested is the target software application, determining an evaluation parameter and a test script set of the software application to be tested based on a function set to be tested of the software application to be tested, wherein the function set to be tested comprises at least one function to be tested, and the test script set comprises at least one test script which corresponds to the function to be tested one by one;
and determining a functional test result of the software application to be tested based on the evaluation parameters and the running data of each test script.
Optionally, before determining the attribute information of the software application to be tested deployed in the target environment, the method further includes: a target environment is determined.
Optionally, determining the target environment includes: determining environmental parameters of an initial environment; determining whether the preset environmental parameters are consistent with the environmental parameters of the initial environment; if the preset environment parameters are consistent with the environment parameters of the initial environment, determining the initial environment as a target environment; if the preset environment parameters are inconsistent with the environment parameters of the initial environment, the environment parameters of the initial environment are adjusted based on the preset environment parameters, and the initial environment after the environment parameters are adjusted is determined to be the target environment.
Optionally, the attribute information includes version data of the software application to be tested, and the reference attribute information includes version data of the target software application.
Optionally, determining whether the software application to be tested is the target software application based on the attribute information and the reference attribute information includes: determining whether the version data of the software application to be tested is consistent with the version data of the target software application; if the version data of the software application to be tested is consistent with the version data of the target software application, determining that the software application to be tested is the target software application; and if the version data of the software application to be tested is inconsistent with the version data of the target software application, determining that the software application to be tested is not the target software application.
Optionally, determining the test script set of the software application to be tested based on the function set to be tested of the software application to be tested includes: determining a historical test script set, wherein the historical test script set comprises at least one historical test script; determining a first test script set based on the matching result of each history test script and each function to be tested, wherein the test scripts in the first test script set are the history test scripts corresponding to the functions to be tested in the history test script set; determining a second test script set based on the intermediate test functions, wherein the intermediate test functions are the test functions which are not matched with each historical test script in the test function set; a set of test scripts is determined based on the first set of test scripts and the second set of test scripts.
Optionally, determining the functional test result of the software application to be tested based on the evaluation parameters and the running data of each test script includes: determining whether the running data of each test script accords with the evaluation parameters; if the running data of each test script accords with the evaluation parameters, determining that the function of the software application to be tested is normal; and if the running data of any one test script does not accord with the evaluation parameters, determining that the function of the software application to be tested is abnormal.
Optionally, after determining the functional abnormality of the software application under test, the method further includes: and generating a function detection report of the software application to be tested based on the running data and the evaluation parameters of each test script.
According to another aspect of the present invention, there is provided a function test device for a software application, the device comprising:
the acquisition module is used for determining attribute information of the software application to be tested deployed in the target environment;
the determining module is used for determining whether the software application to be tested is a target software application or not based on the attribute information and the reference attribute information;
the execution module is used for determining an evaluation parameter and a test script set of the software application to be tested based on a function set to be tested of the software application to be tested if the software application to be tested is a target software application, wherein the function set to be tested comprises at least one function to be tested, and the test script set comprises at least one test script which corresponds to the function to be tested one by one;
And the evaluation module is used for determining the functional test result of the software application to be tested based on the evaluation parameters and the running data of each test script.
According to another aspect of the present invention, there is provided an electronic device including:
at least one processor; and a memory communicatively coupled to the at least one processor;
the memory stores a computer program executable by the at least one processor, so that the at least one processor can execute the method for testing the function of the software application according to any embodiment of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a method for functional testing of a software application according to any one of the embodiments of the present invention.
According to the technical scheme, the attribute information of the software application to be tested deployed in the target environment is determined; determining whether the software application to be tested is a target software application or not based on the attribute information and the reference attribute information; if the software application to be tested is the target software application, determining an evaluation parameter and a test script set of the software application to be tested based on a function set to be tested of the software application to be tested, wherein the function set to be tested comprises at least one function to be tested, and the test script set comprises at least one test script which corresponds to the function to be tested one by one; and determining a functional test result of the software application to be tested based on the evaluation parameters and the running data of each test script. When the software application to be tested is the target software application, the evaluation parameters and the test script sets of the software application to be tested are determined according to the functions to be tested of the software application to be tested, each test script is operated, the function test result of the software application to be tested is determined based on the operation data and the evaluation parameters of each test script, the software application can be automatically tested, the manpower resources are saved, and the test efficiency and the test accuracy of the software application are improved. The method solves the problems that quantitative indexes of performance or function tests of all applications are not clear, and unified evaluation standards are planned, testers determine the evaluation indexes according to evaluation experience and evaluate the performance or the functions of all applications, the test efficiency of the application functions is low, the evaluation results are not comprehensive and accurate enough, a large amount of manpower resources are wasted, and once the test level of testers is limited or the testers are doped with subjective consciousness in the test process, the test results of the applications are seriously affected.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for testing functionality of a software application according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a method for testing functionality of a software application according to a second embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a functional testing apparatus for a software application according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flow chart of a method for testing functions of a software application according to an embodiment of the present invention, where the method may be applied to situations such as fast, efficient, accurate, and automatic testing of functions of the software application, and the method may be performed by a device for testing functions of the software application according to the present invention, where the device may be implemented in hardware and/or software, and in a specific embodiment, the device may be integrated in an electronic device. The following embodiment will be described taking the example of the integration of the apparatus in an electronic device, and referring to fig. 1, the method specifically includes the following steps:
S101, determining attribute information of the software application to be tested deployed in the target environment.
The software application needs to be deployed or installed in the corresponding application environment to be able to run normally, and once the deployment environment of the software application is not opposite, the software application cannot run.
The target environment may be understood as an installation environment of a software application deployed in advance, and the attribute information may be understood as identification information of the software application, for example, a code of the software application, a name of the software application, a version number of the software application, and the like, which is not limited in this embodiment.
Specifically, the functions of the software applications of different versions are different, so that in order to ensure that the correct software application is detected, the attribute information of the software application to be tested in this embodiment may be understood as the combined information of the name/code and version number of the software application, for example, weChat version 1.2, carrier pigeon version 1.5, etc.
Further, the target environment may be understood as an operating system that is installed in advance and is capable of supporting normal running of each software application and detecting functions of each software application (executing a function test script of the software application), for example, a Windows 7 operating system, a Windows 8 operating system, a Windows 10 operating system, a Windows 11 operating system, an android operating system, an apple operating system, and the like, which is not limited in this embodiment.
For example, after the software application to be tested is installed in the target environment, the name and version number of the installed software application to be tested are determined so as to check whether the software application to be tested in the target environment is the software application to be tested, and the problem of false detection is avoided.
S102, determining whether the software application to be tested is a target software application or not based on the attribute information and the reference attribute information.
The target software application may be understood as a software application that needs to perform function detection, the reference attribute information may be understood as personalized information (reference attribute information) of the target software application, the attribute information in S102 includes identification information and version data of the software application to be tested, the reference attribute information includes identification information and version data of the target software application, the identification information may be understood as a name of the software application or an application identifier, and the version data may be understood as a version number or a version name of the software application.
Specifically, if the software application to be tested is the target software application, S103 is executed, otherwise, it is determined that the software application to be tested is installed with errors, and the software application to be tested needs to be redeployed.
For example, assuming that the reference attribute information is a WeChat 1.5 version, if the attribute information of the software application to be tested is a WeChat 1.5 version, determining that the software application to be tested is a target software application, and can continuously determine the function of the software application to be tested, if the attribute information of the software application to be tested is not a WeChat 1.5 version, determining that the software application to be tested is not a target software application, and if the software application to be tested is not a software application requiring function inspection, the software application requiring function inspection needs to be redeployed.
The method has the advantages that whether the software application to be tested needs to be subjected to function detection or not is identified, the software application needing to be subjected to function detection is only detected, and detection workload of a detection system is saved.
S103, determining evaluation parameters and test script sets of the software application to be tested based on the function set to be tested of the software application to be tested.
The to-be-tested function set is a set formed by at least one to-be-tested function, the to-be-tested function can be understood as a function needing to be tested in the to-be-tested software application, for example, an information sending function, an information writing function, a picture transmission function and the like of WeChat, the test script set is a set formed by at least one test script, the test script can be understood as a test code of the to-be-tested function, the test script corresponds to the to-be-tested function one by one, the evaluation parameters can be understood as a result evaluation basis of the to-be-tested function, the result evaluation basis comprises execution time, execution scene, resource occupancy rate, transmission rate per second (namely event processing number per second transmission, transactions Per Second, TPS) and the like, and when the running data of the test script corresponding to the to be-tested function accords with the evaluation parameters, the to-be-tested function is considered to be qualified, otherwise, the to be-tested function is not qualified.
Specifically, the evaluation modes, evaluation standards and test scripts of different functions to be tested are different, so that the evaluation parameters and test script set of the software application to be tested need to be determined according to the functions to be tested of the software application to be tested.
The advantage of this arrangement is that the test conditions of the software functions to be tested can be quantified for speed. And accurately and efficiently evaluating the software application to be tested.
S104, determining a functional test result of the software application to be tested based on the evaluation parameters and the running data of each test script.
The running data of the test script may be understood as running parameters of the test script, including running time, resource occupancy rate, execution scenario (gradient, constant, fatigue), system throughput, and the like, and the functional test result of the software application to be tested may be understood as a test condition of each function to be tested of the software application to be tested, including a function that is tested successfully, a function that is tested failed, a cause of the functional test failure, a function perfection suggestion, and the like, which is not limited in this embodiment.
Specifically, determining the function test result of the software application to be tested based on the evaluation parameters and the running data of each test script can be understood as determining whether each function to be tested is qualified based on the running data of each test script of each function to be tested and the evaluation parameters, if so, determining that the function to be tested is successful, if not, determining that the function to be tested is failed, and the function still needs to be continuously perfected.
By way of example, in this embodiment, the test conditions of the functions to be tested may be summarized, so as to obtain a test result of the software application to be tested, so that developers, testers, task formulators and related personnel can know the implementation progress of the software application. And secondly, the test result of the software application to be tested can also comprise information such as reasons of failure of the functional test, functional perfection suggestions and the like, so that the rate of improving the performance of the software application by a developer is improved.
Further, when all functions of the software application are qualified, the software application is determined to be developed and can be put into the market for use.
According to the technical scheme, attribute information of the software application to be tested deployed in the target environment is determined; determining whether the software application to be tested is a target software application or not based on the attribute information and the reference attribute information; if the software application to be tested is the target software application, determining an evaluation parameter and a test script set of the software application to be tested based on a function set to be tested of the software application to be tested, wherein the function set to be tested comprises at least one function to be tested, and the test script set comprises at least one test script which corresponds to the function to be tested one by one; and determining a functional test result of the software application to be tested based on the evaluation parameters and the running data of each test script. When the software application to be tested is the target software application, the evaluation parameters and the test script sets of the software application to be tested are determined according to the functions to be tested of the software application to be tested, each test script is operated, the function test result of the software application to be tested is determined based on the operation data and the evaluation parameters of each test script, the software application can be automatically tested, the manpower resources are saved, and the test efficiency and the test accuracy of the software application are improved. The method solves the problems that quantitative indexes of performance or function tests of all applications are not clear, and unified evaluation standards are planned, testers determine the evaluation indexes according to evaluation experience and evaluate the performance or the functions of all applications, the test efficiency of the application functions is low, the evaluation results are not comprehensive and accurate enough, a large amount of manpower resources are wasted, and once the test level of testers is limited or the testers are doped with subjective consciousness in the test process, the test results of the applications are seriously affected.
Example two
Fig. 2 is a flow chart of a method for testing functions of a software application according to a second embodiment of the present invention, where the method may be applied to situations such as fast, efficient, accurate, and automatic testing of functions of the software application, and the method may be performed by a device for testing functions of the software application according to the present invention, where the device may be implemented in hardware and/or software, and in a specific embodiment, the device may be integrated in an electronic device. The following embodiment will be described taking the example of the integration of the device in an electronic apparatus, and referring to fig. 2, the method specifically includes the following steps:
s201, determining a target environment.
Specifically, determining the target environment may be understood as checking a deployment environment of the software application to be tested, and adjusting various parameters of the deployment environment to a degree suitable for the software application to be tested, so as to enable the software application to be tested to run and detect functions of the software application to be tested.
In an embodiment, S201 may specifically include: determining environmental parameters of an initial environment; determining whether the preset environmental parameters are consistent with the environmental parameters of the initial environment; if the preset environment parameters are consistent with the environment parameters of the initial environment, determining the initial environment as a target environment; if the preset environment parameters are inconsistent with the environment parameters of the initial environment, the environment parameters of the initial environment are adjusted based on the preset environment parameters, and the initial environment after the environment parameters are adjusted is determined to be the target environment.
The initial environment may be understood as an operating system of the processor, the environmental parameters of the initial environment may be understood as information such as version, configuration parameters, data pool parameters and the like of the operating system of the processor, and the preset environmental parameters may be understood as environmental parameters of the operating system capable of running the software application to be tested and detecting functions of the software application to be tested.
Specifically, the matching process of the preset environmental parameter and the environmental parameter of the initial environment includes: according to the agreed format and sequence, information such as version information of preset environmental parameters, key parameter configuration and the like is sequentially listed as reference files, shell (a command interpreter) scripts are written, relevant environmental parameters of a software application to be tested are identified according to the format and sequence of the reference files, an intermediate file is generated based on the identified environmental parameters, the reference files and the intermediate file are compared one by one through the scripts, if the environmental parameters of the two files are consistent, the preset environmental parameters are considered to be consistent with the environmental parameters of the initial environment, the initial environment is determined to be the target environment, if the two files have inconsistent parameters, the preset environmental parameters are considered to be inconsistent with the environmental parameters of the initial environment, for example, the information of the inconsistent parameters in the preset environmental parameters in the two files is determined to be needed to be adjusted, the environmental parameters of the initial environment are adjusted based on the information, and the initial environment after the environmental parameters are adjusted is determined to be the target environment.
The environment parameters in the present invention mainly include parameters such as JAVA (a programming language and development platform) on a server, basic software versions such as an infrastructure (Windows Azure Storage, WAS), key parameter configuration information, and a database connection pool, which are not limited in this embodiment.
S202, determining attribute information of the software application to be tested deployed in the target environment.
In this embodiment, the software application needs to be deployed or installed in its corresponding application environment to operate normally, and once the deployment environment of the software application is not opposite, the software application cannot operate. The target environment may be understood as an installation environment of a software application deployed in advance, and the attribute information may be understood as identification information of the software application, for example, an encoding of the software application, a name of the software application, a version number of the software application, and the like. Specifically, the functions of the software applications of different versions are different, so that in order to ensure that the correct software application is detected, the attribute information of the software application to be tested in this embodiment may be understood as the combined information of the name/code and version number of the software application, for example, weChat version 1.2, carrier pigeon version 1.5, etc. Further, the target environment may be understood as an operating system that is installed in advance and is capable of supporting normal running of each software application and detecting functions of each software application, for example, a Windows 7 operating system, a Windows 8 operating system, a Windows 10 operating system, a Windows 11 operating system, an android operating system, an apple operating system, and the like, which is not limited in this embodiment.
For example, after the software application to be tested is installed in the target environment, the name and version number of the installed software application to be tested are determined so as to check whether the software application to be tested in the target environment is the software application to be tested, and the problem of false detection is avoided.
S203, determining whether the software application to be tested is a target software application or not based on the attribute information and the reference attribute information.
The target software application may be understood as a software application that needs to perform function detection, the reference attribute information may be understood as personalized information of the target software application, the attribute information in S203 includes identification information and version data of the software application to be tested, the reference attribute information includes identification information and version data of the target software application, the identification information may be understood as a name of the software application or an application identifier, and the version data may be understood as a version number or a version name of the software application.
Specifically, if the software application to be tested is the target software application, S204 is executed, otherwise, it is determined that the software application to be tested is installed with errors, and the software application to be tested needs to be redeployed.
In an embodiment, S203 may specifically include: determining whether the version data of the software application to be tested is consistent with the version data of the target software application; if the version data of the software application to be tested is consistent with the version data of the target software application, determining that the software application to be tested is the target software application; and if the version data of the software application to be tested is inconsistent with the version data of the target software application, determining that the software application to be tested is not the target software application.
For example, assuming that the reference attribute information is a WeChat 1.5 version, if the attribute information of the software application to be tested is a WeChat 1.5 version, determining that the software application to be tested is a target software application, and can continuously determine the function of the software application to be tested, if the attribute information of the software application to be tested is not a WeChat 1.5 version, determining that the software application to be tested is not a target software application, and if the software application to be tested is not a software application requiring function inspection, the software application requiring function inspection needs to be redeployed.
It should be noted that the deployment and inspection process of the software application to be tested may be implemented using Jenkins (an open source automation tool written in Java language), for example, using Jenkins deployment tools to obtain source codes of the application, package and deploy the application, and using Jenkins to inspect the application version during the application deployment process.
S204, determining a test script set of the software application to be tested based on the function set to be tested of the software application to be tested.
The test script set is a set composed of at least one test script, and the test script may be understood as a programming language text for detecting a function to be tested (a detection code of the function to be tested), where the test script corresponds to the function to be tested one by one, and the test script includes Jmeter (a pressure test tool developed based on Java for performing pressure test on software), C language script, assembly language script, and the like, which is not limited in this embodiment.
Specifically, determining a test script set of a software application to be tested based on a set of functions to be tested of the software application to be tested may be understood as determining a test script of each function to be tested, and determining the test script set based on each test script.
In an embodiment, S204 may specifically include: determining a historical test script set, wherein the historical test script set comprises at least one historical test script; determining a first test script set based on the matching result of each history test script and each function to be tested, wherein the test scripts in the first test script set are the history test scripts corresponding to the functions to be tested in the history test script set; determining a second test script set based on the intermediate test functions, wherein the intermediate test functions are the test functions which are not matched with each historical test script in the test function set; a set of test scripts is determined based on the first set of test scripts and the second set of test scripts.
Software applications need to undergo multiple rounds of testing before they are marketed, and the functionality of each test may be the same or different.
The history test script set may be understood as a set formed by a history test script of the software application to be tested, the history test script may be understood as a script used by the software application to be tested in a history test process, the first test script set is a set formed by a test script matched with the function to be tested in the history test script set, the middle function to be tested may be understood as a function to be tested for the first time, the test script of the function does not exist in the history test script set, and the second test script set is a set formed by test scripts of all middle functions to be tested.
For example, assuming that the function to be tested includes a function 1, a function 2 and a function 3, the history test script set includes a script 1, a script 2 and a script 3, the script 1 is a test script corresponding to the function 2, the script 2 is a test script corresponding to the function 3, the history test script set has no test script of the function 1, then it is determined that the first test script set is a set formed by the script 1 and the script 2, the middle function to be tested is the function 1, and the second test script set is a test script corresponding to the function 1.
It should be noted that if the historical test script set includes test scripts of all functions to be tested, the second script set is empty, and if the historical test script set does not include any test script of the functions to be tested, the first script set is empty.
If any function is tested before, the corresponding test script is directly called, and the test script does not need to be redesigned and written, so that the test workload of a tester can be reduced, and the test efficiency of the software application is improved. It is noted that the newly written script will incorporate a historical test script set for use in the next test.
S205, determining a functional test result of the software application to be tested based on the evaluation parameters and the running data of each test script.
The evaluation parameters can be understood as the result evaluation basis of the function to be tested, including execution time, execution scene, resource occupancy rate, transmission rate per second, etc., when the operation data of the test script corresponding to the function to be tested accords with the evaluation parameters, the function to be tested is considered to be qualified, otherwise, the function to be tested is considered to be unqualified. The running data of the test script may be understood as running parameters of the test script, including running time, resource occupancy rate, execution scenario (gradient, constant, fatigue), system throughput, etc., and the functional test result of the software application to be tested may be understood as the test condition of each function to be tested of the software application to be tested, including a function that is tested successfully, a function that is tested failed, a cause of the functional test failure, a function perfection suggestion, etc., which is not limited in this embodiment.
It should be noted that the evaluation modes, evaluation standards and test scripts of different functions to be tested are different, so that the evaluation parameters and test script set of the software application to be tested need to be determined according to the functions to be tested of the software application to be tested.
Specifically, determining the function test result of the software application to be tested based on the evaluation parameters and the running data of each test script can be understood as determining whether each function to be tested is qualified based on the running data of each test script of each function to be tested and the evaluation parameters, if so, determining that the function to be tested is successful, if not, determining that the function to be tested is failed, and the function still needs to be continuously perfected.
The evaluation criteria are thresholds such as TPS, processor usage, error rate, script runtime, script resource occupancy, etc., set based on performance evaluation criteria of the software application.
In an embodiment, S205 may specifically include: determining whether the running data of each test script accords with the evaluation parameters; if the running data of each test script accords with the evaluation parameters, determining that the function of the software application to be tested is normal; and if the running data of any one test script does not accord with the evaluation parameters, determining that the function of the software application to be tested is abnormal.
For example, assuming that the function to be tested includes function 1, function 2 and function 3, if the running data of the test scripts of function 1, function 2 and function 3 all meet the evaluation criteria, it is determined that the function of the software application to be tested is normal, and the software application to be tested can be put into production, and if the running data of at least one test script of function 1, function 2 and function 3 does not meet the evaluation criteria, it is determined that the function of the software application to be tested is abnormal, and development and debugging are required to be continued.
It should be noted that, in this embodiment, the abnormal function may also be determined based on the test script that does not meet the evaluation criteria, for example, if the operation data of the test script of the function 1 is abnormal, the function 1 is determined to be abnormal, and if the operation data of the test script of the function 2 is determined to be abnormal, the function 2 is determined to be abnormal. The benefit of this arrangement is that the cause of the failure is located quickly for the developer to debug the software application.
S206, generating a function detection report of the software application to be tested based on the function test result of the software application to be tested.
Wherein the function test report may be understood as a visual document of the function test result.
Specifically, when the function of the software application to be tested is abnormal, S206 includes: and generating an abnormal function detection report of the software application to be tested based on the function test result of the software application to be tested. When the function of the software application to be tested is normal, S206 includes: and generating a normal function detection report of the software application to be tested based on the function test result of the software application to be tested.
The normal function detection report may be used to indicate that the software application is put into production and the abnormal function detection report may be used to indicate to a developer to debug the software application.
Specifically, based on a function test result of the software application to be tested, generating an abnormal function detection report of the software application to be tested includes: and generating an abnormal function detection report of the software application to be tested based on the running data and the evaluation parameters of each test script.
Wherein the abnormal function detection report includes abnormal functions, causes of the abnormal functions, and processing suggestions, the advantage of this arrangement is that a data support for fault debugging is provided for the developer, so that the developer can debug the abnormal functions of the software application.
In an embodiment, the processor may compare conventional indexes such as resource occupation condition and TPS in the test result with the evaluation parameters, and combine the error reporting information and the error reporting log to determine whether the log has information such as memory overflow and high-frequency recovery, so as to form a test report and send the test report to a mailbox of a tester and/or a developer. The functions of comparing the conventional indexes, analyzing the log and sending the report can be realized through scripts.
According to the invention, the performance test is carried out on the application by an automatic means, the existing script, environment, deployment program and the like are utilized to automatically execute the stock transaction (the function of the existing test script), so that the communication cost is reduced, and the test efficiency is improved; secondly, the stock system is continuously expanded along with the measured function, related test scripts are hardly rewritten in the later period, the earlier process assets are reused all the time, and the labor cost is greatly saved; furthermore, the pipelined performance test of the invention automatically performs each process according to each link executed by the office, reduces human participation, and effectively avoids the test problems of missing links and the like caused by human negligence.
According to the technical scheme, the target environment is determined; determining attribute information of a software application to be tested deployed in a target environment; determining whether the software application to be tested is a target software application or not based on the attribute information and the reference attribute information; if the software application to be tested is the target software application, determining an evaluation parameter and a test script set of the software application to be tested based on a function set to be tested of the software application to be tested, wherein the function set to be tested comprises at least one function to be tested, and the test script set comprises at least one test script which corresponds to the function to be tested one by one; determining a functional test result of the software application to be tested based on the evaluation parameters and the running data of each test script; and generating a function detection report of the software application to be tested based on the function test result of the software application to be tested. When the software application to be tested deployed in the target environment is determined to be the target software application, the evaluation parameters and the test script sets of the software application to be tested are determined according to the functions to be tested of the software application to be tested, each test script is operated, the function test result of the software application to be tested is determined based on the operation data and the evaluation parameters of each test script, the software application can be automatically tested, the manpower resources are saved, and the test efficiency and the test accuracy of the software application are improved. And secondly, after the test is finished, a test report is generated based on the test result, so that relevant technicians of the test, development, project planning and the like can know information such as the performance, development progress and the like of the application. The method solves the problems that quantitative indexes of performance or function tests of all applications are not clear, and unified evaluation standards are planned, testers determine the evaluation indexes according to evaluation experience and evaluate the performance or the functions of all applications, the test efficiency of the application functions is low, the evaluation results are not comprehensive and accurate enough, a large amount of manpower resources are wasted, and once the test level of testers is limited or the testers are doped with subjective consciousness in the test process, the test results of the applications are seriously affected.
Example III
Fig. 3 is a schematic structural diagram of a functional testing apparatus for a software application according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: an acquisition module 301, a determination module 302, an execution module 303 and an evaluation module 304.
The obtaining module 301 is configured to determine attribute information of a software application to be tested deployed in a target environment.
A determining module 302, configured to determine whether the software application to be tested is a target software application based on the attribute information and the reference attribute information.
And the execution module 303 is configured to determine, if the software application to be tested is the target software application, an evaluation parameter and a test script set of the software application to be tested based on a set of functions to be tested of the software application to be tested, where the set of functions to be tested includes at least one function to be tested, and the set of test scripts includes at least one test script, and the test scripts and the functions to be tested are in one-to-one correspondence.
The evaluation module 304 is configured to determine a functional test result of the software application to be tested based on the evaluation parameters and the running data of each test script.
Optionally, the obtaining module 301 is further configured to determine the target environment before determining attribute information of the software application to be tested deployed in the target environment.
Optionally, the acquiring module 301 is specifically configured to determine an environmental parameter of the initial environment; determining whether the preset environmental parameters are consistent with the environmental parameters of the initial environment; if the preset environment parameters are consistent with the environment parameters of the initial environment, determining the initial environment as a target environment; if the preset environment parameters are inconsistent with the environment parameters of the initial environment, the environment parameters of the initial environment are adjusted based on the preset environment parameters, and the initial environment after the environment parameters are adjusted is determined to be the target environment.
Optionally, the attribute information includes version data of the software application to be tested, and the reference attribute information includes version data of the target software application.
Optionally, the determining module 302 is specifically configured to determine whether the version data of the software application to be tested is consistent with the version data of the target software application; if the version data of the software application to be tested is consistent with the version data of the target software application, determining that the software application to be tested is the target software application; and if the version data of the software application to be tested is inconsistent with the version data of the target software application, determining that the software application to be tested is not the target software application.
Optionally, the executing module 303 is specifically configured to determine a historical test script set, where the historical test script set includes at least one historical test script; determining a first test script set based on the matching result of each history test script and each function to be tested, wherein the test scripts in the first test script set are the history test scripts corresponding to the functions to be tested in the history test script set; determining a second test script set based on the intermediate test functions, wherein the intermediate test functions are the test functions which are not matched with each historical test script in the test function set; a set of test scripts is determined based on the first set of test scripts and the second set of test scripts.
Optionally, the evaluation module 304 is specifically configured to determine whether the running data of each test script accords with the evaluation parameters; if the running data of each test script accords with the evaluation parameters, determining that the function of the software application to be tested is normal; and if the running data of any one test script does not accord with the evaluation parameters, determining that the function of the software application to be tested is abnormal.
Optionally, the evaluation module 304 is further configured to generate an abnormal function detection report of the software application under test based on the operation data and the evaluation parameters of each test script after determining the abnormal function of the software application under test.
The function test device for the software application provided by the embodiment of the invention can execute the function test method for the software application provided by any embodiment of the invention, and has the corresponding function modules and beneficial effects of the execution method.
Example IV
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a Memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a random access Memory (also referred to as a random access Memory, random Access Memory, RAM) 13, etc., in which a computer program executable by the at least one processor is stored, and the processor 11 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the functional testing method of a software application.
In some embodiments, the functional testing method of the software application may be implemented as a computer program, which is tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the above-described method of testing the functionality of a software application may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the functional test method of the software application in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server) or that includes a middleware component (e.g., an application server) or that includes a front-end component through which a user can interact with an implementation of the systems and techniques described here, or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for testing the functionality of a software application, comprising:
determining attribute information of a software application to be tested deployed in a target environment;
determining whether the software application to be tested is a target software application or not based on the attribute information and the reference attribute information;
if the software application to be tested is the target software application, determining an evaluation parameter and a test script set of the software application to be tested based on a function set to be tested of the software application to be tested, wherein the function set to be tested comprises at least one function to be tested, and the test script set comprises at least one test script, and the test scripts and the functions to be tested are in one-to-one correspondence;
And determining a functional test result of the software application to be tested based on the evaluation parameters and the running data of each test script.
2. The method of claim 1, wherein before determining the attribute information of the software application to be tested deployed in the target environment, further comprising:
and determining the target environment.
3. The method of claim 2, wherein the determining the target environment comprises:
determining environmental parameters of an initial environment;
determining whether the preset environmental parameters are consistent with the environmental parameters of the initial environment;
if the preset environment parameters are consistent with the environment parameters of the initial environment, determining that the initial environment is the target environment;
if the preset environment parameters are inconsistent with the environment parameters of the initial environment, the environment parameters of the initial environment are adjusted based on the preset environment parameters, and the initial environment after the environment parameters are adjusted is determined to be the target environment.
4. The method of claim 1, wherein the attribute information includes version data of the software application under test and the reference attribute information includes version data of the target software application;
The determining whether the software application to be tested is a target software application based on the attribute information and the reference attribute information comprises the following steps:
determining whether the version data of the software application to be tested is consistent with the version data of the target software application;
if the version data of the software application to be tested is consistent with the version data of the target software application, determining that the software application to be tested is the target software application;
and if the version data of the software application to be tested is inconsistent with the version data of the target software application, determining that the software application to be tested is not the target software application.
5. The method of claim 1, wherein the determining the set of test scripts for the software application under test based on the set of functions under test for the software application under test comprises:
determining a historical test script set, wherein the historical test script set comprises at least one historical test script;
determining a first test script set based on the matching result of each history test script and each function to be tested, wherein the test scripts in the first test script set are the history test scripts corresponding to the functions to be tested in the history test script set;
Determining a second test script set based on an intermediate test function, wherein the intermediate test function is a test function which is not matched with each history test script in the test function set;
the test script set is determined based on the first test script set and the second test script set.
6. The method of claim 1, wherein determining the functional test result of the software application under test based on the evaluation parameters and the operation data of each test script comprises:
determining whether the running data of each test script accords with the evaluation parameters;
if the running data of each test script accords with the evaluation parameters, determining that the function of the software application to be tested is normal;
and if the running data of any test script does not accord with the evaluation parameters, determining that the function of the software application to be tested is abnormal.
7. The method of claim 6, further comprising, after determining the functional abnormality of the software application under test:
and generating an abnormal function detection report of the software application to be tested based on the running data of each test script and the evaluation parameters.
8. A functional testing apparatus for a software application, comprising:
the acquisition module is used for determining attribute information of the software application to be tested deployed in the target environment;
the determining module is used for determining whether the software application to be tested is a target software application or not based on the attribute information and the reference attribute information;
the execution module is used for determining an evaluation parameter and a test script set of the software application to be tested based on a function set to be tested of the software application to be tested if the software application to be tested is the target software application, wherein the function set to be tested comprises at least one function to be tested, and the test script set comprises at least one test script, and the test scripts and the functions to be tested are in one-to-one correspondence;
and the evaluation module is used for determining the functional test result of the software application to be tested based on the evaluation parameters and the running data of each test script.
9. An electronic device, the electronic device comprising:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of testing the functionality of the software application of any one of claims 1 to 7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the method of testing the functionality of a software application according to any one of claims 1 to 7.
CN202311618686.6A 2023-11-29 2023-11-29 Function test method and device for software application, electronic equipment and storage medium Pending CN117648252A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311618686.6A CN117648252A (en) 2023-11-29 2023-11-29 Function test method and device for software application, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311618686.6A CN117648252A (en) 2023-11-29 2023-11-29 Function test method and device for software application, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117648252A true CN117648252A (en) 2024-03-05

Family

ID=90042756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311618686.6A Pending CN117648252A (en) 2023-11-29 2023-11-29 Function test method and device for software application, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117648252A (en)

Similar Documents

Publication Publication Date Title
CN115598505A (en) Chip detection method, device, equipment and storage medium
CN114691521A (en) Software testing platform based on artificial intelligence
CN115437961A (en) Data processing method and device, electronic equipment and storage medium
CN115576831A (en) Test case recommendation method, device, equipment and storage medium
CN117648252A (en) Function test method and device for software application, electronic equipment and storage medium
CN114546799A (en) Point burying log checking method and device, electronic equipment, storage medium and product
CN113127362A (en) Object testing method, object testing device, electronic device, and readable storage medium
CN116401113B (en) Environment verification method, device and medium for heterogeneous many-core architecture acceleration card
CN117271373B (en) Automatic construction method and device for test cases, electronic equipment and storage medium
CN117971640A (en) Method, device, equipment and medium for testing embedded software
CN115470149A (en) Database preprocessing function testing method, device, equipment and storage medium
CN115374012A (en) Automatic regression testing method and device, electronic equipment and storage medium
CN115374010A (en) Function testing method, device, equipment and storage medium
CN117493203A (en) Method, device, equipment and storage medium for testing server software
CN116467161A (en) Application testing method and device, electronic equipment and storage medium
CN116225390A (en) Warehouse-in method, device, equipment and medium for software development files
CN116303019A (en) Test tracing method, device, equipment and medium
CN116302944A (en) Service system testing method and device, electronic equipment and storage medium
CN116521536A (en) Code coverage rate determining method and device, electronic equipment and storage medium
CN117632726A (en) Test case validity detection method and device, electronic equipment and storage medium
CN116955189A (en) Automatic testing method, device and equipment for user interface and storage medium
CN117609087A (en) Code processing method, device, equipment and medium
CN114741291A (en) Method, device, equipment and medium for automatically submitting vulnerability information
CN117724980A (en) Method and device for testing software framework performance, electronic equipment and storage medium
CN114968791A (en) Detection method and device

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