CN117056228A - Page loading test method and device, computer equipment and storage medium - Google Patents

Page loading test method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN117056228A
CN117056228A CN202311070994.XA CN202311070994A CN117056228A CN 117056228 A CN117056228 A CN 117056228A CN 202311070994 A CN202311070994 A CN 202311070994A CN 117056228 A CN117056228 A CN 117056228A
Authority
CN
China
Prior art keywords
page
test
tested
test case
terminal
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
CN202311070994.XA
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.)
Qichacha Technology Co ltd
Original Assignee
Qichacha Technology 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 Qichacha Technology Co ltd filed Critical Qichacha Technology Co ltd
Priority to CN202311070994.XA priority Critical patent/CN117056228A/en
Publication of CN117056228A publication Critical patent/CN117056228A/en
Pending legal-status Critical Current

Links

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/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application relates to a page loading test method, a page loading test device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: respectively acquiring test cases of each page to be tested from a server; responding to page loading operation of an application program in a second terminal, and sending the test case to the second terminal so as to instruct the second terminal to display the page to be tested; according to the display result of the page to be tested and the preset test item in the test case, determining the test result of the page loading of the page to be tested, and sending the test result to the server. The embodiment of the disclosure can realize automatic testing of a plurality of pages to be tested, and greatly improves the testing efficiency.

Description

