CN116578491A - Dynamic form test method and system based on component packaging and electronic equipment - Google Patents
Dynamic form test method and system based on component packaging and electronic equipment Download PDFInfo
- Publication number
- CN116578491A CN116578491A CN202310584773.8A CN202310584773A CN116578491A CN 116578491 A CN116578491 A CN 116578491A CN 202310584773 A CN202310584773 A CN 202310584773A CN 116578491 A CN116578491 A CN 116578491A
- Authority
- CN
- China
- Prior art keywords
- component
- target component
- target
- implementation class
- attribute
- 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
Links
- 238000010998 test method Methods 0.000 title claims abstract description 24
- 238000004806 packaging method and process Methods 0.000 title claims description 34
- 238000012360 testing method Methods 0.000 claims abstract description 111
- 238000000034 method Methods 0.000 claims abstract description 94
- 238000012795 verification Methods 0.000 claims abstract description 19
- 238000005538 encapsulation Methods 0.000 claims abstract description 9
- 238000007429 general method Methods 0.000 claims abstract description 8
- 238000012545 processing Methods 0.000 claims description 22
- 238000004590 computer program Methods 0.000 claims description 13
- 238000013515 script Methods 0.000 abstract description 8
- 238000010276 construction Methods 0.000 abstract 1
- 230000006870 function Effects 0.000 description 22
- 238000013461 design Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 10
- 238000012423 maintenance Methods 0.000 description 9
- 238000012986 modification Methods 0.000 description 6
- 230000004048 modification Effects 0.000 description 6
- 230000008859 change Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000001052 transient effect Effects 0.000 description 2
- 238000011282 treatment Methods 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000013100 final test Methods 0.000 description 1
- 238000012812 general test Methods 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Human Computer Interaction (AREA)
- Tests Of Electronic Circuits (AREA)
Abstract
The application provides a dynamic form test method, a system and electronic equipment based on component encapsulation, wherein in the method, a basic class and an implementation class are set for components, the basic class comprises a general method for component construction, and the implementation class comprises unique attributes of a target component and a unique dynamic form test method based on the component encapsulation of the target component. Therefore, after the implementation class corresponding to the target component is obtained, the test flow for the target component is adjusted according to the implementation class, and the verification point of the target component constructed in the page is tested according to the adjusted test flow, so that a test result is obtained. Because the basic class and the implementation class are divided for the target component, when one component is added, one test flow is not needed to be added, and the flow directly replaces the implementation class in the original flow, so that the writing amount of test scripts in a low-code platform is reduced.
Description
Technical Field
The present application relates to the field of testing technologies, and in particular, to a dynamic form testing method, system and electronic device based on component packaging.
Background
Currently, more and more software application design is implemented by low code platforms, i.e. large software applications with small amounts of code and visualization of module drag, whose functionality is primarily dependent on how much of the configurable properties of the number of draggable modules.
Of course, to ensure accuracy in application development in a low code platform, a full amount of testing work for each component and each configuration in the low code platform needs to be done. This requires a lot of manpower and can be done by interface automated testing or by software interface design (english: user Interface Design, UI for short).
When the UI automation test is realized, the test architecture can be divided into an object layer, a logic layer, a service layer and a data layer, so that when the change occurs, the new addition or maintenance operation can be performed on the corresponding layer.
Referring to FIG. 1, there is shown a schematic architecture of UI automation testing, where the main function for the object layer is to encapsulate all elements of a page or a system together.
For the logic layer, the function is to use the information of the object layer to package the function on the page, and provide a method for the service layer to use, such as form submitting function, a method is required to be packaged to fill in different types of form information on the page, and finally the submit button is clicked.
For the service layer, the service layer is an automatic use case layer, and describes a test flow of a certain functional point of the service, such as a form submitting functional point, wherein the test flow is logging in, jumping to a form page, filling corresponding form information according to the functional point, clicking a submitting button, testing whether the submitted form is successful, and verifying the data drop point and page condition. Here, if only the page element changes, the flow of the service itself is unchanged, and the service layer does not need maintenance.
For the data layer, the data layer may be configured by a script stored by a file, may be a list in a code, may be called by an interface, and the like.
For a low-code design state page, a single page changes along with different design combinations, the existing technical architecture is suitable for the design of page fixing functions, and the adaptation of the changed page is not suitable or needs to be carried out by a method of packaging a large number of transient states, or needs to be covered by a large number of use case scripts of the same flow and different treatments.
For example, 3 components are tested, each component having 3 generic properties, 1 independent property.
The method mainly realizes the following steps for an object layer: packaging positioning information of 3 components, 3 general attributes and 3 unique attributes;
the method is mainly realized for a logic layer: the drag method (A1, B1, C1) of packaging 3 components, the setting method (G1, G2, G3) of packaging 3 general attributes, the setting method (T1, T2, T3) of packaging 3 unique attributes.
For the service layer, according to the encapsulation of the logic layer, there are 3 cases to write:
case1- -drag component A1- - > sets the attributes G1, G2, G3, T1- - > test the set function verification points;
case2- -drag component B1- - > set up attribute G1, G2, G3, T2- - > test functional verification point after setting up;
case3- -drag component C1- - > set up attribute G1, G2, G3, T3- - > test functional verification point after setting up;
for the current UI automation test implementation, each time there is one more component in the low code platform, one case needs to be added, which leads to an increase in the workload of pre-script writing. In addition, the setting method in the logic layer may occur in another case or cases, and once the setting attribute flow is changed, for example, one setting method G4 is more, all the cases involved need to be changed, which not only results in great modification difficulty, but also is high in maintenance cost.
Disclosure of Invention
The application provides a dynamic form test method based on component packaging, which is used for solving the problem that the writing workload of a pre-script is increased when one more component is needed in a low-code platform and one more case is needed.
In a first aspect, the present application provides a dynamic form testing method based on component packaging, the method comprising:
obtaining an implementation class corresponding to a target component, wherein the implementation class comprises a label attribute of the target component and a unique dynamic form test method of the target component based on component encapsulation;
according to the implementation class, a testing flow aiming at the target component is adjusted, wherein the testing flow comprises a basic class which comprises a general method for testing the component;
and testing the verification point of the target component in the page according to the test flow to obtain a test result.
By the method, the attribute of each component is used as a configurable item, and even if the attribute and the like of the subsequent component are changed, only one test flow needs to be maintained, so that the maintenance is not difficult along with the change of the order of magnitude of UI automation, and the maintenance cost is greatly reduced.
In an alternative embodiment, before obtaining the implementation class corresponding to the target component, the method further includes:
determining a target dragging method in all dragging methods according to the identification of the target component, and packaging the target dragging method;
determining a target attribute setting method corresponding to the target component, and packaging the target attribute setting method;
and setting the encapsulated target component dragging method and the target attribute setting method as the basic class.
In an alternative embodiment, before obtaining the implementation class corresponding to the target component, the method further includes:
determining all tag attributes of the target component and a unique component package-based dynamic form test method, and packaging all unique attributes and the unique component package-based dynamic form test method, wherein the tag attributes are unique attributes of the target component;
all unique attributes of the package and the unique component package-based dynamic form testing method are taken as the implementation class.
In an alternative embodiment, after testing the verification point of the target component in the page to obtain a test result, the method further includes:
when the attribute corresponding to the target component is detected to be added, the implementation class corresponding to the target component is called, and the attribute to be added is added in the implementation class; or alternatively
And when deleting the attribute to be deleted corresponding to the target component, calling the implementation class corresponding to the target component, and deleting the attribute to be deleted in the implementation class.
In a second aspect, the present application provides a test system, the system comprising:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring an implementation class corresponding to a target component, and the implementation class comprises all attributes of the target component and a unique dynamic form test method based on component encapsulation of the target component;
the processing module is used for adjusting a testing flow aiming at the target component according to the implementation class, wherein the testing flow comprises a basic class which comprises a general method for testing the component; and testing the verification point of the target component in the page according to the test flow to obtain a test result.
In an optional embodiment, the processing module is further configured to determine a target dragging method from all the dragging methods according to the identifier of the target component, and encapsulate the target dragging method;
determining a target attribute setting method corresponding to the target component, and packaging the target attribute setting method;
and setting the encapsulated target component dragging method and the target attribute setting method as the basic class.
In an alternative embodiment, the processing module is further configured to determine all unique attributes of the target component and a unique component package-based dynamic form test method, and package all unique attributes and the unique component package-based dynamic form test method;
all unique attributes of the package and the unique component package-based dynamic form testing method are taken as the implementation class.
In an optional embodiment, the processing module is further configured to, when detecting that an attribute to be added is added to an attribute corresponding to the target component, call the implementation class corresponding to the target component, and add the attribute to be added to the implementation class; or alternatively
And when deleting the attribute to be deleted corresponding to the target component, calling the implementation class corresponding to the target component, and deleting the attribute to be deleted in the implementation class.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for realizing the dynamic form testing method based on the component package when executing the computer program stored in the memory.
In a fourth aspect, the present application provides a computer readable storage medium having a computer program stored therein, which when executed by a processor implements the above-described component package based dynamic form testing method steps.
The technical effects of each of the second to fourth aspects and the technical effects that may be achieved by each aspect are referred to above for the technical effects that may be achieved by the first aspect or each possible aspect in the first aspect, and the detailed description is not repeated here.
Drawings
FIG. 1 is a schematic diagram of a UI automation test architecture according to the present application;
FIG. 2 is a flow chart of a dynamic form testing method based on component packaging provided by the application;
FIG. 3 is a second schematic diagram of the UI automation test architecture according to the present application;
FIG. 4 is a schematic diagram of a test system according to the present application;
fig. 5 is a schematic structural diagram of an electronic device according to the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings. The specific method of operation in the method embodiment may also be applied to the device embodiment or the system embodiment. In the description of the present application, "a plurality of" means "at least two". "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. A is connected with B, and can be represented as follows: both cases of direct connection of A and B and connection of A and B through C. In addition, in the description of the present application, the words "first," "second," and the like are used merely for distinguishing between the descriptions and not be construed as indicating or implying a relative importance or order.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
For a low-code design state page, a single page changes along with different design combinations, the existing technical architecture is suitable for the design of page fixing functions, and the adaptation of the changed page is not suitable or needs to be carried out by a method of packaging a large number of transient states, or needs to be covered by a large number of use case scripts of the same flow and different treatments.
For the current UI automation test implementation, each time there is one more component in the low code platform, one case needs to be added, which leads to an increase in the workload of pre-script writing. In addition, the setting method in the logic layer may occur in another case or cases, and once the setting attribute flow is changed, for example, one more setting method, all the cases involved need to be changed, which not only results in great difficulty in modification, but also high maintenance cost.
In order to solve the problems, the application provides a detection method, wherein a basic class and an implementation class are arranged for the components, the basic class comprises a general method for constructing the components, and the implementation class comprises all the attributes of the target components and a unique dynamic form test method based on the package of the target components. That is, the passing methods of all target components are classified into basic classes, and the unique properties of each target component and the unique dynamic form testing method based on the component package are classified into implementation classes.
Therefore, after the implementation class corresponding to the target component is obtained, the test flow for the target component is adjusted according to the implementation class, and the verification point of the target component constructed in the page is tested according to the adjusted test flow, so that a test result is obtained.
Because the basic class and the implementation class are divided for the target component, when one component is added, one test flow is not needed to be added, and the flow directly replaces the implementation class in the original flow, so that the writing amount of test scripts in a low-code platform is reduced.
Referring to fig. 2, a flow chart of a dynamic form testing method based on component packaging provided by the application is shown, and the method comprises the following steps:
s1, obtaining an implementation class corresponding to a target component;
first, in the embodiment of the present application, most of the properties of different components in a page are duplicate properties from the perspective of page design, for example, all components have a title, a suffix, a display state, and so on. The operation of the different components on the title and suffix can be implemented by extracting one method.
Therefore, before a page containing a plurality of target components is constructed, determining a target dragging method corresponding to each target component in all dragging methods according to the identification of all target components, and packaging the target dragging methods.
Further, determining target attribute setting methods corresponding to all target components, packaging the target attribute setting methods, and setting the packaged target component dragging method and the target attribute setting method as basic classes. That is, the basic class includes a target drag method and a target attribute setting method that are common to target components. It should be noted here that the target dragging method of the different components is used to drag the components to the design page.
Further, in the embodiment of the present application, since the attribute of each component may be different, besides setting a basic class, an implementation class corresponding to the component needs to be set, where the implementation class may include component style modification, component function opening, and so on. Specifically, all tag attributes of the target component, which are unique attributes of the target component, namely, differential attributes, and a unique component package-based dynamic form test method are first determined.
Packaging the unique attributes and the unique component packaging-based dynamic form test method, and taking all the unique attributes of the package and the unique component packaging-based dynamic form test method as implementation classes. The implementation class here includes unique attributes corresponding to each target component. It should be noted here that the unique properties of the different components are used to set up different configurations on the design page.
It should be noted that, the basic class and the implementation class of the target component are implemented in the logic layer of the low-code platform, that is, the dragging method and the attribute setting method of the package component in the logic layer, and after the package is completed, the method of the package in the logic layer is used by the service layer.
By the method, the basic class and the implementation class are divided for the target component, the basic class is a general method, and the implementation class is the unique attribute of the component, so that when one component is added, one test flow is not needed, and the basic class and the implementation class are directly called.
S2, according to the implementation class, adjusting a test flow aiming at the target component;
after the implementation class of the target component is obtained, the implementation class contains the unique attribute corresponding to the target component and the unique dynamic form test method based on the component package, so that the original test flow can be adjusted according to the implementation class, for example, the original test flow is as follows:
case-dragging component- > setting attribute- > testing the set function verification point;
according to the test flow, the 'functional verification point after test setting' can be adjusted according to the implementation class, so that the test flow can test the target component. Obviously, the above-mentioned test flow is a general test flow, and the test flows of different target components can be adjusted on the above-mentioned original test flow, so that it is unnecessary to add a test flow again.
For example, the component a encapsulates 10 attributes, the 10 attributes are set on the page in the attribute setting method of the component basic class in the service layer attribute stage, the component a rewrites the logic processing of the verification point, and when the verification point is executed, the component a invokes the dynamic form test method based on the component encapsulation to perform test and verification.
S3, testing verification points of the target components in the page according to the test flow to obtain a test result.
After the adjusted test flow is obtained, testing the verification point of the target component in the page through the test flow to obtain a final test result.
By the method, the attribute of each component is used as a configurable item, and even if the attribute and the like of the subsequent component are changed, only one test flow needs to be maintained, so that the maintenance is not difficult along with the change of the order of magnitude of UI automation, and the maintenance cost is greatly reduced.
Further, in the embodiment of the application, if the attribute corresponding to the target component is detected to be added with the attribute to be added, the base implementation class corresponding to the target component is called, and the attribute to be added is added in the implementation class;
and if deleting the attribute to be deleted corresponding to the target component is detected, calling the implementation class corresponding to the target component, and deleting the attribute to be deleted in the implementation class.
That is, under the condition that the attribute of the target component is changed, the implementation class corresponding to the target component can be directly adjusted, so that the change of the component service itself is only required to maintain the attribute in the implementation class no matter the change on the UI, and the number of use cases is reduced.
In addition, the method can also adjust the number of the use cases from the number of the components and the attribute number to the number of the functions to be tested, thereby greatly reducing the number of the use cases and greatly reducing the maintenance cost.
The method provided by the application is further described below through specific application scenarios.
Referring to fig. 3, the low code platform in fig. 3 includes an object layer, a logic layer, a service layer, and a data layer.
Object layer: packaging the positioning information of the component on the page;
logic layer: page function packaging and component function packaging;
the page function package comprises login, form filling, dragging and the like, and the component function package comprises component style modification, component function opening and the like. A step of
Of course, the logic layer further includes a basic class and an implementation class of the component, where contents included in the basic class and the implementation class are described in detail in the foregoing embodiments, and are not described herein again.
Service layer: generating a test CASE;
data layer: and calling the data driver to finish the test.
Based on the same inventive concept, the embodiment of the present application further provides a test system, referring to fig. 4, the system includes:
an obtaining module 401, configured to obtain an implementation class corresponding to a target component, where the implementation class includes a tag attribute of the target component and a dynamic form test method of the target component that is unique and based on component encapsulation;
a processing module 402, configured to adjust a test flow for the target component according to the implementation class, where the test flow includes a basic class, and the basic class includes a general method for component testing; and testing the verification point of the target component in the page according to the test flow to obtain a test result.
Further, in an alternative embodiment, the processing module 402 is further configured to determine a target dragging method from all the dragging methods according to the identifier of the target component, and encapsulate the target dragging method;
determining a target attribute setting method corresponding to the target component, and packaging the target attribute setting method;
and setting the encapsulated target component dragging method and the target attribute setting method as the basic class.
Further, in an alternative embodiment, the processing module 402 is further configured to determine all tag attributes of the target component and a unique component package-based dynamic form testing method, and package all unique attributes and the unique component package-based dynamic form testing method, where the tag attributes are unique attributes of the target component;
all unique attributes of the package and the unique component package-based dynamic form testing method are taken as the implementation class.
Further, in an optional embodiment, the processing module 402 is further configured to, when detecting that an attribute corresponding to the target component is added to an attribute to be added, call the implementation class corresponding to the target component, and add the attribute to be added to the implementation class; or alternatively
And when deleting the attribute to be deleted corresponding to the target component, calling the implementation class corresponding to the target component, and deleting the attribute to be deleted in the implementation class.
Based on the same inventive concept, the embodiment of the present application further provides an electronic device, where the electronic device may implement the function of the foregoing test system, and referring to fig. 5, the electronic device includes:
the embodiment of the present application is not limited to a specific connection medium between the processor 501 and the memory 502, and the processor 501 and the memory 502 are exemplified in fig. 5 by a connection between the processor 501 and the memory 502 through the bus 500. The connection between the other components of bus 500 is shown in bold lines in fig. 5, and is merely illustrative and not limiting. Bus 500 may be divided into an address bus, a data bus, a control bus, etc., and is represented by only one thick line in fig. 5 for ease of illustration, but does not represent only one bus or one type of bus. Alternatively, the processor 501 may be referred to as a controller, and the names are not limited.
In an embodiment of the present application, the memory 502 stores instructions executable by the at least one processor 501, and the at least one processor 501 may perform a dynamic form testing method based on component packaging as discussed above by executing the instructions stored in the memory 502. Processor 501 may implement the functionality of the various modules in the system shown in fig. 4.
The processor 501 is a control center of the device, and various interfaces and lines can be used to connect various parts of the entire control device, and by executing or executing instructions stored in the memory 502 and invoking data stored in the memory 502, various functions of the device and processing data can be performed to monitor the device as a whole.
In one possible design, processor 501 may include one or more processing units, and processor 501 may integrate an application processor and a modem processor, where the application processor primarily processes operating systems, user interfaces, application programs, and the like, and the modem processor primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 501. In some embodiments, processor 501 and memory 502 may be implemented on the same chip, or they may be implemented separately on separate chips in some embodiments.
The processor 501 may be a general purpose processor such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, and may implement or perform the methods, steps and logic blocks disclosed in embodiments of the present application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the dynamic form testing method based on component packaging disclosed in the embodiment of the application can be directly embodied as the execution completion of a hardware processor or the execution completion of the combination execution of hardware and software modules in the processor.
The memory 502, as a non-volatile computer readable storage medium, may be used to store non-volatile software programs, non-volatile computer executable programs, and modules. The Memory 502 may include at least one type of storage medium, and may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory), magnetic Memory, magnetic disk, optical disk, and the like. Memory 502 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 502 in embodiments of the present application may also be circuitry or any other device capable of performing storage functions for storing program instructions and/or data.
By programming the processor 501, the code corresponding to a dynamic form testing method based on component package described in the foregoing embodiment may be cured into the chip, so that the chip can execute the steps of a dynamic form testing method based on component package in the embodiment shown in fig. 2 at runtime. How to design and program the processor 501 is a technique well known to those skilled in the art, and will not be described in detail herein.
Based on the same inventive concept, the embodiment of the application also provides a storage medium, wherein the storage medium stores computer instructions, and when the computer instructions run on a computer, the computer is caused to execute the dynamic form testing method based on the component packaging.
In some possible embodiments, aspects of a component package-based dynamic form testing method provided by the present application may also be implemented in the form of a program product comprising program code for causing the control apparatus to perform the steps of a component package-based dynamic form testing method according to the various exemplary embodiments of the present application as described herein above when the program product is run on a device.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
Claims (10)
1. A method for testing a dynamic form based on component packaging, the method comprising:
obtaining an implementation class corresponding to a target component, wherein the implementation class comprises a label attribute of the target component and a unique dynamic form test method of the target component based on component encapsulation;
according to the implementation class, a testing flow aiming at the target component is adjusted, wherein the testing flow comprises a basic class which comprises a general method for testing the component;
and testing the verification point of the target component in the page according to the test flow to obtain a test result.
2. The method of claim 1, wherein prior to obtaining the implementation class corresponding to the target component, the method further comprises:
determining a target dragging method in all dragging methods according to the identification of the target component, and packaging the target dragging method;
determining a target attribute setting method corresponding to the target component, and packaging the target attribute setting method;
and setting the encapsulated target component dragging method and the target attribute setting method as the basic class.
3. The method of claim 1, wherein prior to obtaining the implementation class corresponding to the target component, the method further comprises:
determining all tag attributes of the target component and a unique component package-based dynamic form test method, and packaging all unique attributes and the unique component package-based dynamic form test method, wherein the tag attributes are unique attributes of the target component;
all unique attributes of the package and the unique component package-based dynamic form testing method are taken as the implementation class.
4. The method of claim 1, wherein after testing the verification point of the target component in the page to obtain a test result, the method further comprises:
when the attribute corresponding to the target component is detected to be added, the implementation class corresponding to the target component is called, and the attribute to be added is added in the implementation class; or alternatively
And when deleting the attribute to be deleted corresponding to the target component, calling the implementation class corresponding to the target component, and deleting the attribute to be deleted in the implementation class.
5. A test system, the system comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an implementation class corresponding to a target component, and the implementation class comprises a label attribute of the target component and a unique dynamic form test method of the target component based on component encapsulation;
the processing module is used for adjusting a testing flow aiming at the target component according to the implementation class, wherein the testing flow comprises a basic class which comprises a general method for testing the component; and testing the verification point of the target component in the page according to the test flow to obtain a test result.
6. The system of claim 5, wherein the processing module is further configured to determine a target drag method among all drag methods according to the identification of the target component, and encapsulate the target drag method;
determining a target attribute setting method corresponding to the target component, and packaging the target attribute setting method;
and setting the encapsulated target component dragging method and the target attribute setting method as the basic class.
7. The system of claim 5, wherein the processing module is further configured to determine all tag attributes of the target component and a unique component package-based dynamic form test method, and package all unique attributes and the unique component package-based dynamic form test method, wherein the tag attributes are unique attributes of the target component;
all unique attributes of the package and the unique component package-based dynamic form testing method are taken as the implementation class.
8. The system of claim 5, wherein the processing module is further configured to, when adding an attribute to be added to an attribute corresponding to the target component is detected, invoke the implementation class corresponding to the target component, and add the attribute to be added to the implementation class; or alternatively
And when deleting the attribute to be deleted corresponding to the target component, calling the implementation class corresponding to the target component, and deleting the attribute to be deleted in the implementation class.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-4 when executing a computer program stored on said memory.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310584773.8A CN116578491A (en) | 2023-05-23 | 2023-05-23 | Dynamic form test method and system based on component packaging and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310584773.8A CN116578491A (en) | 2023-05-23 | 2023-05-23 | Dynamic form test method and system based on component packaging and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116578491A true CN116578491A (en) | 2023-08-11 |
Family
ID=87545024
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310584773.8A Pending CN116578491A (en) | 2023-05-23 | 2023-05-23 | Dynamic form test method and system based on component packaging and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116578491A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118796714A (en) * | 2024-09-12 | 2024-10-18 | 东风汽车集团股份有限公司 | Android system testing method, device, equipment, medium and product |
-
2023
- 2023-05-23 CN CN202310584773.8A patent/CN116578491A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118796714A (en) * | 2024-09-12 | 2024-10-18 | 东风汽车集团股份有限公司 | Android system testing method, device, equipment, medium and product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100468356C (en) | Test instance inheritance controlled by attributes | |
AU2018310287A1 (en) | Smart contract processing method and apparatus | |
US11954015B2 (en) | Software environment for control engine debug, test, calibration and tuning | |
CN109491763B (en) | System deployment method and device and electronic equipment | |
CN109739700B (en) | Interface testing method and device | |
CN107220066B (en) | Method and device for publishing application software in application store | |
US7340725B1 (en) | Smart test attributes and test case scenario in object oriented programming environment | |
CN110727581B (en) | Crash location method and electronic device | |
CN106843901B (en) | Page rendering and verification method and device | |
CN114818565A (en) | Simulation environment management platform, method, equipment and medium based on python | |
CN116578491A (en) | Dynamic form test method and system based on component packaging and electronic equipment | |
CN117743145A (en) | Test script generation method and device based on coding template and processing equipment | |
CN115729724B (en) | Fault injection method, fault test system, electronic device and readable storage medium | |
CN113296834A (en) | Reverse engineering-based android closed source service type information extraction method | |
CN114416545B (en) | Method, device and electronic device for determining test code coverage | |
CN109992511B (en) | Device and method for obtaining code test coverage rate | |
US20030237032A1 (en) | Method for electronically testing memory modules | |
US7010454B1 (en) | Test services provider | |
US9632912B1 (en) | Method and system for debugging a program | |
CN116150020A (en) | Test case conversion method and device | |
CN115809193A (en) | Front-end reverse abnormal data robustness detection method, device and storage medium | |
CN104572429A (en) | Page testing method and device for collective elements | |
US7082376B1 (en) | State full test method executor | |
CN119862827B (en) | Hardware verification method, device, electronic device and readable storage medium | |
CN112445491B (en) | File sequence processing method, device, terminal 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 |