[go: up one dir, main page]

CN110825635B - Test method, test device and computer-readable storage medium - Google Patents

Test method, test device and computer-readable storage medium Download PDF

Info

Publication number
CN110825635B
CN110825635B CN201911069170.4A CN201911069170A CN110825635B CN 110825635 B CN110825635 B CN 110825635B CN 201911069170 A CN201911069170 A CN 201911069170A CN 110825635 B CN110825635 B CN 110825635B
Authority
CN
China
Prior art keywords
tested
information
assertion
reading
test
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
CN201911069170.4A
Other languages
Chinese (zh)
Other versions
CN110825635A (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.)
JD Digital Technology Holdings Co Ltd
Jingdong Technology Holding Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN201911069170.4A priority Critical patent/CN110825635B/en
Publication of CN110825635A publication Critical patent/CN110825635A/en
Application granted granted Critical
Publication of CN110825635B publication Critical patent/CN110825635B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

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

Abstract

The disclosure relates to a test method, a test device and a computer readable storage medium, and relates to the technical field of computers. The method of the present disclosure comprises: reading user login information and address information of an object to be tested; generating an access request and sending the access request to a server corresponding to the object to be tested according to the user login information and the address information of the object to be tested; testing the information enabling assertion of the object to be tested returned by the server; and determining whether the object to be tested is normal or not according to the assertion result.

Description

