CN115048311A - Test environment monitoring method and device, electronic equipment and readable storage medium - Google Patents
Test environment monitoring method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN115048311A CN115048311A CN202210760222.8A CN202210760222A CN115048311A CN 115048311 A CN115048311 A CN 115048311A CN 202210760222 A CN202210760222 A CN 202210760222A CN 115048311 A CN115048311 A CN 115048311A
- Authority
- CN
- China
- Prior art keywords
- test
- test case
- instruction
- component
- link
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 345
- 238000012544 monitoring process Methods 0.000 title claims abstract description 70
- 238000000034 method Methods 0.000 title claims abstract description 67
- 238000013515 script Methods 0.000 claims abstract description 54
- 238000012806 monitoring device Methods 0.000 claims abstract description 6
- 230000000694 effects Effects 0.000 claims description 21
- 230000004044 response Effects 0.000 claims description 20
- 238000012423 maintenance Methods 0.000 claims description 10
- 238000012545 processing Methods 0.000 claims description 9
- 238000012795 verification Methods 0.000 claims description 8
- 238000012986 modification Methods 0.000 claims description 6
- 230000004048 modification Effects 0.000 claims description 6
- 230000009467 reduction Effects 0.000 claims description 4
- 230000003044 adaptive effect Effects 0.000 abstract 1
- 239000007787 solid Substances 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 13
- 238000004590 computer program Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 11
- 230000008569 process Effects 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 101710085715 Defensin-like protein 2 Proteins 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000010757 Reduction Activity Effects 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000009533 lab test Methods 0.000 description 1
- 238000011022 operating instruction Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 238000013024 troubleshooting Methods 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
Images
Classifications
-
- G06F11/3664—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application discloses a monitoring method, a monitoring device, electronic equipment and a readable storage medium of a test environment, wherein the method is realized by a modular software development platform and comprises the following steps: identifying the link type of a link to be tested; responding to a component calling instruction, calling a plurality of testing components, and forming a testing case script of the link to be tested; reading the initial input parameters of the test case script according to the identified link type to form a test case of the link to be tested; and executing the test case in a target test environment to determine a monitoring result of the target test environment. The method and the device have the advantages that labor, time and economic cost for maintaining the offline test environment are saved to the greatest extent, accuracy is high, reliability is high, pertinence is strong, and adaptive scenes are wide, reliability of the test environment is obviously improved, and a solid foundation is provided for program development.
Description
Technical Field
The application relates to the technical field of computers, in particular to a monitoring method and device for a test environment, electronic equipment and a readable storage medium.
Background
The high availability of the offline environment of the application test is the basis for ensuring efficient research and development.
In the prior art, there are two main ways for testing the offline environment, one of which is to adopt a manual way, manually build a test case, run the test case according to the data of the offline environment, and report to relevant departments or personnel if a problem is found in the process of running the test case. The manual mode needs a large amount of manpower to maintain the test cases and scripts, is low in efficiency and easy to make mistakes, and seriously influences the trust degree of the offline environment. In the prior art, the automatic test usually comprises the steps of firstly constructing a test case, manually running the whole test case flow, after the whole test passes, performing online function, and then compiling the manually run test case into an automatic test script.
Disclosure of Invention
The embodiment of the application provides a method and a device for monitoring a test environment, an electronic device and a readable storage medium, aiming at the situation, the method reuses the existing components in a componentized software development platform, can obviously reduce labor cost, and has strong reliability.
In a first aspect, an embodiment of the present application provides a method for monitoring a test environment, where the method is implemented by a componentized software development platform, and the method includes:
identifying the link type of a link to be tested;
responding to a component calling instruction, calling a plurality of testing components, and forming a testing case script of the link to be tested;
reading the initial input parameters of the test case script according to the identified link type to form a test case of the link to be tested;
and executing the test case in a target test environment to determine a monitoring result of the target test environment.
In a second aspect, an embodiment of the present application further provides a device for monitoring a test environment, where the device is applied to a modular software development platform, and the device includes:
the identification unit is used for identifying the link type of the link to be tested;
the calling unit is used for responding to the component calling instruction and calling a plurality of testing components to form a testing case script of the link to be tested;
the reading unit is used for reading the initial input parameters of the test case script according to the identified link type to form a test case of the link to be tested;
and the execution unit is used for executing the test case in a target test environment so as to determine the monitoring result of the target test environment.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to perform any of the methods described above.
In a fourth aspect, this application embodiment also provides a computer-readable storage medium storing one or more programs which, when executed by an electronic device including a plurality of application programs, cause the electronic device to perform any of the methods described above.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects:
the method comprises the steps of firstly identifying the link type of a link to be tested, calling a plurality of test components according to a component calling instruction, enabling the components to form a test case script of the link to be tested in a specified form, and then reading initial input parameters of the test case script according to the identified link type to form a test case of the link to be tested; and finally, executing the test case in the target test environment so as to determine the monitoring result of the test environment. According to the method and the device, the existing components on the componentized software development platform are reused, the full-link automatic test case of the link to be tested is generated according to different link types, and the test case is operated in the test environment to realize monitoring of the test environment.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 shows a schematic flow diagram of a method of monitoring a test environment according to one embodiment of the present application;
FIG. 2 shows a schematic structural diagram of a monitoring device for a test environment according to one embodiment of the present application;
fig. 3 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 present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the 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.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
The concept of the application is that the usability of a test environment, which may also be referred to as an offline environment, is always an important link affecting the development experience, especially for the team of the development work of the shoulder-borne core system. In the prior art, the defects of high labor cost, low efficiency and poor reliability generally exist in the monitoring of the testing environment, and therefore, the monitoring method of the testing environment is provided.
The words that may appear in this application are briefly explained below.
Test environment, also known as offline environment: refers to an internal application test environment, is isolated from a production environment (on-line environment), and is used for integrated test of change codes.
Application availability ratio: the proportion of applications that can be completely and successfully run through in an offline environment, and in this application, the measure of application availability is the real application, not the single interface call.
Fig. 1 is a schematic flow chart illustrating a monitoring method for a test environment according to an embodiment of the present application, where the method is implemented by a componentized software development platform, and as can be seen from fig. 1, the present application at least includes steps S110 to S140:
step S110: the link type of the link to be tested is identified.
People increasingly rely on electronic commerce, such as online shopping, online ordering and taking out, and the like.
When monitoring a test environment, firstly, the link type of a link to be tested is identified, and then different input parameters (input parameters) are read according to different link types for monitoring, and the link to be tested is taken as a takeaway single link as an example.
Step S120: and responding to the component calling instruction, calling a plurality of testing components, and forming a test case script of the link to be tested.
After the link type of the link to be tested is determined, a plurality of test components existing on the componentized software development platform are called in response to a component calling instruction, so that the test components are connected together in a specified form to form a test case script of the link to be tested. The component calling instruction can be determined by a tester according to the link type of the link to be tested.
The modular software development platform is a modular and automatic platform for software developers to develop, and various components written by the developers in historical time are stored in the platform. These components are not limited to testing, and may be functions to be performed or functions already performed, which are stored in the form of components, and the components are generally independent of each other.
It should be noted that each component is typically single in function, such as querying store information components, aic modifying inventory components, etc., and therefore, multiple components are typically required to form a link.
The modular software development platform realizes convenient and rapid reuse of previously established functional modules, and a test case script of a link to be tested is conveniently established through connection among a plurality of modules and transmission of access parameters.
Taking the link to be tested as the takeaway ordering link as an example, the test case script may be, but is not limited to be, sequentially connected: the system comprises a store information query component, an in-bullet bill drawing page rendering build component, an in-bullet single-production component, an ALSC general in-bullet payment component, an ATC order query and verification component, an AFP2 fulfillment merchant order taking component and a takeout platform price calculation verification component.
In the present application, "connection" between components is not a physical connection in a general sense, and may be understood as transmission of an entry/exit parameter, that is, an exit parameter (output parameter) of a component located at a previous position is used as an entry parameter of a component located at a later position, so that connection between components is realized.
Step S130: and reading the initial input parameters of the test case script according to the identified link type to form the test case of the link to be tested.
After the test case script is formed, the initial input parameters of the test case script are read, and the test case of the link to be tested can be formed.
When the initial input parameters are read, the initial input parameters can be retrieved and read by butting the initial input parameters into a corresponding database according to the link type of the link to be tested.
In some embodiments of the present application, data failure or an undesirable condition that needs to be reconstructed is often encountered in monitoring of an offline environment, and therefore all static input parameters can be output through a first component, and parameters used by subsequent components are associated from outputs of components at upstream. That is, for the specific form of reading the initial input parameters, a reading component may be preceded by all components of the formed test case script to read the initial input parameters.
And inputting the read initial input parameters into the test case script to form the test script.
Step S140: and executing the test case in a target test environment to determine a monitoring result of the target test environment.
And finally, executing the formed test case in the target test environment to obtain a monitoring result of the test case, and displaying the specific problem if the problem occurs in the monitoring result in the process of executing the test case so as to facilitate the tester to remove the fault.
It should be noted that the failure is usually caused by two reasons, one is failure of the real application, that is, the link itself is in a problem, and the monitoring result abnormality caused by the failure of the real application mainly includes: the problems of low timeout value, the full problem of a link pool depending on a system, application errors caused by the problem of configuration after the problem of the release of the dependent system, the full of an offline database connection pool and the like can be solved by a manual method, for example, corresponding information can be generated and sent to corresponding personnel for troubleshooting or maintenance, and for example, for the full problem of the offline database connection pool, a DBA (database administrator) can be informed to modify the configuration of the offline database connection pool.
One of the two reasons is usually failure caused by stability of the test case, in which case, the test case or the link to be tested needs to be debugged or managed to avoid case failure caused by problems of test data or test codes.
And if the monitoring result passes, the test environment has no problem.
It can be seen from the method shown in fig. 1 that, a test case script of the link to be tested is formed by firstly identifying the link type of the link to be tested and calling a plurality of test components according to a component calling instruction, so that the components form the test case script of the link to be tested in a specified form, and then the initial input parameters of the test case script are read according to the identified link type to form the test case of the link to be tested; and finally, executing the test case in the target test environment so as to determine the monitoring result of the test environment. According to the method and the device, the existing components on the componentized software development platform are reused, the full-link automatic test case of the link to be tested is generated according to different link types, and the test case is operated in the test environment, so that the test environment is monitored.
In some embodiments of the present application, in the method above, before the step of invoking a plurality of test components in response to a component invocation instruction to form a test case script of the link to be tested, the method further includes: and responding to a test component adding instruction, and adding a test component corresponding to the test component adding instruction to the existing component of the componentized software development platform.
The functions of the componentized software development platform which do not exist can be added in a customized manner, specifically, the desired functions can be developed into codes, and then the codes are added into the existing components of the componentized software development platform through a test component adding instruction, so that the subsequent calling is facilitated.
In some embodiments of the present application, in the method, the invoking a plurality of test components in response to a component invocation instruction to form a test case script of the link to be tested includes: providing a configuration interface, receiving the component calling instruction through the configuration interface, wherein the component calling instruction comprises at least one of a component adding instruction, a component deleting instruction and a component sequence adjusting instruction, and responding to the component adding instruction, the component deleting instruction and the component sequence adjusting instruction to execute corresponding operation on the test component corresponding to each instruction; and integrating the called multiple test components in a serial mode according to the specified sequence in the component calling instruction to form a test case script, wherein each test component takes the output parameter of the previous test component as the input parameter of the test component.
In order to facilitate the operation of a tester, in some embodiments of the present application, a configuration interface that can be displayed at a terminal is provided, in the configuration interface, the tester can add, delete, and adjust the sequence of test components through operations such as selection, clicking, etc., a componentized software development platform responds to these component call instructions, and executes the operation of response to each instruction corresponding to the test component, and finally, integrates the multiple test components that are called in a serial manner according to the specified sequence in the component call instructions to form a test case script, in the test case script, for one test component, the output of the previous test component is the input parameter of the test component, and the output parameter of the test component is the input parameter of the next test component. Through the serial connection of the components, the test logic can be conveniently and randomly changed, the code is not required to be modified in a large range, the code integration is not required, and the test work is more convenient.
In some embodiments of the present application, in the method, the reading initial input parameters of the test case script according to the identified link type to form a test case of the link to be tested includes: determining an input parameter data source of the test case according to the identified link type; connecting the input parameter data source, and acquiring the initial input parameters of the test case script from the input parameter data source; and inputting the test case script into the parameter data source to form the test case of the link to be tested.
When initial input parameters are read, firstly, according to the link type of the identified link to be tested, determining an incoming parameter data source of a test case, taking the link to be tested as a takeout order link as an example, and the incoming parameter data source can be information for ordering by a client in a front-end takeout small program.
In some embodiments of the present application, in the method, the executing the test case in the target test environment to determine a monitoring result of the target test environment includes: establishing a test laboratory, wherein the test laboratory comprises a target test environment and the test case; executing the test case in the test laboratory according to a first preset period; if the test case is executed for a specified number of continuous failures in a certain preset period, determining that the monitoring result of the target test environment is a fault; and generating an obstacle maintenance work order according to the monitoring result, and sending the obstacle maintenance work order to a corresponding obstacle maintenance party.
When the test case is operated, a test laboratory can be established, the test case is executed in the test laboratory, specifically, the established test laboratory only contains the test case, and when the test laboratory is established, various parameters of the test laboratory can be configured, such as task name, task description, task type, timing expression, repetition times, failure feedback, whether to start notification, communication mode and information of obstacle maintainer, use protocol, target test environment and the like. Thus, the test case can be tested in the set experimental environment.
In the prior art, the automatic test for the application in a specific environment is usually performed once a day, so that the change of the environment in a day cannot be accurately and comprehensively reflected. Therefore, the execution frequency can be randomly specified through the timing expression, if the execution frequency can be specified to be once in 60min, the high-frequency operation can be performed, and the consistency of the usability measurement result and the real application body feeling can be ensured to the greatest extent.
In addition, if the test case is continuously failed to be executed for a specified number of times in a certain preset period, determining that the monitoring result of the link to be tested is faulty, that is, in the process of executing the test case once, the number of times of repetition, for example, 3 times, can be configured, if the number of times of continuous execution failing is less than 3, the link to be tested is re-executed, when the number of times of failure reaches 3, determining that the link to be tested is faulty, and specific fault information can be output, and in some embodiments, the related monitoring result is visually displayed in a form of a report.
In some embodiments of the application, a work order is introduced, for the case of a fault, the work order is generated according to the monitoring result, and corresponding fault maintainers are sent according to the configured information, so that the corresponding staff can be notified at the first time; in addition, a laboratory report can be generated, and the past data of the whole laboratory test, the feedback condition and the like are recorded in the laboratory report.
In some embodiments of the present application, the method further comprises: and responding to a test case adjusting instruction, and adjusting the test components in the test case to eliminate faults occurring in the execution of the test case, wherein the test case adjusting instruction is determined according to the monitoring result.
That is to say, under the condition of instability of the test case, the measurement case may be adjusted, and specifically, the test component in the test case is adjusted in response to the test case adjustment instruction, so as to eliminate the fault occurring in executing the test case.
The following lists several solutions for instability of test cases, if the link type is a takeout ordering link, the monitoring result is ordering failure caused by clearing of offline commodity inventory, and the test case adjustment instruction is a pre-modification commodity inventory component instruction; the responding to the test case adjusting instruction, adjusting the test components in the test case, including: and in response to the preposed modified commodity inventory component instruction, adding a modified commodity inventory component to a first specified position in the test case.
Namely, if the monitoring result is that the order placing fails due to the fact that the off-line commodity inventory is cleared, a component 'aic modifying the commodity inventory' is added in front, and the case failure caused by the fact that other testers modify the inventory by mistake is reduced.
If the link type is a takeout ordering link, the monitoring result is that an offline store fails, and the test case adjusting instruction is a pre-update store business state as an opening instruction; the responding to the test case adjusting instruction, adjusting the test components in the test case, including: and in response to the front updating store business state being an opening instruction, adding an updating store business state being an opening component to a second appointed position in the test case.
Namely, if the monitoring result is that the off-line store fails, a node for updating the store business state to be an open store is added in front, so that the store state is ensured to be the open store state.
If the link type is a takeaway drop link, the monitoring result is that the processing is overtime due to the fact that the number of offline activities is automatically created to be larger than a preset threshold value, the test case adjusting instruction is to increase takeaway, delete all the class reduction activity component instructions under a sold according to the sold, and adjust the test components in the test case in response to the test case adjusting instruction, wherein the step of adjusting the test components in the test case comprises the following steps: and in response to the instruction of adding takeaway, deleting all the activity components of the class reduction under the selerid according to the selerid, adding the instruction of adding takeaway, deleting all the activity components of the class reduction under the selerid according to the selerid to a third specified position in the test case.
That is, if too many offline transaction activities are created due to automation, the transaction times out and the use case fails. The [ alsc-mp ] takeout can be added in a preposed manner, all the classification-reducing activities under the selerid are deleted according to the selerid, all the existing activities under the merchant are invalid, the transaction activities used by the transaction are ensured to be in line with expectations after the subsequent transaction activities are established, and the improvement of the stability of the test case is facilitated due to a small amount of transaction activities; meanwhile, the validity period of the transaction activities automatically created is shortened, and more transaction activities are prevented from being accumulated under merchants.
In some embodiments, the link type is a takeaway ordering link, the monitoring result is that the callback message is overtime to cause an order state verification failure, and the test case adjustment instruction is an instruction to add a waiting node component; the responding to the test case adjusting instruction, adjusting the test components in the test case, including: and responding to the adding waiting node component instruction, and adding an adding waiting node component to a fourth specified position in the test case.
Namely, if the monitoring result is that the callback message is overtime and the order state verification fails, the problem can be solved by adding a waiting node.
In other embodiments, the link type is a takeaway ordering link, the monitoring result is that the transaction activity does not meet the expectation, and the test case adjustment instruction is an instruction to add a cache switch component to close the offline transaction; the responding to the test case adjusting instruction, adjusting the test components in the test case, including: and responding to the instruction of additionally setting the cache switch component for closing the offline transaction, and adding the cache switch component for closing the offline transaction to a fifth appointed position in the test case.
That is, if the monitoring result is that the transaction activity rule is inconsistent with the expectation, and the reason for the occurrence of the monitoring result is that the offline transaction has a cache and is not updated timely, the problem can be solved by additionally arranging a cache switch component for closing the offline transaction.
Still taking the aforementioned link to be tested as the takeaway ordering link as an example, the test case script may be, but is not limited to being, connected in sequence by adjusting: the platform accesses the database to obtain the entry component, aic modifies the merchandise inventory component, updates the store business state to be the store opening component, queries the store information component, [ ALSC-mp ] takeout-deletes all the activity reducing components under the sellerd according to the sellerd, [ ALSC-mp ] takeout-reduce activity-driver enable component, [ ALSC-mp ] takeout-reduce pro-driver enable component, in-missile bill-rendering build component, in-missile under single create component, [ transaction ] waiting component, [ transaction ] in-missile pay component, [ transaction ] waiting component, [ transaction ] ATC order query and verification component, [ transaction ] waiting component, [ AFP2 performs merchant acceptance component, [ transaction ] waiting component, and in-sale platform price calculation verification component.
Through the comprehensive treatment of the methods, the application availability ratio of the method can reach more than 93% through experiments.
Fig. 2 is a schematic structural diagram of a monitoring apparatus for a test environment according to an embodiment of the present application, the apparatus being applied to a componentized software development platform, the apparatus 200 including:
an identifying unit 210, configured to identify a link type of a link to be tested;
a calling unit 220, configured to call, in response to a component calling instruction, a plurality of test components to form a test case script of the link to be tested;
a reading unit 230, configured to read an initial input parameter of the test case script according to the identified link type, and form a test case of the link to be tested;
the execution unit 240 is configured to execute the test case in a target test environment to determine a monitoring result of the target test environment.
In some embodiments of the present application, the apparatus further comprises: and the component adding unit is used for responding to the test component adding instruction and adding the test component corresponding to the test component adding instruction to the existing component of the componentized software development platform before the step of responding to the component calling instruction, calling a plurality of test components and forming the test case script of the link to be tested.
In some embodiments of the present application, in the above apparatus, the invoking unit 220 is configured to provide a configuration interface, receive the component invoking instruction through the configuration interface, where the component invoking instruction includes at least one of a component adding instruction, a component deleting instruction, and a component order adjusting instruction, and in response to the component adding instruction, the component deleting instruction, and the component order adjusting instruction, perform a corresponding operation on a test component corresponding to each instruction; and integrating the called multiple test components in a serial mode according to the specified sequence in the component calling instruction to form a test case script, wherein each test component takes the output parameter of the previous test component as the input parameter of the test component.
In some embodiments of the present application, in the above apparatus, the reading unit 230 is configured to determine an import parameter data source of the test case script according to the identified link type; connecting the input parameter data source, and acquiring the initial input parameters of the test case script from the input parameter data source; and inputting the test case script into the parameter data source to form the test case of the link to be tested.
In some embodiments of the present application, in the above apparatus, the execution unit 240 is configured to establish a test laboratory, where the test laboratory includes a target test environment and the test case; executing the test case in the test laboratory according to a first preset period; if the test case is executed for a specified number of continuous failures in a certain preset period, determining that the monitoring result of the target test environment is a fault; and generating an obstacle maintenance work order according to the monitoring result, and sending the obstacle maintenance work order to a corresponding obstacle maintenance party.
In some embodiments of the present application, in the above apparatus, the invoking unit 220 is further configured to adjust a test component in the test case in response to a test case adjustment instruction, so as to eliminate a fault occurring in executing the test case, where the test case adjustment instruction is determined according to the monitoring result.
In some embodiments of the present application, in the above apparatus, the link type is a takeout ordering link, the monitoring result is that ordering fails due to clearing of offline commodity inventory, and the test case adjustment instruction is a pre-modification commodity inventory component instruction; and the calling unit 220 is used for responding to the pre-positioned commodity inventory modification component instruction and adding a modified commodity inventory component to a first specified position in the test case.
In some embodiments of the present application, in the above apparatus, the link type is a takeout release link, the monitoring result is an offline store failure, and the test case adjustment instruction is a front update store business state as an open store instruction; and the calling unit 220 is used for responding to the front updating shop business state being an opening order, and adding the component with the updating shop business state being the opening order to the second appointed position in the test case.
In some embodiments of the present application, in the above apparatus, the link type is takeaway leave single link, the monitoring result is that the automatically creating of the offline activity amount is greater than a preset threshold value, which results in processing timeout, the test case adjustment instruction is increase takeaway-delete all instruction of the activity-reduction components under selled according to selled, and the call unit 220 is configured to, in response to the increase takeaway-delete all instruction of the activity-reduction components under selled according to selled, add the increase takeaway-delete all the activity-reduction components under selled according to selled to a third specified location in the test case.
In some embodiments of the present application, in the above apparatus, the link type is a takeaway leave-order link, the monitoring result is that the callback message is overtime to cause an order state verification failure, and the test case adjustment instruction is an instruction to add a wait node component; and the calling unit 220 is configured to add the add-wait node component to the fourth specified position in the test case in response to the add-wait node component instruction.
In some embodiments of the present application, in the above apparatus, the link type is a takeaway drop link, the monitoring result is that the transaction activity does not meet the expectation, and the test case adjustment instruction is an instruction to add a cache switch component for closing an offline transaction; and the calling unit 220 is configured to add, in response to the instruction for additionally setting the cache switch component for closing the offline transaction, the cache switch component for closing the offline transaction to a fifth specified position in the test case.
It should be noted that, the monitoring device for the test environment can implement the monitoring method for the test environment one by one, and details are not repeated here.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 3, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other applications.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 3, but this does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and runs the computer program to form the monitoring device of the test environment on the logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
identifying the link type of a link to be tested;
responding to a component calling instruction, calling a plurality of testing components, and forming a testing case script of the link to be tested;
reading the initial input parameters of the test case script according to the identified link type to form a test case of the link to be tested;
and executing the test case in a target test environment to determine a monitoring result of the target test environment.
The method performed by the monitoring device of the test environment according to the embodiment shown in fig. 2 of the present application may be applied to or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The electronic device may further execute the method executed by the monitoring apparatus for testing environment in fig. 2, and implement the functions of the monitoring apparatus for testing environment in the embodiment shown in fig. 2, which are not described herein again in this embodiment of the present application.
An embodiment of the present application further provides a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which, when executed by an electronic device including a plurality of application programs, enable the electronic device to perform the method performed by the monitoring apparatus of the test environment in the embodiment shown in fig. 2, and are specifically configured to perform:
identifying the link type of a link to be tested;
responding to a component calling instruction, calling a plurality of testing components, and forming a testing case script of the link to be tested;
reading the initial input parameters of the test case script according to the identified link type to form a test case of the link to be tested;
and executing the test case in a target test environment to determine a monitoring result of the target test environment.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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 application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. 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.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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 above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims (14)
1. A monitoring method for a test environment is characterized in that the method is realized by a componentized software development platform, and the method comprises the following steps:
identifying the link type of a link to be tested;
responding to a component calling instruction, calling a plurality of testing components, and forming a testing case script of the link to be tested;
reading the initial input parameters of the test case script according to the identified link type to form a test case of the link to be tested;
and executing the test case in a target test environment to determine a monitoring result of the target test environment.
2. The method of claim 1, wherein prior to the step of invoking a plurality of test components in response to a component invocation instruction to form a test case script for the link under test, further comprising:
and responding to a test component adding instruction, and adding a test component corresponding to the test component adding instruction to the existing component of the componentized software development platform.
3. The method of claim 1, wherein said invoking a plurality of test components in response to a component invocation instruction to form a test case script for said link under test comprises:
providing a configuration interface, receiving the component calling instruction through the configuration interface, wherein the component calling instruction comprises at least one of a component adding instruction, a component deleting instruction and a component sequence adjusting instruction, and responding to the component adding instruction, the component deleting instruction and the component sequence adjusting instruction to execute corresponding operation on the test component corresponding to each instruction;
and integrating the called multiple test components in a serial mode according to the specified sequence in the component calling instruction to form a test case script, wherein each test component takes the output parameter of the previous test component as the input parameter of the test component.
4. The method of claim 1, wherein the reading the initial input parameters of the test case script according to the identified link type to form the test case of the link to be tested comprises:
determining an input parameter data source of the test case script according to the identified link type;
connecting the input parameter data source, and acquiring the initial input parameters of the test case script from the input parameter data source;
and inputting the test case script into the parameter data source to form the test case of the link to be tested.
5. The method of claim 1, wherein executing the test case in a target test environment to determine a monitoring result of the target test environment comprises:
establishing a test laboratory, wherein the test laboratory comprises a target test environment and the test case;
executing the test case in the test laboratory according to a first preset period;
if the test case is executed for a specified number of continuous failures in a certain preset period, determining that the monitoring result of the target test environment is a fault;
and generating an obstacle maintenance work order according to the monitoring result, and sending the obstacle maintenance work order to a corresponding obstacle maintenance party.
6. The method of claim 5, further comprising:
and responding to a test case adjusting instruction, and adjusting the test components in the test case to eliminate faults occurring in the execution of the test case, wherein the test case adjusting instruction is determined according to the monitoring result.
7. The method according to claim 6, wherein the link type is a takeaway ordering link, the monitoring result is ordering failure caused by clearing of offline commodity inventory, and the test case adjustment instruction is a pre-modification commodity inventory component instruction;
the responding to the test case adjusting instruction, adjusting the test components in the test case, including:
and in response to the preposed modified commodity inventory component instruction, adding a modified commodity inventory component to a first specified position in the test case.
8. The method according to claim 6, wherein the link type is a take-out order link, the monitoring result is an offline store failure, and the test case adjustment instruction is a forward update store business state as an open store instruction;
the responding to the test case adjusting instruction, adjusting the test components in the test case, including:
and in response to the front updating store business state being an opening instruction, adding an updating store business state being an opening component to a second appointed position in the test case.
9. The method according to claim 6, wherein the link type is takeaway leave link, the monitoring result is that the automatic creation of offline activity quantity is larger than a preset threshold value, which results in processing timeout, the test case adjustment instruction is add takeaway-delete all clash-reducing activity component instructions under selled according to selled;
the responding to the test case adjusting instruction, adjusting the test components in the test case, including:
and in response to the instruction of adding takeaway, deleting all the activity components of the class reduction under the selerid according to the selerid, adding the instruction of adding takeaway, deleting all the activity components of the class reduction under the selerid according to the selerid to a third specified position in the test case.
10. The method according to claim 6, wherein the link type is a takeaway order-placing link, the monitoring result is that the callback message is overtime to cause the order state verification to fail, and the test case adjustment instruction is an add wait node component instruction;
the responding to the test case adjusting instruction, adjusting the test components in the test case, including:
and responding to the adding waiting node component instruction, and adding an adding waiting node component to a fourth specified position in the test case.
11. The method of claim 6, wherein the link type is a takeaway drop link, the monitoring result is a transaction activity rule that does not match an expected rule, and the test case adjustment instruction is an instruction to add a cache switch component to close an offline transaction;
the responding to the test case adjusting instruction, adjusting the test components in the test case, including:
and responding to the instruction of the additional cache switch component for closing the offline transaction, and adding the cache switch component for closing the offline transaction to a fifth appointed position in the test case.
12. A monitoring device for a test environment is applied to realization of a component software development platform, and comprises:
the identification unit is used for identifying the link type of the link to be tested;
the calling unit is used for responding to the component calling instruction and calling a plurality of testing components to form a testing case script of the link to be tested;
the reading unit is used for reading the initial input parameters of the test case script according to the identified link type to form a test case of the link to be tested;
and the execution unit is used for executing the test case in a target test environment so as to determine the monitoring result of the target test environment.
13. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the method of claims 1 to 11.
14. A computer readable storage medium storing one or more programs which, when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform the method of claims 1-11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210760222.8A CN115048311A (en) | 2022-06-30 | 2022-06-30 | Test environment monitoring method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210760222.8A CN115048311A (en) | 2022-06-30 | 2022-06-30 | Test environment monitoring method and device, electronic equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115048311A true CN115048311A (en) | 2022-09-13 |
Family
ID=83166203
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210760222.8A Pending CN115048311A (en) | 2022-06-30 | 2022-06-30 | Test environment monitoring method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115048311A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115902595A (en) * | 2023-02-20 | 2023-04-04 | 之江实验室 | Chip testing system and chip testing method |
CN117453552A (en) * | 2023-10-30 | 2024-01-26 | 赛力斯汽车有限公司 | Script test sequence adjusting method, script test sequence adjusting device and storage medium |
-
2022
- 2022-06-30 CN CN202210760222.8A patent/CN115048311A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115902595A (en) * | 2023-02-20 | 2023-04-04 | 之江实验室 | Chip testing system and chip testing method |
CN117453552A (en) * | 2023-10-30 | 2024-01-26 | 赛力斯汽车有限公司 | Script test sequence adjusting method, script test sequence adjusting device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108763076A (en) | A kind of Software Automatic Testing Method, device, equipment and medium | |
CN114205273B (en) | System test method, device and equipment and computer storage medium | |
CN115048311A (en) | Test environment monitoring method and device, electronic equipment and readable storage medium | |
CN110060139B (en) | Accounting processing method and device | |
CN112446786A (en) | Abnormal transaction processing method and device, electronic equipment and readable storage medium | |
CN110188036A (en) | A kind of method for testing software and device | |
CN110716878A (en) | Automatic interface testing method, device and system | |
CN111324540A (en) | Interface testing method and device | |
CN112286790A (en) | Full link test method, device, equipment and storage medium | |
CN113297060A (en) | Data testing method and device | |
CN111815401B (en) | Order flow control method and equipment | |
CN116383052A (en) | Automatic testing method, device and equipment for batch processing task and storage medium | |
CN115167842A (en) | Visual development method, device, system, electronic equipment and medium of business | |
CN115437903A (en) | Interface test method, device, apparatus, storage medium, and program | |
CN117632723B (en) | Automatic simulation adjustment and measurement method, system, equipment and medium | |
CN114253846B (en) | Automatic test abnormality positioning method, device, equipment and readable storage medium | |
CN119205319A (en) | Funds clearing method and system | |
CN113609145B (en) | Database processing method, device, electronic equipment, storage medium and product | |
CN110688144B (en) | Method and device for optimizing service interface configuration and electronic equipment | |
CN117171041A (en) | Test method, device, equipment and storage medium for business batch processing | |
CN117891714A (en) | Flow playback testing method, device, equipment and storage medium | |
CN118069197A (en) | Software development management and control method and device, electronic equipment and readable storage medium | |
CN116992414A (en) | Authority verification method and device and electronic equipment | |
CN116841888A (en) | Link testing method and device for life-information scene and electronic equipment | |
CN117614817A (en) | Commercial tenant network access processing method, device, storage medium and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |