CN114490409A - Product testing method and device, storage medium and electronic equipment - Google Patents

Product testing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114490409A
CN114490409A CN202210133001.8A CN202210133001A CN114490409A CN 114490409 A CN114490409 A CN 114490409A CN 202210133001 A CN202210133001 A CN 202210133001A CN 114490409 A CN114490409 A CN 114490409A
Authority
CN
China
Prior art keywords
product
tested
testing
request
log
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210133001.8A
Other languages
Chinese (zh)
Inventor
刘佳丽
吴东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Allianz Property Insurance Co ltd
Original Assignee
Jingdong Allianz Property Insurance 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 Jingdong Allianz Property Insurance Co ltd filed Critical Jingdong Allianz Property Insurance Co ltd
Priority to CN202210133001.8A priority Critical patent/CN114490409A/en
Publication of CN114490409A publication Critical patent/CN114490409A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

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 disclosure provides a product testing method and device, a storage medium and electronic equipment, and relates to the technical field of computers. The method comprises the following steps: acquiring a product to be tested and the operating environment of the product to be tested; if the running environment of the product to be tested is the testing environment, generating a request message corresponding to the product to be tested according to the relevant information of the product to be tested, and then testing the product to be tested according to the generated request message; and if the running environment of the product to be tested is the production environment, capturing an on-line production log, and further testing the product to be tested according to the on-line production log. The method can generate the request message of various services of each product in the test environment to test the product, can capture the on-line production log in the production environment to test the product, can decouple the test flow from the production service scene, and improves the test efficiency and accuracy.

Description