Test method, test device and computer-readable storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a testing method, an apparatus, and a computer-readable storage medium.
Background
In daily software testing, a large number of tests are required to ensure that the software operates normally. For example, after a new page comes online, the page needs to be tested frequently, whether the page is normally opened or not is tested, and the like.
In an internet company, many systems and pages are developed, often with a significant amount of time spent by testers to perform the tests.
Disclosure of Invention
The inventor finds that in the prior art, generally, a tester selects a page manually, configures test parameters, and repeats the operations, so that the test efficiency and the test accuracy are reduced.
One technical problem to be solved by the present disclosure is: how to improve the testing efficiency and accuracy.
According to some embodiments of the present disclosure, there is provided a test method comprising: reading user login information and address information of an object to be tested; generating an access request and sending the access request to a server corresponding to the object to be tested according to the user login information and the address information of the object to be tested; testing the information enabling assertion of the object to be tested returned by the server; and determining whether the object to be tested is normal or not according to the assertion result.
In some embodiments, generating the access request according to the user login information and the address information of the object to be tested comprises: creating a hypertext transfer protocol (HTTP) request; and adding the user login information and the address information of the object to be tested into the HTTP request to generate an access request.
In some embodiments, the object to be tested comprises a page to be tested; the testing of the information enabling assertion of the object to be tested returned by the server comprises the following steps: acquiring elements to be tested in the content information of the page to be tested returned by the server; enabling a first assertion to the element to be tested, and matching the element to be tested with a preset element in the first assertion to obtain a first assertion result.
In some embodiments, the object to be tested comprises a test interface; the testing of the information enabling assertion of the object to be tested returned by the server comprises the following steps: acquiring information of an interface to be tested returned by a server; and starting a second assertion for the information of the interface to be tested, and matching the preset information in the second assertion with the information of the interface to be tested to obtain a second assertion result.
In some embodiments, the object to be tested comprises a test interface; the method further comprises the following steps: reading parameters corresponding to the interface to be tested; generating an access request according to the user login information and the address information of the object to be tested comprises the following steps: and generating an access request according to the user login information, the parameters corresponding to the interface to be tested and the address information of the interface to be tested.
In some embodiments, reading the user login information and the address information of the object to be tested comprises: and responding to the triggering of the periodic timing test task, and reading user login information and address information of the object to be tested.
In some embodiments, further comprising: storing a test result of whether the object to be tested is normal to a database; or generating and outputting a test result of whether the object to be tested is normal.
In some embodiments, further comprising: and sending the abnormal test result of the object to be tested to a preset mailbox under the condition that the object to be tested is abnormal.
According to further embodiments of the present disclosure, there is provided a test apparatus including: the information reading module is used for reading user login information and address information of an object to be tested; the request module is used for generating an access request and sending the access request to a server corresponding to the object to be tested according to the user login information and the address information of the object to be tested; the testing module is used for testing the information enabling assertion of the object to be tested returned by the server; and the result generation module is used for determining whether the object to be tested is normal or not according to the assertion result.
In some embodiments, the request module is to create a hypertext transfer protocol, HTTP, request; and adding the user login information and the address information of the object to be tested into the HTTP request to generate an access request.
In some embodiments, the object to be tested comprises a page to be tested; the testing module is used for acquiring elements to be tested in the content information of the page to be tested returned by the server; enabling a first assertion to the element to be tested, and matching the element to be tested with a preset element in the first assertion to obtain a first assertion result.
In some embodiments, the object to be tested comprises a test interface; the test module is used for acquiring the information of the interface to be tested returned by the server; and starting a second assertion for the information of the interface to be tested, and matching the preset information in the second assertion with the information of the interface to be tested to obtain a second assertion result.
In some embodiments, the object to be tested comprises a test interface; the information reading module is further used for reading parameters corresponding to the interface to be tested, and the request module is used for generating an access request according to the user login information, the parameters corresponding to the interface to be tested and the address information of the interface to be tested.
In some embodiments, the information reading module is configured to read the user login information and the address information of the object to be tested in response to the triggering of the periodic timing test task.
In some embodiments, the apparatus further comprises: the storage module is used for storing a test result of whether the object to be tested is normal to the database; or, the result output module is used for generating and outputting a test result of whether the object to be tested is normal; or the notification module is used for sending the abnormal test result of the object to be tested to a preset mailbox under the condition that the object to be tested is abnormal.
According to still other embodiments of the present disclosure, there is provided a test apparatus including: a processor; and a memory coupled to the processor for storing instructions that, when executed by the processor, cause the processor to perform a test method as in any of the preceding embodiments.
According to still further embodiments of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the testing method of any of the foregoing embodiments.
The automatic testing method comprises the steps of reading user login information and address information of an object to be tested, automatically generating an access request and sending the access request to a corresponding server, testing the information of the object to be tested returned by the server in an assertion mode, and determining whether the object to be tested is normal or not according to an assertion result. The automatic testing method can be applied to different testing objects and tests the information of the objects to be tested corresponding to the users with different authorities. The automatic test can be started at any time, the change is flexible, and the efficiency and the accuracy of the test are improved. And the change of the test logic can be realized only by changing the asserted logic by adopting an assertion mode, and the maintenance cost is low.
Other features of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 shows a flow diagram of a testing method of some embodiments of the present disclosure.
FIG. 2 shows a flow diagram of a testing method of further embodiments of the present disclosure.
Fig. 3 shows a flow diagram of a testing method of further embodiments of the present disclosure.
Fig. 4 shows a schematic structural diagram of a testing device of some embodiments of the present disclosure.
FIG. 5 shows a schematic structural diagram of a test apparatus of further embodiments of the present disclosure.
Fig. 6 shows a schematic structural diagram of a testing apparatus according to further embodiments of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
The present disclosure proposes an automated testing method, described below in conjunction with fig. 1.
FIG. 1 is a flow chart of some embodiments of the disclosed test methods. As shown in fig. 1, the method of this embodiment includes: steps S102 to S108.
In step S102, user login information and address information of an object to be tested are read.
The object to be tested may include: at least one item of the page to be tested and the interface to be tested can be set according to actual requirements. For example, a Tomcat test environment is set up, one or more user login information is saved in a user information configuration file, and address information of one or more objects to be tested is saved in an object configuration file. A user information reading class, e.g., a cookie information class, may be created that reads user login information (e.g., login account and password) in a user information profile. An object read class, e.g., ReadUrl class, may be created that reads address information of the object to be tested (e.g., URL (uniform resource locator) of the object to be tested) in the object configuration file.
A test service class, such as the StartTest class, may be created to perform tests through the httpClient framework. After reading the user login information, the user information reading class can package the read user login information and provide the user login information for the test service class. After reading the address information of the object to be tested, the object reading class can package the address information and provide the packaged address information to the test service class. The test service class calls the packages provided by the user information reading class and the object reading class, so that the test service class reads the user login information and the address information of the object to be tested to perform the subsequent test method.
In some embodiments, in response to the triggering of a periodic timed test task, user login information and address information of an object to be tested are read. The timing Task configured by SpringQuartz can be used to set a Task class, for example, a Task class is used to set a timing test Task, and a test method in a test service class is executed in response to a preset time.
In step S104, an access request is generated according to the user login information and the address information of the object to be tested, and the access request is sent to the server corresponding to the object to be tested.
In some embodiments, an HTTP request may be generated as the access request. For example, create an HTTP (hypertext transfer protocol) request; and adding the user login information and the address information of the object to be tested into the HTTP request to generate an access request.
In step S106, the information enabling assertion of the object to be tested returned by the server is tested.
Assertions are programming terms, expressed as boolean expressions, that can be set according to the content and logic that needs to be tested in practice.
In step S108, it is determined whether the object to be tested is normal according to the assertion result.
The assertion will return the decision, true or false, of the boolean expression. And under the condition that the assertion result is false, the object to be tested is determined to be abnormal, and under the condition that the assertion result is true, the object to be tested is determined to be normal.
In the above embodiment, the login information of a plurality of users and the address information of the object to be tested can be read simultaneously. And executing the process of generating different access requests and performing the test by a plurality of threads in parallel.
In some embodiments, storing the test result of whether the object to be tested is normal to a database; or generating and outputting a test result of whether the object to be tested is normal. In other embodiments, in the case that the object to be tested is abnormal, the test result that the object to be tested is abnormal is sent to a preset mailbox so as to inform a worker. And under the condition that the object to be tested is normal, the test result can be sent to a preset mailbox.
A result output class, e.g., ResultWrite class, may be created, the test results written to a database, or output as a file, or sent to a preset mailbox. And the test service class calls a result output class to analyze, process and store the result in a database and send the mail related personnel.
The embodiment provides an automatic testing method, which includes reading user login information and address information of an object to be tested, automatically generating an access request and sending the access request to a corresponding server, testing the information of the object to be tested returned by the server in an assertion mode, and determining whether the object to be tested is normal according to an assertion result. The automatic testing method can be applied to different testing objects and tests the information of the objects to be tested corresponding to the users with different authorities. The automatic test can be started at any time, the automatic test is changed flexibly, the efficiency and the accuracy of the test are improved, and the logging information does not need to be manually input to different pages to carry out the test work with complicated repeatability. And the change of the test logic can be realized only by changing the asserted logic by adopting an assertion mode, and the maintenance cost is low. In addition, the automatic test is executed at regular time, so that errors caused by manual test of testers are reduced, and the safety and the stability of the test are improved. The related personnel of the test result warehousing and mail sending can reserve historical problems, record the problems and facilitate follow-up; sending the mail can quickly inform corresponding personnel to solve the problem.
Some embodiments are described below by taking the object to be tested as the page to be tested or the interface to be tested as an example.
FIG. 2 is a flow chart of additional embodiments of the testing method of the present disclosure. As shown in fig. 2, the method of this embodiment includes: steps S202 to S216.
In step S202, in response to the triggering of the periodic timing test task, the user login information and the address information of the page to be tested are read.
For example, a test task is issued 12 points a day, and referring to the foregoing embodiment, the package provided by the user information reading class and the object reading class is called by the test service class, so as to obtain the user login information and the address information of the page to be tested.
In step S204, an access request is generated and a server corresponding to the page to be tested is sent according to the user login information and the address information of the page to be tested.
In step S206, the element to be tested in the content information of the page to be tested returned by the server is obtained.
The content information of the page to be tested is, for example, an HTML (hypertext markup language) file, and parsing the HTML file can obtain various elements included in the page to be tested, such as a title, contents of each part, and the like. Different elements to be tested can be tested according to requirements, for example, whether the page name is correct, the text format is uniform, whether the typesetting is neat, the data loading condition and the like are tested.
In step S208, a first assertion is enabled for the element to be tested, and the element to be tested is matched with a preset element in the first assertion, so as to obtain a first assertion result.
For example, the user login account is 278011, and the user login account should be displayed in the upper right corner of the page to be tested after the user login account is logged in. If the user login account in the test page is normally displayed, an element displaying the position of the user login account in the page to be tested can be used as an element to be tested, the element to be tested is obtained, such as 'name', a preset assertion (name, '278011') is started, the obtained element to be tested is matched with 278011, if the two elements are matched, the assertion result is true, and if not, false is obtained.
In step S210, it is determined whether the page to be tested is normal according to the first assertion result.
In step S212, a test result indicating whether the page to be tested is normal is stored in the database.
In step S214, a test result indicating whether the page to be tested is normal is generated into a file and output.
In step S216, a test result indicating whether the page to be tested is normal is sent to a preset mailbox.
Steps S212 to S216 may be executed in parallel without any order.
The method of the embodiment realizes automatic testing of the page, can execute automatic testing regularly according to requirements, improves testing efficiency, stability and accuracy, retains the testing result after testing, informs workers of solving problems in time, and facilitates follow-up.
FIG. 3 is a flow chart of yet further embodiments of the disclosed test method. As shown in fig. 3, the method of this embodiment includes: steps S302 to S316.
In step S302, in response to the trigger of the periodic timing test task, user login information, parameters corresponding to the interface to be tested, and address information of the interface to be tested are read.
The parameters corresponding to the interface to be tested can also be stored in the interface parameter configuration file in advance, reading and packaging are carried out through the interface parameter reading class, and the testing service class calls the interface parameter reading class to obtain the parameters corresponding to the interface to be tested.
In step S304, an access request is generated and a server corresponding to the interface to be tested is sent according to the user login information, the parameter corresponding to the interface to be tested, and the address information of the interface to be tested.
In step S306, information of the interface to be tested returned by the server is obtained.
For example, the interface to be tested is a coupon picking interface, the information of the interface to be tested returned by the server is { "subCodeMsg": the coupon is robbed up in the current time period, please go to the bar 20: 00! "," subCode ": D2", "code": 0"," msg ": null }.
In step S308, a second assertion is enabled for the information of the interface to be tested, and the preset information in the second assertion is matched with the information of the interface to be tested, so as to obtain a second assertion result.
For example, the interface information that the coupon has been robbed up for the current time period may be represented by "code" of 0. Matching a value corresponding to the code in the information of the interface to be tested returned by the server with a preset value 0 in a second assertion assert rule (map.key,0), wherein the map.key represents the obtained code value, if the two are matched, the assertion result is true, otherwise, the assertion result is false.
In step S310, it is determined whether the interface to be tested is normal according to the second assertion result.
In step S312, the test result of whether the interface to be tested is normal is stored in the database.
In step S314, a test result indicating whether the interface to be tested is normal is generated into a file and output.
In step S316, a test result indicating whether the interface to be tested is normal is sent to a preset mailbox.
Steps S312 to S316 may be executed in parallel, without being in order.
The method of the embodiment realizes automatic testing of the interface, can execute automatic testing regularly according to requirements, improves testing efficiency, stability and accuracy, retains the testing result after testing, informs workers of solving problems in time, and facilitates follow-up.
The present disclosure also provides a testing device, described below in conjunction with fig. 4.
FIG. 4 is a block diagram of some embodiments of a testing device of the present disclosure. As shown in fig. 4, the apparatus 40 of this embodiment includes: the system comprises an information reading module 410, a request module 420, a test module 430 and a result generation module 440.
And an information reading module 410, configured to read user login information and address information of the object to be tested.
In some embodiments, the object to be tested comprises a test interface; the information reading module 410 is further configured to read a parameter corresponding to the interface to be tested, and the request module is configured to generate an access request according to the user login information, the parameter corresponding to the interface to be tested, and the address information of the interface to be tested.
In some embodiments, the information reading module 410 is configured to read the user login information and the address information of the object to be tested in response to the triggering of the periodic timing test task.
The request module 420 is configured to generate an access request according to the user login information and the address information of the object to be tested, and send the access request to the server corresponding to the object to be tested.
In some embodiments, the request module 420 is to create a hypertext transfer protocol, HTTP, request; and adding the user login information and the address information of the object to be tested into the HTTP request to generate an access request.
And the testing module 430 is configured to test the information enabling assertion of the object to be tested, which is returned by the server. In some embodiments, the object to be tested comprises a page to be tested; the test module 430 is configured to obtain an element to be tested in the content information of the page to be tested returned by the server; enabling a first assertion to the element to be tested, and matching the element to be tested with a preset element in the first assertion to obtain a first assertion result.
In some embodiments, the object to be tested comprises a test interface; the test module 430 is used for acquiring information of the interface to be tested returned by the server; and starting a second assertion for the information of the interface to be tested, and matching the preset information in the second assertion with the information of the interface to be tested to obtain a second assertion result.
And the result generating module 440 is configured to determine whether the object to be tested is normal according to the assertion result.
In some embodiments, the testing device 40 further comprises: a storage module 450, a result output module 470, and a notification module 470.
The storage module 450 is configured to store the test result of whether the object to be tested is normal in the database.
And a result output module 460, configured to generate and output a test result indicating whether the object to be tested is normal.
And the notification module 470 is configured to send a test result that the object to be tested is abnormal to a preset mailbox when the object to be tested is abnormal.
The testing apparatus in the embodiments of the present disclosure may each be implemented by various computing devices or computer systems, which are described below in conjunction with fig. 5 and 6.
FIG. 5 is a block diagram of some embodiments of a testing device of the present disclosure. As shown in fig. 5, the apparatus 50 of this embodiment includes: a memory 510 and a processor 520 coupled to the memory 510, the processor 520 configured to perform a test method in any of the embodiments of the present disclosure based on instructions stored in the memory 110.
Memory 510 may include, for example, system memory, fixed non-volatile storage media, and the like. The system memory stores, for example, an operating system, an application program, a BootLoader (BootLoader), a database, and other programs.
FIG. 6 is a block diagram of further embodiments of the testing device of the present disclosure. As shown in fig. 6, the apparatus 60 of this embodiment includes: memory 610 and processor 620 are similar to memory 510 and processor 520, respectively. An input output interface 630, a network interface 640, a storage interface 650, and the like may also be included. These interfaces 630, 640, 650 and the connections between the memory 610 and the processor 620 may be, for example, via a bus 660. The input/output interface 630 provides a connection interface for input/output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 640 provides a connection interface for various networking devices, such as a database server or a cloud storage server. The storage interface 650 provides a connection interface for external storage devices such as an SD card and a usb disk.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only exemplary of the present disclosure and is not intended to limit the present disclosure, so that any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (10)

1. A method of testing, comprising:
reading user login information and address information of an object to be tested;
generating an access request according to the user login information and the address information of the object to be tested, and sending the access request to a server corresponding to the object to be tested;
testing the information enabling assertion of the object to be tested returned by the server;
determining whether the object to be tested is normal or not according to the assertion result;
the method for testing the information enabling assertion of the object to be tested returned by the server comprises the following steps:
obtaining elements to be tested in the content information of the pages to be tested returned by the server, wherein the elements to be tested comprise: page name, text format, typesetting and data loading conditions;
enabling a first assertion to the element to be tested, and matching the element to be tested with a preset element in the first assertion to obtain a first assertion result;
wherein, the reading of the user login information and the address information of the object to be tested comprises:
and responding to the triggering of a periodic timing test task, calling a package provided by a user information reading class and an object reading class by the test service class, and reading user login information and address information of the object to be tested, wherein the user information reading class is used for reading the user login information in the user information configuration file, and the object reading class is used for reading the address information of the object to be tested in the object configuration file.
2. The test method of claim 1,
the generating an access request according to the user login information and the address information of the object to be tested comprises:
creating a hypertext transfer protocol (HTTP) request;
and adding the user login information and the address information of the object to be tested to the HTTP request to generate an access request.
3. The test method of claim 1,
the object to be tested also comprises a to-be-tested interface;
the testing the information enabling assertion of the object to be tested returned by the server further comprises:
acquiring the information of the interface to be tested returned by the server;
and enabling a second assertion to the information of the interface to be tested, and matching preset information in the second assertion with the information of the interface to be tested to obtain a second assertion result.
4. The test method of claim 1,
the object to be tested also comprises a to-be-tested interface;
the method further comprises the following steps: reading parameters corresponding to the interface to be tested;
the generating an access request according to the user login information and the address information of the object to be tested comprises:
and generating an access request according to the user login information, the parameters corresponding to the interface to be tested and the address information of the interface to be tested.
5. The testing method of claim 1, further comprising:
storing a test result of whether the object to be tested is normal to a database;
or generating a file according to the test result of whether the object to be tested is normal and outputting the file.
6. The testing method of claim 1, further comprising:
and sending the test result that the object to be tested is abnormal to a preset mailbox under the condition that the object to be tested is abnormal.
7. A test apparatus, comprising:
the information reading module is used for reading user login information and address information of an object to be tested;
the request module is used for generating an access request and sending a server corresponding to the object to be tested according to the user login information and the address information of the object to be tested;
the testing module is used for testing the information enabling assertion of the object to be tested, which is returned by the server;
the result generation module is used for determining whether the object to be tested is normal or not according to the assertion result;
the object to be tested comprises a page to be tested, the testing module is used for acquiring elements to be tested in the content information of the page to be tested returned by the server, wherein the elements to be tested comprise: page name, text format, typesetting and data loading conditions; enabling a first assertion to the element to be tested, and matching the element to be tested with a preset element in the first assertion to obtain a first assertion result;
wherein, the reading of the user login information and the address information of the object to be tested comprises:
and responding to the triggering of a periodic timing test task, calling a package provided by a user information reading class and an object reading class by the test service class, and reading user login information and address information of the object to be tested, wherein the user information reading class is used for reading the user login information in the user information configuration file, and the object reading class is used for reading the address information of the object to be tested in the object configuration file.
8. The test device of claim 7, further comprising:
the storage module is used for storing the test result of whether the object to be tested is normal to a database;
or, the result output module is used for generating and outputting a test result of whether the object to be tested is normal;
or the notification module is used for sending the abnormal test result of the object to be tested to a preset mailbox under the condition that the object to be tested is abnormal.
9. A test apparatus, comprising:
a processor; and
a memory coupled to the processor for storing instructions that, when executed by the processor, cause the processor to perform the test method of any of claims 1-6.
10. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the program when executed by a processor implements the steps of the method of any one of claims 1-6.
CN201911069170.4A 2019-11-05 2019-11-05 Test method, test device and computer-readable storage medium Active CN110825635B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911069170.4A CN110825635B (en) 2019-11-05 2019-11-05 Test method, test device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911069170.4A CN110825635B (en) 2019-11-05 2019-11-05 Test method, test device and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN110825635A CN110825635A (en) 2020-02-21
CN110825635B true CN110825635B (en) 2021-05-04

Family

ID=69552471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911069170.4A Active CN110825635B (en) 2019-11-05 2019-11-05 Test method, test device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN110825635B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367802B (en) * 2020-02-29 2024-06-25 中国平安财产保险股份有限公司 Web automatic test method, device and computer readable storage medium
CN111581100B (en) * 2020-05-11 2023-05-30 北京首汽智行科技有限公司 Background management system testing method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260318A (en) * 2015-11-25 2016-01-20 飞天诚信科技股份有限公司 Automatic testing method and device based on web pages
US9323597B2 (en) * 2012-08-08 2016-04-26 Peach Fuzzer Llc Flow based fault testing
CN108255730A (en) * 2018-01-23 2018-07-06 平安普惠企业管理有限公司 Software interface test approach, test equipment, storage medium and device
CN109101415A (en) * 2018-06-25 2018-12-28 平安科技(深圳)有限公司 Interface test method, system, equipment and the storage medium compared based on database
CN110262964A (en) * 2019-05-21 2019-09-20 深圳壹账通智能科技有限公司 Test method, device, equipment and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8117591B1 (en) * 2005-01-07 2012-02-14 Interactive TKO, Inc. Graphical model for test case viewing, editing, and reporting
GB2502099A (en) * 2012-05-16 2013-11-20 Ibm Performance testing of web components using symbolic identities

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9323597B2 (en) * 2012-08-08 2016-04-26 Peach Fuzzer Llc Flow based fault testing
CN105260318A (en) * 2015-11-25 2016-01-20 飞天诚信科技股份有限公司 Automatic testing method and device based on web pages
CN108255730A (en) * 2018-01-23 2018-07-06 平安普惠企业管理有限公司 Software interface test approach, test equipment, storage medium and device
CN109101415A (en) * 2018-06-25 2018-12-28 平安科技(深圳)有限公司 Interface test method, system, equipment and the storage medium compared based on database
CN110262964A (en) * 2019-05-21 2019-09-20 深圳壹账通智能科技有限公司 Test method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN110825635A (en) 2020-02-21

Similar Documents

Publication Publication Date Title
CN111240994B (en) Vulnerability processing method and device, electronic equipment and readable storage medium
CN109359028B (en) Code quality monitoring method, device, computer equipment and storage medium
CN108427731B (en) Page code processing method and device, terminal equipment and medium
CN111666743A (en) Report automatic generation method and device, computer equipment and storage medium
CN109710508A (en) Test method, test device, test equipment and computer readable storage medium
CN109901968A (en) A kind of automation page data method of calibration and device
KR960015310A (en) System and method for determining whether a software package complies with packaging rules and requirements
EP3470988A1 (en) Method for replicating production behaviours in a development environment
CN113535587B (en) Target application detection method and device and computer equipment
CN109783385B (en) Product testing method and device
CN112748928A (en) Rich text data processing method and device, computer equipment and storage medium
CN110825635B (en) Test method, test device and computer-readable storage medium
JPWO2018122890A1 (en) Log analysis method, system and program
CN112269744A (en) System abnormity testing method and device, computer equipment and storage medium
US9026612B2 (en) Generating a custom parameter rule based on a comparison of a run-time value to a request URL
CN111125605A (en) Page element acquisition method and device
US10922207B2 (en) Method, apparatus, and computer-readable medium for maintaining visual consistency
CN109324956B (en) System testing method, device, and computer-readable storage medium
CN115408453A (en) Configured report generation method and device, computer equipment and storage medium
CN117113430A (en) Webpage violation picture detection method and device, electronic equipment and storage medium
CN111756594B (en) Control method of pressure test, computer device and computer readable storage medium
CN109815083B (en) Application crash monitoring method and device, electronic equipment and medium
CN112559278A (en) Method and device for acquiring operation data
CN111414525B (en) Method, device, computer equipment and storage medium for acquiring data of applet
CN107133205A (en) A kind of cloud form component implementation method and device based on data, services

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
CP01 Change in the name or title of a patent holder

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Patentee after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Patentee before: Jingdong Digital Technology Holding Co.,Ltd.

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Patentee after: Jingdong Digital Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Patentee before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

CP01 Change in the name or title of a patent holder