CN117667710A - Determination method, test method, device, medium and equipment for page test case - Google Patents

Determination method, test method, device, medium and equipment for page test case Download PDF

Info

Publication number
CN117667710A
CN117667710A CN202311677036.9A CN202311677036A CN117667710A CN 117667710 A CN117667710 A CN 117667710A CN 202311677036 A CN202311677036 A CN 202311677036A CN 117667710 A CN117667710 A CN 117667710A
Authority
CN
China
Prior art keywords
test
scene
interface
page
tested
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
CN202311677036.9A
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.)
Beijing Youzhuju Network Technology Co Ltd
Original Assignee
Beijing Youzhuju Network 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 Beijing Youzhuju Network Technology Co Ltd filed Critical Beijing Youzhuju Network Technology Co Ltd
Priority to CN202311677036.9A priority Critical patent/CN117667710A/en
Publication of CN117667710A publication Critical patent/CN117667710A/en
Pending legal-status Critical Current

Links

Classifications

    • 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

Abstract

The disclosure relates to a method, a device, a medium and equipment for determining a page test case, wherein the method for determining the page test case comprises the following steps: determining interface flow data corresponding to an interface to be tested of a target page, wherein the interface flow data is data responding to the target page; performing interface scene recognition based on the interface flow data to obtain scene test data corresponding to the interface to be tested, wherein the scene test data comprises test data under at least one scene corresponding to the interface to be tested; and generating a test case corresponding to the target page according to the scene test data corresponding to the interface to be tested.

Description

