CN113204379B - Method, system, equipment and medium for dynamically loading test resources - Google Patents

Method, system, equipment and medium for dynamically loading test resources Download PDF

Info

Publication number
CN113204379B
CN113204379B CN202110491115.5A CN202110491115A CN113204379B CN 113204379 B CN113204379 B CN 113204379B CN 202110491115 A CN202110491115 A CN 202110491115A CN 113204379 B CN113204379 B CN 113204379B
Authority
CN
China
Prior art keywords
test
request
module
address
resources
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.)
Active
Application number
CN202110491115.5A
Other languages
Chinese (zh)
Other versions
CN113204379A (en
Inventor
程兴
黄书珽
黄凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ctrip Travel Information Service Shanghai Co Ltd
Original Assignee
Ctrip Travel Information Service Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ctrip Travel Information Service Shanghai Co Ltd filed Critical Ctrip Travel Information Service Shanghai Co Ltd
Priority to CN202110491115.5A priority Critical patent/CN113204379B/en
Publication of CN113204379A publication Critical patent/CN113204379A/en
Application granted granted Critical
Publication of CN113204379B publication Critical patent/CN113204379B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method, a system, equipment and a medium for dynamically loading test resources. Specifically, the dynamic test resource loading method comprises the steps of obtaining a test task ID and inquiring related test application according to the test task ID; wherein a test task ID is associated with at least one of the test applications; analyzing the test application to obtain a test environment address; wherein the test resource comprises a test environment address; and acquiring other test resources according to the test environment address. According to the invention, all test resources on the whole test link can be accurately obtained only through one test task ID, and repeated retrieval of test personnel during test resource acquisition is avoided, so that the test efficiency is improved, and the test cost is saved.

Description

Method, system, equipment and medium for dynamically loading test resources
Technical Field
The present invention relates to the field of test technologies, and in particular, to a method, a system, a device, and a medium for dynamically loading test resources.
Background
At present, a traditional testing means is generally selected when QA (Quality Assurance) or RD (Research and Development engineer) is used for interface testing, and the testing means generally has a plurality of problems, such as unclear associated application and release environment, unclear related interface and request message, incapability of inquiring request logs, incapability of sharing test cases, and the like, and each problem requires a tester to spend a large amount of time to repeatedly retrieve testing resources, thereby resulting in low testing efficiency.
Disclosure of Invention
The invention provides a method, a system, equipment and a medium for dynamically loading test resources, aiming at overcoming the defect of low test efficiency caused by repeated retrieval of the test resources in the prior art.
The invention solves the technical problems through the following technical scheme:
the invention provides a dynamic loading method of test resources, which comprises the following steps:
acquiring an Identity Document (ID) of a test task and inquiring related test application according to the ID of the test task; wherein the test task ID is associated with at least one of the test applications;
analyzing the test application to obtain a test environment address; wherein the test resource comprises the test environment address;
and acquiring other test resources according to the test environment address.
Preferably, the step of analyzing the test application to obtain the test environment address comprises:
acquiring a test environment issued by the test application;
inquiring the test environment address corresponding to the test environment;
the step of obtaining other test resources according to the test environment address comprises:
and searching the registration method of the test environment through the test environment address to obtain a test interface address and a history request message.
Preferably, the method for dynamically loading test resources further comprises:
splicing the test application, the test environment address, the test interface address and the historical request message into at least one request;
adding a preset request header parameter in the request header of the request, and sending the request;
receiving a return message and inquiring the log information associated with the request according to the unique log ID carried in the return message; the preset request header parameter corresponds to the unique log ID, and the unique log ID is associated with at least one piece of log information;
querying the log information associated with the unique log ID through the unique log ID;
and analyzing and acquiring the downstream interface simple topological graph of the current request based on the log information.
Preferably, the method for dynamically loading test resources further includes:
caching the request as a test case after the request is sent;
reinitiating the request after the test case is opened;
and/or the presence of a gas in the gas,
after the request is sent, the request is stored as a test case, and the test case is stored in a test case database;
and retrieving and opening a target test case in the test case database, and restarting the request after opening the target test case.
The invention also provides a test resource dynamic loading system, which comprises an acquisition module, a test environment address acquisition module and a test resource acquisition module;
the acquisition module is used for acquiring a test task ID and inquiring related test application according to the test task ID; wherein the test task ID is associated with at least one of the test applications;
the test environment address acquisition module is used for analyzing the test application to acquire a test environment address; wherein the test resource comprises the test environment address;
and the test resource acquisition module is used for acquiring other test resources according to the test environment address.
Preferably, the test environment address obtaining module includes a test environment obtaining unit and a test environment address querying unit;
the test environment obtaining unit is used for obtaining the test environment issued by the test application;
the test environment address query unit is used for querying the test environment address corresponding to the test environment;
the test resource acquisition module comprises a test resource searching and acquiring unit;
the test resource searching and acquiring unit is used for searching the registration method of the test environment through the test environment address to acquire a test interface address and a history request message.
Preferably, the dynamic system for testing resources further comprises a splicing module, an adding module, a receiving module, an inquiring module and an analyzing module;
the splicing module is used for splicing the test application, the test environment address, the test interface address and the historical request message into at least one request;
the adding module is used for adding a preset request header parameter in the request header of the request and sending the request;
the receiving module is used for receiving a return message and inquiring the log information associated with the request according to the unique log ID carried in the return message; the preset request header parameter corresponds to the unique log ID, and the unique log ID is associated with at least one piece of log information;
the query module is used for querying the log information associated with the unique log ID through the unique log ID;
and the analysis module is used for analyzing and acquiring the simple topological graph of the downstream interface of the current request based on the log information.
Preferably, the system for dynamically loading test resources further includes a test case caching module and a first test case opening module:
the test case caching module is used for caching the request as a test case after the request is sent;
the first test case opening module is used for reinitiating the request after the test case is opened;
and/or the presence of a gas in the gas,
the test resource dynamic loading system also comprises a test case storage module and a second test case opening module;
the test case storage module is used for storing the request as a test case after the request is sent and storing the test case into a test case database;
and the second test case opening module is used for retrieving and opening a target test case in the test case database, and restarting the request after opening the target test case.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor implements the dynamic loading method of the test resources when executing the computer program.
The invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method for dynamic loading of test resources as described above.
The positive progress effects of the invention are as follows: by acquiring the test task ID, inquiring the associated at least one test application according to the test task ID, acquiring the test environment address according to the test application and further acquiring the test resources according to the test environment address, all the test resources on the whole test link can be accurately acquired only through one test task ID, repeated retrieval of testers when the test resources are acquired is avoided, the test efficiency is improved, and the test cost is saved.
Drawings
Fig. 1 is a flowchart of a test resource dynamic loading method according to embodiment 1 of the present invention.
Fig. 2 is a flowchart of a test resource dynamic loading method according to embodiment 2 of the present invention.
Fig. 3 is a schematic block diagram of a test resource dynamic loading system according to embodiment 3 of the present invention.
Fig. 4 is a schematic block diagram of a test resource dynamic loading system according to embodiment 4 of the present invention.
Fig. 5 is a core timing diagram of a system for dynamically loading test resources according to embodiment 4 of the present invention.
Fig. 6 is a schematic structural diagram of an electronic device implementing a method for dynamically loading test resources according to embodiment 5 of the present invention.
FIG. 7 is a partial test resource diagram of the present invention.
Fig. 8 is a simplified topology diagram of a downstream interface of the present invention.
FIG. 9 is a diagram illustrating a search method of a test case set according to the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Example 1
As shown in fig. 1, a method for dynamically loading test resources provided in this embodiment includes:
s101, acquiring a test task ID and inquiring related test application according to the test task ID; wherein the test task ID is associated with at least one test application;
s102, analyzing the test application to obtain a test environment address; wherein the test resource comprises a test environment address;
and S103, acquiring other test resources according to the test environment address.
Specifically, when test resources need to be loaded, the test task ID of the test task is obtained first, and each test task ID is associated with at least one test application in advance, then the test application associated with the test task ID is queried according to the obtained test task ID, the test application associated with the test task ID is analyzed to obtain a test environment address, and then other test resources of the test task are obtained according to the test environment address, so that the operation of loading the test resources according to the test task ID is completed.
In a specific scenario, one test task ID associates 2 test applications, each test application has a corresponding test environment address, and each test environment address corresponds to a test resource, so that the test resources of the 2 test applications associated with one test task ID can be acquired through the test task ID, and the test resources corresponding to the test task ID are loaded.
According to the dynamic test resource loading method, the test task ID is obtained, the associated at least one test application is inquired according to the test task ID, the test application is analyzed to obtain the test environment address, and then the test resource is obtained according to the test environment address, so that all test resources required by the corresponding test task can be accurately loaded through only one test task ID, repeated retrieval of test personnel during test resource obtaining is avoided, the test efficiency is improved, and the test cost is saved.
Example 2
As shown in fig. 2, the method for dynamically loading test resources in this embodiment is a further improvement of embodiment 1, specifically:
the step S102 includes:
s1021, obtaining a test environment issued by the test application;
and S1022, querying a test environment address corresponding to the test environment.
Step S103 includes:
and S1031, searching the registration method of the test environment through the test environment address to obtain the test interface address and the history request message.
Specifically, fig. 7 shows a part of the test resources, such as a test interface address 61, a history request message 63, which further includes a registration method 62 passing through the test environment, wherein the history request message 63 is used to record history request information, which includes but is not limited to what test interface the user uses, what test application the user queries, and so on; the testing application is analyzed to obtain the testing environment issued by the testing application, and then the testing environment address corresponding to the testing environment is inquired, so that the testing interface address and the history request message are obtained by searching the registration method of the testing environment through the testing environment address, the testing resources such as the required testing application, the testing environment address, the testing interface address, the history request message and the like can be automatically searched according to the requirement of the testing task, the times of manual repeated searching are reduced, and the testing efficiency is improved.
In a preferred embodiment, the method for dynamically loading test resources of this embodiment further includes:
s104, splicing the test application, the test environment address, the test interface address and the historical request message into at least one request;
specifically, at least one request is divided through different request messages, and by sending at least one request, a simple concurrent test can be realized, wherein the concurrent test aims at the same test interface address of the same test application, for example, https:// xxx.com/user/logic =1 and https:// xxx.com// user/logic =12 are different request messages of the same interface of the same test application.
S105, adding a preset request header parameter in a request header of the request, and sending the request;
s106, receiving the return message and inquiring the log information associated with the current request according to the unique log ID carried in the return message; the preset request head parameter corresponds to the unique log ID, and the unique log ID is associated with at least one piece of log information;
specifically, the user can add preset request header parameters to the spliced request header and also can add preset request header parameters to the request header in the empty message, and a person skilled in the art can make a selection according to the situation; by adding a preset request header parameter in a request header of a request, on one hand, authority verification can be realized, and on the other hand, a corresponding unique log ID can be obtained; the preset request header parameter may be a default value, or may be modified by the user according to the requirement.
In an optional implementation manner, by recording and displaying a sending request and receiving and analyzing whether a returned message has a response time of a unique log ID, a user can monitor the call of the test resource dynamic loading method in real time according to the response time, and support is provided for further implementation and optimization of the test resource dynamic loading method.
S107, inquiring log information associated with the unique log ID through the unique log ID;
and S108, analyzing and acquiring the downstream interface simple topological graph of the current request based on the log information.
Specifically, the log information associated with the current request may also be queried through the unique log ID, and the simple topology diagram of the downstream interface of the current request is mainly analyzed and obtained according to the log information associated with the unique log ID, where fig. 8 shows the simple topology diagram of the downstream interface of the present invention, and which interfaces the tested interface depends on downstream may be obtained through the simple topology diagram of the downstream interface of the current request.
In an alternative embodiment, the identification associated with the unique log ID may be added to the log information by way of, but not limited to, a buried point.
Specifically, by splicing the test application, the test environment address, the test interface address and the request message into at least one request, and by sending the at least one request, simple concurrent test can be realized, preset request head parameters are added to a request head of the request and sent, a return message is received, and log information associated with the current request and other log information associated with the unique log ID are inquired according to the unique log ID carried in the return message, so that a downstream interface simple topological graph of the current request is analyzed and obtained based on the log information, a tester does not need to integrate test resources in a manual mode when obtaining the test resources, the test efficiency is further improved, and the test cost is saved.
In an optional implementation manner, the method for dynamically loading test resources according to this embodiment further includes:
s109, caching the request as a test case after the request is sent;
and S1010, reinitiating the request after the test case is opened.
Specifically, after a request is completed once, the request is cached as a test case, and if the same request is sent again, a user can quickly select and open the cached test case to resend the request, so that repeated operation is avoided, the test efficiency is greatly improved, and the test time is saved.
In an optional implementation manner, the method for dynamically loading test resources according to this embodiment further includes:
s1011, storing the request as a test case after sending the request, and storing the test case into a test case database;
s1012, retrieving and opening the target test case in the test case database, and re-initiating the request after opening the target test case.
Specifically, after one request is completed, each request is stored as a corresponding test case, the test cases are stored in the test case database, and if the request is sent again, the user can resend the request in a mode of retrieving and opening a target test case in the test case database, so that repeated operation is avoided, the test efficiency is greatly improved, and the test time is saved.
In an alternative embodiment, the user may retrieve the target test case by a retrieval method including, but not limited to, at least one of a keyword of the test case and an interface name of the test case, and fig. 9 shows a schematic diagram of retrieving the test case by using the keyword.
According to the dynamic test resource loading method, on the basis that all test resources can be accurately obtained through one test task ID and repeated retrieval of a tester is avoided when the tester obtains the test resources, the test application, the test environment address, the test interface address and the request message are spliced into at least one request, a preset request head parameter is added to a request head of the request to receive a return message, and accordingly associated log information is queried according to the unique log ID, so that the tester does not need to integrate the test resources in a manual mode when the tester obtains the test resources, the test efficiency is further improved, and the test cost is saved.
Example 3
As shown in fig. 3, the dynamic test resource loading system of this embodiment includes an obtaining module 1, a test environment address obtaining module 2, and a test resource obtaining module 4;
the acquisition module 1 is used for acquiring a test task ID and inquiring related test application according to the test task ID; wherein the test task ID is associated with at least one test application;
a test environment address obtaining module 2, configured to analyze a test application to obtain a test environment address; wherein the test resource comprises a test environment address;
and the test resource acquisition module 4 is used for acquiring other test resources according to the test environment address.
Specifically, fig. 7 shows a part of the test resources, such as a test interface address 61, a history request message 63, which further includes a registration method 62 passing through the test environment, wherein the history request message 63 is used to record history request information, which includes but is not limited to what test interface the user uses, what test application the user queries, and so on; when a test resource needs to be loaded, the obtaining module 1 obtains a test task ID of a test task, each test task ID is associated with at least one test application in advance, then the test application associated with the test task ID is inquired according to the obtained test task ID, the test environment address obtaining module 2 analyzes the test application associated with the test task ID to obtain a test environment address, and then the test resource obtaining module 4 obtains other test resources of the test task according to the test environment address, so that the operation of loading the test resources according to the test task ID is completed.
In a specific scenario, one test task ID associates 2 test applications, each test application has a corresponding test environment address, and each test environment address also corresponds to a test resource, so that the test resources of the 2 test applications associated therewith can be acquired through one test task ID, and then the test resources corresponding to the test task ID are loaded.
According to the dynamic test resource loading system, the acquisition module acquires the test task ID, the associated at least one test application is inquired according to the test task ID, the test environment address acquisition module analyzes the test application to acquire the test environment address, and then the test resource acquisition module acquires the test resource according to the test environment address, so that all test resources required by the corresponding test task can be accurately loaded only through one test task ID, repeated retrieval of test personnel during acquisition of the test resources is avoided, the test efficiency is improved, and the test cost is saved.
Example 4
As shown in fig. 4, the test resource dynamic loading system of this embodiment is a further improvement of embodiment 3, specifically:
the test environment address obtaining module 2 in this embodiment includes a test environment obtaining unit 21 and a test environment address querying unit 22;
a test environment obtaining unit 21, configured to obtain a test environment issued by a test application;
a test environment address query unit 22, configured to query a test environment address corresponding to a test environment;
the test resource acquisition module 4 includes a test resource search acquisition unit 41;
the test resource search obtaining unit 41 is configured to search a registration method of the test environment through the test environment address to obtain the test interface address and the history request packet.
Specifically, the test environment obtaining unit 21 obtains the test environment issued by the test application by analyzing the test application, and the test environment address querying unit 22 queries the test environment address corresponding to the test environment, so that the test resource searching and obtaining unit 41 searches the registration method of the test environment by using the test environment address to obtain the test interface address and the history request message, thereby realizing automatic search of the required test resources such as the test application, the test environment address, the test interface address, the history request message and the like according to the test task requirement, reducing the times of manual repeated search, and improving the test efficiency.
In a preferred embodiment, the dynamic system for testing resources further comprises a splicing module 5, an adding module 6, a receiving module 7, a querying module 8 and an analyzing module 9;
the splicing module 5 is used for splicing the test application, the test environment address, the test interface address and the historical request message into at least one request;
specifically, at least one request is divided by different request messages, and by sending at least one request, a simple concurrent test can be realized, wherein the concurrent test aims at the same test interface address of the same test application, for example, https:// xxx.com/user/logic =1, and https:// xxx.com// user/logic =12 are different request messages of the same interface of the same test application.
An adding module 6, configured to add a preset request header parameter in a request header of the request, and send the request;
the receiving module 7 is used for receiving the return message and inquiring the log information associated with the current request according to the unique log ID carried in the return message; the preset request head parameter corresponds to a unique log ID, and the unique log ID is associated with at least one log message;
specifically, the user can add a preset request header parameter to the spliced request header and also can add a preset request header parameter to the request header in the null message, and a person skilled in the art can make a selection according to the situation; by adding a preset request header parameter in a request header of a request, on one hand, authority verification can be realized, and on the other hand, a corresponding unique log ID can be obtained; the preset request header parameter may be a default value, or may be modified by the user according to the requirement.
In an optional implementation manner, by recording and displaying a sending request and receiving and analyzing whether a return message has a response time of a unique log ID, a user can monitor the test resource dynamic loading system in real time according to the response time, and data support is provided for further implementation and optimization of the test resource dynamic loading system.
The query module 8 is used for querying the log information associated with the unique log ID through the unique log ID;
and the analysis module 9 is configured to analyze and obtain the downstream interface simple topological graph of the current request based on the log information.
Specifically, fig. 5 shows a core sequence diagram of the test resource dynamic loading system of this embodiment, the query module 8 may also query the log information corresponding to the current request through the unique log ID, and mainly analyze and acquire the downstream interface simple topology diagram of the current request according to the log information associated with the unique log ID, and fig. 8 shows the downstream interface simple topology diagram of the present invention, which interfaces the tested interface depends on downstream can be analyzed and acquired through the downstream interface simple topology diagram of the current request.
In an alternative embodiment, the identification associated with the unique log ID may be added to the log information by way of, but not limited to, a buried point.
Specifically, the splicing module 5 splices the test application, the test environment address, the test interface address and the request message into at least one request, and can realize simple concurrent test by sending the at least one request, the adding module 6 adds preset request header parameters in the request header of the request and sends the request header parameters, the receiving module 7 receives the return message, and the inquiring module 8 inquires the log information associated with the current request and other log information associated with the unique log ID according to the unique log ID carried in the return message, so that the analyzing module 9 analyzes and obtains the simple topological graph of the downstream interface of the current request based on the log information, thereby realizing that a tester does not need to integrate the test resources in a manual mode when obtaining the test resources, further improving the test efficiency, and saving the test cost.
In an optional implementation manner, the system for dynamically loading test resources of this embodiment further includes a test case caching module 10 and a first test case opening module 11:
a test case caching module 10, configured to cache the request as a test case after sending the request;
the first test case opening module 11 is configured to reinitiate the request after the test case is opened.
Specifically, after a request is completed, the test case caching module 10 caches the request as a test case, and if the same request is sent again, the user can quickly select and open the cached test case through the first test case opening module 11 to resend the request, so that repeated operation is avoided, the test efficiency is greatly improved, and the test time is saved.
In an optional implementation manner, the test resource dynamic loading system of this embodiment further includes a test case saving module 12 and a second test case opening module 13;
the test case storage module 12 is used for storing the request as a test case after sending the request and storing the test case into the test case database;
and the second test case opening module 13 is configured to retrieve and open the target test case in the test case database, and reinitiate the request after opening the target test case.
Specifically, after a request is completed, the test case storage module 12 stores each request as a corresponding test case, and stores the test case into the test case database, and if the request is sent again, the user can resend the request by retrieving and opening the target test case in the test case database through the second test case opening module 13, thereby avoiding repeated operation, greatly improving the test efficiency, and saving the test time.
In an alternative embodiment, the user may retrieve the target test case through a retrieval manner including, but not limited to, at least one of a keyword of the test case and an interface name of the test case, and fig. 9 illustrates a method for retrieving the test case by using the keyword.
According to the dynamic loading method for the test resources, on the basis that all the test resources can be accurately obtained through one test task ID and repeated retrieval of a tester is avoided when the tester obtains the test resources, the test application, the test environment address, the test interface address and the request message are spliced into at least one request, and a preset request head parameter is added to a request head of the request to receive a return message, so that associated log information is inquired according to the unique log ID, the tester does not need to integrate the test resources in a manual mode when the tester obtains the test resources, the test efficiency is further improved, and the test cost is saved.
Example 5
Fig. 6 is a schematic structural diagram of an electronic device according to embodiment 5 of the present invention. The electronic device comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, and the processor executes the program to implement the dynamic loading method of the test resource in embodiment 1 or 2. The electronic device 30 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 6, the electronic device 30 may be embodied in the form of a general purpose computing device, which may be, for example, a server device. The components of the electronic device 30 may include, but are not limited to: the at least one processor 31, the at least one memory 32, and a bus 33 that couples various system components including the memory 32 and the processor 31.
The bus 33 includes a data bus, an address bus, and a control bus.
The memory 32 may include volatile memory, such as Random Access Memory (RAM) 321 and/or cache memory 322, and may further include Read Only Memory (ROM) 323.
Memory 32 may also include a program/utility 325 having a set (at least one) of program modules 324, such program modules 324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may comprise an implementation of a network environment.
The processor 31 executes various functional applications and data processing, such as the dynamic loading method of the test resource in embodiment 1 or 2 of the present invention, by running the computer program stored in the memory 32.
The electronic device 30 may also communicate with one or more external devices 34 (e.g., a keyboard, a pointing device, etc.). Such communication may be through an input/output (I/O) interface 35. Also, model-generating device 30 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via network adapter 36. As shown in FIG. 6, network adapter 36 communicates with the other modules of model-generating device 30 via bus 33. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the model-generating device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Example 6
The present embodiment provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps in the test resource dynamic loading method in embodiment 1 or 2.
More specific examples that may be employed by the readable storage medium include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation manner, the present invention can also be implemented in the form of a program product, which includes program code for causing a terminal device to execute the steps in the method for dynamically loading test resources in implementation example 1 or 2 when the program product runs on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be understood by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (6)

1. A dynamic loading method for test resources is characterized in that the dynamic loading method for test resources comprises the following steps:
acquiring a test task ID and inquiring related test application according to the test task ID; wherein the test task ID is associated with at least one of the test applications;
analyzing the test application to obtain a test environment address; wherein the test resource comprises the test environment address;
acquiring other test resources according to the test environment address;
the step of analyzing the test application to obtain a test environment address comprises:
acquiring a test environment issued by the test application;
inquiring the test environment address corresponding to the test environment;
the step of obtaining other test resources according to the test environment address comprises the following steps:
searching a registration method of the test environment through the test environment address to obtain a test interface address and a history request message;
the dynamic loading method for the test resources further comprises the following steps:
splicing the test application, the test environment address, the test interface address and the history request message into at least one request;
adding a preset request header parameter in a request header of the request, and sending the request;
receiving a return message and inquiring the log information associated with the request according to the unique log ID carried in the return message; the preset request header parameter corresponds to the unique log ID, and the unique log ID is associated with at least one piece of log information;
querying the log information associated with the unique log ID through the unique log ID;
and analyzing and acquiring a downstream interface simple topological graph of the current request based on the log information.
2. The method of dynamic loading of test resources of claim 1, further comprising:
caching the request as a test case after the request is sent;
reinitiating the request after the test case is opened;
and/or the presence of a gas in the gas,
after the request is sent, the request is stored as a test case, and the test case is stored in a test case database;
and retrieving and opening a target test case in the test case database, and restarting the request after opening the target test case.
3. The system for dynamically loading the test resources is characterized by comprising an acquisition module, a test environment address acquisition module and a test resource acquisition module;
the acquisition module is used for acquiring a test task ID and inquiring related test application according to the test task ID; wherein the test task ID is associated with at least one of the test applications;
the test environment address acquisition module is used for analyzing the test application to acquire a test environment address; wherein the test resource comprises the test environment address;
the test resource acquisition module is used for acquiring other test resources according to the test environment address;
the test environment address acquisition module comprises a test environment acquisition unit and a test environment address query unit;
the test environment obtaining unit is used for obtaining the test environment issued by the test application;
the test environment address query unit is used for querying the test environment address corresponding to the test environment;
the test resource acquisition module comprises a test resource search acquisition unit;
the test resource searching and acquiring unit is used for searching the registration method of the test environment through the test environment address to acquire a test interface address and a history request message;
the dynamic system for testing resources further comprises a splicing module, an adding module, a receiving module, an inquiring module and an analyzing module;
the splicing module is used for splicing the test application, the test environment address, the test interface address and the historical request message into at least one request;
the adding module is used for adding a preset request header parameter in the request header of the request and sending the request;
the receiving module is used for receiving a return message and inquiring the log information associated with the request according to the unique log ID carried in the return message; the preset request header parameter corresponds to the unique log ID, and the unique log ID is associated with at least one piece of log information;
the query module is used for querying the log information associated with the unique log ID through the unique log ID;
and the analysis module is used for analyzing and acquiring the simple topological graph of the downstream interface of the current request based on the log information.
4. The dynamic test resource loading system of claim 3, further comprising a test case caching module, a first test case opening module:
the test case caching module is used for caching the request as a test case after the request is sent;
the first test case opening module is used for reinitiating the request after the test case is opened;
and/or the presence of a gas in the gas,
the test resource dynamic loading system also comprises a test case storage module and a second test case opening module;
the test case storage module is used for storing the request as a test case after the request is sent and storing the test case into a test case database;
and the second test case opening module is used for retrieving and opening a target test case in the test case database, and restarting the request after the target test case is opened.
5. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for dynamic loading of test resources of claim 1 or 2 when executing the computer program.
6. 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 method for dynamic loading of test resources according to claim 1 or 2.
CN202110491115.5A 2021-05-06 2021-05-06 Method, system, equipment and medium for dynamically loading test resources Active CN113204379B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110491115.5A CN113204379B (en) 2021-05-06 2021-05-06 Method, system, equipment and medium for dynamically loading test resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110491115.5A CN113204379B (en) 2021-05-06 2021-05-06 Method, system, equipment and medium for dynamically loading test resources

Publications (2)

Publication Number Publication Date
CN113204379A CN113204379A (en) 2021-08-03
CN113204379B true CN113204379B (en) 2022-11-15

Family

ID=77030151

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110491115.5A Active CN113204379B (en) 2021-05-06 2021-05-06 Method, system, equipment and medium for dynamically loading test resources

Country Status (1)

Country Link
CN (1) CN113204379B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844201A (en) * 2016-12-30 2017-06-13 北京五八信息技术有限公司 Test environment dispositions method and system
CN110334029A (en) * 2019-07-10 2019-10-15 中国民航信息网络股份有限公司 Test environmental system and system integration and test method
CN110413522A (en) * 2019-07-25 2019-11-05 江苏满运软件科技有限公司 A kind of determination method, apparatus, storage medium and the electronic equipment of test database
CN111078553A (en) * 2019-12-16 2020-04-28 南方电网数字电网研究院有限公司 Data development task testing method and device, computer equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107402880B (en) * 2016-05-20 2020-10-16 腾讯科技(北京)有限公司 Test method and electronic equipment
CN108845937A (en) * 2018-06-01 2018-11-20 平安普惠企业管理有限公司 Test environment control method, device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844201A (en) * 2016-12-30 2017-06-13 北京五八信息技术有限公司 Test environment dispositions method and system
CN110334029A (en) * 2019-07-10 2019-10-15 中国民航信息网络股份有限公司 Test environmental system and system integration and test method
CN110413522A (en) * 2019-07-25 2019-11-05 江苏满运软件科技有限公司 A kind of determination method, apparatus, storage medium and the electronic equipment of test database
CN111078553A (en) * 2019-12-16 2020-04-28 南方电网数字电网研究院有限公司 Data development task testing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113204379A (en) 2021-08-03

Similar Documents

Publication Publication Date Title
CN111522922B (en) Log information query method and device, storage medium and computer equipment
CN107688530B (en) Software testing method and device
US6304872B1 (en) Search system for providing fulltext search over web pages of world wide web servers
CN110851324B (en) Log-based routing inspection processing method and device, electronic equipment and storage medium
CN106603296A (en) Log processing method and device
CN109308305A (en) Querying method, device and the computer equipment of monitoring data
CN106776318A (en) A kind of test script method for recording and system
CN103152391A (en) Journal output method and device
CN104298675A (en) Method and device for cache management
CN112363907A (en) Test method and device for Dubbo interface, electronic device and storage medium
CN113220597A (en) Test method, test device, electronic apparatus, and storage medium
CN113204379B (en) Method, system, equipment and medium for dynamically loading test resources
CN110334019B (en) Test method, test device and readable storage medium
CN112015771A (en) Data retrieval method and device, electronic equipment and computer storage medium
CN114610689B (en) Recording and analyzing method for request log in distributed environment
CN110147313A (en) A kind of log-output method and device
US9201771B2 (en) Method for evaluating a production rule for a memory management analysis
CN114817300A (en) Log query method based on SQL (structured query language) statements and application thereof
CN114064510A (en) Function testing method and device, electronic equipment and storage medium
US10909019B2 (en) Runtime performance introspection
CN111026637A (en) Method and device for positioning problem code
CN112597119A (en) Method and device for generating processing log and storage medium
WO2020215693A1 (en) Software testing method and apparatus, computer device, and readable storage medium
CN112286777A (en) PC equipment parameter data quality inspection method, system and server
CN114765599A (en) Sub-domain name acquisition 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
GR01 Patent grant
GR01 Patent grant