Page loading test method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technology, and in particular, to a method and apparatus for testing page loading, a computer device, a storage medium, and a computer program product.
Background
HTML5 is a markup language for creating web page structures and content that provides many advantages and functionality for mobile application development. Such as geolocation, local storage, offline access, etc. These functions allow developers to create more powerful and functional applications while providing better performance and user experience. In the related art, when the regression test is performed on the newly developed HTML5 page loading effect, the regression test is performed manually, so that the test cost is high, and the time and the labor are consumed.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, apparatus, computer device, storage medium, and computer program product for testing page loading.
In a first aspect, the present application provides a method for testing page loading. The method comprises the following steps:
respectively acquiring test cases of each page to be tested from a server;
responding to page loading operation of an application program in a second terminal, and sending the test case to the second terminal so as to instruct the second terminal to display the page to be tested;
according to the display result of the page to be tested and the preset test item in the test case, determining the test result of the page loading of the page to be tested, and sending the test result to the server.
In one possible implementation manner, the method for respectively obtaining the test cases of each page to be tested from the server includes:
obtaining a test file template and test case data of each page to be tested from the server; the test file template comprises a plurality of test rules, and each test rule corresponds to a test parameter;
and assigning values for the corresponding test parameters of the test file template by using the test case data to obtain the test cases of the pages to be tested.
In one possible implementation manner, the obtaining manner of the test case data includes:
displaying an editing interface of test case data;
and receiving modification or new addition operation of the test case data in the editing interface, and generating the test case data.
In one possible implementation manner, the test case data includes a plurality of test case data, and the generating test case data includes:
and receiving a modification operation of the state of the test case data in the editing interface, and determining the test case data as the test case in the enabling state.
In one possible implementation manner, the sending the test case to the second terminal to instruct the second terminal to display the page to be tested includes:
analyzing the test case to obtain a page address corresponding to the page to be tested;
and sending the page address to the second terminal to instruct the second terminal to display the page to be tested according to the page address.
In one possible implementation, the preset test items include at least one of the following: whether the page element exists, whether the text value of the page element is the same as the expected value, whether the page is displayed normally,
according to the screenshot of the page to be tested and a preset test item corresponding to the page to be tested, determining a test result of the page to be tested loading comprises:
determining whether the page to be tested is normally displayed or not according to the screenshot of the page to be tested and a page which is normally displayed and preset by the page to be tested;
and/or determining whether the first text value is the same as the second text value according to the first text value of the page element in the screenshot of the page to be tested and the second text value of the page element preset by the page to be tested;
and/or detecting whether a page screenshot of the page to be tested has preset page elements or not, and obtaining a detection result.
In a second aspect, the application further provides a testing device for page loading. The device comprises:
the acquisition module is used for respectively acquiring test cases of each page to be tested from the server;
the sending module is used for responding to page loading operation of an application program in the second terminal, and sending the test case to the second terminal so as to instruct the second terminal to display the page to be tested;
the determining module is used for determining the page loading test result of the page to be tested according to the display result of the page to be tested and the preset test item in the test case, and sending the test result to the server.
In one possible implementation manner, the acquiring module includes:
the first acquisition submodule is used for acquiring a test file template and acquiring test case data of each page to be tested from the server; the test file template comprises a plurality of test rules, and each test rule corresponds to a test parameter;
and the generation submodule is used for assigning values for the corresponding test parameters of the test file template by utilizing the test case data to obtain the test cases of the pages to be tested.
In one possible implementation manner, the first obtaining sub-module includes:
the display unit is used for displaying an editing interface of the test case data;
and the generating unit is used for receiving the modification or new addition operation of the test case data in the editing interface and generating the test case data.
In one possible implementation manner, the test case data includes a plurality of test case data, and the generating unit includes:
and the determining subunit is used for receiving the modification operation of the state of the test case data in the editing interface and determining the test case data as the test case in the enabling state.
In one possible implementation manner, the sending module includes:
the analysis submodule is used for analyzing the test case to obtain a page address corresponding to the page to be tested;
and the sending sub-module is used for sending the page address to the second terminal so as to instruct the second terminal to display the page to be tested according to the page address.
In one possible implementation, the preset test items include at least one of the following: whether the page element exists, whether the text value of the page element is the same as the expected value, whether the page is displayed normally,
the determining module includes:
the first determining submodule is used for determining whether the page to be tested is normally displayed or not according to the screenshot of the page to be tested and a page which is preset for the page to be tested and is normally displayed;
and/or a second determining submodule, configured to determine whether the first text value is the same as the second text value according to a first text value of a page element in a screenshot of the page to be tested and a second text value of a page element preset by the page to be tested;
and/or a third determining submodule is used for detecting whether the page screenshot of the page to be tested has preset page elements or not to obtain a detection result.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor that when executing the computer program implements the method of testing page loading according to any of the embodiments of the present disclosure.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements a method of testing page loading as described in any of the embodiments of the present disclosure.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the method for testing page loading according to any of the embodiments of the present disclosure.
According to the page loading test method, the device, the computer equipment, the storage medium and the computer program product, the test results of the page loading of the pages to be tested are determined according to the display results of the pages to be tested and preset test items in the test cases by acquiring the test cases of the pages to be tested and utilizing the pages to be tested displayed by the second terminal. The automatic test of a plurality of pages to be tested can be realized, and the test efficiency is greatly improved.
Drawings
FIG. 1 is an application environment diagram of a test method for page loading in one embodiment;
FIG. 2 is a first flow chart of a method of testing page loading in one embodiment;
FIG. 3 is a diagram of a maintenance interface for test cases of a test method for page loading in one embodiment;
FIG. 4 is a diagram of a maintenance interface for test cases of a test method for page loading in one embodiment;
FIG. 5 is a second flow chart of a method of testing page loading in another embodiment;
FIG. 6 is a block diagram of the structure of a test of page loading in one embodiment;
FIG. 7 is an internal block diagram of a computer device in one embodiment;
fig. 8 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The page loading test method provided by the embodiment of the application can be applied to an application environment shown in figure 1. Wherein the first terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The first terminal 102 may be, but not limited to, various personal computers, notebook computers, tablet computers, and the like. The second terminal 106 may be, but is not limited to, a cell phone, tablet computer, smart car device, etc. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers. Wherein the first terminal 102 and the second terminal 106 may be connected by a communication line, such as a USB interface.
In one embodiment, as shown in fig. 2, a method for testing page loading is provided, and the method is applied to the first terminal in fig. 1 for illustration, and includes the following steps:
step S201, test cases of each page to be tested are respectively obtained from a server.
Specifically, the test case includes a plurality of preset test items, for example: whether a page element exists, whether the text value of the page element is the same as the expected value, whether the page is displayed normally, etc. The types and the numbers of the corresponding test items are different from each other according to the test cases. In an exemplary embodiment, the test cases may be set in a database of the server, and referring to fig. 3, a user may perform operations such as adding, querying, modifying, deleting, etc. the test cases in the database. In an exemplary embodiment, a test case or a new test case is selected, and an editing interface of the test case is entered, and referring to fig. 4, in the editing interface, a name, an execution end, a page URL, an expected result, and the like of the test case may be modified and set. For example, the server may edit the test cases, or may edit the test case data of the test cases individually.
In the embodiment of the disclosure, the test cases of each page to be tested can be stored in the case table database in the server, and each test case is read from the case table when the test cases are executed. The reading sequence of each test case and which test cases to read can be determined according to the requirements of specific application scenes, and the disclosure is not limited to this. In an exemplary embodiment, all test cases in an active state may be periodically read, and a loading test of the page to be tested may be performed. Optionally, the page to be tested includes an HTML5 page.
And step 203, responding to the page loading operation of the application program in the second terminal, and sending the test case to the second terminal so as to instruct the second terminal to display the page to be tested.
Specifically, the page load may be triggered when an application is enabled, or when a link is triggered in a page. In the embodiment of the disclosure, sending the test case to the second terminal may include sending an identifier of a page to be tested of the test case to the second terminal, where the second terminal accesses a corresponding page to be tested according to a page address corresponding to the identifier. In another exemplary embodiment, sending the test case to the second terminal may also include sending a page address in the test case to the second terminal, where the second terminal accesses a corresponding page to be tested according to the page address.
Step S205, determining a test result of page loading of the page to be tested according to the display result of the page to be tested and a preset test item in the test case, and sending the test result to the server.
Specifically, the display result of the test page may include a snapshot of the display page, or a display page captured by using other sensors. And checking the display result according to the check content in the preset test item, for example, whether the page element exists, whether the text value of the page element is the same as the expected value, whether the page is normally displayed, and the like. The specific content, the expected value and the normally displayed page of the page element are preset in the test case, and during testing, test results, such as a plurality of test passed test items, a plurality of test failed items, a reason for the test failed item and the like, are determined according to comparison between the display result of the test page and the expected result in the test case.
In the page loading test method, the test results of the page loading of the pages to be tested are determined by acquiring the test cases of the pages to be tested and utilizing the pages to be tested displayed by the second terminal according to the display results of the pages to be tested and the preset test items in the test cases. The automatic test of a plurality of pages to be tested can be realized, and the test efficiency is greatly improved.
Fig. 5 is a second flow chart of a testing method for page loading in another embodiment, referring to fig. 5, step S201, respectively obtaining test cases of each page to be tested from a server, including:
step S501, a test file template is obtained, and test case data of each page to be tested is obtained from the server; the test file template comprises a plurality of test rules, and each test rule corresponds to a test parameter.
Step S503, assigning a value to the corresponding test parameter of the test file template by using each test case data, so as to obtain a test case of each page to be tested.
Specifically, each page to be tested may include a plurality of pages to be tested for testing, which are obtained from a server. The number of each test page may include all or part of the pages to be tested in the server. In the embodiment of the disclosure, the test file template includes a plurality of test rules, and each test rule corresponds to a test parameter. Such as a test rule for whether a page element exists, a test rule for whether a text value of the page element is the same as an expected value, a test rule for whether a page is normally displayed, a test rule for password verification, etc. In the embodiment of the disclosure, the test case data is assigned to the driving test parameters, and the driving test parameters together form the test case. Specifically, in the test process, different test case data are transmitted through the test parameters, the test case is executed, the test case contains an expected result, and the test result is obtained by comparing the expected result with the display result of the second terminal. In an exemplary embodiment, taking a test rule for password verification as an example, the test rule in the test template may be expressed as a function: pytest.mark.parameters (argrames, argvalues), wherein argnames, argvalues denotes the test parameters. Illustratively, the test case data may be represented as: ['123','12345678','1234567890123456','12345678901234561']. Assigning values to the test parameters by using the test case data, wherein the obtained test case can be expressed as: @pytest.mark.parameter (' passwd ', [ (123 ', '12345678', '1234567890123456', '12345678901234561 ')).
According to the page loading test method, through the common test file template, only the test case data can be modified or added and deleted every time the version of the page to be tested changes, and the test data and the corresponding verification logic do not need to be written simultaneously like a traditional mode, so that the workload of writing the test case can be reduced, only the test case data are maintained, and the test efficiency of the test page is further improved.
In one possible implementation manner, the obtaining manner of the test case data includes:
displaying an editing interface of test case data;
and receiving modification or new addition operation of the test case data in the editing interface, and generating the test case data.
Specifically, the test case data may be stored in a database, and the test case data may be maintained by a third terminal, where the third terminal may be the same as or different from the first terminal or the second terminal in the foregoing embodiments. Referring to fig. 3 and 4, each test case data is shown in an editing interface of the test case data, and each test case data corresponds to an application case name. After triggering the target test case data, the editing interface of the target test case data is performed, and the test case data can be subjected to multi-dimensional modification, such as case names, page URLs, positioning elements, expected results and the like. It should be noted that, in the embodiment of the present disclosure, the editing operation of the test case data is not limited to the above dimensions, and those skilled in the art may make other changes in the light of the technical spirit of the present disclosure, but all the functions and effects implemented by the method are included in the protection scope of the present disclosure as long as they are the same or similar to the present disclosure.
According to the page loading test method, the test case data is edited in a visual mode, complex program logic is not required to be understood, the test case data can be conveniently increased or modified, and the page loading test efficiency is further improved.
In one possible implementation manner, the test case data includes a plurality of test case data, and the generating test case data includes:
and receiving a modification operation of the state of the test case data in the editing interface, and determining the test case data as the test case in the enabling state.
Specifically, the state of the test case data is used for setting start and stop of the test case, for example, when the test page is updated, some pages to be tested may be newly added, some pages to be tested may be put down, and some pages to be tested may be changed. At the moment, a forbidden state can be set for the page to be tested which is put down, and the page to be tested in the forbidden state is not tested subsequently; the state of the newly added page to be tested and the modified page to be tested can be set to be an enabling state. In an exemplary embodiment, the test case data may be stored in a database, and when the test case data changes, the test case data is synchronized to the database; when the test case is executed next time, the test case data is tested from the database.
In an exemplary embodiment, the execution progress and execution result of each test case may be read,
according to the page loading test method, the state is set for the test case data, so that the test case data in the database can be conveniently maintained and managed.
In one possible implementation manner, the sending the test case to the second terminal to instruct the second terminal to display the page to be tested includes:
analyzing the test case to obtain a page address corresponding to the page to be tested;
and sending the page address to the second terminal to instruct the second terminal to display the page to be tested according to the page address.
Specifically, the test case includes a page address of a page to be tested. In an exemplary embodiment, the test case may be sent to the second terminal, so as to instruct the second terminal to parse the test case to obtain the corresponding page address. In another exemplary embodiment, the first terminal may also parse the test case to obtain the page address. And sending the page address to a second terminal to instruct the second terminal to access a corresponding website according to the page address and display the page to be tested.
In one possible implementation, the preset test items include at least one of the following: whether the page element exists, whether the text value of the page element is the same as the expected value, whether the page is displayed normally,
according to the screenshot of the page to be tested and a preset test item corresponding to the page to be tested, determining a test result of the page to be tested loading comprises:
determining whether the page to be tested is normally displayed or not according to the screenshot of the page to be tested and a page which is normally displayed and preset by the page to be tested;
and/or determining whether the first text value is the same as the second text value according to the first text value of the page element in the screenshot of the page to be tested and the second text value of the page element preset by the page to be tested;
and/or detecting whether a page screenshot of the page to be tested has preset page elements or not, and obtaining a detection result.
It should be noted that the types of the test items are not limited to the examples described above, for example, whether the display positions of the elements are the same as the expected positions, and those skilled in the art may make other modifications in light of the technical spirit of the present application, but all the functions and effects implemented by the test items are the same as or similar to those of the present application, and are included in the protection scope of the present application.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a page loading testing device for realizing the above-mentioned page loading testing method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the testing device for loading one or more pages provided below may be referred to the limitation of the testing method for loading pages in the above description, and will not be repeated here.
In one embodiment, as shown in fig. 6, there is provided a testing apparatus for page loading, including:
the obtaining module 601 is configured to obtain test cases of each page to be tested from a server respectively;
the sending module 603 is configured to respond to a page loading operation of an application program in the second terminal, and send the test case to the second terminal, so as to instruct the second terminal to display the page to be tested;
the determining module 605 is configured to determine a test result of page loading of the page to be tested according to the display result of the page to be tested and a preset test item in the test case, and send the test result to the server.
In one possible implementation manner, the acquiring module includes:
the first acquisition submodule is used for acquiring a test file template and acquiring test case data of each page to be tested from the server; the test file template comprises a plurality of test rules, and each test rule corresponds to a test parameter;
and the generation submodule is used for assigning values for the corresponding test parameters of the test file template by utilizing the test case data to obtain the test cases of the pages to be tested.
In one possible implementation manner, the first obtaining sub-module includes:
the display unit is used for displaying an editing interface of the test case data;
and the generating unit is used for receiving the modification or new addition operation of the test case data in the editing interface and generating the test case data.
In one possible implementation manner, the test case data includes a plurality of test case data, and the generating unit includes:
and the determining subunit is used for receiving the modification operation of the state of the test case data in the editing interface and determining the test case data as the test case in the enabling state.
In one possible implementation manner, the sending module includes:
the analysis submodule is used for analyzing the test case to obtain a page address corresponding to the page to be tested;
and the sending sub-module is used for sending the page address to the second terminal so as to instruct the second terminal to display the page to be tested according to the page address.
In one possible implementation, the preset test items include at least one of the following: whether the page element exists, whether the text value of the page element is the same as the expected value, whether the page is displayed normally,
the determining module includes:
the first determining submodule is used for determining whether the page to be tested is normally displayed or not according to the screenshot of the page to be tested and a page which is preset for the page to be tested and is normally displayed;
and/or a second determining submodule, configured to determine whether the first text value is the same as the second text value according to a first text value of a page element in a screenshot of the page to be tested and a second text value of a page element preset by the page to be tested;
and/or a third determining submodule is used for detecting whether the page screenshot of the page to be tested has preset page elements or not to obtain a detection result.
The various modules in the page load testing device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store the page loaded test data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method of testing page loading.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure thereof may be as shown in fig. 8. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program, when executed by a processor, implements a method of testing page loading. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 8 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. The method for testing page loading is characterized by being applied to a first terminal, wherein the first terminal is electrically connected with a second terminal and a server respectively, and the method comprises the following steps:
respectively acquiring test cases of each page to be tested from a server;
responding to page loading operation of an application program in a second terminal, and sending the test case to the second terminal so as to instruct the second terminal to display the page to be tested;
according to the display result of the page to be tested and the preset test item in the test case, determining the test result of the page loading of the page to be tested, and sending the test result to the server.
2. The method of claim 1, wherein the obtaining test cases for each page to be tested from the server includes:
obtaining a test file template and test case data of each page to be tested from the server; the test file template comprises a plurality of test rules, and each test rule corresponds to a test parameter;
and assigning values for the corresponding test parameters of the test file template by using the test case data to obtain the test cases of the pages to be tested.
3. The method according to claim 2, wherein the obtaining manner of the test case data includes:
displaying an editing interface of test case data;
and receiving modification or new addition operation of the test case data in the editing interface, and generating the test case data.
4. The method of claim 3, wherein the test case data comprises a plurality of test case data, the generating test case data comprising:
and receiving a modification operation of the state of the test case data in the editing interface, and determining the test case data as the test case in the enabling state.
5. The method of claim 1, wherein sending the test case to a second terminal to instruct the second terminal to display the page to be tested comprises:
analyzing the test case to obtain a page address corresponding to the page to be tested;
and sending the page address to the second terminal to instruct the second terminal to display the page to be tested according to the page address.
6. The method of claim 1, wherein the pre-set test items comprise at least one of: whether the page element exists, whether the text value of the page element is the same as the expected value, whether the page is displayed normally,
according to the screenshot of the page to be tested and a preset test item corresponding to the page to be tested, determining a test result of the page to be tested loading comprises:
determining whether the page to be tested is normally displayed or not according to the screenshot of the page to be tested and a page which is normally displayed and preset by the page to be tested;
and/or determining whether the first text value is the same as the second text value according to the first text value of the page element in the screenshot of the page to be tested and the second text value of the page element preset by the page to be tested;
and/or detecting whether a page screenshot of the page to be tested has preset page elements or not, and obtaining a detection result.
7. The utility model provides a testing arrangement of page loading, its characterized in that is applied to first terminal, first terminal is connected with second terminal and server electricity respectively, the device includes:
the acquisition module is used for respectively acquiring test cases of each page to be tested from the server;
the sending module is used for responding to page loading operation of an application program in the second terminal, and sending the test case to the second terminal so as to instruct the second terminal to display the page to be tested;
the determining module is used for determining the page loading test result of the page to be tested according to the display result of the page to be tested and the preset test item in the test case, and sending the test result to the server.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202311070994.XA 2023-08-24 2023-08-24 Page loading test method and device, computer equipment and storage medium Pending CN117056228A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311070994.XA CN117056228A (en) 2023-08-24 2023-08-24 Page loading test method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311070994.XA CN117056228A (en) 2023-08-24 2023-08-24 Page loading test method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117056228A true CN117056228A (en) 2023-11-14

Family

ID=88653296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311070994.XA Pending CN117056228A (en) 2023-08-24 2023-08-24 Page loading test method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117056228A (en)

Similar Documents

Publication Publication Date Title
CN116644250B (en) Page detection method, page detection device, computer equipment and storage medium
CN117078181A (en) Automatic method and system for power transaction business data processing flow
CN116860614A (en) Performance test method, apparatus, device, storage medium, and program product
CN117056228A (en) Page loading test method and device, computer equipment and storage medium
CN114756293A (en) Service processing method, device, computer equipment and storage medium
CN114528045B (en) Plug-in operation method, device, computer equipment and storage medium
CN116700725B (en) Page generation method, page generation device, computer equipment and storage medium
CN117493113B (en) Data reporting method, device, computer equipment and storage medium
CN117331817A (en) Test data acquisition method, device, computer equipment and storage medium
CN117435651A (en) Test data processing method, device, computer equipment and storage medium
CN116361149A (en) Batch processing automatic test method, device, computer equipment and storage medium
CN116701178A (en) Interface test method, device, computer equipment and storage medium
CN118132443A (en) Method and device for constructing batch test file and computer equipment
CN117522296A (en) Auditing flow generation method, auditing flow generation device, computer equipment and storage medium
CN117827554A (en) Test method, test device, computer equipment and storage medium
CN118245699A (en) Page acquisition method, device, equipment, storage medium and computer program product
CN116051056A (en) Front-end project management method, front-end project management device, computer equipment and storage medium
CN118467095A (en) Data verification method, device, computer equipment and storage medium
CN116094770A (en) Data consistency verification method, device, system and computer equipment
CN117389605A (en) Service interface configuration method, device, equipment, storage medium and program product
CN116861120A (en) Webpage resource loading method and device, computer equipment and storage medium
CN118409956A (en) Performance test method, apparatus, computer device, storage medium, and program product
CN118338337A (en) Reliability detection method, apparatus, computer device and storage medium
CN116894031A (en) Data quality detection method and device and computer equipment
CN118200314A (en) File interaction method, device, computer equipment and storage 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