Determination method, test method, device, medium and equipment for page test case
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a method for determining a page test case, a test method, a device, a medium and equipment.
Background
For example, in an e-commerce system, most of the business forms of clients involve on-end module presentation. Taking an item detail page as an example, a large amount of item information is usually carried in the page, and the service scene is many and the display logic is complex. In the related art, in order to ensure the standard of page display, the page display result is usually tested by combining manual regression with UI automation test. However, in the above scheme, the testing process depends on manual design, is difficult to adapt to complex interface display, and has fast iteration of service requirements, needs frequent updating of the test cases, and has high case maintenance cost.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a method for determining a page test case, the method including:
determining interface flow data corresponding to an interface to be tested of a target page, wherein the interface flow data is data responding to the target page;
performing interface scene recognition based on the interface flow data to obtain scene test data corresponding to the interface to be tested, wherein the scene test data comprises test data under at least one scene corresponding to the interface to be tested;
and generating a test case corresponding to the target page according to the scene test data corresponding to the interface to be tested.
In a second aspect, the present disclosure provides a page testing method, the method comprising:
acquiring a test case corresponding to a target page to be tested, wherein the test case is determined based on the determination method of the page test case in the first aspect;
The test case is played back under a reference environment and a test environment, and a first page under the reference environment and a second page under the test environment are obtained, wherein the reference environment is an execution environment of a history version corresponding to the test environment;
and carrying out page comparison based on the first page and the second page to obtain a test result corresponding to the target page.
In a third aspect, the present disclosure provides a device for determining a page test case, where the device includes:
the first determining module is used for determining interface flow data corresponding to an interface to be tested of a target page, wherein the interface flow data is data responding to the target page;
the first processing module is used for carrying out interface scene recognition based on the interface flow data to obtain scene test data corresponding to the interface to be tested, wherein the scene test data comprises test data under at least one scene corresponding to the interface to be tested;
and the generating module is used for generating the test case corresponding to the target page according to the scene test data corresponding to the interface to be tested.
In a fourth aspect, the present disclosure provides a page testing apparatus, the apparatus comprising:
The acquisition module is used for acquiring a test case corresponding to a target page to be tested, wherein the test case is determined based on the determination method of the page test case in the first aspect;
the second processing module is used for playing back the test case under a reference environment and a test environment to obtain a first page under the reference environment and a second page under the test environment, wherein the reference environment is an execution environment of a history version corresponding to the test environment;
and the comparison module is used for comparing the pages based on the first page and the second page to obtain a test result corresponding to the target page.
In a fifth aspect, the present disclosure provides a computer readable medium having stored thereon a computer program which when executed by a processing device performs the steps of the method of the first or second aspect.
In a sixth aspect, the present disclosure provides an electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to carry out the steps of the method of the first or second aspect
According to the technical scheme, the test data of the interface to be tested in the target page under multiple scenes can be determined, the scene test data corresponding to the interface to be tested is determined through the flow data on the line, on one hand, the workload required by manually setting the test data can be effectively reduced, on the other hand, deviation caused by manually setting the test data can be avoided, the matching degree of the test data and the on-line application is improved, and therefore the accuracy of testing based on the determined test cases is guaranteed. And the test data corresponding to the interface to be tested is used for automatically generating the test case corresponding to the target page, so that the coverage of the test case to the test scene can be ensured while the automation level of the test case generation is effectively improved, the test process of the complex page is met, the application range of the test case is widened, and the accuracy of the test result obtained based on the determined test case is improved to a certain extent.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale. In the drawings:
FIG. 1 is a flow chart of a method of determining a page test case provided in accordance with one embodiment of the present disclosure.
Fig. 2 is a schematic diagram of determining scenario test data provided according to one embodiment of the present disclosure.
Fig. 3 is a flow chart of a page testing method provided in accordance with one embodiment of the present disclosure.
Fig. 4 is a schematic diagram of a page alignment based on a first page and a second page provided in accordance with one embodiment of the present disclosure.
FIG. 5 is a schematic diagram of an execution test case provided in accordance with one embodiment of the present disclosure.
FIG. 6 is a block diagram of a determination device for page test cases provided according to one embodiment of the present disclosure.
Fig. 7 is a block diagram of a page testing apparatus provided by an embodiment of the present disclosure.
Fig. 8 is a schematic diagram illustrating a configuration of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
It will be appreciated that, before using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized by appropriate means of the type, the usage range, the usage scenario, etc. of the user information related to the present disclosure according to the relevant legal regulations.
For example, in response to receiving an active request from a user, a prompt is sent to the user to explicitly prompt the user that the operation it is requesting to perform will require information to be obtained and used with the user. Therefore, a user can autonomously select whether to provide relevant information for software or hardware such as electronic equipment, application programs, servers or storage media for executing the operation of the technical scheme of the present disclosure according to the prompt information.
As an alternative but non-limiting implementation, in response to receiving an active request from a user, the manner in which the prompt information is sent to the user may be, for example, a popup, in which the prompt information may be presented in a text manner. In addition, a selection control for the user to select to provide relevant information to the electronic device in a 'consent' or 'disagreement' manner can be carried in the popup window.
It will be appreciated that the above-described notification and user authorization process is merely illustrative and not limiting of the implementations of the present disclosure, and that other ways of satisfying relevant legal regulations may be applied to the implementations of the present disclosure.
Meanwhile, it can be understood that the data (including but not limited to the data itself, the acquisition or the use of the data) related to the technical scheme should conform to the requirements of the corresponding laws and regulations and related regulations.
FIG. 1 is a flowchart illustrating a method for determining a page test case according to an embodiment of the present disclosure, where the method includes:
in step 11, interface flow data corresponding to an interface to be tested of a target page is determined, wherein the interface flow data is data responding to the target page.
As described in the background art, in the related art, manual analysis is generally required to set corresponding test data, which is difficult to cover the whole scene to be tested in all aspects. In an actual application scene, a page request is initiated first to display a target page, so that response data is obtained based on the request, and the response data is rendered to realize page display. Based on the method, the flow data responding to the target page can be collected, so that the test case can be automatically generated based on the collected data.
In general, rendering display of a page in a system depends on a plurality of interfaces, and as an example, each interface in the page can be used as an interface to be tested, and as another example, an interface to be tested in the page can be determined according to actual use requirements. If the display of the page P depends on the Interface A, B, C, D, E, the UI (User Interface) displays corresponding to the interfaces a and C are tested according to the actual application scenario. Accordingly, when determining the test case of the target page, the interfaces A and C can be used as interfaces to be tested for case design.
Accordingly, in this embodiment, the interface traffic data corresponding to the interfaces a and C needs to be determined. As an example, the data traffic responding to the target page may be collected, for example, the collected traffic data may include traffic data corresponding to the interfaces a-E, and further, interface traffic data corresponding to the interface a and interface traffic data corresponding to the interface C are determined from the collected traffic data. The interface identification can be used for identifying the interface flow data corresponding to each interface from the flow data, so that the interface flow data corresponding to the interface to be tested is obtained.
In step 12, interface scene recognition is performed based on the interface flow data to obtain scene test data corresponding to the interface to be tested, wherein the scene test data comprises test data corresponding to the interface to be tested in at least one scene.
The interface flow data corresponding to each interface may include various types, taking the commodity detail page as an example, the interface a is used for displaying commodity purchase information of the commodity detail page, and determining scene division according to actual application requirements. For example, the interface flow data of the interface a corresponds to one scene when the clothing is displayed, and the interface flow data of the interface a corresponds to another scene when the electronic product is displayed.
In this step, interface scene recognition may be performed based on the interface traffic data, and it is determined that the interface traffic data is the test data corresponding to the interface to be tested in which scene, so that the scene test data corresponding to the interface to be tested may be obtained.
In step 13, according to the scene test data corresponding to the interface to be tested, a test case corresponding to the target page is generated.
In the embodiment, the test data of the interface to be tested in multiple scenes can be determined by the collected flow data in the steps 11 and 12, and in this embodiment, multiple test cases can be obtained by combining the scene test data corresponding to the interface to be tested.
According to the technical scheme, the test data of the interface to be tested in the target page under multiple scenes can be determined, the scene test data corresponding to the interface to be tested is determined through the flow data on the line, on one hand, the workload required by manually setting the test data can be effectively reduced, on the other hand, deviation caused by manually setting the test data can be avoided, the matching degree of the test data and the on-line application is improved, and therefore the accuracy of testing based on the determined test cases is guaranteed. And the test data corresponding to the interface to be tested is used for automatically generating the test case corresponding to the target page, so that the coverage of the test case to the test scene can be ensured while the automation level of the test case generation is effectively improved, the test process of the complex page is met, the application range of the test case is widened, and the accuracy of the test result obtained based on the determined test case is improved to a certain extent.
In a possible embodiment, the method for performing interface scene recognition based on the interface traffic data, and obtaining the scene test data corresponding to the interface to be tested may include:
And determining a scene characteristic value corresponding to the interface flow data according to the interface flow data.
The scene characteristic value can be used for uniquely representing one scene, so that accurate identification of the scene can be realized.
As an example, according to the interface traffic data, determining a scene feature value corresponding to the interface traffic data may include:
and determining a scene field corresponding to the interface to be tested and a matching type of the scene field.
In this embodiment, for each interface to be tested, a scene field for performing scene identification in the included fields may be preset, and the number of the scene fields may be one or more. If the interface a includes fields A1, A2, and A3, the interface a can set A1 as a scene field according to an actual application scene, and then the scene can be identified based on a value corresponding to the scene field.
And determining data corresponding to the scene field from the interface flow data according to the matching type as the scene characteristic value.
The matching type is used for indicating the type of matching the value of the scene field in the interface flow data.
Therefore, through the technical scheme, the scene characteristic value extraction can be carried out based on the scene field in the interface to be tested, and the scene characteristic value is used for uniquely representing one scene corresponding to the interface to be tested, so that scene identification can be accurately realized, and further support is provided for determining the test data corresponding to each scene.
In a possible embodiment, the implementation manner of determining, according to the matching type, the data corresponding to the scene field from the interface traffic data as the scene feature value may include:
in the first mode, if the matching type is a leaf node type, a path value corresponding to the scene field determined from the interface traffic data is used as the scene characteristic value, wherein the path value of the field includes a value under a matching path corresponding to the field.
The interface flow data is response data corresponding to the interface to be tested, and the response data can be represented by a json response body, and in this embodiment, scene feature value extraction can be performed based on a path of the json response body.
In this embodiment, the matching type of the scene field is a leaf node type, i.e., the scene field is a field represented in the json response body based on a leaf node. As an example, the scene field A1 corresponds to a matching path a- > Q1- > A1, and for the scene field A1, it is expressed in the interface traffic data as:
“A1”:“XXX1”。
In the scene, the path value corresponding to the scene field, namely the value of the json field under the leaf node path corresponding to the scene field, can be directly used as the scene characteristic value, for example, the value 'XXX 1' of the scene field under the matching path of A- > Q1- > A1 can be used as the scene characteristic value.
As another example, there is an array structure in the matching path of the scene field, and the value of the array structure is not limited, that is, the matching path of the scene field D is set to a- > b_list- > D, and the array identifier filled with x represents that one path of any subscript satisfies a condition, and then the value matched from the interface traffic data based on the matching path a- > b_list- > D may be used as the scene feature value corresponding to the scene field D.
As another example, a map structure exists in a matching path of a scene field, for example, a path a- > b_map- > D, a dynamic identifier filled out represents that one path under any key in the map satisfies a condition, and a value matched from interface traffic data based on the matching path a- > b_map- > D may be used as a scene feature value corresponding to the scene field D.
Second, if the matching type is a non-leaf node type, the path value corresponding to each sub-field contained in the scene field determined from the interface traffic data is used as the scene characteristic value.
Wherein the fields represented for the non-leaf node type also contain other subfields. If the matching type is the completely matched non-leaf node type, the values of the scene fields corresponding to the same scene and the sub-fields contained in the scene fields are the same.
As for the scene field A2, it is represented in the interface traffic data as:
“A2”:{
“c1”:“XX1”,
“c2”:“XX2”,
}
i.e. scene field A2 contains subfields c1 and c2, in this embodiment, the overall json structure corresponding to "A2" may be taken as the scene feature value.
The matching mode and the above types when the array structure or the map structure exists in the matching path in the scene are not described herein.
Therefore, through the technical scheme, the scene characteristic value corresponding to the flow data can be identified from the interface data flow so as to carry out accurate scene identification, so that the response return value of the interface under each scene can be determined based on the online flow data, and accurate data support is provided for the subsequent generation of test cases.
After determining the scene characteristic value corresponding to the interface flow data, if the scene test data corresponding to the interface to be tested does not contain the test data corresponding to the scene characteristic value, storing the interface flow data and the scene characteristic value in the scene test data corresponding to the interface to be tested in an associated mode.
As an example, the scenario test data corresponding to the interface may be stored through an interface scenario set, as shown in fig. 2, if the scenario test data corresponding to the interface to be tested does not include the test data corresponding to the scenario feature value, that is, the identified scenario feature value at this time corresponds to a new scenario, in this case, a new scenario may be created based on the scenario feature value, and the return value in the interface flow data, that is, the value of the interface under the scenario, may use the interface flow data as the test data corresponding to the scenario, and further store the interface flow data and the scenario feature value in association with the scenario test data corresponding to the interface to be tested.
As an example, if the scene test data corresponding to the interface to be tested includes the test data corresponding to the scene feature value, that is, the scene test data includes the test data under the scene represented by the scene feature value, no new data may be added to the test scene data.
Therefore, through the technical scheme, the scene characteristic value extraction can be carried out on each piece of interface flow data corresponding to the interface to be tested, so that the characteristic comparison is carried out on the basis of the scene characteristic value and the scene test data corresponding to the interface to be tested, the test data of the interface to be tested in a new scene can be quickly found and generated, the comprehensiveness of the scene test data corresponding to the interface to be tested and the coverage of the actual application scene are improved, and meanwhile, the resource waste caused by storing a plurality of pieces of flow data in the same scene can be avoided.
In a possible embodiment, the generating, according to the scenario test data corresponding to the interface to be tested, an exemplary implementation manner of the test case corresponding to the target page may include:
and combining the test data of each interface to be tested in different scenes according to the scene test data corresponding to each interface to be tested in the target page to obtain test cases, wherein each test case comprises each interface to be tested in the target page and the test data of the interface to be tested in any scene.
As an example, cartesian product combination processing may be performed on the scenario test data corresponding to each interface to be tested in the target page, so as to obtain each test case. If the interface to be tested in the target page is an interface a and an interface C, wherein the scene test data corresponding to the interface a includes test data corresponding to scene feature values a1=1 and a1=2, and the scene test data corresponding to the interface C includes test data corresponding to scene feature values c=3, c=4 and c=5.
In the embodiment, the test data of each interface to be tested under different scenes may be combined, that is, the combination of the test data corresponding to each interface to be tested under the scenes { a1=1, c=3 }, { a1=1, c=4 }, { a1=1, c=5 }, { a1=2, c=3 }, { a1=2, c=4 }, { a1=2, c=5 } is used as the test case corresponding to the interface to be tested.
Therefore, the test cases are obtained by combining the test data of each interface to be tested in the page under different scenes, the coverage of the test cases on the page under various possible values of the interfaces is realized, the coverage of the test cases on the page display is effectively improved, and the reliability of the test results determined based on the test cases is improved.
In one possible embodiment, the method may further comprise:
and under the condition that the test case updating condition is met, determining whether interface flow data corresponding to the scene exists in a target period according to each scene in the scene test data corresponding to the interface to be tested.
The test case update condition can be set based on an actual application scene, for example, the test case update can be performed by setting preset time intervals, or an update instruction can be triggered by user configuration, and when the update instruction is received, the test case update condition is determined to be met.
The target period may be set according to an actual application scenario, for example, may be set to the nearest month or the nearest week, etc., which is not limited by the present disclosure.
As an example, determining whether the interface traffic data corresponding to the scene exists in the target period may be based on matching a scene feature value corresponding to the scene with the interface traffic data collected in the target period, if the interface traffic data corresponding to the scene feature value is matched, determining that the interface traffic data corresponding to the scene exists in the target period, and if the interface traffic data corresponding to the scene feature value is not matched, determining that the interface traffic data corresponding to the scene does not exist in the target period.
If the interface flow data corresponding to the scene exists in the target period, the latest interface flow data in the target period is used as the test data corresponding to the scene in the scene test data, and the associated test cases of the scene are updated, wherein the associated test cases are test cases containing the test data of the scene.
As an example, the interface flow data corresponding to the scene exists in the target period, which indicates that the scene appears in the actual application, and at this time, the latest interface flow data in the target period may be used as test data corresponding to the scene in the scene test data. For example, for the scene of the interface a in the field a1=1, the corresponding test data is the interface traffic data collected at the time t1, the interface traffic data in the scene a1=1 exists in the target period, at this time, the latest (as collected at the time t 2) interface traffic data in the target period can be determined to be the test data in the scene a1=1, and for example, the interface traffic data collected at the time t2 can be taken as the test data in the scene a1=1, so as to realize the update of the test data.
Further, after the test data is updated, the test cases including the a1=1 scenario may be updated, and at this time, the corresponding test cases { a1=1, c=3 }, { a1=1, c=4 }, { a1=1, c=5 } may be further updated as described above.
And if the interface flow data corresponding to the scene does not exist in the target period, deleting the test data corresponding to the scene in the scene test data, and deleting the associated test case of the scene.
If the interface flow data corresponding to the scene does not exist in the target period, the scene is considered not to appear in the interface any more, and the resource waste caused by testing of the scene is avoided, so that the test data corresponding to the scene in the scene test data and the associated test cases of the scene can be directly deleted.
For the scenario of the interface a in the field a1=2, the corresponding test data is the interface traffic data collected at the time t3, and the interface traffic data in the scenario of a1=2 does not exist in the target period, where the test data corresponding to the scenario in the scenario test data, that is, the test data corresponding to a1=2 in the scenario test data corresponding to the interface a, may be deleted. Further, the related test cases of the scene may be deleted, and in this case, the test cases corresponding to { a1=2, c=3 }, { a1=2, c=4 }, and { a1=2, c=5 } may be deleted.
Therefore, through the technical scheme, the test case can be updated and deleted, so that the test case is matched with the actual online flow corresponding to the page, the accuracy of the test can be ensured, meanwhile, the resource waste caused by testing an invalid scene can be avoided, the validity of the test case is ensured, and the automatic maintenance of the test case is realized.
The present disclosure also provides a page testing method, as shown in fig. 3, where the method may include:
in step 21, a test case corresponding to the target page to be tested is obtained, wherein the test case is determined based on the determination method of the page test case.
When testing the target page, the test cases corresponding to the target page can be traversed in sequence, and each traversed test case is executed so as to obtain a final test result.
In step 22, the test case is played back under the reference environment and the test environment, and the first page under the reference environment and the second page under the test environment are obtained, wherein the reference environment is the execution environment of the history version corresponding to the test environment.
The test environment is an execution environment of a version to be tested, the reference environment can be an execution environment of a previous version of the version to be tested, the reference environment can be an execution environment of a historical version, and pages obtained in the reference environment are considered to be effective pages.
In step 23, the page comparison is performed based on the first page and the second page, and the test result corresponding to the target page is obtained.
In this embodiment, the test case is played back under the reference environment and the test environment, so that the page display can be driven based on the same data under the reference environment and the test environment, and the corresponding test result can be determined by comparing different displayed pages.
As an example, as shown in fig. 4, screenshot processing may be performed on the first page and the second page, respectively, to obtain a reference chart S1 corresponding to the first page, and a test chart S2 corresponding to the second page. Thereafter, the test results were contrast-determined by OCR (Optical Character Recognition ). For example, the reference image and the test image may be processed into json format data (data including text content, recognition confidence, position coordinates, etc.) by OCR technology, respectively, to obtain json data S1 and json data S2.
The json format data may then be preprocessed, such as to filter out system information at the top of the page screen, as well as to filter out low confidence text by setting a threshold, etc. And then ordering and sorting the text information in the image according to the two-dimensional position coordinates corresponding to the text information, and then comparing the ordered two json data with the same json path data to obtain a test result. As another example, configuration versus filtering conditions may be supported, such as negligible data specifying a json path occurrence inconsistency, negligible data specifying a data content occurrence inconsistency, etc., to obtain a final test result.
Therefore, through the technical scheme, the page display can be automatically tested based on the test cases corresponding to the page to obtain the test result, and the test result is obtained by comparing the corresponding pages when the same test case is respectively executed in the reference environment and the test environment in the test process, so that on one hand, the user is not required to participate, the manual workload is effectively saved, the technical requirements on testers are reduced, on the other hand, the test of the target page under each scene can be automatically realized, the coverage of the page test is improved, and the accuracy and the reliability of the test result are ensured.
In one possible embodiment, the playing back the test case in a reference environment and a test environment, and obtaining the first page in the reference environment and the second page in the test environment may include:
and respectively initiating display requests of the target page in the reference environment and the test environment to acquire test response of the target page, wherein response data corresponding to an interface to be tested of the target page in the test response is the test data corresponding to the interface to be tested in the test case.
As shown in fig. 5, taking a test environment as an example, when testing a target page, a test case to be executed is obtained from a test case set, where a test case identifier may be represented based on a scene feature value corresponding to an interface to be tested in the test case, for example, a { a1=2, c=3 } identifier, so that corresponding test data may be obtained from the test case. And then, a display request of the target page can be initiated, at the moment, the display request can be intercepted, and a test response corresponding to the display request is constructed based on the test case.
As an example, for an interface to be tested in the target page, test data corresponding to the interface to be tested in the test case may be used as response data corresponding to the interface to be tested in the test response, and for other interfaces except for the interface to be tested in the target page, real-time online data may be obtained through a display request and used as response data corresponding to the other interfaces, so as to obtain the test response.
For example, the test case is { a1=2, c=3 } corresponding test data, and the display of the target page depends on the interface A, B, C, D, E, and the corresponding interfaces to be tested are interfaces a and C. When the test response of the target page is constructed, the test data with a1=2 in the test case can be used as the response data of the interface a, the test data with c=3 in the test case can be used as the response data of the interface C, and the interface B, D, E can realize an online data request based on the display request, namely, the online data of the interface B, D, E determined by the server is used as the response data corresponding to the online data respectively, so that the response data corresponding to the interfaces a-E respectively, namely, the test response of the target page can be obtained. Similarly, the type of the execution process of the test case in the reference environment is not described herein.
And then, performing page rendering on the test response under the reference environment to obtain the first page, and performing page rendering on the test response under the test environment to obtain the second page.
The corresponding page may be obtained based on a manner of rendering the response data, which is common in the art, and will not be described herein.
By way of example, in the disclosure, the execution process of the test case may be controlled by a test script, page login may be implemented based on the test script, a page trigger display request is opened, and then a corresponding page pair is obtained based on a test response to perform a page screenshot, so as to facilitate corresponding comparison. The test script controls the test case to be executed without manual intervention, so that the automation level of the page test can be further improved.
Therefore, through the technical scheme, scene playback can be performed based on the test case in the execution process of the test case, when the target page is opened based on the test case, the return value data of the corresponding interface is found out through the test data in the test case so as to construct a test response, the consistency of the test response and the test data is ensured, the test result of page rendering is determined through the display of the same test response under different environments, and the accuracy of the test result is ensured.
Based on the same inventive concept, the present disclosure further provides a device for determining a page test case, as shown in fig. 6, where the device 10 includes:
a first determining module 101, configured to determine interface traffic data corresponding to an interface to be tested of a target page, where the interface traffic data is data that responds to the target page;
the first processing module 102 is configured to perform interface scene recognition based on the interface traffic data to obtain scene test data corresponding to the interface to be tested, where the scene test data includes test data corresponding to at least one scene of the interface to be tested;
and the generating module 103 is configured to generate a test case corresponding to the target page according to the scene test data corresponding to the interface to be tested.
Optionally, the first processing module includes:
the first determining submodule is used for determining a scene characteristic value corresponding to the interface flow data according to the interface flow data;
and the association sub-module is used for associating and storing the interface flow data and the scene characteristic value into the scene test data corresponding to the interface to be tested if the scene test data corresponding to the interface to be tested does not contain the test data corresponding to the scene characteristic value.
Optionally, the first determining submodule includes:
the second determining submodule is used for determining a scene field corresponding to the interface to be tested and a matching type of the scene field;
and the third determining submodule is used for determining data corresponding to the scene field from the interface flow data according to the matching type as the scene characteristic value.
Optionally, the third determining submodule is further configured to:
if the matching type is a leaf node type, taking a path value corresponding to the scene field determined from the interface flow data as the scene characteristic value, wherein the path value of the field comprises a value under a matching path corresponding to the field;
and if the matching type is a non-leaf node type, taking a path value corresponding to each subfield contained in the scene field determined from the interface flow data as the scene characteristic value.
Optionally, the generating module is further configured to:
and combining the test data of each interface to be tested in different scenes according to the scene test data corresponding to each interface to be tested in the target page to obtain test cases, wherein each test case comprises each interface to be tested in the target page and the test data of the interface to be tested in any scene.
Optionally, the apparatus further comprises:
the second determining module is used for determining whether interface flow data corresponding to the scene exists in a target period or not according to each scene in the scene test data corresponding to the interface to be tested under the condition that the test case updating condition is met;
the updating module is used for taking the latest interface flow data in the target period as the test data corresponding to the scene in the scene test data and updating the associated test cases of the scene if the interface flow data corresponding to the scene exists in the target period, wherein the associated test cases are test cases containing the test data of the scene;
and the deleting module is used for deleting the test data corresponding to the scene in the scene test data and deleting the associated test cases of the scene if the interface flow data corresponding to the scene does not exist in the target period.
The present disclosure further provides a page testing apparatus, as shown in fig. 7, the apparatus 20 includes:
the acquiring module 201 is configured to acquire a test case corresponding to a target page to be tested, where the test case is determined based on the determining method of the page test case described above;
A second processing module 202, configured to play back the test case under a reference environment and a test environment, and obtain a first page under the reference environment and a second page under the test environment, where the reference environment is an execution environment of a history version corresponding to the test environment;
and the comparison module 203 is configured to perform page comparison based on the first page and the second page, and obtain a test result corresponding to the target page.
Optionally, the second processing module includes:
the processing sub-module is used for respectively initiating display requests of the target page in the reference environment and the test environment to obtain test responses of the target page, wherein response data corresponding to the interface to be tested of the target page in the test responses are test data corresponding to the interface to be tested in the test case;
and the rendering sub-module is used for performing page rendering on the test response under the reference environment to obtain the first page, and performing page rendering on the test response under the test environment to obtain the second page.
Referring now to fig. 8, a schematic diagram of an electronic device (e.g., a terminal device or server) 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 8 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 8, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 8 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: determining interface flow data corresponding to an interface to be tested of a target page, wherein the interface flow data is data responding to the target page; performing interface scene recognition based on the interface flow data to obtain scene test data corresponding to the interface to be tested, wherein the scene test data comprises test data under at least one scene corresponding to the interface to be tested; and generating a test case corresponding to the target page according to the scene test data corresponding to the interface to be tested.
Alternatively, the computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: acquiring a test case corresponding to a target page to be tested, wherein the test case is determined based on the determination method of the page test case; the test case is played back under a reference environment and a test environment, and a first page under the reference environment and a second page under the test environment are obtained, wherein the reference environment is an execution environment of a history version corresponding to the test environment; and carrying out page comparison based on the first page and the second page to obtain a test result corresponding to the target page.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. The name of the module is not limited to the module itself in some cases, and for example, the first determining module may also be described as "a module for determining interface traffic data corresponding to an interface to be tested of the target page".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, example 1 provides a method of determining a page test case, wherein the method includes:
determining interface flow data corresponding to an interface to be tested of a target page, wherein the interface flow data is data responding to the target page;
performing interface scene recognition based on the interface flow data to obtain scene test data corresponding to the interface to be tested, wherein the scene test data comprises test data under at least one scene corresponding to the interface to be tested;
and generating a test case corresponding to the target page according to the scene test data corresponding to the interface to be tested.
According to one or more embodiments of the present disclosure, example 2 provides the method of example 1, wherein the performing interface scene recognition based on the interface traffic data to obtain scene test data corresponding to the interface to be tested includes:
determining a scene characteristic value corresponding to the interface flow data according to the interface flow data;
and if the scene test data corresponding to the interface to be tested does not contain the test data corresponding to the scene characteristic value, storing the interface flow data and the scene characteristic value in association with the scene test data corresponding to the interface to be tested.
According to one or more embodiments of the present disclosure, example 3 provides the method of example 2, wherein the determining, according to the interface traffic data, a scene feature value corresponding to the interface traffic data includes:
determining a scene field corresponding to the interface to be tested and a matching type of the scene field;
and determining data corresponding to the scene field from the interface flow data according to the matching type as the scene characteristic value.
According to one or more embodiments of the present disclosure, example 4 provides the method of example 3, wherein the determining, from the interface traffic data, data corresponding to the scene field as the scene feature value according to the matching type includes:
if the matching type is a leaf node type, taking a path value corresponding to the scene field determined from the interface flow data as the scene characteristic value, wherein the path value of the field comprises a value under a matching path corresponding to the field;
and if the matching type is a non-leaf node type, taking a path value corresponding to each subfield contained in the scene field determined from the interface flow data as the scene characteristic value.
According to one or more embodiments of the present disclosure, example 5 provides the method of example 1, wherein the generating, according to the scenario test data corresponding to the interface to be tested, the test case corresponding to the target page includes:
and combining the test data of each interface to be tested in different scenes according to the scene test data corresponding to each interface to be tested in the target page to obtain test cases, wherein each test case comprises each interface to be tested in the target page and the test data of the interface to be tested in any scene.
Example 6 provides the method of example 1, according to one or more embodiments of the present disclosure, wherein the method further comprises:
under the condition that the test case updating condition is met, determining whether interface flow data corresponding to the scene exists in a target period according to each scene in the scene test data corresponding to the interface to be tested;
if the interface flow data corresponding to the scene exists in the target period, taking the latest interface flow data in the target period as test data corresponding to the scene in the scene test data, and updating the associated test cases of the scene, wherein the associated test cases are test cases containing the test data of the scene;
And if the interface flow data corresponding to the scene does not exist in the target period, deleting the test data corresponding to the scene in the scene test data, and deleting the associated test case of the scene.
Example 7 provides a page testing method according to one or more embodiments of the present disclosure, the method comprising:
acquiring a test case corresponding to a target page to be tested, wherein the test case is determined based on the determination method of the page test case in any one of examples 1-6;
the test case is played back under a reference environment and a test environment, and a first page under the reference environment and a second page under the test environment are obtained, wherein the reference environment is an execution environment of a history version corresponding to the test environment;
and carrying out page comparison based on the first page and the second page to obtain a test result corresponding to the target page.
According to one or more embodiments of the present disclosure, example 8 provides the method of example 7, wherein the playing back the test case in a reference environment and a test environment, obtaining a first page in the reference environment and a second page in the test environment, includes:
Respectively initiating display requests of the target page in the reference environment and the test environment to obtain test response of the target page, wherein response data corresponding to an interface to be tested of the target page in the test response is test data corresponding to the interface to be tested in the test case;
and performing page rendering on the test response under the reference environment to obtain the first page, and performing page rendering on the test response under the test environment to obtain the second page.
Example 9 provides a device for determining a page test case according to one or more embodiments of the present disclosure, the device comprising:
the first determining module is used for determining interface flow data corresponding to an interface to be tested of a target page, wherein the interface flow data is data responding to the target page;
the first processing module is used for carrying out interface scene recognition based on the interface flow data to obtain scene test data corresponding to the interface to be tested, wherein the scene test data comprises test data under at least one scene corresponding to the interface to be tested;
And the generating module is used for generating the test case corresponding to the target page according to the scene test data corresponding to the interface to be tested.
In accordance with one or more embodiments of the present disclosure, example 10 provides a page testing apparatus, the apparatus comprising:
the acquisition module is used for acquiring a test case corresponding to the target page to be tested, wherein the test case is determined based on the determination method of the page test case in any one of examples 1-6;
the second processing module is used for playing back the test case under a reference environment and a test environment to obtain a first page under the reference environment and a second page under the test environment, wherein the reference environment is an execution environment of a history version corresponding to the test environment;
and the comparison module is used for comparing the pages based on the first page and the second page to obtain a test result corresponding to the target page.
According to one or more embodiments of the present disclosure, example 11 provides a computer-readable medium having stored thereon a computer program which, when executed by a processing device, implements the steps of the method of any of examples 1-8.
Example 12 provides an electronic device according to one or more embodiments of the present disclosure, comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to implement the steps of the method of any one of examples 1-8.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims. The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.