Product testing method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for testing a product, a storage medium, and an electronic device.
Background
For an insurance service scene, products are various in types and high in updating iteration speed, and in order to ensure that the normal operation of other products is not influenced after a new product is on line or the products are iterated, whether the function of each product is normal needs to be verified.
In the related art, after a new product is online, a tester needs to manually test whether the function of each product is normal, specifically, manually input a request message and then perform function verification, and manually verify the correctness of database entry data. In the related art, the coupling degree of the workflow and the service scene in the testing process is high, and in the face of more and more diversified products, manual testing can cause very high testing cost, can lead to long testing period, and causes influence on the on-line of the products.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The disclosure aims to provide a product testing method, a product testing device, a storage medium and electronic equipment, so as to solve the problems of high coupling degree of workflow and service scene in a manual testing process, high testing cost and long testing period.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, there is provided a method of testing a product, including: acquiring a product to be tested and the operating environment of the product to be tested; if the running environment of the product to be tested is a testing environment, generating a request message corresponding to the product to be tested according to the relevant information of the product to be tested, and then testing the product to be tested according to the generated request message; and if the running environment of the product to be tested is the production environment, capturing an on-line production log, and further testing the product to be tested according to the on-line production log.
In an embodiment of the present disclosure, the information related to the product to be tested includes: the product to be tested comprises a business function and a parameter corresponding to the business function; and generating a request message corresponding to the product to be tested according to the relevant information of the product to be tested, wherein the request message comprises: and generating a generic or request generating script based on a preset request, and generating a request message required for testing the service function according to the parameter corresponding to the service function.
In an embodiment of the present disclosure, the testing the product to be tested according to the generated request message includes: executing a corresponding service request according to the generated request message to obtain returned data; verifying the service function through the returned data, and if the verification is passed, determining that the service function is verified; inquiring data corresponding to the generated request message and stored in a database, and judging whether the inquired data is consistent with the returned data; and if so, determining that the data check is passed.
In an embodiment of the present disclosure, after executing a corresponding service request according to the generated request packet, the method further includes: if the request is successfully executed, the returned data is obtained; and if the request execution fails, determining that the service function is abnormal.
In an embodiment of the present disclosure, the capturing an on-line production log, and then testing the product to be tested according to the on-line production log includes: capturing an abnormal log generated in a production environment, and if the abnormal log is captured, determining that the service function is abnormal; capturing a request log corresponding to a business function contained in the product to be tested; inquiring data corresponding to the request log stored in a database according to the unique identifier of the request log, and judging whether the inquired data is consistent with the request log; and if so, determining that the data check is passed.
In an embodiment of the present disclosure, after the test of the product to be tested is performed according to the generated request message, and after the test of the product to be tested is performed according to the on-line production log, the method further includes: and sending the test result to a person related to the product to be tested.
In one embodiment of the present disclosure, the number of the products to be tested is one or more, and the products to be tested include one or more business functions.
According to another aspect of the present disclosure, there is provided a test apparatus of a product, including: the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring a product to be tested and the operating environment of the product to be tested; the first testing module is used for generating a request message corresponding to the product to be tested according to the relevant information of the product to be tested if the running environment of the product to be tested is a testing environment, and then testing the product to be tested according to the generated request message; and the second testing module is used for capturing an on-line production log if the running environment of the product to be tested is a production environment, and then testing the product to be tested according to the on-line production log.
According to yet another aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of testing a product as described above.
According to still another aspect of the present disclosure, there is provided an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of testing the product described above via execution of the executable instructions.
The product testing method provided by the embodiment of the disclosure can generate the request message of each service of each product in the testing environment, further test the product by using the generated request message, capture the online production log of each service of each product in the production environment, test the product, decouple the testing process from the production service scene, improve the testing efficiency and accuracy, reduce the product testing cost, detect the online production running condition in real time, and automatically check all the product testing processes.
Further, the product testing method provided by the embodiment of the disclosure can generate a generic or request-generating script based on a preset request in a testing environment, generate a request message required for testing each service function of each product, and further can verify whether the service function normally operates and verify whether the database correctly stores data by using the generated request message, can test each function of each product in the testing environment, can decouple the testing process from the production service scene, improve the testing efficiency and accuracy, and reduce the product testing cost; in a production environment, whether abnormal logs exist or not can be judged, if the abnormal logs exist, the abnormal logs can be directly sent to related personnel for early warning, request logs of all business functions of all products can be captured, then the abnormal logs are automatically verified with data in a database, verification results can also be sent to the related personnel, abnormal conditions can be found in time and early warning is carried out, and testing efficiency and testing quality are improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 shows a schematic diagram of an exemplary system architecture to which a method of testing a product of an embodiment of the present disclosure may be applied;
FIG. 2 illustrates a flow chart of a method of testing a product of one embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating a main flow of testing business functions included in a product in a test environment according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating a main flow of testing business functions included in a product according to an embodiment of the present disclosure;
FIG. 5 shows a block diagram of a test apparatus 500 of a product according to an embodiment of the present disclosure; and
fig. 6 shows a block diagram of a test apparatus of a product in an embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present disclosure, "a plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise.
In view of the above technical problems in the related art, embodiments of the present disclosure provide a product testing method for solving at least one or all of the above technical problems.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which a test method of a product of an embodiment of the present disclosure may be applied.
As shown in fig. 1, the system architecture may include a server 101, a network 102, and a client 103. Network 102 serves as a medium for providing communication links between clients 103 and server 101. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The server 101 may be a server that provides various services, such as a background management server that provides support for devices operated by users with clients. The background management server can analyze and process the received test request of the product and feed back the processing result to the client.
The client 103 may be a mobile terminal such as a mobile phone, a game console, a tablet computer, an electronic book reader, smart glasses, a smart home device, an AR (Augmented Reality) device, a VR (Virtual Reality) device, or the client 103 may also be a personal computer such as a laptop computer, a desktop computer, and the like.
In the exemplary embodiment of the disclosure, a user can send a product to be tested to a server through a client, and the server can obtain the product to be tested and the running environment of the product to be tested, for example; the server can generate a request message corresponding to the product to be tested according to the relevant information of the product to be tested under the condition that the running environment of the product to be tested is determined to be a testing environment, and then test the product to be tested according to the generated request message; the server may capture an online production log, for example, when it is determined that the operating environment of the product to be tested is a production environment, and then test the product to be tested according to the online production log.
It should be understood that the number of clients, networks and servers in fig. 1 is only illustrative, and the server 101 may be a physical server, a server cluster composed of a plurality of servers, a cloud server, and any number of clients, networks and servers according to actual needs.
Hereinafter, each step of the testing method of the product in the exemplary embodiment of the present disclosure will be described in more detail with reference to the drawings and the embodiment.
FIG. 2 shows a flow chart of a method of testing a product of one embodiment of the present disclosure. The method provided by the embodiment of the present disclosure may be executed by a server or a client as shown in fig. 1, but the present disclosure is not limited thereto.
In the following description, the server cluster 101 is used as an execution subject for illustration.
As shown in fig. 2, a method for testing a product provided by an embodiment of the present disclosure may include the following steps S201 to S203.
Step S201: and acquiring a product to be tested and the operating environment of the product to be tested.
The products to be tested are products to be tested, and the number of the products to be tested is one or more. In the related art, a manual testing method is adopted, so that the problem of high coupling degree between a testing process and a production environment exists. In order to solve the problem, the product can be tested according to the operating environment, namely different methods are adopted to test the product aiming at different operating environments. The operating environment may include a test environment and a production environment, among others. Step S202, testing the product to be tested in the testing environment; step S203 illustrates that the product to be tested is tested in the production environment.
Step S202: and if the running environment of the product to be tested is the testing environment, generating a request message corresponding to the product to be tested according to the relevant information of the product to be tested, and then testing the product to be tested according to the generated request message.
Under the test environment, the request message of each service function of the product to be tested can be simulated according to the relevant information of the product to be tested, so that the corresponding service request is executed, and then the product to be tested is tested by utilizing the execution result.
Step S203: and if the running environment of the product to be tested is the production environment, capturing an on-line production log, and further testing the product to be tested according to the on-line production log.
Under the production environment, the request message cannot be simulated, so that the log under the production environment can be captured, and then the product to be tested is tested according to the captured log.
After the product to be tested is tested in steps S202 and S203, the test result may be sent to a person related to the product to be tested, for example, the test result is sent to a tester of the product by using an email.
According to the product testing method provided by the embodiment of the disclosure, the request messages of various services of each product can be generated in the testing environment, the generated request messages are further used for testing the product, the online production logs of various services of each product can be captured in the production environment so as to test the product, the testing process and the production service scene can be decoupled, the testing efficiency and the testing accuracy are improved, the product testing cost is reduced, the online production running condition can be detected in real time, and all the product testing processes can be automatically verified.
In some embodiments, the information related to the product to be tested may include: the product to be tested comprises the service function and the parameter corresponding to the service function. For example, an insurance product includes business functions such as underwriting, issuing orders, withdrawing insurance, settling claims, and renewing insurance. The parameters corresponding to different service functions are different, for example, the parameters corresponding to the underwriting service function are an applicant, an insured person and a premium, and the parameters corresponding to the claim settlement service function are an insured person, a claim settlement amount and a claim settlement period.
And generating a request message corresponding to the product to be tested according to the relevant information of the product to be tested, wherein the request message may include: and generating a generic or request generating script based on a preset request, and generating a request message required by testing the service function according to the parameter corresponding to the service function.
The request generation generic type and the request generation script are both used for automatically generating a request message, the specific form is mainly that various service scene requests are simulated, the request is divided into a request header and request content, and the request content is filled with different contents according to different service scenes.
In the above, the number of the products to be tested is one or more, and in addition, the number of the business functions included in the products to be tested is also one or more. If a product is tested, the service functions contained in the product need to be tested. When a certain service function is tested, a request message required for testing the service function needs to be generated according to a parameter corresponding to the service function. If the parameters corresponding to the underwriting business function are the policyholder, the policyholder and the premium, the policyholder information and the premium information can be simulated, and then the request message required for testing the underwriting business function is generated according to the simulated information.
In some embodiments, the testing the product to be tested according to the generated request message may include: executing a corresponding service request according to the generated request message to obtain returned data; verifying the service function through the returned data, and if the verification is passed, determining that the service function is verified; inquiring data corresponding to the generated request message and stored in a database, and judging whether the inquired data is consistent with the returned data; and if so, determining that the data check is passed.
The product test mainly comprises the steps of verifying whether the service function is normal and verifying whether the data stored in the database is correct. Therefore, after the request message required for testing the service function is generated according to the parameter corresponding to the service function, the generated request message is used for executing the service request corresponding to the service function, and the return data of the service request is obtained. And then, verifying whether the service function is normal and verifying whether the data stored in the database is correct through the returned data.
After the product is on-line or iterated, the service function contained in the product and the normal execution result of the service function can be obtained. Therefore, the returned data can be verified by using the normal execution result of the service function, and whether the service function is normal or not can be further verified. For example, for the underwriting business function, if the insured person's age does not meet the requirements, the normal execution result is that the underwriting does not pass. If the insured person's age in the generated service request is not acceptable and the returned data is that the underwriting does not pass, then the underwriting service is considered to function normally.
And after the generated service request is executed, matching and checking the returned data and the data of the database. Specifically, the database is queried for data corresponding to the service request, and it should be noted that the queried data is stored in the database after the service request is executed. Then, it is determined whether the queried data is consistent with the returned data. If the data are consistent, the data stored in the database are considered to be correct, namely the data pass the verification; if the data stored in the database is inconsistent, the data stored in the database is problematic, and the data check is failed.
In addition, in some embodiments, after executing the corresponding service request according to the generated request message, the method for testing a product may further include: if the request is successfully executed, the returned data is obtained; and if the request execution fails, determining that the service function is abnormal.
That is, in the process of executing the generated service request, there is a case that data cannot be successfully returned, and at this time, it is determined that the service function is abnormal if the request execution is considered to be failed. If the request execution is successful, the returned data may be obtained.
Fig. 3 is a schematic diagram illustrating a main flow of testing a business function included in a product in a test environment according to an embodiment of the present disclosure. As shown in fig. 3, in the test environment, the test can be performed according to the following steps:
step S301, generating a generic or request-generating script based on a preset request, and generating a request message required for testing a service function according to parameters corresponding to the service function;
step S302, executing corresponding service request according to the generated request message;
step S303, whether the data are successfully returned is judged, if yes, step S304 is executed, and if not, step S310 is executed;
step S304, verifying the service function through the returned data;
step S305, if the verification is passed, determining that the service function verification is passed;
step S306, if the verification fails, determining that the service function verification fails;
step S307, inquiring data corresponding to the request message stored in the database, and judging whether the inquired data is consistent with the returned data, if so, executing step S308, otherwise, executing step S309;
step S308, determining that the data check is passed;
step S309, determining that the data check fails;
step S310, determining that the service function is abnormal;
and step S311, sending the test result to related personnel.
In the product testing method provided by the embodiment of the disclosure, for a testing environment, a generic or request generation script can be generated based on a preset request, a request message required for testing each service function of each product is generated, and then the generated request message can be utilized to verify whether the service function normally operates and verify whether a database correctly stores data, each function of each product can be tested under the testing environment, a testing process and a production service scene can be decoupled, testing efficiency and accuracy are improved, and product testing cost is reduced.
In some embodiments, capturing the on-line production log, and then testing the product to be tested according to the on-line production log may include: capturing an abnormal log generated in a production environment, and determining that the service function is abnormal if the abnormal log is captured; capturing a request log corresponding to a business function contained in a product to be tested; inquiring data corresponding to the request log stored in a database according to the unique identifier of the request log, and judging whether the inquired data is consistent with the request log; and if so, determining that the data check is passed.
For a production environment, a generated exception log, such as system exception, incorrect guarantee fee, repeated guarantee application and the like, can be captured and then sent to related personnel. Under the production environment, request logs of all service functions of all products can be captured, and the request logs comprise generated request messages and request results; then, inquiring data stored in the database according to the unique identifier of the request log, such as inquiring in the database by using the order number; then judging whether the data stored in the database is consistent with the request log; if so, determining that the data stored in the database is correct, determining that the data check is passed, and if not, determining that the data stored in the database is abnormal, and determining that the data check is not passed; finally, the test results may be sent to the relevant personnel.
According to the product testing method provided by the embodiment of the disclosure, whether the abnormal log exists or not can be judged for the production environment, if the abnormal log exists, the abnormal log can be directly sent to related personnel for early warning, the request log of each business function of each product can be captured, then the verification is automatically carried out on the abnormal log and the data in the database, the verification result can also be sent to the related personnel, the abnormal condition can be found in time, early warning can be carried out, and the testing efficiency and the testing quality are improved.
Fig. 4 is a schematic diagram illustrating a main flow of testing a business function included in a product according to an embodiment of the present disclosure. As shown in fig. 4, the main process of testing a certain service function included in a certain product may include:
step S401, determining a certain service function contained in a product, and acquiring a parameter corresponding to the service function;
step S402, if the product is in a test environment, generating a generic or request-generating script based on a preset request, generating a request message required for testing the service function according to the parameter corresponding to the service function, and then executing a corresponding service request;
step S403, if the data is successfully returned, if yes, step S404 is executed, and if not, step S410 is executed;
step S404, the service function is verified through the returned data;
step S405, if the verification is passed, determining that the service function is verified to be passed;
step S406, if the verification fails, determining that the service function verification fails;
step S407, judging whether the data are consistent with the data stored in the database, if so, executing step S408, otherwise, executing step S409;
step S408, determining that the data check is passed;
step S409, determining that the data check fails;
step S410, determining that the service function is abnormal;
step S411, if the product is in a test environment, capturing an abnormal log generated in a production environment, and if the abnormal log is captured, determining that the service function is abnormal;
step S412, if the product is in a test environment, capturing a request log corresponding to the service function, then executing step S407, determining whether the request log is consistent with the data stored in the database, if so, executing step S408, and if not, executing step S409;
and step S413, sending the test result to related personnel.
It should be noted that, in step S407, the data stored in the database is checked. If the test environment is the test environment, the corresponding storage data of the request message is inquired in the database according to the generated request message, and then the inquired data is compared with the returned data to judge whether the data is consistent. And if the request log is a production environment, inquiring the stored data corresponding to the request log in the database according to the unique identifier of the captured request log, comparing the stored data with the request log, and judging whether the stored data is consistent with the request log. In addition, the method shown in fig. 4 is to test a certain service function of a certain product, and the product testing method provided in the embodiment of the present disclosure may also test a plurality of service functions included in a plurality of products, for example, test each service function separately, or test a plurality of service functions in parallel.
It is to be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the method according to an exemplary embodiment of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
FIG. 5 shows a block diagram of a test apparatus 500 of a product according to an embodiment of the present disclosure. As shown in fig. 5, includes: an obtaining module 501, configured to obtain a product to be tested and an operating environment of the product to be tested; the first testing module 502 is configured to generate a request message corresponding to a product to be tested according to relevant information of the product to be tested if an operating environment of the product to be tested is a testing environment, and then test the product to be tested according to the generated request message; the second testing module 503 is configured to capture an online production log if the operating environment of the product to be tested is a production environment, and then test the product to be tested according to the online production log.
In some embodiments, the information related to the product to be tested may include: the product to be tested comprises the service function and the parameter corresponding to the service function. And, the first test module 502 may be configured to: and generating a generic or request generating script based on a preset request, and generating a request message required by testing the service function according to the parameter corresponding to the service function.
In some embodiments, the first test module 502 may be used to: executing a corresponding service request according to the generated request message to obtain returned data; verifying the service function through the returned data, and if the verification is passed, determining that the service function is verified; inquiring data corresponding to the generated request message and stored in a database, and judging whether the inquired data is consistent with the returned data; and if so, determining that the data check is passed.
In some embodiments, the first test module 502 may be used to: if the request is successfully executed, the returned data is obtained; and if the request execution fails, determining that the service function is abnormal.
In some embodiments, the second test module 503 may be used to: capturing an abnormal log generated in a production environment, and determining that the service function is abnormal if the abnormal log is captured; capturing a request log corresponding to a business function contained in a product to be tested; inquiring data corresponding to the request log stored in a database according to the unique identifier of the request log, and judging whether the inquired data is consistent with the request log; and if so, determining that the data check is passed.
In some embodiments, the testing apparatus 500 further comprises a sending module for: and sending the test result to a person related to the product to be tested.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
Fig. 6 shows a block diagram of a test apparatus of a product in an embodiment of the present disclosure. It should be noted that the illustrated electronic device is only an example, and should not bring any limitation to the functions and the application scope of the embodiment of the present invention.
An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 6. The electronic device 600 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: the at least one processing unit 610, the at least one memory unit 620, and a bus 630 that couples the various system components including the memory unit 620 and the processing unit 610.
Wherein the storage unit stores program code that is executable by the processing unit 610 to cause the processing unit 610 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification. For example, the processing unit 610 may execute step S201 shown in fig. 2 to obtain a product to be tested and an operating environment of the product to be tested; step S202, if the running environment of the product to be tested is a testing environment, a request message corresponding to the product to be tested is generated according to the relevant information of the product to be tested, and then the product to be tested is tested according to the generated request message; step S203, if the running environment of the product to be tested is the production environment, an on-line production log is captured, and then the product to be tested is tested according to the on-line production log.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)6201 and/or a cache memory unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 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.
Bus 630 can be any bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 may 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 the network adapter 660. As shown, the network adapter 660 communicates with the other modules of the electronic device 600 over the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary method" of this description, when said program product is run on said terminal device.
According to the program product for implementing the method, the portable compact disc read only memory (CD-ROM) can be adopted, the program code is included, and the program product can be operated on terminal equipment, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice in the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A method of testing a product, comprising:
acquiring a product to be tested and the operating environment of the product to be tested;
if the running environment of the product to be tested is a testing environment, generating a request message corresponding to the product to be tested according to the relevant information of the product to be tested, and then testing the product to be tested according to the generated request message;
and if the running environment of the product to be tested is the production environment, capturing an on-line production log, and further testing the product to be tested according to the on-line production log.
2. The method of claim 1, wherein the information related to the product under test comprises: the product to be tested comprises a business function and a parameter corresponding to the business function; and the number of the first and second groups,
the generating a request message corresponding to the product to be tested according to the relevant information of the product to be tested comprises:
and generating a generic or request generating script based on a preset request, and generating a request message required for testing the service function according to the parameter corresponding to the service function.
3. The method according to claim 2, wherein the testing the product under test according to the generated request message includes:
executing a corresponding service request according to the generated request message to obtain returned data;
verifying the service function through the returned data, and if the verification is passed, determining that the service function is verified;
inquiring data corresponding to the generated request message and stored in a database, and judging whether the inquired data is consistent with the returned data;
and if so, determining that the data check is passed.
4. The method according to claim 3, wherein after executing the corresponding service request according to the generated request packet, the method further comprises:
if the request is successfully executed, the returned data is obtained; and if the request execution fails, determining that the service function is abnormal.
5. The method of claim 1, wherein capturing an online production log and testing the product under test according to the online production log comprises:
capturing an abnormal log generated in a production environment, and determining that the service function is abnormal if the abnormal log is captured;
capturing a request log corresponding to a business function contained in the product to be tested;
inquiring data corresponding to the request log stored in a database according to the unique identifier of the request log, and judging whether the inquired data is consistent with the request log;
and if so, determining that the data check is passed.
6. The method according to any one of claims 1 to 5, wherein after the testing of the product under test according to the generated request message and after the testing of the product under test according to the on-line production log, the method further comprises:
and sending the test result to a person related to the product to be tested.
7. The method of any of claims 1 to 5, wherein the number of products to be tested is one or more and the products to be tested contain one or more business functions.
8. An apparatus for testing a product, comprising:
the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring a product to be tested and the operating environment of the product to be tested;
the first testing module is used for generating a request message corresponding to the product to be tested according to the relevant information of the product to be tested if the running environment of the product to be tested is a testing environment, and then testing the product to be tested according to the generated request message;
and the second testing module is used for capturing an on-line production log if the running environment of the product to be tested is a production environment, and then testing the product to be tested according to the on-line production log.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method of testing a product according to any one of claims 1 to 7.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out a method of testing a product according to any one of claims 1 to 7.
CN202210133001.8A 2022-02-08 2022-02-08 Product testing method and device, storage medium and electronic equipment Pending CN114490409A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210133001.8A CN114490409A (en) 2022-02-08 2022-02-08 Product testing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210133001.8A CN114490409A (en) 2022-02-08 2022-02-08 Product testing method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114490409A true CN114490409A (en) 2022-05-13

