CN115481007A - Test method, test device, storage medium and electronic equipment - Google Patents

Test method, test device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115481007A
CN115481007A CN202110601576.3A CN202110601576A CN115481007A CN 115481007 A CN115481007 A CN 115481007A CN 202110601576 A CN202110601576 A CN 202110601576A CN 115481007 A CN115481007 A CN 115481007A
Authority
CN
China
Prior art keywords
execution
case
test
parameters
use 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
CN202110601576.3A
Other languages
Chinese (zh)
Inventor
王鹏程
倪亚玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202110601576.3A priority Critical patent/CN115481007A/en
Publication of CN115481007A publication Critical patent/CN115481007A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Landscapes

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

Abstract

The disclosure relates to a testing method, a testing device, a storage medium and electronic equipment, which are used for flexibly switching an execution platform of a quality evaluation case and simplifying the compiling of the quality evaluation case. The test method comprises the following steps: acquiring test configuration parameters which comprise use case execution parameters and use case identification parameters; calling a corresponding test case from a local software development kit according to the case identification parameter; in the execution process of the test case, a target execution interface corresponding to the test case is called in a plurality of case execution interfaces preset in the local software development kit, and the test case is executed by calling a corresponding execution platform through the target execution interface based on the case execution parameters.

Description

Test method, test device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of test technologies, and in particular, to a test method, an apparatus, a storage medium, and an electronic device.
Background
The quality evaluation refers to a process of performing quantitative measurement on performance indexes such as loading duration, hardware resource consumption and the like of a program product. In the related art, quality evaluation generally includes two ways, one way is to execute test cases based on local devices. However, the program product to be tested may involve multiple service lines, and requires cooperative testing by different teams, and the local device environments among different teams are difficult to unify, and the testing efficiency and the testing scale are limited. The other mode is that a test case is executed based on a remote test platform, and the dependence on the test platform is too strong, so that the local debugging of the case is inconvenient.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a method of testing, the method comprising:
acquiring test configuration parameters, wherein the test configuration parameters comprise use case execution parameters and use case identification parameters, the use case execution parameters are used for representing execution platform information of quality test cases, and the use case identification parameters are used for representing quality test cases to be executed;
calling a corresponding test case from a local software development kit according to the case identification parameter;
in the execution process of the test case, a target execution interface corresponding to the test case is called in a plurality of case execution interfaces preset in the local software development kit, and the test case is executed by calling a corresponding execution platform through the target execution interface based on the case execution parameters.
In a second aspect, the present disclosure provides a test apparatus, the apparatus comprising:
the system comprises an acquisition module, a quality test module and a quality test module, wherein the acquisition module is used for acquiring test configuration parameters, the test configuration parameters comprise use case execution parameters and use case identification parameters, the use case execution parameters are used for representing an execution platform of a quality test case, and the use case identification parameters are used for representing the quality test case to be executed;
the first calling module is used for calling a corresponding test case from a local software development kit according to the case identification parameter;
and the second calling module is used for calling a target execution interface corresponding to the test case from a plurality of case execution interfaces preset in the local software development kit in the execution process of the test case, and calling a corresponding execution platform to execute the test case through the target execution interface based on the case execution parameters.
In a third aspect, the present disclosure provides a computer readable medium having stored thereon a computer program which, when executed by a processing apparatus, performs the steps of the method of the first aspect.
In a fourth aspect, the present disclosure provides an electronic device comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to implement the steps of the method in the first aspect.
Through the technical scheme, a plurality of case execution interfaces can be preset in the local software development kit, and the target execution interface corresponding to the test case is called, so that the corresponding execution platform is called through the target execution interface to execute the test case. Therefore, the execution process of the test case can be extracted, and the test case and the execution platform can be decoupled by calling in a servitization mode. In the quality evaluation process, the execution platform of the test case can be flexibly switched by introducing corresponding configuration parameters, so that the convenience of local debugging can be ensured, the requirement of large-scale parallel test can be met, and the normal performance of quality evaluation can be ensured when a single execution platform goes wrong.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale. In the drawings:
FIG. 1 is a flow chart illustrating a quality assessment method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a diagram illustrating a process of executing a quality test case in the related art;
FIG. 3 is a diagram illustrating a process of executing a test case in a testing method according to an exemplary embodiment of the present disclosure;
FIG. 4 is a diagram illustrating a process of executing a test case in a test method according to another exemplary embodiment of the present disclosure;
FIG. 5 is a block diagram illustrating a test apparatus according to an exemplary embodiment of the present disclosure;
fig. 6 is a block diagram illustrating an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units. It is further noted that references to "a" or "an" in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will appreciate that references to "one or more" are intended to be exemplary and not limiting unless the context clearly indicates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The quality evaluation refers to a process of performing quantitative measurement on performance indexes such as loading duration of a program product, consumption condition of hardware resources and the like. Quality evaluation is an important means for monitoring the quality of program products and realizing transverse comparison among the program products. In the related art, quality evaluation generally includes two modes.
One way is to execute the test cases based on the local device, i.e. write the test cases locally, and then execute the test cases on the local device, and under the condition that the number of the test cases is large, the requirement of parallel testing cannot be met. For example, for a CPU parameter obtaining method, ADB commands need to be called, or Http services need to be called, and the method has two modes of local calling and remote calling, respectively, and case writing is complex. The CPU is only one of many test indexes, and in practical situations, many information such as a refresh rate, a GPU, a memory, and the like are often required. If each is done locally for multiple implementations, the test case writing can be very costly. Moreover, the program product to be tested may involve multiple service lines, and different teams are required to write use cases in the same local project, so that writing and modifying of the use cases are very complex. If each team develops independently, many identical scenes or functions are rewritten, and indexes among teams are difficult to align, so that the test efficiency and the test scale are influenced.
Another way is to execute test cases based on a remote test platform, such as accessing a large-scale remote machine cluster. Although the parallel efficiency of the test cases can be effectively improved, the execution tasks of all the test cases are required to be completed by the test platform, the dependence on the test platform is too strong, and the local debugging of the test cases is inconvenient.
Therefore, the mode based on the local equipment or the remote test platform cannot meet the requirements of test scale, test efficiency and debugging convenience at the same time. In addition, in the two modes, once the execution platform of the test case is determined, the test case needs to be modified to realize the switching of the execution platform, the operation is complicated, and errors are easy to occur in the modification process, so that the accuracy and the efficiency of quality evaluation are influenced.
In view of the above, the present disclosure provides a new testing method, which is to take out the execution of the test case, call the test case in a service mode, decouple the test case from the execution platform, and flexibly switch the execution platform of the test case by introducing corresponding configuration parameters in the quality testing process, so as to not only ensure the convenience of local debugging, but also meet the requirement of large-scale parallel testing, and ensure the normal performance of quality evaluation when a single execution platform has a problem.
FIG. 1 is a flow chart illustrating a testing method according to an exemplary embodiment of the present disclosure. Referring to fig. 1, the test method includes the steps of:
step 101, obtaining test configuration parameters, where the test configuration parameters include use case execution parameters and use case identification parameters. The case execution parameters are used for representing the execution platform information of the quality test case, and the case identification parameters are used for representing the quality test case to be executed.
And 102, calling a corresponding test case from the local software development kit according to the case identification parameter.
103, in the execution process of the test case, calling a target execution interface corresponding to the test case from a plurality of case execution interfaces preset in the local software development kit, and calling a corresponding execution platform to execute the test case through the target execution interface based on the case execution parameters.
In a possible manner, a plurality of use case execution interfaces preset in the local software development kit may be packaged as a use case execution layer, and accordingly, invoking a target execution interface corresponding to the test case in the plurality of use case execution interfaces preset in the local software development kit may be: and calling the use case execution layer, and calling a target execution interface corresponding to the test case from a plurality of use case execution interfaces packaged by the use case execution layer.
As described above, referring to fig. 2, in the CPU data collection process of the test cases, in the related art, it is necessary to write corresponding test cases one by one for the execution platform, for example, remote rack execution needs to write a case for separately writing a call rack interface, local execution needs to write a case for separately calling a local ADB database, and private node execution needs to write a case for separately connecting private nodes, so that flexible switching of the execution platform cannot be realized. Referring to fig. 3, according to the present disclosure, an independent use case execution layer may be set in a local SDK (Software Development Kit), so that an execution platform of a test use case may be flexibly switched by calling the use case execution layer, convenience of local debugging may be ensured, a requirement of large-scale parallel testing may be met, and normal performance of quality evaluation may be ensured when a single execution platform has a problem.
In order to facilitate those skilled in the art to understand the testing method provided in the present disclosure, the following takes a quality testing scenario as an example to illustrate the above steps in detail.
For example, the test configuration parameters may be configured by the user on the front-end page of the test platform, for example, the test platform may obtain the test configuration parameters input by the user in response to the test configuration operation (e.g., parameter input operation, etc.) of the user. In a possible manner, the test configuration parameters may include use case execution parameters, which are used to characterize execution platform information of the quality test use case, that is, an execution platform for executing the quality test use case may be specified by the use case execution parameters. In addition, the test configuration parameters may further include a case identification parameter for characterizing the quality test case to be executed, that is, the quality test case to be executed may be specified by the case identification parameter, so that quality evaluation is achieved by executing the quality test case.
After the test configuration parameters are obtained, the corresponding quality test case can be called according to the case identification parameters. In the embodiment of the disclosure, the quality test case can be preset in the local SDK, so that the purpose of calling the corresponding quality test case can be achieved by calling the corresponding local SDK. It should be appreciated that quality assessments generally target multiple program products in order to compare performance indicators of the multiple program products. In this case, quality parameter use cases corresponding to a plurality of program products may be preset in the local SDK, and a use case identification parameter may be set as identification information of the target program, such as a program ID, so that a quality test use case corresponding to the target program to be tested may be called according to the use case identification parameter.
In a possible manner, the local software development kit is further preset with a plurality of test cases, and the plurality of test cases are packaged as a test case layer, and accordingly, the corresponding test case is called from the local software development kit according to the case identification parameter, which may be: and calling the test case layer, and calling the corresponding test case from the plurality of test cases packaged by the test case layer according to the case identification parameters.
In the quality test scenario, quality test cases in multiple scenarios can be analyzed, quality test cases with a general test function are determined, and then the quality test cases with the general test function are preset in a local software development kit and packaged into a test case layer. For example, the basic test functions of CPU occupation, video playing times per second, video head-to-tail frame analysis, and the like can be respectively preset in the local software development kit as general quality test cases. Therefore, the test cases with general functions can be packaged into an independent case execution layer, the general test capability and the case execution capability of quality evaluation are separated, functional decoupling in the quality evaluation process is further realized, and the function debugging in the quality evaluation process is facilitated. And because the universal test functions are packaged, after the corresponding case identification parameters are transmitted, the corresponding test cases can be executed, and a user only needs to pay attention to the test scene without paying attention to the specific implementation of the cases, so that the case compiling standards among different test teams can be unified, and the compiling and modifying of the test cases can be simplified.
Further, in a possible manner, the use case identification parameters may further include a use case call parameter and a use case combination parameter, and correspondingly, calling a corresponding test case from a plurality of test cases encapsulated in the test case layer according to the use case identification parameters may be: at least two target test cases are called from a plurality of test cases packaged in a test case layer according to case calling parameters, and then the at least two target test cases are combined according to case combination parameters to obtain corresponding test cases.
It should be understood that a plurality of test cases with universal basic capability are preset in the test case layer, and in practical applications, one test case with universal basic capability may be called to implement the test requirement. In more scenarios, multiple quality test cases may need to be called, and the multiple quality test cases need to be executed according to a specific sequence, that is, the multiple quality test cases need to be combined according to the specific sequence, so as to obtain a final quality test case to be executed.
Therefore, the embodiment of the present disclosure provides a use case calling parameter and a use case combining parameter. The method comprises the following steps of calling a plurality of quality test cases by using a case calling parameter, and calling a plurality of quality test cases by using a case combination parameter. In specific implementation, at least two target test cases can be called in a plurality of test cases packaged in a test case layer according to case calling parameters, and then the at least two target test cases are combined according to corresponding execution sequences according to case combination parameters to obtain corresponding test cases. Therefore, if a single universal basic quality test case cannot meet the test requirement, a complex quality test case can be obtained by combining all the universal basic quality test cases without rewriting the complex quality test case, and the writing of the quality test case is simplified. Moreover, the quality test case can be customized to better adapt to the quality evaluation requirements under different scenes.
In order to implement the decoupling of the test cases and the case execution, a plurality of case execution interfaces are preset in the local SDK, and the plurality of case execution interfaces can be packaged into independent case execution layers, that is, the case execution layers can be used for calling corresponding execution platform execution quality test cases in a plurality of execution platforms. Therefore, the parameters for representing the information of the execution platform are transmitted to the use case execution layer, so that the flexible switching of the execution platform can be realized.
It should be appreciated that to accommodate different test scenarios, the quality test cases include different types of cases corresponding to the scenarios. Accordingly, the execution interface of the test case may also include a plurality of interfaces of different types. In the embodiment of the present disclosure, the use case execution layer may include a plurality of use case execution interfaces of different types, and the plurality of use case execution interfaces may be packaged as a unified external interface of the use case execution layer. Therefore, a user cannot perceive the difference of the quality test cases executed by different execution platforms, the content of case execution in the test cases does not need to be modified when the execution platforms are switched, the flexible switching of the execution platforms can be realized by introducing corresponding case execution parameters, and the quality evaluation efficiency is improved.
In a possible manner, the preset multiple use case execution interfaces may include at least one of the following interfaces: the interface is used for acquiring memory data, the interface is used for acquiring key frame data, the interface is used for acquiring screen display content, the interface is used for acquiring central processing unit data, and the interface is used for acquiring graphics processing unit data.
Illustratively, the quality test case is a data acquisition case, and the case execution interface is used for performing corresponding data acquisition operations. Therefore, the interfaces for acquiring different types of data can be arranged on the use case execution layer, so that the different types of data can be acquired conveniently for performance analysis, and a quality evaluation result can be obtained. For example, at least two kinds of use case execution interfaces mentioned above may be provided in the use case execution layer. Alternatively, all the above-mentioned use case execution interfaces may be provided in the use case execution layer. Or, according to the actual test requirement, more possible use case execution interfaces may be set in the use case execution layer, for example, other use case execution interfaces related to quality evaluation indexes such as device state data acquisition, scene head and tail frame acquisition, video playing frame rate acquisition, disk space occupation change, and the like are set, and the embodiment of the present disclosure does not limit this.
It should be understood that quality test cases have different types, and therefore, in a case where the use case execution layer includes a plurality of use case execution interfaces, after the use case execution layer is called, a target use case execution interface of a corresponding type may be determined in the use case execution layer, and then the corresponding execution platform is called to execute the test case based on the use case execution parameters through the target execution interface, that is, the use case execution parameters are transmitted to the target use case execution interface, so that the corresponding execution platform is called to execute the quality test case through the target use case execution interface.
Therefore, the quality test case can be executed by calling the corresponding target execution platform through the case execution interface adaptive to the type of the quality test case, and the accuracy of quality evaluation is ensured. Moreover, by further decoupling the function of case execution in the case execution layer, the writing and maintenance of the content related to case execution in the test case can be simplified, thereby improving the quality evaluation efficiency.
In a possible manner, the use case execution parameters may include an execution environment parameter and a device identification parameter, and accordingly, the corresponding execution platform is called to execute the test case based on the use case execution parameters, which may be: and determining the type of the execution platform of the test case based on the execution environment parameters, and calling the corresponding execution platform to execute the test case in the multiple execution platforms corresponding to the type according to the equipment identification parameters.
For example, the execution environment parameters may be used to characterize the type of execution platform for the qualification test case. In a possible manner, the use case execution layer may be configured to call a corresponding execution platform to execute the quality test case in the following execution platforms: the system comprises local equipment, a private node, a remote server and a cloud data service platform.
The local device is any electronic device used for executing the quality test case locally, the private node can be a node which is user-defined in the distributed network and used for executing the quality test case, the remote server can be a cloud server or an entity server used for executing the quality test case remotely, the cloud data service can include an intelligent framing service and the like, and the cloud service provides a data acquisition function.
That is, in a possible approach, the execution environment parameter may be a type parameter used to characterize at least one of the local device, the private node, the remote server, and the cloud data service platform. For example, the execution environment parameter corresponding to the local device may be "native" or the like, and when the present disclosure is specifically implemented, the corresponding relationship between the execution environment parameter and the execution platform type may be defined according to an actual situation, which is not limited in this embodiment of the present disclosure.
It should be understood that, in general, a plurality of specific execution platforms may be further included in the same execution platform type, and therefore, in order to accurately invoke a target execution platform, the embodiment of the present disclosure further provides a device identification parameter for characterizing the target execution platform of the quality test case.
In this case, the target case execution interface may be called according to the execution environment parameter and the device identification parameter, so that the target case execution interface determines the type of the execution platform of the quality test case according to the execution environment parameter, and then calls the target execution platform to execute the quality test case in a plurality of execution platforms corresponding to the type according to the device identification parameter. Therefore, the flexible switching of the execution platform can be better realized under the condition of the execution platform, and the accuracy of calling the execution platform is ensured, so that the accuracy of quality evaluation is ensured.
The following describes a test method provided by the present disclosure with a quality test scenario as an example by another exemplary embodiment.
Referring to fig. 4, a user may perform parameter configuration on a test platform, where the test platform obtains test configuration parameters in response to a parameter configuration operation of the user, or performs parameter configuration through a local project to obtain the test configuration parameters. The test configuration parameters may include use case execution parameters and use case identification parameters. The use case execution parameters may include an execution environment parameter and a device identification parameter, and the use case identification parameters may include a program identification parameter, a use case call parameter, and a use case combination parameter.
The test platform may pass the acquired test configuration parameters into the engineering code layer. The engineering code layer comprises a plurality of application programs to be tested, such as a first application, a second application, a third application and the like. For example, the target program to be tested is first determined as the first application according to the program identification parameter, and then the local SDK corresponding to the first application may be called. An independent test case layer is arranged in the local SDK. Referring to fig. 4, the test case layer includes a plurality of test cases having a common test function, such as a common scenario a, a common scenario B, and a common scenario C. For example, a common scene a, a common scene B, and a common scene C are called in the test case layer according to the case call parameter, and thus a plurality of target quality test cases can be called. Then, the public scene A, the public scene B and the public scene C can be combined according to the case combination parameters to obtain a quality test case corresponding to the first application.
Thereafter, a use case execution layer in the local SDK may be invoked. Referring to fig. 4, the use case execution layer includes a plurality of use case execution interfaces, which are a get CPU (central processing unit) interface, a get MEM (memory data) interface, a get GPU (graphics processing unit) interface, a screen recording interface, and a get key frame interface, respectively. The external interface of the use case execution layer is obtained by packaging the plurality of use case execution interfaces. Therefore, the unified external interface of the use case execution layer can be called according to the calling result. Then, inside the use case execution layer, a target use case execution interface corresponding to the quality test use case can be determined, and then the execution environment parameters and the equipment identification parameters can be transmitted to the target use case execution interface. For example, if the execution platform type represented by the execution environment parameter is the local device, and the local device represented by the device identification parameter is the local device D1, the execution platform type may be determined to be the local device according to the execution environment parameter, so that the local device connection may be triggered, for example, a communication connection may be established with the local device cluster first. Then, the corresponding local device D1 may be called in the local device cluster to execute the quality test case according to the device identification parameter.
It should be appreciated that the remote server may provide remote services corresponding to the functionality of the plurality of use case execution interfaces included in the use case execution layer. For example, referring to fig. 4, the use case execution layer includes use case execution interfaces such as an obtain CPU interface, an obtain MEM interface, an obtain GPU interface, a screen recording interface, and an obtain key frame interface, and the remote server correspondingly provides services such as an obtain CPU service, an obtain MEM service, an obtain GPU service, a screen recording service, and an obtain key frame service.
In addition, it should be understood that the execution result of the quality test case may be returned to the test platform for result display, and the test platform may store the result, which is not limited in the embodiment of the present disclosure. In addition, referring to fig. 4, a UI automation layer may also be disposed in the local SDK, and is used to perform quality testing according to operation behaviors of the user on the test platform, such as click operation, sliding operation, and the like.
By the mode, the use case execution can be separated into the basic component, the service calling capability is provided, the decoupling of the test use case and the use case execution is realized, the quality test use case can be flexibly switched among different execution platforms, the convenience of local debugging can be ensured, the requirement of large-scale parallel test can be met, and the normal performance of quality evaluation can be ensured when a single execution platform goes wrong. In addition, data standards among different teams can be effectively unified, team communication and case compiling cost is reduced, and quality evaluation efficiency is improved.
Based on the same inventive concept, the disclosed embodiments also provide a testing apparatus, which may become part or all of an electronic device through software, hardware or a combination of both. Referring to fig. 5, the test apparatus 500 includes:
an obtaining module 501, configured to obtain test configuration parameters, where the test configuration parameters include use case execution parameters and use case identification parameters, the use case execution parameters are used to characterize an execution platform of a quality test case, and the use case identification parameters are used to characterize a quality test case to be executed;
a first calling module 502, configured to call a corresponding test case from a local software development kit according to the case identification parameter;
a second calling module 503, configured to call, in the execution process of the test case, a target execution interface corresponding to the test case from a plurality of case execution interfaces preset in the local software development kit, and call, through the target execution interface, a corresponding execution platform based on the case execution parameters to execute the test case.
Optionally, a plurality of use case execution interfaces preset in the local software development kit are encapsulated as a use case execution layer, and the second calling module 503 is configured to:
and calling the use case execution layer, and calling a target execution interface corresponding to the test case from a plurality of use case execution interfaces packaged by the use case execution layer.
Optionally, a plurality of test cases are preset in the local software development kit, and the test cases are packaged as a test case layer, and the second calling module 503 is configured to:
and calling the test case layer, and calling a corresponding test case from a plurality of test cases packaged by the test case layer according to the case identification parameters.
Optionally, the use case identifier parameters include a use case invoking parameter and a use case combining parameter, and the first invoking module 502 is configured to:
calling at least two target test cases from a plurality of test cases packaged by the test case layer according to the case calling parameters;
and combining the at least two target test cases according to the case combination parameters to obtain corresponding test cases.
Optionally, the use case execution parameters include an execution environment parameter and a device identification parameter, and the second invoking module 503 is configured to:
determining the type of the execution platform of the test case based on the execution environment parameters, and calling the corresponding execution platform from the plurality of execution platforms corresponding to the type to execute the test case according to the equipment identification parameters.
Optionally, the quality test case is a case for obtaining quality test data, and the case execution layer includes the following case execution interfaces:
an interface for obtaining memory data;
an interface for obtaining key frame data;
an interface for obtaining screen display content;
an interface for acquiring data of the central processing unit;
an interface for acquiring graphics processor data.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Based on the same inventive concept, embodiments of the present disclosure further provide a computer readable medium, on which a computer program is stored, and the program, when executed by a processing device, implements the steps of any of the above-mentioned test methods.
Based on the same inventive concept, an embodiment of the present disclosure further provides an electronic device, including:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to implement the steps of any of the above-described test methods.
Referring now to FIG. 6, a block diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 present 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 contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. 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 thereof. 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, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the communication may be performed using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may be separate and not incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: obtaining test configuration parameters, wherein the test configuration parameters comprise use case execution parameters and use case identification parameters, the use case execution parameters are used for representing execution platform information of quality test use cases, and the use case identification parameters are used for representing quality test use cases to be executed; calling a corresponding quality test case according to the case identification parameters, wherein the quality test case is preset in a local software development kit, the local software development kit is also provided with an independent case execution layer, and the case execution layer is used for calling corresponding execution platforms to execute the quality test case in a plurality of execution platforms; and calling the case execution layer according to the calling result of the quality test case, and calling a target execution platform in the case execution layer according to the case execution parameters to execute the quality test case.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, smalltalk, C + +, and including conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the name of a module in some cases does not constitute a limitation on the module itself.
The functions described herein above 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: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Example 1 provides, in accordance with one or more embodiments of the present disclosure, a testing method, comprising:
obtaining test configuration parameters, wherein the test configuration parameters comprise use case execution parameters and use case identification parameters, the use case execution parameters are used for representing execution platform information of quality test use cases, and the use case identification parameters are used for representing quality test use cases to be executed;
calling a corresponding test case from a local software development kit according to the case identification parameter;
in the execution process of the test case, a target execution interface corresponding to the test case is called in a plurality of case execution interfaces preset in the local software development kit, and the test case is executed by calling a corresponding execution platform through the target execution interface based on the case execution parameters.
According to one or more embodiments of the present disclosure, example 2 provides the method of example 1, where a plurality of use case execution interfaces preset in the local software development kit are packaged as a use case execution layer, and the invoking of the target execution interface corresponding to the test case in the plurality of use case execution interfaces preset in the local software development kit includes:
and calling the use case execution layer, and calling a target execution interface corresponding to the test case from a plurality of use case execution interfaces packaged by the use case execution layer.
Example 3 provides the method of example 1 or 2, where the local software development kit is further preset with a plurality of test cases, and the plurality of test cases are packaged as a test case layer, and the invoking of the corresponding test case from the local software development kit according to the case identification parameter includes:
and calling the test case layer, and calling a corresponding test case from a plurality of test cases packaged by the test case layer according to the case identification parameters.
Example 4 provides the method of example 3, wherein the use case identification parameters include a use case calling parameter and a use case combination parameter, and calling a corresponding test case from a plurality of test cases packaged by the test case layer according to the use case identification parameters, and the method includes:
calling at least two target test cases from a plurality of test cases packaged by the test case layer according to the case calling parameters;
and combining the at least two target test cases according to the case combination parameters to obtain corresponding test cases.
Example 5 provides the method of example 1 or 2, wherein the use case execution parameters include execution environment parameters and device identification parameters, and invoking a corresponding execution platform to execute the test case based on the use case execution parameters, including:
determining the type of the execution platform of the test case based on the execution environment parameters, and calling the corresponding execution platform from the plurality of execution platforms corresponding to the type to execute the test case according to the equipment identification parameters.
Example 6 provides the method of example 1 or 2, the preset multiple use case execution interfaces including at least one of: :
an interface for obtaining memory data;
an interface for obtaining key frame data;
an interface for obtaining screen display content;
an interface for acquiring data of the central processing unit;
an interface for acquiring graphics processor data.
Example 7 provides, in accordance with one or more embodiments of the present disclosure, a test apparatus, the apparatus comprising:
the system comprises an acquisition module, a quality test module and a quality test module, wherein the acquisition module is used for acquiring test configuration parameters, the test configuration parameters comprise use case execution parameters and use case identification parameters, the use case execution parameters are used for representing an execution platform of a quality test case, and the use case identification parameters are used for representing the quality test case to be executed;
the first calling module is used for calling a corresponding test case from a local software development kit according to the case identification parameter;
and the second calling module is used for calling a target execution interface corresponding to the test case from a plurality of case execution interfaces preset in the local software development kit in the execution process of the test case, and calling a corresponding execution platform to execute the test case through the target execution interface based on the case execution parameters.
Example 8 provides the apparatus of example 7, wherein the multiple use case execution interfaces preset in the local software development kit are encapsulated as a use case execution layer, and the second calling module is configured to:
and calling the use case execution layer, and calling a target execution interface corresponding to the test case from a plurality of use case execution interfaces packaged by the use case execution layer.
Example 9 provides a computer readable medium having stored thereon a computer program that, when executed by a processing apparatus, performs the steps of the method of any of examples 1-6, in accordance with one or more embodiments of the present disclosure.
Example 10 provides, in accordance with one or more embodiments of the present disclosure, an electronic device comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method of any of examples 1-6.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other combinations of features described above or equivalents thereof without departing from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while 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. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims (10)

