CN118093405A - Method and device for generating mobile terminal test case, electronic equipment and storage medium - Google Patents

Method and device for generating mobile terminal test case, electronic equipment and storage medium Download PDF

Info

Publication number
CN118093405A
CN118093405A CN202410231141.8A CN202410231141A CN118093405A CN 118093405 A CN118093405 A CN 118093405A CN 202410231141 A CN202410231141 A CN 202410231141A CN 118093405 A CN118093405 A CN 118093405A
Authority
CN
China
Prior art keywords
tested
interface
generating
test case
case
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
CN202410231141.8A
Other languages
Chinese (zh)
Inventor
梁潇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202410231141.8A priority Critical patent/CN118093405A/en
Publication of CN118093405A publication Critical patent/CN118093405A/en
Pending legal-status Critical Current

Links

Landscapes

  • Telephone Function (AREA)

Abstract

The application discloses a method, a device, electronic equipment and a storage medium for generating a mobile terminal test case, wherein the method and the device are applied to the electronic equipment, specifically respond to an interface entry request of a user and enter an interface to be tested; capturing at least one element to be tested on an interface to be tested; taking a base line use case corresponding to the element to be tested from the component library; determining an operation step according to the service logic and the behavior of the base line use case; setting an expected result according to the business logic; and generating a test case according to the operation steps and the expected result. The method comprises the steps of utilizing the attributes and the methods of the components of the component library to establish a baseline case of the components, calling the corresponding baseline case in the component library through all the captured elements of the interface to be tested, and generating the test case according to the expected result of service logic configuration, so that an implementation strategy is provided for multiplexing the test case.

Description