Family

ID=81480238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210133001.8A Pending CN114490409A (en) 2022-02-08 2022-02-08 Product testing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114490409A (en)

Similar Documents

Publication Publication Date Title
CN109857404B (en) SDK interface packaging method and device, storage medium and electronic equipment
CN112685029A (en) Visual template generation method, device, equipment and storage medium
CN112100079B (en) Test method and system based on simulation data calling and electronic equipment
CN110806970A (en) Client test method and device based on simulation server response and electronic equipment
CN113704823B (en) Reimbursement processing method, reimbursement processing system, storage medium and electronic equipment
CN110851471A (en) Distributed log data processing method, device and system
CN111258832B (en) Interface parameter verification method, device, equipment and medium
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN112199277A (en) Browser-based defect reproduction method, device, equipment and storage medium
CN112363938A (en) Data processing method and device, electronic equipment and storage medium
CN110647523B (en) Data quality analysis method and device, storage medium and electronic equipment
CN114185808A (en) Automatic testing method and device, electronic equipment and computer readable storage medium
CN110717315B (en) System data batch modification method and device, storage medium and electronic equipment
CN110609786A (en) Software testing method and device, computer equipment and storage medium
CN114490409A (en) Product testing method and device, storage medium and electronic equipment
CN111786991B (en) Block chain-based platform authentication login method and related device
CN113656301A (en) Interface testing method, device, equipment and storage medium
CN114969175A (en) Method for butting insurance platform and external system and related equipment
US7516048B2 (en) Externalized metric calculation engine
CN110348984B (en) Automatic credit card data input method and related equipment under different transaction channels
CN112084114A (en) Method and apparatus for testing an interface
CN113760696A (en) Program problem positioning method and device, electronic equipment and storage medium
CN110362464B (en) Software analysis method and equipment
CN112328473A (en) Code automation integration test method and device and electronic equipment
CN111625455A (en) Program testing method, device, equipment and medium

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