1. A method of testing, the method comprising:
acquiring test configuration parameters, wherein the test configuration parameters comprise use case execution parameters and use case identification parameters, the use case execution parameters are used for representing execution platform information of a test use case, and the use case identification parameters are used for representing the test use case to be executed;
calling a corresponding test case from a local software development kit according to the case identification parameter;
in the execution process of the test case, a target execution interface corresponding to the test case is called in a plurality of case execution interfaces preset in the local software development kit, and a corresponding execution platform is called through the target execution interface based on the case execution parameters to execute the test case.
2. The method according to claim 1, wherein a plurality of use case execution interfaces preset in the local software development kit are encapsulated as a use case execution layer, and the invoking of the target execution interface corresponding to the test case in the plurality of use case execution interfaces preset in the local software development kit comprises:
and calling the use case execution layer, and calling a target execution interface corresponding to the test case from a plurality of use case execution interfaces packaged by the use case execution layer.
3. The method according to claim 1 or 2, wherein a plurality of test cases are preset in the local software development kit, and the plurality of test cases are packaged as a test case layer, and the calling of the corresponding test case from the local software development kit according to the case identification parameter includes:
and calling the test case layer, and calling a corresponding test case from a plurality of test cases packaged by the test case layer according to the case identification parameters.
4. The method according to claim 3, wherein the use case identification parameters include a use case call parameter and a use case combination parameter, and a corresponding test case is called from a plurality of test cases encapsulated by the test case layer according to the use case identification parameters, and the method includes:
calling at least two target test cases from a plurality of test cases packaged by the test case layer according to the case calling parameters;
and combining the at least two target test cases according to the case combination parameters to obtain corresponding test cases.
5. The method according to claim 1 or 2, wherein the use case execution parameters include an execution environment parameter and a device identification parameter, and invoking a corresponding execution platform to execute the test case based on the use case execution parameters includes:
and determining the type of the execution platform of the test case based on the execution environment parameters, and calling the corresponding execution platform from a plurality of execution platforms corresponding to the type to execute the test case according to the equipment identification parameters.
6. The method according to claim 1 or 2, wherein the preset plurality of use case execution interfaces comprise at least one of the following interfaces:
an interface for acquiring memory data;
an interface for obtaining key frame data;
an interface for obtaining screen display content;
an interface for acquiring data of the central processing unit;
an interface for acquiring graphics processor data.
7. A test apparatus, the apparatus comprising:
the system comprises an acquisition module, a quality test module and a quality test module, wherein the acquisition module is used for acquiring test configuration parameters, the test configuration parameters comprise use case execution parameters and use case identification parameters, the use case execution parameters are used for representing an execution platform of a quality test case, and the use case identification parameters are used for representing the quality test case to be executed;
the first calling module is used for calling a corresponding quality test case from a local software development kit according to the case identification parameter;
and the second calling module is used for calling a target execution interface corresponding to the test case from a plurality of case execution interfaces preset in the local software development kit in the execution process of the test case, and calling a corresponding execution platform to execute the test case through the target execution interface based on the case execution parameters.
8. The apparatus of claim 7, wherein a plurality of use case execution interfaces preset in the local software development kit are encapsulated as a use case execution layer, and the second calling module is configured to:
and calling the use case execution layer, and calling a target execution interface corresponding to the test case from a plurality of use case execution interfaces packaged by the use case execution layer.
9. A computer-readable medium, on which a computer program is stored, characterized in that the program, when being executed by processing means, carries out the steps of the method of any one of claims 1 to 6.
10. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method according to any one of claims 1 to 6.
CN202110601576.3A 2021-05-31 2021-05-31 Test method, test device, storage medium and electronic equipment Pending CN115481007A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110601576.3A CN115481007A (en) 2021-05-31 2021-05-31 Test method, test device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110601576.3A CN115481007A (en) 2021-05-31 2021-05-31 Test method, test device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115481007A true CN115481007A (en) 2022-12-16

Family

ID=84419036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110601576.3A Pending CN115481007A (en) 2021-05-31 2021-05-31 Test method, test device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115481007A (en)

Similar Documents

Publication Publication Date Title
CN111897740B (en) User interface testing method and device, electronic equipment and computer readable medium
CN111488285B (en) Interface testing method, device, electronic equipment and computer readable storage medium
CN113835992B (en) Memory leakage processing method and device, electronic equipment and computer storage medium
CN111625422B (en) Thread monitoring method, thread monitoring device, electronic equipment and computer readable storage medium
CN111190657B (en) Activity configuration method and device, readable medium and electronic equipment
CN110727566A (en) Method, device, medium and electronic equipment for acquiring process crash information
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN116225886A (en) Test case generation method, device, equipment, storage medium and program product
CN112954056B (en) Method and device for processing monitoring data, electronic equipment and storage medium
CN113391860B (en) Service request processing method and device, electronic equipment and computer storage medium
CN110704050B (en) Module initializing method and device, electronic equipment and computer readable storage medium
CN111352823B (en) Test method, client and storage medium
CN114296986B (en) Memory leakage positioning method, device, medium and electronic equipment
CN112379967B (en) Simulator detection method, device, equipment and medium
CN115481007A (en) Test method, test device, storage medium and electronic equipment
CN111309323B (en) Parameter initialization method and device and electronic equipment
CN114116480A (en) Method, device, medium and equipment for determining application program test coverage rate
CN113704079A (en) Interface testing method and device based on Protobuf
CN111797009A (en) Method and device for detecting code compatibility and electronic equipment
CN110489341B (en) Test method and device, storage medium and electronic equipment
CN113448550B (en) Method and device for realizing collection management of classes, electronic equipment and computer medium
CN115827415B (en) System process performance test method, device, equipment and computer medium
CN113641587A (en) Operation interface test method, device, terminal and storage medium
CN114036053A (en) Test method, test device, readable medium and electronic equipment
CN116401173A (en) Test case generation method and device, medium and electronic equipment

Legal Events

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