Method and device for generating mobile terminal test case, electronic equipment and storage medium
Technical Field
The present application relates to the field of software development technologies, and in particular, to a method and apparatus for generating a mobile terminal test case, an electronic device, and a storage medium.
Background
The software test is a reliable means for ensuring the quality of the software, is an essential important link in the software development process, and needs to be tested by using a test case in the software test process. The mobile terminal test case refers to the description of a test task for a mobile terminal software product, and a test script and a document for embodying a test scheme, a method, a technology and a strategy, wherein the content of the test script and the document comprises a test target, a test environment, input data, test steps, expected results and the like. The test case mainly comprises four contents, namely a case title, a precondition, a test step and an expected result. At present, test cases are generally designed and written by testers, so that finished products of the test cases are closely related to personal experiences of the testers, the test cases are poor in reusability due to the fact that different testers are different in experience and writing formats, and the reusability of the test cases has extremely important significance for shortening a software development period and reducing software development cost.
Disclosure of Invention
In view of the above, the present application provides a method, an apparatus, an electronic device, and a storage medium for generating a test case at a mobile terminal, which are used for solving the problem of poor reusability of the test case generated by the existing means.
In order to achieve the above object, the following solutions have been proposed:
a generation method of a mobile terminal test case is applied to electronic equipment, and comprises the following steps:
responding to an interface entering request of a user, and entering an interface to be tested;
Capturing at least one element to be tested on the interface to be tested;
taking a baseline use case corresponding to the element to be tested from a component library;
determining an operation step according to business logic and the behavior of the base line use case;
Setting an expected result according to the service logic;
And generating a test case according to the operation step and the expected result.
Optionally, the responding to the interface entry request of the user enters the interface to be tested, including the steps of:
responding to the interface entering request, and determining a package name and an interface name based on a testing tool;
And receiving the implementation package name and the interface name input by the user, and entering the interface to be tested.
Optionally, the capturing at least one element to be tested on the interface to be tested includes the steps of:
Capturing all elements on the interface to be tested;
Determining whether each element is operable;
the element having operability is determined as the element to be tested.
Optionally, the capturing at least one element to be tested on the interface to be tested further includes the steps of:
An element that does not have operability is determined as an inoperable element that is used only for correct display.
Optionally, the step of taking the baseline case corresponding to the element to be tested from the component library includes the steps of:
Defining execution sequences for a plurality of elements to be tested;
and extracting the baseline use cases from the component library according to the execution sequence.
Optionally, the step of determining the operation according to the business logic and the behavior of the baseline case includes the steps of:
selecting at least one behavior of the element to be tested according to the business logic;
determining the operation step according to all the at least one behavior.
A generation device of a mobile terminal test case is applied to electronic equipment, and the generation device comprises:
the interface entering module is configured to respond to an interface entering request of a user and enter an interface to be tested;
an element capturing module configured to capture at least one element to be tested on the interface to be tested;
the use case extraction module is configured to obtain a baseline use case corresponding to the element to be tested from a component library;
a step determining module configured to determine an operation step according to business logic and behavior of the baseline case;
A result setting module configured to set an expected result according to the business logic;
and the case generation module is configured to generate a test case according to the operation steps and the expected result.
Optionally, the use case extraction module includes:
a sequence defining unit configured to define an execution sequence for a plurality of the elements to be tested;
and the extraction execution unit is configured to extract the baseline use cases from the component library according to the execution sequence.
An electronic device comprising at least one processor and a memory coupled to the processor, wherein:
The memory is used for storing a computer program or instructions;
The processor is configured to execute the computer program or the instructions, so that the electronic device implements the method for generating the mobile terminal test case as described above.
A storage medium applied to an electronic device, the storage medium carrying one or more computer programs executable by the electronic device to cause the electronic device to implement a method for generating a mobile terminal test case as described above.
From the above technical solution, the present application discloses a method, an apparatus, an electronic device, and a storage medium for generating a mobile terminal test case, where the method and the apparatus are applied to the electronic device, specifically respond to an interface entry request of a user, and enter an interface to be tested; capturing at least one element to be tested on an interface to be tested; taking a base line use case corresponding to the element to be tested from the component library; determining an operation step according to the service logic and the behavior of the base line use case; setting an expected result according to the business logic; and generating a test case according to the operation steps and the expected result. The method comprises the steps of utilizing the attributes and the methods of the components of the component library to establish a baseline case of the components, calling the corresponding baseline case in the component library through all the captured elements of the interface to be tested, and generating the test case according to the expected result of service logic configuration, so that an implementation strategy is provided for multiplexing the test case.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for generating a mobile terminal test case according to an embodiment of the present application;
FIG. 2 is a block diagram of a generating device of a mobile terminal test case according to an embodiment of the present application;
FIG. 3 is a block diagram of another device for generating a mobile terminal test case according to an embodiment of the present application;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The existing test case design is manually written by a tester according to a product requirement document, and for testing a mobile terminal, service logic (functional interaction) of a single functional module and a function of the mobile terminal is concerned, for example: the place related to input and output needs to consider equivalence class, boundary value, abnormality or illegal, test UI, ensure that design is consistent with UI, and the like, and for the function with complex logic, complex and complicated test cases are required, the workload of test design is large, the reusability is poor, and the following implementation scheme is specially proposed.
FIG. 1 is a flowchart of a method for generating a mobile terminal test case according to an embodiment of the present application.
As shown in fig. 1, the generating method provided in the present embodiment is applied to an electronic device, which is used for generating a mobile terminal test case based on a component library, and the electronic device includes, but is not limited to, a computer, a server or a cloud platform with data computing capability and information processing capability. The generating method comprises the following steps:
s1, entering an interface to be tested according to an interface entering request.
The interface to be tested is entered according to an interface entry request input by a user, namely a mobile terminal test interface to be tested. The method specifically comprises the following steps:
Firstly, responding to an interface entering request of a user, determining a package name and an interface name based on a testing tool, wherein the testing tool can be an adb tool, the package name refers to the name of a code package for realizing the mobile terminal testing interface, and the interface name refers to the name of an interface selected for testing from a plurality of interfaces included in the code package.
And then, after the user inputs the corresponding package name and the interface name, jumping to the interface to be tested to which the interface name points. The mobile terminal in the application refers to application software developed for the business of connecting mobile equipment such as mobile phones, tablet computers and the like to the Internet, and is also an important development project in the wireless Internet industry.
S2, capturing elements to be tested on the interface to be tested.
I.e. at least one element to be tested on the interface to be tested by a corresponding tool, such as appium tool. Generally, there are multiple elements on the interface to be tested, where the multiple elements include an operable element and an inoperable element, where the operable element is capable of receiving an input instruction or text of a user during actual operation, and the inoperable element is an element that the user cannot change its structure and appearance through the operation instruction. Based on the times, the application adopts the following steps to obtain the element to be tested.
First, all elements on the interface to be tested are captured, the elements generally including operable elements and inoperable elements, the operable elements being elements that can perform a certain operation, and the inoperable elements being elements that are used only to complete a certain display, i.e., they complete a correct display to realize their functions.
Then, after capturing all the elements, determining whether each element has operability, wherein the element with operability is the above-mentioned operable element, and the element without operability is the non-operable element.
Finally, an operable element, that is, an element having operability is determined as the element to be tested.
S3, taking a base line use case corresponding to the element to be tested from the component library.
The component library can be a component library used for developing a mobile terminal program, or can be a separate component library, and one or more elements to be tested, namely operable elements with operability, are determined. The specific method comprises the following steps:
firstly, if the number of the elements to be tested is a plurality, defining an execution sequence for the plurality of the elements to be tested according to the corresponding operation logic.
And then, extracting the base line use cases corresponding to the corresponding elements to be tested from the component library according to the execution sequence. The baseline case is a generic, reusable test case corresponding to a certain element.
S4, determining operation steps according to service logic and the behaviors of the base line use case.
In view of at least one behavior of the baseline case, there are generally a plurality of behaviors, and in order to implement the business logic of the interface to be tested in the present application, the following steps are used to determine the operation steps:
Firstly, one or more behaviors of an element to be tested are selected according to business logic.
Then, determining an operation step according to the behavior of the selected base line use case.
S5, setting an expected result according to the service logic.
The setting operation may be implemented by a manual input manner or a call manner based on the user through the interface. The expected result refers to the function realized by the interface to be tested or the result obtained by the corresponding function.
S6, generating a test case according to the operation steps and the expected result.
After determining the operation steps and the expected results, the generation of the test case may be achieved by integrating and constraining the above-mentioned base line case, where constraining refers to adding a definition of the function of the base line case.
From the above technical solution, it can be seen that this embodiment provides a method for generating a mobile terminal test case, where the method is applied to an electronic device, specifically, responds to an interface entry request of a user, and enters an interface to be tested; capturing at least one element to be tested on an interface to be tested; taking a base line use case corresponding to the element to be tested from the component library; determining an operation step according to the service logic and the behavior of the base line use case; setting an expected result according to the business logic; and generating a test case according to the operation steps and the expected result. The method comprises the steps of utilizing the attributes and the methods of the components of the component library to establish a baseline case of the components, calling the corresponding baseline case in the component library through all the captured elements of the interface to be tested, and generating the test case according to the expected result of service logic configuration, so that an implementation strategy is provided for multiplexing the test case.
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.
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.
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.
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-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 remote computers, the remote computer may be connected to the user 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.
Fig. 2 is a block diagram of a generating device for a mobile terminal test case according to an embodiment of the present application.
As shown in fig. 2, the generating device provided in this embodiment is applied to an electronic device, which is used for generating a mobile terminal test case based on a component library, and the electronic device includes, but is not limited to, a computer, a server or a cloud platform with data computing capability and information processing capability. The generating means includes an interface entry module 10, an element capturing module 20, a use case extraction module 30, a step determination module 40, a result setting module 50, and a use case generating module 60.
The interface entering module is used for entering the interface to be tested according to the interface entering request.
The interface to be tested is entered according to an interface entry request input by a user, namely a mobile terminal test interface to be tested. The method specifically comprises the following steps:
Firstly, responding to an interface entering request of a user, determining a package name and an interface name based on a testing tool, wherein the testing tool can be an adb tool, the package name refers to the name of a code package for realizing the mobile terminal testing interface, and the interface name refers to the name of an interface selected for testing from a plurality of interfaces included in the code package.
And then, after the user inputs the corresponding package name and the interface name, jumping to the interface to be tested to which the interface name points. The mobile terminal in the application refers to application software developed for the business of connecting mobile equipment such as mobile phones, tablet computers and the like to the Internet, and is also an important development project in the wireless Internet industry.
The element capturing module is used for capturing an element to be tested on the interface to be tested.
I.e. at least one element to be tested on the interface to be tested by a corresponding tool, such as appium tool. Generally, there are multiple elements on the interface to be tested, where the multiple elements include an operable element and an inoperable element, where the operable element is capable of receiving an input instruction or text of a user during actual operation, and the inoperable element is an element that the user cannot change its structure and appearance through the operation instruction. Based on the times, the application adopts the following steps to obtain the element to be tested.
First, all elements on the interface to be tested are captured, the elements generally including operable elements and inoperable elements, the operable elements being elements that can perform a certain operation, and the inoperable elements being elements that are used only to complete a certain display, i.e., they complete a correct display to realize their functions.
Then, after capturing all the elements, determining whether each element has operability, wherein the element with operability is the above-mentioned operable element, and the element without operability is the non-operable element.
Finally, an operable element, that is, an element having operability is determined as the element to be tested.
The use case extraction module is used for taking a base line use case corresponding to the element to be tested from the component library.
The component library can be a component library used for developing a mobile terminal program, or can be a separate component library, and one or more elements to be tested, namely operable elements with operability, are determined. The module comprises a sequence definition unit 31 and an extraction execution unit 32, as shown in fig. 3.
The sequence definition unit is used for defining execution sequence for the plurality of elements to be tested according to the corresponding operation logic if the elements to be tested are a plurality of elements.
The extraction execution unit is used for extracting the base line use cases corresponding to the corresponding elements to be tested from the component library according to the execution sequence. The baseline case is a generic, reusable test case corresponding to a certain element.
The step determining module is used for determining an operation step according to the business logic and the behavior of the base line use case.
In view of at least one behavior of the baseline case, there are generally a plurality of behaviors, and in order to implement the business logic of the interface to be tested in the present application, the following steps are used to determine the operation steps:
Firstly, one or more behaviors of an element to be tested are selected according to business logic.
Then, determining an operation step according to the behavior of the selected base line use case.
The result setting module is used for setting expected results according to the business logic.
The setting operation may be implemented by a manual input manner or a call manner based on the user through the interface. The expected result refers to the function realized by the interface to be tested or the result obtained by the corresponding function.
The case generation module is used for generating a test case according to the operation steps and the expected result.
After determining the operation steps and the expected results, the generation of the test case may be achieved by integrating and constraining the above-mentioned base line case, where constraining refers to adding a definition of the function of the base line case.
From the above technical solution, it can be seen that this embodiment provides a device for generating a test case at a mobile terminal, where the device is applied to an electronic device, specifically, responds to an interface entry request of a user, and enters an interface to be tested; capturing at least one element to be tested on an interface to be tested; taking a base line use case corresponding to the element to be tested from the component library; determining an operation step according to the service logic and the behavior of the base line use case; setting an expected result according to the business logic; and generating a test case according to the operation steps and the expected result. The method comprises the steps of utilizing the attributes and the methods of the components of the component library to establish a baseline case of the components, calling the corresponding baseline case in the component library through all the captured elements of the interface to be tested, and generating the test case according to the expected result of service logic configuration, so that an implementation strategy is provided for multiplexing the test case.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
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.
Fig. 4 is a block diagram of an electronic device according to an embodiment of the present application.
Referring now to fig. 4, a schematic diagram of an electronic device 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 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
The electronic device may include a processing means (e.g., a central processor, a graphics processor, etc.) 401, which may perform various appropriate actions and processes in accordance with programs stored in a read-only memory ROM402 or loaded from an input means 406 into a random access memory RAM 403. In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM, and RAM are connected to each other by bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
In general, the following devices may be connected to the I/O interface: input devices including, for example, touch screens, touch pads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, magnetic tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While an electronic device having various means is shown in the figures, 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.
The application also provides a computer-readable storage medium embodiment.
The computer readable storage medium is applied to the electronic equipment and carries one or more computer programs, and when the one or more computer programs are executed by the electronic equipment, the electronic equipment responds to an interface entering request of a user and enters an interface to be tested; capturing at least one element to be tested on an interface to be tested; taking a base line use case corresponding to the element to be tested from the component library; determining an operation step according to the service logic and the behavior of the base line use case; setting an expected result according to the business logic; and generating a test case according to the operation steps and the expected result. The method comprises the steps of utilizing the attributes and the methods of the components of the component library to establish a baseline case of the components, calling the corresponding baseline case in the component library through all the captured elements of the interface to be tested, and generating the test case according to the expected result of service logic configuration, so that an implementation strategy is provided for multiplexing the test case.
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 this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or terminal device that comprises the element.
The foregoing has outlined rather broadly the more detailed description of the invention in order that the detailed description of the invention that follows may be better understood, and in order that the present principles and embodiments may be better understood; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. The method for generating the test case of the mobile terminal is applied to the electronic equipment and is characterized by comprising the following steps:
responding to an interface entering request of a user, and entering an interface to be tested;
Capturing at least one element to be tested on the interface to be tested;
taking a baseline use case corresponding to the element to be tested from a component library;
determining an operation step according to business logic and the behavior of the base line use case;
Setting an expected result according to the service logic;
And generating a test case according to the operation step and the expected result.
2. The generating method according to claim 1, wherein the entering the interface to be tested in response to the interface entering request of the user includes the steps of:
responding to the interface entering request, and determining a package name and an interface name based on a testing tool;
And receiving the implementation package name and the interface name input by the user, and entering the interface to be tested.
3. The method of generating as claimed in claim 1, wherein said capturing at least one element to be tested on said interface to be tested comprises the steps of:
Capturing all elements on the interface to be tested;
Determining whether each element is operable;
the element having operability is determined as the element to be tested.
4. A method of generating as claimed in claim 3, wherein said capturing at least one element to be tested on said interface to be tested further comprises the steps of:
An element that does not have operability is determined as an inoperable element that is used only for correct display.
5. The generating method according to claim 1, wherein the step of taking a base line use case corresponding to the element to be tested from a component library includes the steps of:
Defining execution sequences for a plurality of elements to be tested;
and extracting the baseline use cases from the component library according to the execution sequence.
6. The generating method as claimed in claim 1, wherein said operation step of determining based on business logic and behavior of said base line use case comprises the steps of:
selecting at least one behavior of the element to be tested according to the business logic;
determining the operation step according to all the at least one behavior.
7. The utility model provides a generating device of mobile terminal test case, is applied to electronic equipment, its characterized in that, generating device includes:
the interface entering module is configured to respond to an interface entering request of a user and enter an interface to be tested;
an element capturing module configured to capture at least one element to be tested on the interface to be tested;
the use case extraction module is configured to obtain a baseline use case corresponding to the element to be tested from a component library;
a step determining module configured to determine an operation step according to business logic and behavior of the baseline case;
A result setting module configured to set an expected result according to the business logic;
and the case generation module is configured to generate a test case according to the operation steps and the expected result.
8. The generation apparatus of claim 7, wherein the use case extraction module comprises:
a sequence defining unit configured to define an execution sequence for a plurality of the elements to be tested;
and the extraction execution unit is configured to extract the baseline use cases from the component library according to the execution sequence.
9. An electronic device comprising at least one processor and a memory coupled to the processor, wherein:
The memory is used for storing a computer program or instructions;
The processor is configured to execute the computer program or instructions to cause the electronic device to implement the method for generating a mobile terminal test case according to any one of claims 1 to 6.
10. A storage medium applied to an electronic device, wherein the storage medium carries one or more computer programs, and the one or more computer programs are capable of being executed by the electronic device, so as to enable the electronic device to implement the method for generating a mobile terminal test case according to any one of claims 1 to 6.
CN202410231141.8A 2024-02-29 2024-02-29 Method and device for generating mobile terminal test case, electronic equipment and storage medium Pending CN118093405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410231141.8A CN118093405A (en) 2024-02-29 2024-02-29 Method and device for generating mobile terminal test case, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410231141.8A CN118093405A (en) 2024-02-29 2024-02-29 Method and device for generating mobile terminal test case, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118093405A true CN118093405A (en) 2024-05-28