Claims (12)

1. A method for determining page test cases is characterized by comprising the following steps:
determining interface flow data corresponding to an interface to be tested of a target page, wherein the interface flow data is data responding to the target page;
performing interface scene recognition based on the interface flow data to obtain scene test data corresponding to the interface to be tested, wherein the scene test data comprises test data under at least one scene corresponding to the interface to be tested;
and generating a test case corresponding to the target page according to the scene test data corresponding to the interface to be tested.
2. The method according to claim 1, wherein the performing interface scene recognition based on the interface traffic data to obtain scene test data corresponding to the interface to be tested includes:
determining a scene characteristic value corresponding to the interface flow data according to the interface flow data;
and if the scene test data corresponding to the interface to be tested does not contain the test data corresponding to the scene characteristic value, storing the interface flow data and the scene characteristic value in association with the scene test data corresponding to the interface to be tested.
3. The method according to claim 2, wherein determining, according to the interface traffic data, a scene feature value corresponding to the interface traffic data includes:
determining a scene field corresponding to the interface to be tested and a matching type of the scene field;
and determining data corresponding to the scene field from the interface flow data according to the matching type as the scene characteristic value.
4. A method according to claim 3, wherein said determining data corresponding to the scene field from the interface traffic data according to the matching type as the scene feature value comprises:
If the matching type is a leaf node type, taking a path value corresponding to the scene field determined from the interface flow data as the scene characteristic value, wherein the path value of the field comprises a value under a matching path corresponding to the field;
and if the matching type is a non-leaf node type, taking a path value corresponding to each subfield contained in the scene field determined from the interface flow data as the scene characteristic value.
5. The method of claim 1, wherein the generating the test case corresponding to the target page according to the scenario test data corresponding to the interface to be tested includes:
and combining the test data of each interface to be tested in different scenes according to the scene test data corresponding to each interface to be tested in the target page to obtain test cases, wherein each test case comprises each interface to be tested in the target page and the test data of the interface to be tested in any scene.
6. The method according to claim 1, wherein the method further comprises:
under the condition that the test case updating condition is met, determining whether interface flow data corresponding to the scene exists in a target period according to each scene in the scene test data corresponding to the interface to be tested;
If the interface flow data corresponding to the scene exists in the target period, taking the latest interface flow data in the target period as test data corresponding to the scene in the scene test data, and updating the associated test cases of the scene, wherein the associated test cases are test cases containing the test data of the scene;
and if the interface flow data corresponding to the scene does not exist in the target period, deleting the test data corresponding to the scene in the scene test data, and deleting the associated test case of the scene.
7. A method of testing a page, the method comprising:
acquiring a test case corresponding to a target page to be tested, wherein the test case is determined based on the determination method of the page test case in any one of claims 1-6;
the test case is played back under a reference environment and a test environment, and a first page under the reference environment and a second page under the test environment are obtained, wherein the reference environment is an execution environment of a history version corresponding to the test environment;
and carrying out page comparison based on the first page and the second page to obtain a test result corresponding to the target page.
8. The method of claim 7, wherein the playing back the test case in the reference environment and the test environment, obtaining a first page in the reference environment and a second page in the test environment, comprises:
respectively initiating display requests of the target page in the reference environment and the test environment to obtain test response of the target page, wherein response data corresponding to an interface to be tested of the target page in the test response is test data corresponding to the interface to be tested in the test case;
and performing page rendering on the test response under the reference environment to obtain the first page, and performing page rendering on the test response under the test environment to obtain the second page.
9. A device for determining page test cases is characterized in that the device comprises:
the first determining module is used for determining interface flow data corresponding to an interface to be tested of a target page, wherein the interface flow data is data responding to the target page;
the first processing module is used for carrying out interface scene recognition based on the interface flow data to obtain scene test data corresponding to the interface to be tested, wherein the scene test data comprises test data under at least one scene corresponding to the interface to be tested;
And the generating module is used for generating the test case corresponding to the target page according to the scene test data corresponding to the interface to be tested.
10. A page testing apparatus, the apparatus comprising:
the acquisition module is used for acquiring a test case corresponding to a target page to be tested, wherein the test case is determined based on the determination method of the page test case according to any one of claims 1-6;
the second processing module is used for playing back the test case under a reference environment and a test environment to obtain a first page under the reference environment and a second page under the test environment, wherein the reference environment is an execution environment of a history version corresponding to the test environment;
and the comparison module is used for comparing the pages based on the first page and the second page to obtain a test result corresponding to the target page.
11. A computer readable medium on which a computer program is stored, characterized in that the program, when being executed by a processing device, carries out the steps of the method according to any one of claims 1-8.
12. An electronic device, comprising:
a storage device having a computer program stored thereon;
Processing means for executing said computer program in said storage means to carry out the steps of the method according to any one of claims 1-8.
CN202311677036.9A 2023-12-07 2023-12-07 Determination method, test method, device, medium and equipment for page test case Pending CN117667710A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311677036.9A CN117667710A (en) 2023-12-07 2023-12-07 Determination method, test method, device, medium and equipment for page test case

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311677036.9A CN117667710A (en) 2023-12-07 2023-12-07 Determination method, test method, device, medium and equipment for page test case

