CN114661617A - Test environment detection method and device - Google Patents

Test environment detection method and device Download PDF

Info

Publication number
CN114661617A
CN114661617A CN202210408288.0A CN202210408288A CN114661617A CN 114661617 A CN114661617 A CN 114661617A CN 202210408288 A CN202210408288 A CN 202210408288A CN 114661617 A CN114661617 A CN 114661617A
Authority
CN
China
Prior art keywords
test
transaction
program
set time
environment
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
CN202210408288.0A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210408288.0A priority Critical patent/CN114661617A/en
Publication of CN114661617A publication Critical patent/CN114661617A/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/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Abstract

The embodiment of the application provides a test environment detection method and a test environment detection device, which can be used in the field of finance, and the method comprises the following steps: running a transaction test program in a test environment according to the set time frequency to obtain a transaction test result; determining a first calculation weight according to the interval duration between the transaction test result and a set time node, and determining a second calculation weight according to the transaction type of the transaction test result; determining the availability of a test environment according to the total running times of the transaction test program in a set time period, corresponding transaction test results, and first calculation weights and second calculation weights corresponding to the transaction test results; the method and the device can effectively improve the detection efficiency and accuracy of the test environment.

Description

Test environment detection method and device
Technical Field
The application relates to the field of software testing, can also be used in the field of finance, and particularly relates to a testing environment detection method and device.
Background
In the software engineering life cycle, whether development or testing personnel need to test the system before and after software production, and the testing environment is unstable most of the time. After the coding is completed, development testers (program codes and automation scripts) need to operate in a test environment, and manual testers also need to perform functional tests in the test environment. Therefore, the survival rate of the test environment is a key factor that affects whether the test can be performed normally.
However, in the prior art, the technical availability of a single detection environment system, such as cpu conditions, cannot meet the system environment test requirements and guarantee the normal operation of a program in the test environment.
Disclosure of Invention
Aiming at the problems in the prior art, the application provides a test environment detection method and device, which can effectively improve the detection efficiency and accuracy of a test environment.
In order to solve at least one of the above problems, the present application provides the following technical solutions:
in a first aspect, the present application provides a test environment probing method, including:
running a transaction test program in a test environment according to the set time frequency to obtain a transaction test result;
determining a first calculation weight according to the interval duration between the transaction test result and a set time node, and determining a second calculation weight according to the transaction type of the transaction test result;
and determining the availability of the test environment according to the total running times of the transaction test program in a set time period, corresponding transaction test results, and first calculation weights and second calculation weights corresponding to the transaction test results.
Further, the determining the availability of the test environment according to the total number of times of operation of the transaction test program within the set time period, the corresponding transaction test results, and the first calculation weight and the second calculation weight corresponding to the transaction test results includes:
carrying out weighted operation according to the number of transaction test results with successful test contents in a set time period and the corresponding first calculation weight and second calculation weight;
and determining the availability of the test environment according to the ratio of the result of the weighted operation to the total running times of the transaction test program in the set time period.
Further, after the determining the available rate of the test environment, the method further includes:
and carrying out test failure analysis on the transaction test program with the result of test failure in the time period when the availability of the test environment is lower than the threshold value, generating a failure analysis report and sending the failure analysis report to a set test management terminal.
Further, after the transaction test program is run in the test environment according to the set time frequency to obtain a transaction test result, the method further includes:
and sending a test failure signal to the set test management terminal according to the transaction test result with the content as the test success.
Further, the test scenario of the transaction test program does not include an abnormal transaction scenario.
Further, the running of the transaction test program in the test environment according to the set time frequency to obtain the transaction test result further includes:
and running each test case contained in the transaction test program in the test environment according to the set time frequency, and if at least one test case fails to run, judging that the transaction test result is test failure.
In a second aspect, the present application provides a test environment probing apparatus, comprising:
the transaction testing module is used for running a transaction testing program in a testing environment according to the set time frequency to obtain a transaction testing result;
the weight determining module is used for determining a first calculating weight according to the interval duration between the transaction test result and a set time node and determining a second calculating weight according to the transaction type of the transaction test result;
and the environment availability ratio determining module is used for determining the environment availability ratio according to the total running times of the transaction testing program in the set time period, the corresponding transaction testing results, and the first calculation weight and the second calculation weight corresponding to the transaction testing results.
Further, the environment availability determination module comprises:
the weighting operation unit is used for carrying out weighting operation on the number of transaction test results with successful test contents and the corresponding first calculation weight and second calculation weight according to the number of the transaction test results with successful test contents in a set time period;
and the proportion calculating unit is used for determining the availability of the test environment according to the ratio of the result of the weighted operation to the total running times of the transaction test program in the set time period.
In a third aspect, the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the test environment probing method when executing the program.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the test environment probing method described.
In a fifth aspect, the present application provides a computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the test environment probing method described.
According to the technical scheme, the test environment detection method and the test environment detection device are characterized in that the time characteristics and the type characteristics of the transaction test result are obtained by operating the transaction test program in the test environment, the calculation weight of the test failure is determined, and then the ratio operation is carried out on the calculation weight and the total operation times of the transaction test program in the set time period, so that the test environment availability in the time period is determined, and the test environment detection efficiency and the test environment accuracy can be effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly 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 flowchart illustrating a testing environment probing method according to an embodiment of the present application;
FIG. 2 is a second flowchart illustrating a test environment probing method according to an embodiment of the present application;
FIG. 3 is a diagram showing one of the structures of a test environment detection apparatus according to an embodiment of the present application;
FIG. 4 is a second block diagram of the testing environment detecting apparatus according to the embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, 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 embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In consideration of the problem that the technical availability of a single detection environment system in the prior art, such as the cpu condition, cannot meet the system environment test requirements and guarantee the normal operation of a program in a test environment, the application provides a test environment detection method and device, which determine the calculation weight of the test failure by running a transaction test program in the test environment to obtain the time characteristics and the type characteristics of the transaction test result, and then perform ratio operation with the total running times of the transaction test program in a set time period to determine the test environment availability in the time period, thereby effectively improving the detection efficiency and the accuracy of the test environment.
In order to effectively improve the detection efficiency and accuracy of the test environment, the application provides an embodiment of a test environment detection method, and referring to fig. 1, the test environment detection method specifically includes the following contents:
step S101: and running a transaction test program in the test environment according to the set time frequency to obtain a transaction test result.
Alternatively, the set time frequency may be custom set, for example, every 15 minutes.
Optionally, the transaction test program may be an automated transaction test script program, where in order to improve the success rate of running the automated script to the maximum extent and reduce the situation of running failure of the script due to the abnormality of the script itself, the script program of the present application does not include various transaction abnormal scenes, and only compiles a happy/normal scene.
Optionally, one transaction test program may include multiple test cases, and if there is a case where at least one test case fails to operate, it is determined that the transaction test result is a test failure.
Optionally, the transaction test result obtained by the present application is stored in the local system, and the specific content includes but is not limited to: script running time, success and failure marks and error reporting information.
Step S102: and determining a first calculation weight according to the interval duration between the transaction test result and a set time node, and determining a second calculation weight according to the transaction type of the transaction test result.
Optionally, after the transaction test result is stored in the local of the system, the application can sample the transaction test result according to a set time node.
In an example, the application takes thirty minutes before and after nine am on a working day as a set time node, and takes the transaction test result in the period of time from the local database of the system, for example: results A: 8: 30. result B: 8: 45. results C: 9: 00. result D: 9: 15. results E: 9: 30, determining respective first calculation weights according to the interval duration between each transaction test result and the set time node, for example, if the interval duration between the result a and the result E and the set time node is longest, the corresponding first calculation weight is the lowest, and if the interval duration between the result C and the set time node is the shortest, the corresponding first calculation weight is the highest, thereby enhancing the association relationship between the calculation of the test environment availability and the time node for calculation, that is, the closer the transaction test result is to the set time node, the higher the weight is.
In another example, twelve hours from nine am to nine pm on a working day are used as the set time nodes, the transaction test results in the whole day are taken from the local database of the system, and the closer the transaction test results are, the higher the weight is.
Optionally, because the transaction test program for performing the test is generated according to a specific transaction type, and different transaction types should have different priorities, the second calculation weight may be determined according to the transaction type corresponding to the transaction test result, for example, the second calculation weight for the payment transaction type is the highest, and when online payment is involved, the second calculation weight may be a full mark of the weight.
Step S103: and determining the availability of the test environment according to the total running times of the transaction test program in a set time period, corresponding transaction test results, and first calculation weights and second calculation weights corresponding to the transaction test results.
Optionally, in the present application, after locally storing all transaction test results within a set time period, and after obtaining the first calculation weight and the second calculation weight of each transaction test result through the above steps, and by combining the total number of times of running the transaction test program within the set time period, the availability of the test environment within the set time period may be obtained through calculation, and the specific calculation rule may be:
the test environment availability ratio Q (the content is the number a of transaction test results with successful test multiplied by the first calculation weight B1 multiplied by the second calculation weight B2)/the total number C of transaction test program runs.
It can be understood that in the calculation rule of the test environment availability of the present application, the parameter a can represent the number of times of environment success, the parameter B1 can represent the priority of environment available period detection, the parameter B2 can represent the influence of transaction importance on the environment availability, and the environment of core transaction can be guaranteed to be available in the conventional test period by the multiplication of these three parameters.
As can be seen from the above description, the test environment detection method provided in the embodiment of the present application can determine the calculation weight of the test failure by obtaining the time characteristic and the type characteristic of the transaction test result by running the transaction test program in the test environment, and then perform the ratio operation with the total running times of the transaction test program in the set time period, so as to determine the availability of the test environment in the time period, thereby effectively improving the detection efficiency and accuracy of the test environment.
In order to accurately calculate the available rate of the test environment, in an embodiment of the test environment detection method of the present application, referring to fig. 2, the step S103 may further include the following steps:
step S201: and performing weighted operation according to the number of the transaction test results with the contents of successful test in the set time period and the corresponding first calculation weight and second calculation weight.
Step S202: and determining the availability of the test environment according to the ratio of the result of the weighted operation to the total running times of the transaction test program in the set time period.
Optionally, in the present application, after locally storing all transaction test results within a set time period, and after obtaining the first calculation weight and the second calculation weight of each transaction test result through the above steps, and by combining the total number of times of running the transaction test program within the set time period, the availability of the test environment within the set time period may be obtained through calculation, and the specific calculation rule may be:
the test environment availability ratio Q (the content is the number a of transaction test results with successful test multiplied by the first calculation weight B1 multiplied by the second calculation weight B2)/the total number C of transaction test program runs.
In order to feed back the analysis result of the test failure in time, in an embodiment of the test environment detection method of the present application, after the step S103, the following may be specifically included:
and carrying out test failure analysis on the transaction test program with the result of test failure in the time period when the availability of the test environment is lower than the threshold value, generating a failure analysis report and sending the failure analysis report to a set test management terminal.
Optionally, when the availability of the test environment is lower than the threshold, the application may perform failure analysis on the transaction test program that fails within the time period to obtain a failure analysis report, where the specific failure analysis process may be: setting a time period, scanning the detection transactions with the availability ratio lower than a threshold value in batch through a timing program in the period, and intercepting error report log information of the transaction in the time period to generate a failure analysis report.
In order to early warn a test error signal in time, in an embodiment of the test environment detection method of the present application, after the step S101, the following may be further included:
and sending a test failure signal to the set test management terminal according to the transaction test result with the content as the test success.
Optionally, when the transaction test is carried out and the error is guaranteed, the system can acquire the test error reporting information and generate a test failure signal to feed back the test failure signal to the set test management terminal, so that the failure transaction can be early warned, the operation and maintenance intervention can be early repaired on the environment, and the time that the environment is unavailable is shortened.
In order to improve the success rate of the test, in an embodiment of the test environment detection method of the present application, the test scenario of the transaction test program does not include an abnormal transaction scenario.
Optionally, the transaction test program may be an automated transaction test script program, where in order to improve the success rate of running the automated script to the maximum extent and reduce the situation of running failure of the script due to the abnormality of the script itself, the script program of the present application does not include various transaction abnormal scenes, and only compiles a happy/normal scene.
In order to effectively improve the detection efficiency and accuracy of the test environment, the present application provides an embodiment of a test environment detection apparatus for implementing all or part of the content of the test environment detection method, and referring to fig. 3, the test environment detection apparatus specifically includes the following contents:
the transaction testing module 10 is configured to run a transaction testing program in a testing environment according to a set time frequency to obtain a transaction testing result.
And the weight determining module 20 is configured to determine a first calculation weight according to an interval duration between the transaction test result and a set time node, and determine a second calculation weight according to a transaction type of the transaction test result.
The environment availability determining module 30 is configured to determine the environment availability according to the total number of times of operation of the transaction test program in the set time period, the corresponding transaction test results, and the first calculation weight and the second calculation weight corresponding to each transaction test result.
As can be seen from the above description, the test environment detection apparatus provided in the embodiment of the present application can determine the calculation weight of the test failure by obtaining the time characteristic and the type characteristic of the transaction test result by running the transaction test program in the test environment, and then perform the ratio operation with the total running times of the transaction test program in the set time period, so as to determine the availability of the test environment in the time period, thereby effectively improving the detection efficiency and accuracy of the test environment.
In order to feed back the test failure analysis result in time, in an embodiment of the test environment detecting apparatus of the present application, referring to fig. 4, the environment availability determining module 30 includes:
and the weighting operation unit 31 is configured to perform weighting operation according to the number of transaction test results with successful test contents in a set time period and the corresponding first calculation weight and second calculation weight.
And the proportion calculating unit 32 is used for determining the availability of the test environment according to the ratio of the result of the weighted operation to the total running times of the transaction test program in the set time period.
In terms of hardware, in order to effectively improve the detection efficiency and accuracy of the test environment, the present application provides an embodiment of an electronic device for implementing all or part of the contents in the test environment detection method, where the electronic device specifically includes the following contents:
a processor (processor), a memory (memory), a communication Interface (Communications Interface), and a bus; the processor, the memory and the communication interface complete mutual communication through the bus; the communication interface is used for realizing information transmission between the test environment detection device and relevant equipment such as a core service system, a user terminal, a relevant database and the like; the logic controller may be a desktop computer, a tablet computer, a mobile terminal, and the like, but the embodiment is not limited thereto. In this embodiment, the logic controller may be implemented with reference to the embodiment of the testing environment detection method and the embodiment of the testing environment detection apparatus in the embodiment, and the contents thereof are incorporated herein, and repeated descriptions are omitted.
It is understood that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a Personal Digital Assistant (PDA), an in-vehicle device, a smart wearable device, and the like. Wherein, intelligence wearing equipment can include intelligent glasses, intelligent wrist-watch, intelligent bracelet etc..
In practical applications, part of the test environment probing method may be performed on the electronic device side as described above, or all operations may be performed in the client device. The selection may be specifically performed according to the processing capability of the client device, the limitation of the user usage scenario, and the like. This is not a limitation of the present application. The client device may further include a processor if all operations are performed in the client device.
The client device may have a communication module (i.e., a communication unit), and may be communicatively connected to a remote server to implement data transmission with the server. The server may include a server on the task scheduling center side, and in other implementation scenarios, the server may also include a server on an intermediate platform, for example, a server on a third-party server platform that is communicatively linked to the task scheduling center server. The server may include a single computer device, or may include a server cluster formed by a plurality of servers, or a server structure of a distributed apparatus.
Fig. 5 is a schematic block diagram of a system configuration of an electronic device 9600 according to an embodiment of the present application. As shown in fig. 5, the electronic device 9600 can include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. Notably, this FIG. 5 is exemplary; other types of structures may also be used in addition to or in place of the structure to implement telecommunications or other functions.
In one embodiment, the test environment probing method function may be integrated into the central processor 9100. The central processor 9100 may be configured to control as follows:
step S101: and running a transaction test program in the test environment according to the set time frequency to obtain a transaction test result.
Step S102: and determining a first calculation weight according to the interval duration between the transaction test result and a set time node, and determining a second calculation weight according to the transaction type of the transaction test result.
Step S103: and determining the availability of the test environment according to the total running times of the transaction test program in a set time period, corresponding transaction test results, and first calculation weights and second calculation weights corresponding to the transaction test results.
As can be seen from the above description, in the electronic device provided in the embodiment of the present application, the time characteristic and the type characteristic of the transaction test result obtained by running the transaction test program in the test environment are determined, the calculation weight of the test failure is determined, and then the ratio operation is performed on the total running times of the transaction test program in the set time period, so as to determine the availability of the test environment in the time period, thereby effectively improving the detection efficiency and accuracy of the test environment.
In another embodiment, the testing environment detecting device may be configured separately from the central processing unit 9100, for example, the testing environment detecting device may be configured as a chip connected to the central processing unit 9100, and the testing environment detecting method function is realized by the control of the central processing unit.
As shown in fig. 5, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is noted that the electronic device 9600 also does not necessarily include all of the components shown in fig. 5; in addition, the electronic device 9600 may further include components not shown in fig. 5, which may be referred to in the prior art.
As shown in fig. 5, a central processor 9100, sometimes referred to as a controller or operational control, can include a microprocessor or other processor device and/or logic device, which central processor 9100 receives input and controls the operation of the various components of the electronic device 9600.
The memory 9140 can be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 9100 can execute the program stored in the memory 9140 to realize information storage or processing, or the like.
The input unit 9120 provides input to the central processor 9100. The input unit 9120 is, for example, a key or a touch input device. Power supply 9170 is used to provide power to electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, an LCD display, but is not limited thereto.
The memory 9140 can be a solid state memory, e.g., Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes referred to as an EPROM or the like. The memory 9140 could also be some other type of device. Memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application/function storage part 9142, the application/function storage part 9142 being used to store application programs and function programs or a flow for executing the operation of the electronic device 9600 by the central processing unit 9100.
The memory 9140 can also include a data store 9143, the data store 9143 being used to store data, such as contacts, digital data, pictures, sounds, and/or any other data used by an electronic device. The driver storage portion 9144 of the memory 9140 may include various drivers for the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, contact book applications, etc.).
The communication module 9110 is a transmitter/receiver 9110 that transmits and receives signals via an antenna 9111. The communication module (transmitter/receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 9110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby implementing ordinary telecommunications functions. The audio processor 9130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100, thereby enabling recording locally through the microphone 9132 and enabling locally stored sounds to be played through the speaker 9131.
An embodiment of the present application further provides a computer-readable storage medium capable of implementing all the steps in the test environment probing method with the execution subject being the server or the client in the foregoing embodiments, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements all the steps in the test environment probing method with the execution subject being the server or the client in the foregoing embodiments, for example, when the processor executes the computer program, the processor implements the following steps:
step S101: and running a transaction test program in the test environment according to the set time frequency to obtain a transaction test result.
Step S102: and determining a first calculation weight according to the interval duration between the transaction test result and a set time node, and determining a second calculation weight according to the transaction type of the transaction test result.
Step S103: and determining the availability of the test environment according to the total running times of the transaction test program in a set time period, corresponding transaction test results, and first calculation weights and second calculation weights corresponding to the transaction test results.
As can be seen from the above description, the computer-readable storage medium provided in the embodiment of the present application determines the calculation weight of the test failure by obtaining the time characteristic and the type characteristic of the transaction test result by running the transaction test program in the test environment, and then performs the ratio operation with the total running times of the transaction test program in the set time period, so as to determine the availability of the test environment in the time period, thereby effectively improving the detection efficiency and the accuracy of the test environment.
Embodiments of the present application further provide a computer program product capable of implementing all steps in the test environment probing method with the execution subject being the server or the client in the foregoing embodiments, and when executed by a processor, the computer program/instruction implements the steps of the test environment probing method, for example, the computer program/instruction implements the following steps:
step S101: and running a transaction test program in the test environment according to the set time frequency to obtain a transaction test result.
Step S102: and determining a first calculation weight according to the interval duration between the transaction test result and the set time node, and determining a second calculation weight according to the transaction type of the transaction test result.
Step S103: and determining the availability of the test environment according to the total running times of the transaction test program in a set time period, corresponding transaction test results, and first calculation weights and second calculation weights corresponding to the transaction test results.
As can be seen from the above description, the computer program product provided in the embodiment of the present application determines the calculation weight of the test failure by obtaining the time characteristic and the type characteristic of the transaction test result by running the transaction test program in the test environment, and then performs the ratio operation on the calculation weight and the total running times of the transaction test program in the set time period, so as to determine the availability of the test environment in the time period, thereby effectively improving the detection efficiency and accuracy of the test environment.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A test environment probing method, the method comprising:
running a transaction test program in a test environment according to the set time frequency to obtain a transaction test result;
determining a first calculation weight according to the interval duration between the transaction test result and a set time node, and determining a second calculation weight according to the transaction type of the transaction test result;
and determining the availability of the test environment according to the total running times of the transaction test program in a set time period, corresponding transaction test results, and first calculation weights and second calculation weights corresponding to the transaction test results.
2. The method according to claim 1, wherein determining the availability ratio of the test environment according to the total number of times of running the transaction test program in the set time period, the corresponding transaction test results, and the first calculation weight and the second calculation weight corresponding to the transaction test results comprises:
carrying out weighted operation according to the number of transaction test results with successful test contents in a set time period and the corresponding first calculation weight and second calculation weight;
and determining the availability of the test environment according to the ratio of the result of the weighted operation to the total running times of the transaction test program in the set time period.
3. The method of claim 1, further comprising, after the determining the test environment availability ratio:
and carrying out test failure analysis on the transaction test program with the result of test failure in the time period when the availability of the test environment is lower than the threshold value, generating a failure analysis report and sending the failure analysis report to a set test management terminal.
4. The method of claim 1, wherein after the running of the transaction test program in the test environment according to the set time frequency to obtain the transaction test result, the method further comprises:
and sending a test failure signal to the set test management terminal according to the transaction test result with the content as the test success.
5. The test environment detection method of claim 1, wherein the test scenario of the transaction test program does not include an exception transaction scenario.
6. The method according to claim 1, wherein the executing a transaction test program in the test environment according to the set time frequency to obtain a transaction test result further comprises:
and running each test case contained in the transaction test program in the test environment according to the set time frequency, and if at least one test case fails to run, judging that the transaction test result is test failure.
7. A test environment detection apparatus, comprising:
the transaction testing module is used for running a transaction testing program in a testing environment according to the set time frequency to obtain a transaction testing result;
the weight determining module is used for determining a first calculating weight according to the interval duration between the transaction test result and the set time node and determining a second calculating weight according to the transaction type of the transaction test result;
and the environment availability rate determining module is used for determining the environment availability rate according to the total running times of the transaction testing program in a set time period, corresponding transaction testing results, and first calculation weights and second calculation weights corresponding to the transaction testing results.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the test environment probing method of any of claims 1 to 6 are implemented by the processor when executing the program.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the test environment probing method of any one of claims 1 to 6.
10. A computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the steps of the test environment probing method of any of claims 1 to 6.
CN202210408288.0A 2022-04-19 2022-04-19 Test environment detection method and device Pending CN114661617A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210408288.0A CN114661617A (en) 2022-04-19 2022-04-19 Test environment detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210408288.0A CN114661617A (en) 2022-04-19 2022-04-19 Test environment detection method and device

Publications (1)

Publication Number Publication Date
CN114661617A true CN114661617A (en) 2022-06-24

Family

ID=82035172

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210408288.0A Pending CN114661617A (en) 2022-04-19 2022-04-19 Test environment detection method and device

Country Status (1)

Country Link
CN (1) CN114661617A (en)

Similar Documents

Publication Publication Date Title
CN111786885B (en) Distributed full-link gray level routing method and device
CN109359118B (en) Data writing method and device
CN110908875B (en) Inspection method and device based on operation terminal
US20190278689A1 (en) System to determine performance based on entropy values
CN112783793B (en) Automatic interface test system and method
CN111782470A (en) Distributed container log data processing method and device
CN111736772A (en) Storage space data processing method and device of distributed file system
CN111768305A (en) Anti-money laundering identification method and device
CN112817694A (en) Automatic load balancing method and device for distributed system
CN110990222A (en) Cross-platform graphical operation monitoring method and device based on mainframe
CN113190516B (en) Data synchronization monitoring method and device
CN113760611A (en) System site switching method and device, electronic equipment and storage medium
CN114661617A (en) Test environment detection method and device
CN113515447A (en) System automation test method and device
CN115562898A (en) Distributed payment system exception handling method and device
CN113434423A (en) Interface test method and device
CN112764957A (en) Application fault delimiting method and device
CN113050985A (en) Front-end engineering dependence automatic registration method and device
CN111930624A (en) Test link message data processing method and device
CN112766698B (en) Application service pressure determining method and device
CN113076262A (en) Automatic webpage testing method and device
CN112116402A (en) Credit risk customer-level default rate determination method and device
CN111953847A (en) Client message risk reminding method, device and system
CN115237808A (en) Software online test method, device and system
CN116339814A (en) Software patch data processing 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