Family

ID=91143606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410231141.8A Pending CN118093405A (en) 2024-02-29 2024-02-29 Method and device for generating mobile terminal test case, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118093405A (en)

Similar Documents

Publication Publication Date Title
CN111897740B (en) User interface testing method and device, electronic equipment and computer readable medium
CN111813641B (en) Method, device, medium and equipment for collecting crash information
CN113835992B (en) Memory leakage processing method and device, electronic equipment and computer storage medium
CN110727566B (en) Method, device, medium and electronic equipment for acquiring process crash information
CN109376419B (en) Data model generation method and device, electronic equipment and readable medium
CN112395188B (en) Test-oriented software project development method and device, electronic equipment and storage medium
CN113742153A (en) Equipment testing method and device, readable medium and electronic equipment
CN111857720B (en) User interface state information generation method and device, electronic equipment and medium
CN111459822B (en) Method, device, equipment and readable medium for extracting system component data
CN112363885B (en) Method, device, electronic equipment and computer readable medium for detecting application abnormality
CN116225886A (en) Test case generation method, device, equipment, storage medium and program product
CN113391860B (en) Service request processing method and device, electronic equipment and computer storage medium
CN109408387B (en) Page testing method and device
CN112422648B (en) Data synchronization method and system
CN118093405A (en) Method and device for generating mobile terminal test case, electronic equipment and storage medium
CN111984496B (en) Method, device, medium and electronic equipment for monitoring stack memory leakage
CN112487416A (en) Business process verification method and device and electronic equipment
CN116561015B (en) Map application testing method, electronic device and computer readable medium
CN111367555B (en) Assertion method, assertion device, electronic equipment and computer readable medium
CN115640204A (en) Page compatibility testing method and device, electronic equipment and storage medium
CN112905167B (en) Application operation method and device and electronic equipment
CN113835995B (en) Method and device for generating test cases
CN115481007A (en) Test method, test device, storage medium and electronic equipment
CN116775001A (en) Method, device, electronic equipment and storage medium for processing application program
CN114461416A (en) Automatic test optimization method and device, electronic equipment and readable 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