Publications (1)

Publication Number Publication Date
CN117667710A true CN117667710A (en) 2024-03-08

Family

ID=90067796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311677036.9A Pending CN117667710A (en) 2023-12-07 2023-12-07 Determination method, test method, device, medium and equipment for page test case

Country Status (1)

Country Link
CN (1) CN117667710A (en)

Similar Documents

Publication Publication Date Title
CN110634049B (en) Page display content processing method and device, electronic equipment and readable medium
CN111897740B (en) User interface testing method and device, electronic equipment and computer readable medium
EP3910909A1 (en) Method and device for displaying information
CN111679990B (en) Test data generation method and device, readable medium and electronic equipment
CN110619100B (en) Method and apparatus for acquiring data
CN112597047A (en) Test method, test device, electronic equipment and computer readable medium
CN111596991A (en) Interactive operation execution method and device and electronic equipment
CN112954056B (en) Method and device for processing monitoring data, electronic equipment and storage medium
CN111311358B (en) Information processing method and device and electronic equipment
CN114510305B (en) Model training method and device, storage medium and electronic equipment
CN112083982A (en) Information processing method and device
CN110084298B (en) Method and device for detecting image similarity
CN117667710A (en) Determination method, test method, device, medium and equipment for page test case
CN114116480A (en) Method, device, medium and equipment for determining application program test coverage rate
CN113849416A (en) Test method, test device, storage medium and electronic equipment
CN111222067B (en) Information generation method and device
CN111563797A (en) House source information processing method and device, readable medium and electronic equipment
CN113177174B (en) Feature construction method, content display method and related device
CN114613355B (en) Video processing method and device, readable medium and electronic equipment
CN111367517B (en) Information generation method and device
CN111104626B (en) Information storage method and device
CN111782777B (en) Method and device for generating information
CN110968768B (en) Information generation method and device
CN116820989A (en) Test coverage rate determining method and device, readable medium and electronic equipment
CN117669511A (en) Code coverage rate report display method, information processing method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination