CN117009216A - Application program testing method, device, equipment and storage medium - Google Patents

Application program testing method, device, equipment and storage medium Download PDF

Info

Publication number
CN117009216A
CN117009216A CN202310760451.4A CN202310760451A CN117009216A CN 117009216 A CN117009216 A CN 117009216A CN 202310760451 A CN202310760451 A CN 202310760451A CN 117009216 A CN117009216 A CN 117009216A
Authority
CN
China
Prior art keywords
service
change
application program
interface
code
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
CN202310760451.4A
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202310760451.4A priority Critical patent/CN117009216A/en
Publication of CN117009216A publication Critical patent/CN117009216A/en
Pending legal-status Critical Current

Links

Classifications

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

Landscapes

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

Abstract

The application relates to a test method, a test device, test equipment and a storage medium of an application program. The method relates to the field of automatic testing, and comprises the following steps: firstly, acquiring a change code of an application program; the change code is a program code which changes before and after the update of the application program; according to the change codes, determining change service interfaces corresponding to the change codes; acquiring a target test case of the application program according to the changed service interface; and executing the target test case and outputting a test report. Obviously, under the condition that the service corresponding to the upgrade is not clear, the application can find the change service interface corresponding to the change code and quickly locate the target test case for testing the application program based on the change service interface, namely, the application can effectively complete the test of the application program under the condition that the service corresponding to the upgrade is not clear.

Description

Application program testing method, device, equipment and storage medium
Technical Field
The present application relates to the field of automated testing, and in particular, to a method, apparatus, device, and storage medium for testing an application program.
Background
With the development of technology, the frequency of iterative upgrades of application programs is increasing. In order to ensure the normal operation of the upgraded application, the upgraded application needs to be tested.
Currently, since an application is generally upgraded for a service, the upgraded application is usually tested for the service after the upgrade. However, in the method, under the condition that the service corresponding to the upgrade is not clear, a tester cannot clear the test case corresponding to the service, cannot test the application program based on the test case corresponding to the service, and cannot effectively finish the upgrade of the application program.
Therefore, how to test the updated application program effectively without explicitly upgrading the corresponding service is a technical problem to be solved.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a test method, apparatus, device, and storage medium that can effectively test an application after an upgrade without explicitly upgrading a corresponding service.
In a first aspect, the present application provides a method for testing an application program, the method comprising:
acquiring a change code of an application program; the change code is a program code which changes before and after the update of the application program;
according to the change codes, determining change service interfaces corresponding to the change codes;
acquiring a target test case of the application program according to the changed service interface;
and executing the target test case and outputting a test report.
In one embodiment, obtaining change code for an application includes:
inquiring a task code merging file of an application program, and determining a change code of the application program; the task code merging file is recorded with pre-update codes and post-update codes of the application program.
In one embodiment, obtaining a target test case of an application according to a change service interface includes:
according to the change service interface, determining the associated service of the change service interface, wherein the associated service is the service needing to call the change service interface;
judging whether the related services are overlapped or not;
if so, the service test cases corresponding to the associated service with the largest overlapping quantity are used as target test cases of the application program.
In one embodiment, after determining whether there is an overlap in the associated service, the method further includes:
if not, selecting one associated service from the associated service of each changed service interface as a service to be tested;
and taking the service test case corresponding to the service to be tested as a target test case of the application program.
In one embodiment, the test report includes a test result of the application program and a corresponding relation of the changed interface service; and changing the corresponding relation of the interface service to be the relation between the interface called by executing the target test case and the service corresponding to the target test case.
In one embodiment, determining the associated service of the change service interface according to the change service interface includes:
searching the associated service of the changed service interface based on the corresponding relation of the preset interface service;
accordingly, after outputting the test report, the method further comprises:
and updating the corresponding relation of the preset interface service according to the corresponding relation of the changed interface service contained in the test report.
In a second aspect, the present application also provides an apparatus for testing an application program, the apparatus comprising:
the first acquisition module is used for acquiring the change codes of the application program; the change code is a program code which changes before and after the update of the application program;
the determining module is used for determining a change service interface corresponding to the change code according to the change code;
the second acquisition module is used for acquiring a target test case of the application program according to the changed service interface;
and the output module is used for executing the target test case and outputting a test report.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the following steps:
acquiring a change code of an application program; the change code is a program code which changes before and after the update of the application program;
according to the change codes, determining change service interfaces corresponding to the change codes;
acquiring a target test case of the application program according to the changed service interface;
and executing the target test case and outputting a test report.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring a change code of an application program; the change code is a program code which changes before and after the update of the application program;
according to the change codes, determining change service interfaces corresponding to the change codes;
acquiring a target test case of the application program according to the changed service interface;
and executing the target test case and outputting a test report.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, performs the steps of:
acquiring a change code of an application program; the change code is a program code which changes before and after the update of the application program;
according to the change codes, determining change service interfaces corresponding to the change codes;
acquiring a target test case of the application program according to the changed service interface;
and executing the target test case and outputting a test report.
The method, the device, the equipment and the storage medium for testing the application program firstly acquire the change code of the application program; the change code is a program code which changes before and after the update of the application program; according to the change codes, determining change service interfaces corresponding to the change codes; acquiring a target test case of the application program according to the changed service interface; and executing the target test case and outputting a test report. Obviously, under the condition that the service corresponding to the upgrade is not clear, the application can find the change service interface corresponding to the change code and quickly locate the target test case for testing the application program based on the change service interface, namely, the application can effectively complete the test of the application program under the condition that the service corresponding to the upgrade is not clear.
Drawings
Fig. 1 is an application environment diagram of a test method of an application program according to the present embodiment;
fig. 2 is a flow chart of a testing method of a first application program according to the present embodiment;
fig. 3 is a flowchart of a method for obtaining a target test case of an application program according to a change service interface according to the present embodiment;
fig. 4 is a flowchart of a second method for testing an application according to the present embodiment;
fig. 5 is a block diagram of a test device for an application program according to the present embodiment;
fig. 6 is an internal structural diagram of the computer device provided in the present embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The embodiment of the application provides a computer device, which can be a terminal, and the internal structure diagram of the computer device can be shown in fig. 1. The computer device includes a processor, a memory, an input/output interface, and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal in a wired or Wireless manner, wherein the Wireless manner can be realized through Wireless-Fidelity (WIFI), a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. The computer program, when executed by a processor, implements a method of testing an application program.
In one embodiment, as shown in fig. 2, a test method of an application program is provided, and the test method is described as applied to the computer device shown in fig. 1, for example, the computer device may be a device for testing the application program. The method specifically comprises the following steps:
s201, acquiring a change code of an application program; the change code is a program code which changes before and after the update of the application program.
Wherein an application may be a computer program that performs some particular task or tasks. The change code may be a program code that changes during the iterative upgrade of the application program, wherein the changing program code includes an added code, a deleted code, a modified code, and the like.
In this embodiment, a test script capable of testing the change of the code of the application program may be generated in advance, and the test script is executed to find the program code of the application program that changes in the iterative upgrade process.
Optionally, the task code merging file of the application program can be queried to determine the change code of the application program; the task code merging file is recorded with pre-update codes and post-update codes of the application program.
Specifically, in the iterative upgrade process of the application program, the pre-update code and the post-update code of the application program need to be recorded in the task code merging file, and subsequently when the change code of the application program needs to be queried, the pre-update code and the post-update code can be directly compared, so that the change code of the application program can be obtained.
S202, according to the change codes, determining the change service interfaces corresponding to the change codes.
The service interface change may be a service interface corresponding to a code of the application program change, where the service interface change has a certain corresponding relationship with the service, that is, the service corresponding to the interface may be implemented by calling the service interface change. For example, if the application is a financial application, the change service interface of the application may include at least one of a login interface, a page jump interface, a balance inquiry interface, a transfer interface, a result confirmation interface, and the like.
Optionally, a corresponding relation between the code of the application program and the interface code of the service interface is pre-established, and after the change code is found, the change service interface corresponding to the change code is obtained based on the corresponding relation between the change code and the interface code.
S203, acquiring a target test case of the application program according to the changed service interface.
The target test case is a document for testing the service corresponding to the changed service interface related to the iteratively upgraded application program. The target test case has a corresponding test script.
Optionally, the service corresponding to the changed service interface can be queried according to the changed service interface, and the target test case of the application program can be determined according to the service.
S204, executing the target test case and outputting a test report.
Alternatively, the test report may be a report of the feedback test results. In this embodiment, a test script corresponding to the target test case is executed, and a test report may be generated.
The test method of the application program provided by the embodiment includes the steps that firstly, a change code of the application program is obtained; according to the change code, determining a change service interface corresponding to the change code; then, according to the changed service interface, acquiring a target test case of the application program; and executing the target test case and outputting a test report. Obviously, under the condition that the service corresponding to the upgrade is not clear, the application can find the change service interface corresponding to the change code and quickly locate the target test case for testing the application program based on the change service interface, namely, the application can effectively complete the test of the application program under the condition that the service corresponding to the upgrade is not clear.
Based on the above embodiment, this embodiment provides an alternative implementation manner for obtaining the target test case of the application program according to the change service interface in S203, specifically as shown in fig. 3, including the following steps:
s301, according to the changed service interface, determining the associated service of the changed service interface.
Wherein, the associated service is a service needing to call a change service interface. Alternatively, one service interface may correspond to at least one associated service, for example, the login interface may correspond to the associated service and may include purchasing financial, charging, transferring accounts, inquiring balance records, loans, and the like.
Optionally, the service of the change service interface may be called as the associated service in the query service execution process according to the change service interface. For example, if the change service interface is a login interface, the services that can be implemented by calling the login interface include transfer, buying a fund, buying a financial resource, and the like, so that the transfer, buying a fund, buying a financial resource, and the like corresponding to the login interface are used as related services. And when the change service interface is a transfer interface, calling a service which can be realized by the transfer interface to transfer accounts, so that the transfer service corresponding to the transfer interface is used as an associated service.
S302, judging whether the related services are overlapped, if so, executing S303, and if not, executing S304.
S303, taking the service test cases corresponding to the associated service with the largest overlapping quantity as the target test cases of the application program.
In this embodiment, since each change service interface may correspond to at least one associated service, after determining the associated service of the change service interface, it may be determined whether there is an overlap between each change service interface and at least one associated service. And if the associated services corresponding to the changed service interfaces are overlapped, taking the service test cases corresponding to the associated services with the largest overlapped quantity as target test cases of the application program. It should be noted that each associated service has a corresponding test case, for example, a transfer service, a buy fund service, a buy finance service, etc. has a corresponding test case.
For example, in the upgrade test of the application program, when the change service interface includes a login interface and a transfer interface, the login interface may correspond to related services such as transferring, buying funds, buying financial resources, and the like, that is, the login interface may correspond to a test case of the transfer service, a test case of the buying funds service, a test case of the buying financial resources, and the like. The transfer interface may correspond to a transfer service, i.e., the transfer interface may correspond to a test case of the transfer service. Since the test cases of the transfer service may call the two change service interfaces of the login interface and the transfer interface, and the other test cases (e.g., the test cases of the fund service, the test cases of the financial service, etc.) call only one change service interface (e.g., the login interface), the test cases of the transfer service are regarded as target test cases of the application program.
S304, selecting one associated service from the associated services of each changed service interface as a service to be tested; and taking the service test case corresponding to the service to be tested as a target test case of the application program.
Specifically, if the associated service corresponding to each changed service interface is obtained, and it is determined that there is no overlap in the associated service corresponding to each changed service interface, one associated service may be selected from at least one associated service corresponding to each changed service interface as a service to be tested; and taking the service test case corresponding to the selected service to be tested as a target test case of the application program.
For example, in the upgrade test of the application program, when the change service interface includes a balance inquiry interface and a money transfer interface, the balance inquiry interface may correspond to related services such as buying funds and buying financial resources, that is, the balance inquiry interface may correspond to test cases of buying the foundation service and test cases of buying the financial resources. The transfer interface may correspond to a transfer service, i.e., the transfer interface may correspond to a test case of the transfer service. Because the balance inquiry interface corresponds to the fund buying service and the financial buying service and the transfer service corresponding to the transfer interface is not overlapped, one of the fund buying service and the financial buying service can be selected as a service to be tested according to the balance inquiry interface, the fund buying service is selected as the service to be tested, and the test case of the fund buying service can be used as the target test case of the application program. For the transfer interface, the transfer service can be used as a service to be tested, and the test case of the transfer service can be used as a target test case of the application program.
In this embodiment, according to the change service interface, the associated service of the change service interface may be determined, and whether the associated service has overlap may be determined; if so, the service test cases corresponding to the associated service with the largest overlapping quantity are used as target test cases of the application program. If not, selecting one associated service from the associated service of each changed service interface as a service to be tested; and taking the service test case corresponding to the service to be tested as a target test case of the application program. Obviously, in the embodiment, the overlapping performance between the test cases corresponding to the associated service is considered, the test of the application program is realized by using the target test case with the largest overlapping quantity, and the test efficiency is improved under the condition of ensuring the accurate test result.
On the basis of the above embodiment, optionally, the test report includes a test result of the application program and a corresponding relationship of the change interface service; and changing the corresponding relation of the interface service to be the relation between the interface called by executing the target test case and the service corresponding to the target test case.
In this embodiment, the test report records the service interface called in the process of executing the target test case, the corresponding relationship between the calling service interface and the service, and the test result. The test result comprises test success, test failure and error reporting type of test failure. Specifically, in the process of executing the target test case, a service needs to call at least one interface, for example, the transfer function needs to call a login interface, a balance inquiry interface, a transfer interface, a result confirmation interface, and the like.
Optionally, in the foregoing embodiment, an optional manner of determining, according to the change service interface, an associated service of the change service interface is to search for an associated service of the change service interface based on a preset interface service correspondence; on the basis, the method can further comprise updating the preset interface service corresponding relation according to the changed interface service corresponding relation contained in the test report after the test report is output.
The preset interface service corresponding relation refers to a preset corresponding relation between a service interface and a service, wherein the corresponding relation between the service interface and the service can be one-to-one, one-to-many or many-to-one, and specifically, the corresponding relation between the service interface and the service can be determined according to actual requirements, and the method is not limited.
Optionally, according to the changed service interface, the corresponding relation of the preset interface service can be queried, and the service corresponding to the changed service interface is determined as the associated service. Accordingly, after the test report is output, because the test report includes the corresponding relationship of the changed interface service, that is, the corresponding relationship of the service interface and the service invoked when the target test case is executed, the preset corresponding relationship of the service interface and the service (that is, the preset interface service corresponding relationship) can be updated based on the corresponding relationship of the service interface and the service invoked when the target test case is executed in the test report.
In this embodiment, the corresponding relationship between the service interface and the service invoked when the target test case is executed in the test report may be updated, so that when the application program is upgraded next time, the corresponding upgrade test may be directly performed based on the updated corresponding relationship between the service interface and the service, without adopting the corresponding relationship between the service interface and the service to perform the corresponding upgrade test, and the test efficiency is improved.
On the basis of the above embodiment, this embodiment provides an alternative implementation manner of the test method of the second application program, as shown in fig. 4, and the method includes the following steps:
s401, inquiring a task code merging file of the application program, and determining a change code of the application program.
The change code is a program code which changes before and after the update of the application program.
S402, according to the change codes, determining the change service interfaces corresponding to the change codes.
S403, searching the associated service of the changed service interface based on the corresponding relation of the preset interface service.
Wherein, the associated service is a service needing to call a change service interface.
S404, judging whether the related services are overlapped or not; if yes, executing S405; otherwise, S406 is performed.
S405, taking the service test cases corresponding to the associated service with the largest overlapping quantity as the target test cases of the application program.
S406, selecting an associated service from the associated services of each changed service interface as a service to be tested; and taking the service test case corresponding to the service to be tested as a target test case of the application program.
S407, executing the target test case and outputting a test report.
The test report comprises the test result of the application program and the corresponding relation of the changed interface service; and changing the corresponding relation of the interface service to be the relation between the interface called by executing the target test case and the service corresponding to the target test case.
S408, updating the corresponding relation of the preset interface service according to the corresponding relation of the changed interface service contained in the test report.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides an application program testing device for realizing the application program testing method. The implementation scheme of the device for solving the problem is similar to the implementation scheme and beneficial effect described in the above method, so the specific limitation in the embodiment of the test device for one or more application programs provided below can be referred to the limitation of the test method for one application program hereinabove, and will not be repeated here.
The embodiment of the application also provides an application program testing device for implementing the above related application program testing method, as shown in fig. 5, comprising:
a first obtaining module 501, configured to obtain a change code of an application program; the change code is a program code which changes before and after the update of the application program;
a determining module 502, configured to determine, according to the change code, a change service interface corresponding to the change code;
a second obtaining module 503, configured to obtain a target test case of the application program according to the change service interface;
and the output module 504 is used for executing the target test case and outputting a test report.
In one embodiment, the first obtaining module 501 is specifically configured to:
inquiring a task code merging file of an application program, and determining a change code of the application program; the task code merging file is recorded with pre-update codes and post-update codes of the application program.
In one embodiment, the second obtaining module 503 includes:
the first determining unit is used for determining the associated service of the changed service interface according to the changed service interface, wherein the associated service is the service needing to call the changed service interface;
the judging unit is used for judging whether the related services are overlapped or not;
and the second determining unit is used for taking the business test cases corresponding to the associated businesses with the largest overlapping quantity as target test cases of the application program if the business test cases exist.
In one embodiment, the second obtaining module 503 is specifically further configured to:
if not, selecting one associated service from the associated service of each changed service interface as a service to be tested;
and taking the service test case corresponding to the service to be tested as a target test case of the application program.
In one embodiment, the test report includes a test result of the application program and a corresponding relation of the changed interface service; and changing the corresponding relation of the interface service to be the relation between the interface called by executing the target test case and the service corresponding to the target test case.
In one embodiment, the first determining unit is specifically configured to:
searching the associated service of the changed service interface based on the corresponding relation of the preset interface service;
correspondingly, the device also comprises
And the updating module is used for updating the corresponding relation of the preset interface service according to the corresponding relation of the changed interface service contained in the test report.
The modules in the test device of the application program may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program, when executed by the processor, enables testing of the application program. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 6 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
The application also provides computer equipment. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the following steps:
acquiring a change code of an application program; the change code is a program code which changes before and after the update of the application program;
according to the change codes, determining change service interfaces corresponding to the change codes;
acquiring a target test case of the application program according to the changed service interface;
and executing the target test case and outputting a test report.
In one embodiment, obtaining change code for an application includes:
inquiring a task code merging file of an application program, and determining a change code of the application program; the task code merging file is recorded with pre-update codes and post-update codes of the application program.
In one embodiment, obtaining a target test case of an application according to a change service interface includes:
according to the change service interface, determining the associated service of the change service interface, wherein the associated service is the service needing to call the change service interface;
judging whether the related services are overlapped or not;
if so, the service test cases corresponding to the associated service with the largest overlapping quantity are used as target test cases of the application program.
In one embodiment, after determining whether there is an overlap in the associated service, the method further includes:
if not, selecting one associated service from the associated service of each changed service interface as a service to be tested;
and taking the service test case corresponding to the service to be tested as a target test case of the application program.
In one embodiment, the test report includes a test result of the application program and a corresponding relation of the changed interface service; and changing the corresponding relation of the interface service to be the relation between the interface called by executing the target test case and the service corresponding to the target test case.
In one embodiment, determining the associated service of the change service interface according to the change service interface includes:
searching the associated service of the changed service interface based on the corresponding relation of the preset interface service;
accordingly, after outputting the test report, the method further comprises:
and updating the corresponding relation of the preset interface service according to the corresponding relation of the changed interface service contained in the test report.
The application also provides a computer readable storage medium. The computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring a change code of an application program; the change code is a program code which changes before and after the update of the application program;
according to the change codes, determining change service interfaces corresponding to the change codes;
acquiring a target test case of the application program according to the changed service interface;
and executing the target test case and outputting a test report.
In one embodiment, obtaining change code for an application includes:
inquiring a task code merging file of an application program, and determining a change code of the application program; the task code merging file is recorded with pre-update codes and post-update codes of the application program.
In one embodiment, obtaining a target test case of an application according to a change service interface includes:
according to the change service interface, determining the associated service of the change service interface, wherein the associated service is the service needing to call the change service interface;
judging whether the related services are overlapped or not;
if so, the service test cases corresponding to the associated service with the largest overlapping quantity are used as target test cases of the application program.
In one embodiment, after determining whether there is an overlap in the associated service, the method further includes:
if not, selecting one associated service from the associated service of each changed service interface as a service to be tested;
and taking the service test case corresponding to the service to be tested as a target test case of the application program.
In one embodiment, the test report includes a test result of the application program and a corresponding relation of the changed interface service; and changing the corresponding relation of the interface service to be the relation between the interface called by executing the target test case and the service corresponding to the target test case.
In one embodiment, determining the associated service of the change service interface according to the change service interface includes:
searching the associated service of the changed service interface based on the corresponding relation of the preset interface service;
accordingly, after outputting the test report, the method further comprises:
and updating the corresponding relation of the preset interface service according to the corresponding relation of the changed interface service contained in the test report.
The application also provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, performs the steps of:
acquiring a change code of an application program; the change code is a program code which changes before and after the update of the application program;
according to the change codes, determining change service interfaces corresponding to the change codes;
acquiring a target test case of the application program according to the changed service interface;
and executing the target test case and outputting a test report.
In one embodiment, obtaining change code for an application includes:
inquiring a task code merging file of an application program, and determining a change code of the application program; the task code merging file is recorded with pre-update codes and post-update codes of the application program.
In one embodiment, obtaining a target test case of an application according to a change service interface includes:
according to the change service interface, determining the associated service of the change service interface, wherein the associated service is the service needing to call the change service interface;
judging whether the related services are overlapped or not;
if so, the service test cases corresponding to the associated service with the largest overlapping quantity are used as target test cases of the application program.
In one embodiment, after determining whether there is an overlap in the associated service, the method further includes:
if not, selecting one associated service from the associated service of each changed service interface as a service to be tested;
and taking the service test case corresponding to the service to be tested as a target test case of the application program.
In one embodiment, the test report includes a test result of the application program and a corresponding relation of the changed interface service; and changing the corresponding relation of the interface service to be the relation between the interface called by executing the target test case and the service corresponding to the target test case.
In one embodiment, determining the associated service of the change service interface according to the change service interface includes:
searching the associated service of the changed service interface based on the corresponding relation of the preset interface service;
accordingly, after outputting the test report, the method further comprises:
and updating the corresponding relation of the preset interface service according to the corresponding relation of the changed interface service contained in the test report.
The data (including, but not limited to, data for analysis, data stored, data displayed, etc.) related to the present application are all data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method for testing an application program, the method comprising:
acquiring a change code of an application program; the change code is a program code which changes before and after the application program is updated;
according to the change code, determining a change service interface corresponding to the change code;
acquiring a target test case of the application program according to the change service interface;
and executing the target test case and outputting a test report.
2. The method of claim 1, wherein the acquiring the change code of the application program comprises:
inquiring a task code merging file of the application program, and determining a change code of the application program; and the task code merging file is recorded with the pre-update code and the post-update code of the application program.
3. The method of claim 1, wherein the obtaining the target test case of the application according to the change service interface comprises:
determining associated service of the change service interface according to the change service interface, wherein the associated service is the service needing to call the change service interface;
judging whether the related services are overlapped or not;
and if so, taking the service test cases corresponding to the associated service with the largest overlapping quantity as the target test cases of the application program.
4. The method of claim 3, wherein after said determining whether there is an overlap in the associated traffic, further comprising:
if not, selecting one associated service from the associated service of each changed service interface as a service to be tested;
and taking the service test case corresponding to the service to be tested as the target test case of the application program.
5. A method according to claim 3, wherein the test report includes a test result of the application program and a change interface service correspondence; and the corresponding relation of the interface changing service is the relation between the interface called by executing the target test case and the service corresponding to the target test case.
6. The method of claim 5, wherein said determining the associated service of the change service interface from the change service interface comprises:
searching the associated service of the changed service interface based on the corresponding relation of the preset interface service;
accordingly, after outputting the test report, the method further comprises:
and updating the corresponding relation of the preset interface service according to the corresponding relation of the changed interface service contained in the test report.
7. An apparatus for testing an application program, the apparatus comprising:
the first acquisition module is used for acquiring the change codes of the application program; the change code is a program code which changes before and after the application program is updated;
the determining module is used for determining a change service interface corresponding to the change code according to the change code;
the second acquisition module is used for acquiring a target test case of the application program according to the change service interface;
and the output module is used for executing the target test case and outputting a test report.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310760451.4A 2023-06-26 2023-06-26 Application program testing method, device, equipment and storage medium Pending CN117009216A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310760451.4A CN117009216A (en) 2023-06-26 2023-06-26 Application program testing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310760451.4A CN117009216A (en) 2023-06-26 2023-06-26 Application program testing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117009216A true CN117009216A (en) 2023-11-07

Family

ID=88573587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310760451.4A Pending CN117009216A (en) 2023-06-26 2023-06-26 Application program testing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117009216A (en)

Similar Documents

Publication Publication Date Title
CN110597552B (en) Configuration method, device, equipment and storage medium of project continuous integrated pipeline
CN115344284A (en) Automatic driving software upgrading method and device, storage medium and computer equipment
CN111736776A (en) Data storage and reading method and device
CN116561003A (en) Test data generation method, device, computer equipment and storage medium
CN117009216A (en) Application program testing method, device, equipment and storage medium
CN114756293A (en) Service processing method, device, computer equipment and storage medium
CN112506781B (en) Test monitoring method, device, electronic equipment, storage medium and program product
CN114185566A (en) Containerized deployment method, apparatus, computer device and storage medium
CN113392010A (en) Common component testing method and device, electronic equipment and storage medium
CN112306995A (en) Method and device for realizing database operation
CN114528045B (en) Plug-in operation method, device, computer equipment and storage medium
CN109726053B (en) Switching method and device of database control center and computer equipment
CN116893830A (en) Application system updating method, device, equipment, storage medium and program product
CN116910038A (en) Information analysis method, apparatus, computer device and computer program product
CN117331817A (en) Test data acquisition method, device, computer equipment and storage medium
CN117522296A (en) Auditing flow generation method, auditing flow generation device, computer equipment and storage medium
CN118132108A (en) Vehicle software upgrading method and device, vehicle terminal, vehicle and medium
CN116881116A (en) Interface test method, apparatus, computer device, storage medium, and program product
CN115292182A (en) Method for searching test data conforming to test case in service test scene
CN118132656A (en) Knowledge graph construction method, knowledge graph construction device, computer equipment and storage medium
CN118012752A (en) Application program testing method, computer device and storage medium
CN114915573A (en) Test method, device, equipment, storage medium and program product
CN117667985A (en) Data positioning method, device, computer equipment and storage medium
CN117376114A (en) Parameter configuration method, device, computer equipment and storage medium
CN116894044A (en) Data management method, device, computer equipment and storage medium

Legal Events

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