WO2021103743A1 - 程序测试方法、装置、计算机设备和存储介质 - Google Patents

程序测试方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2021103743A1
WO2021103743A1 PCT/CN2020/114504 CN2020114504W WO2021103743A1 WO 2021103743 A1 WO2021103743 A1 WO 2021103743A1 CN 2020114504 W CN2020114504 W CN 2020114504W WO 2021103743 A1 WO2021103743 A1 WO 2021103743A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
account
code
test
program
Prior art date
Application number
PCT/CN2020/114504
Other languages
English (en)
French (fr)
Inventor
黄灿辉
孙锦辉
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to EP20892256.7A priority Critical patent/EP3992800B1/en
Publication of WO2021103743A1 publication Critical patent/WO2021103743A1/zh
Priority to US17/512,206 priority patent/US11983101B2/en

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/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3457Performance evaluation by simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • 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/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • 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

Definitions

  • This application relates to the field of computer technology, in particular to program testing methods, devices, computer equipment and storage media.
  • APP Application, APP
  • a video can be downloaded from a corresponding video server through a video playback program and played in a terminal.
  • the application program is usually tested online after the application program is launched, resulting in failure to discover the problems of the application program in time, and the program testing efficiency is low.
  • a program testing method, device, computer equipment, and storage medium are provided.
  • a program testing method executed by a computer device, the method comprising: receiving a test account addition instruction, the test account addition instruction carrying a second test account; in response to the test account addition instruction, obtaining a first test account corresponding to the target program Target code, the first target code is the code corresponding to the first page, a first test account is logged on the first page, the first page is generated according to the first target code; according to the first target The code generates a second page corresponding to the second test account; and interacts through the first page and the second page to test the target program.
  • a program testing device comprising: a test account adding instruction receiving module, configured to receive a test account adding instruction, the test account adding instruction carrying a second test account; a first target code acquisition module, used to respond to all The test account addition instruction is used to obtain the first target code corresponding to the target program, the first target code is the code corresponding to the first page, the first test account is logged on the first page, and the first page is based on the The first target code is generated; a second page generation module is used to generate a second page corresponding to the second test account according to the first target code; and an interaction module is used to pass the first page and the The second page interacts to test the target program.
  • the device further includes: a code selection operation receiving module, configured to receive a code selection operation in a test program, and use the code selected by the code selection operation as the target code, and the test program The first test account is logged in; a first page generation module is used to generate the first page corresponding to the first test account according to the target code.
  • a code selection operation receiving module configured to receive a code selection operation in a test program, and use the code selected by the code selection operation as the target code, and the test program The first test account is logged in; a first page generation module is used to generate the first page corresponding to the first test account according to the target code.
  • the device further includes: an adjustment instruction receiving module, configured to receive an adjustment instruction for adjusting the first target code, the adjustment instruction including code adjustment information; and an update module, configured to adjust according to the The code adjustment information obtains the adjusted second target code, and the first page and the second page are updated according to the second target code.
  • an adjustment instruction receiving module configured to receive an adjustment instruction for adjusting the first target code, the adjustment instruction including code adjustment information
  • an update module configured to adjust according to the The code adjustment information obtains the adjusted second target code, and the first page and the second page are updated according to the second target code.
  • the update module is used to: load the second target code in a shared runtime space; a first process executes the second target code in the shared runtime space to update the first Page; the second process executes the second target code in the shared runtime space, and updates the second page.
  • the second page generation module is used to: obtain the first running space of the first process, and the first running space is used to load the runtime environment corresponding to the first process; In the second process, the first running space is used as the shared running space for loading a runtime environment, and a second page corresponding to the second test account is generated by using the second process according to the first target code.
  • the device further includes: a first target code display module, configured to display the first target code on a test program page corresponding to the first test account; an adjustment operation receiving module, configured to receive For the adjustment operation of the first target code, the second target code is obtained according to the adjustment operation, and an adjustment instruction for adjusting the first target code is triggered.
  • a first target code display module configured to display the first target code on a test program page corresponding to the first test account
  • an adjustment operation receiving module configured to receive For the adjustment operation of the first target code, the second target code is obtained according to the adjustment operation, and an adjustment instruction for adjusting the first target code is triggered.
  • the device further includes: a code debugging instruction receiving module, configured to receive a code debugging instruction, the code debugging instruction is received through the first code debugging page or the second code debugging page, the first A code debugging page is a code debugging page for logging in to the first test account, and the second code debugging page is a code debugging page for logging in to a second test account; a debugging module is used to perform code debugging on the target code according to the code debugging instructions. Code debugging, get debugging results.
  • the interaction module is configured to perform at least one of the following steps: receiving a first operation input through the first page, and displaying the operation result obtained according to the first operation on the second page Or, receiving an input second operation through the second page, and displaying the operation result obtained according to the second operation on the first page.
  • the device further includes: an account addition display page module, configured to display an account addition page, where candidate accounts are displayed on the account addition page;
  • the account selection operation received on the page uses the candidate account selected by the account selection operation as the second test account, and triggers the test account addition instruction.
  • the account addition display page module is used to obtain a preset virtual account, use the preset virtual account as a candidate account, and generate an account addition page.
  • the account addition display page module is configured to display an account addition page, and the account addition page displays a corresponding account login code, so that the second terminal scans the account login code and sends the corresponding account login code to the corresponding account.
  • the server sends a login authorization instruction, the login authorization instruction carries the user account corresponding to the second terminal; receives the user account corresponding to the second terminal sent by the server according to the login authorization instruction, and displays it as a candidate account in the The account is added on the page.
  • a computer device includes a memory and a processor.
  • the memory stores computer readable instructions.
  • the processor executes the steps of the program testing method.
  • One or more non-volatile storage media storing computer-readable instructions.
  • the processors execute the steps of the program testing method described above.
  • FIG. 1 is an application environment diagram of program testing methods provided in some embodiments
  • Figure 2 is a flowchart of a program testing method in some embodiments
  • 3A is a schematic diagram of a screen interface before receiving a test account adding instruction in some embodiments
  • 3B is a schematic diagram of the screen interface after generating the second page in some embodiments.
  • Figure 4 is a flowchart of a program testing method in some embodiments.
  • Figure 5 is a schematic diagram of an account addition page in some embodiments.
  • Figure 6 is a schematic diagram of an account addition page in some embodiments.
  • Figure 7 is a flowchart of a program testing method in some embodiments.
  • Figure 8 is a flowchart of a program testing method in some embodiments.
  • FIG. 9 is a schematic diagram of the principle of a program testing method in some embodiments.
  • Figure 10 is a structural block diagram of a program testing device in some embodiments.
  • Figure 11 is a block diagram of the internal structure of a computer device in some embodiments.
  • first, second, etc. used in this application can be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.
  • first page may be referred to as the second page, and similarly, the second page may be referred to as the first page.
  • Fig. 1 is an application environment diagram of a program testing method provided in some embodiments.
  • a first terminal 110 and a server 120 are included.
  • a developer tool can be run on the first terminal 110, and the program testing method provided in the embodiment of the present application can be implemented in the developer tool.
  • the program interface of the sub-application is generated according to the sub-application written by the user, which is called the first page.
  • the test account addition instruction can be triggered through the account addition operation, and the test account addition instruction carries the second
  • the developer tool responds to the test account adding instruction and uses the sub-application as the target program to obtain the code corresponding to the target program; the developer tool generates the page corresponding to the second test account according to the code of the target program, which is called the second Page, so that you can interact through the first page and the second page, and you can test the target program.
  • the program developer finds that there is a problem with the program during the interaction, for example, when the program responds slowly or the running logic corresponding to a function is chaotic, the developer can debug the application in the developer tool. If there is a problem, then The code of the target program can be modified in the developer tool. Wherein, the interaction between the first page and the second page may be performed through the server 120.
  • the interaction process is determined according to the target program.
  • the sub-application is a game application, such as a MOBA (Multiplayer Online Battle Arena, multiplayer online tactical competitive game) game application
  • the terminal displays the first game interface (the first page) and the second game of the first test account Interface (second page).
  • the first test account and the second test account are the accounts corresponding to both sides of the battle.
  • the program tester can move the game object controlled by the first test account (such as a hero) to the position A on the first game interface, and in the second The game interface also shows that the game object has moved to the A position.
  • the program tester can perform the skill application operation corresponding to the B skill on the second game interface.
  • the first terminal applies the B skill to the hero character according to the skill application operation, and the B skill will reduce the life value of the A hero character .
  • the application process of skill B can be displayed on the first game interface, and the life value of hero character A can be reduced. It is understandable that the application process of skill B can also be displayed on the second game interface, and the life value of the hero character A is reduced.
  • the server 120 may be an independent physical server, or a server cluster composed of multiple physical servers, and may be a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, cloud storage, and CDN.
  • the first terminal 110 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto.
  • the first terminal 110 and the server 120 may be connected through a communication connection method such as a network, which is not limited in this application.
  • a program testing method is proposed. This embodiment mainly uses the method to be applied to the first terminal 110 in FIG. 1 as an example. Specifically, it can include the following steps:
  • Step S202 Receive a test account addition instruction, and the test account addition instruction carries a second test account.
  • the test account addition instruction is used to instruct to add a test account, and may be triggered by the first terminal in response to the test account addition operation.
  • the number of second test accounts can be one or more. "Multiple" means at least two.
  • the second test account may be a user account that has been registered in advance.
  • the second test account may include at least one of a real user account or a virtual user account.
  • the real user account refers to the user obtained through account registration.
  • a virtual user account is not a real user account, but a virtual one, for example, it is specially used for testing programs to reduce the user account registration process.
  • the real user test account may be an instant messaging account, and the user can log in to the instant messaging application through the account to perform instant messaging. The virtual user account cannot log in to the instant messaging application to communicate.
  • the terminal can run a test program for testing the code.
  • the test program can receive a test account addition instruction.
  • the test program can be, for example, a developer tool or any program that can be used to simulate the target program locally. Runtime status of the program.
  • Developer tools are also called Integrated Development Environment (IDE, Integrated Development Environment), which is a type of application software that assists in the development of computer programs.
  • IDE Integrated Development Environment
  • the developer tool may be a sub-application developer tool, which may be used for the development and debugging of the sub-application program.
  • Sub-applications are commonly known as applets, which are applications that can be implemented in the environment provided by the parent application.
  • the parent application is the application that carries the sub-application and provides an environment for the realization of the sub-application.
  • the parent application is a native application.
  • Native applications are applications that can run directly on the operating system.
  • the parent application can be an instant messaging application
  • the child application can be a file management application, a mail application, or a game application.
  • the icon of the child application can be displayed on the page corresponding to the parent application.
  • the child application can be run in the environment provided by the parent application, such as running a game application. Therefore, the user can enter the game without installing the game application in the terminal in advance.
  • the test program may display an account addition page, and the test account to be added may be determined through the account addition page, as the second test account, and trigger the test account addition instruction.
  • Step S204 in response to the test account addition instruction, obtain the first target code corresponding to the target program, the first target code is the code corresponding to the first page, the first test account is logged in on the first page, and the first page is based on the first target Code generation.
  • the program is embodied by code, and the designed function can be executed by running the code.
  • a program can be called a project.
  • the page is used to display content, and the content may include at least one of pictures, text, controls, or videos.
  • the sub-application developer tool includes a sub-application simulator.
  • the sub-application simulator is used to simulate the real logic performance of the currently developed sub-application in the parent application. For most of the interfaces, the sub-application simulator can present the correct state on the sub-application simulator.
  • the sub-application simulator is used to simulate the state of the sub-application when it is running normally in the parent application.
  • the first target code is the code of the target program, and the first page is generated according to the first target code.
  • the running environment of the program can be simulated by the simulator, and the first target code can be loaded to generate the first page.
  • the program testing method before the first terminal receives the test account adding instruction, the program testing method further includes: in the test program, receiving a code selection operation, using the selected code indicated by the code selection operation as the target code, and logging in the test program There is a first test account; the first page corresponding to the first test account is generated according to the target code.
  • the code selection operation may be an operation of importing the code of the program. For example, when you open the developer tools for the first time, you can import the edited code.
  • the developer tool in the first terminal may also receive the code editing operation to obtain the corresponding target code, and receive the selection operation of the program name corresponding to the target code, and use the code of the program corresponding to the selection operation as the target code.
  • the first test account may be logged in beforehand. For example, when a click operation on the icon of the developer tool is received, the login page is opened. When receiving the user account and password entered by the user on the login page, you can log in to the developer application. You can import or edit the code in the developer tool. After obtaining the code of the program to be tested, the developer tool uses the simulator to load the code to generate the first page. When a test account needs to be added on the basis of the first test account, the test account addition instruction can be triggered by an operation.
  • the first page may be displayed in the form of a window.
  • a "window" is an area that is displayed on the screen and corresponds to an application.
  • a window is displayed on the screen, indicating that the application corresponding to the window is running. Since the test program will also have a corresponding window after it is opened, the first page can be an independent window, or it can be embedded as a sub-window in the corresponding window of the test program. For example, for the sub-application developer tool, when the sub-application developer tool is opened, the first sub-application debugging window is displayed for debugging the sub-application, and the first page is embedded in the first sub-application debugging window .
  • Step S206 Generate a second page corresponding to the second test account according to the first target code.
  • the first terminal after obtaining the first target code, the first terminal generates a second page corresponding to the second test account according to the first target code, and the second page is logged in with the second test account.
  • the first terminal may also interact with the corresponding server to log in. For example, if the second test account is a virtual user account, the first terminal may send an account login request to the server. Since both the first page and the second page are generated according to the first target code, the content displayed on the pages can be consistent. For example, when the target program is an applet, both the first page and the second page can be the client page of the applet, but the login account is different, so you can operate on the client page to implement the provided by the applet Interactive function.
  • the second page may be displayed in the form of a window. Since the test program will also have a corresponding window after it is opened, the second page may also be an independent window, or it may be embedded in the window corresponding to the test program as a sub-window.
  • the first terminal may generate the second sub-application debugging window while generating the second page, and at the same time, the second page is embedded in the second sub-application debugging window.
  • the first sub-application debugging window and the second sub-application debugging window are used to debug the same sub-application.
  • the first page is in the first sub-application debugging window
  • the second page is in the second sub-application debugging window.
  • the first terminal can obtain information such as the application identification (application identification, appid for short) of the target program, the code storage path, and the name of the program, as well as the developer information (for example, the developer’s A test account). Therefore, the code storage path can be determined according to the application identifier, and the corresponding code can be obtained according to the code storage path to generate the first page. And display the name of the target program on the first page, and display the name of the first test account in the first sub-application debugging window.
  • the program name of the target program can also be displayed on the second page, and the name of the second test account is displayed in the second sub-application debugging window, so as to improve the recognizability of the window.
  • the first sub-application debugging window and the second sub-application debugging window share the runtime environment of the target code, so that when the target code is modified, the first page and the second page in the first sub-application debugging window are The second page of the sub-application debugging window can be changed synchronously.
  • the first terminal may use the first test account as the primary account.
  • the first sub-application debugging window is used as the main window
  • the second sub-application debugging window is used as the sub-window.
  • the functions of the main window and the sub-window may have similarities and differences. For example, there are simulators and debuggers for both the child window and the main window. The debugger is used to debug the code, so when you need to debug the code, you can do it in the main window or in the sub-window.
  • the main window can also display the target code and correspond to the code editor, which can edit the code.
  • Figure 3A shows the screen interface diagram before receiving the test account adding instruction in some embodiments.
  • the first sub-application debugging window corresponding to the first page corresponds to the trigger simulator and the debugger. And the controls of the editor. It also includes a page display area 302, a code display area 304 that displays the code of the program under test, and a debugging data display area 306.
  • the debug data display area 306 may display a log of the executed code, for example.
  • the first page may be displayed on the page display area 302. Among them, "123abc" on the debugging window of the first sub-application is the name corresponding to the first test account, such as the user name in the instant messaging account. "Xxx game” is the name of the target program. On the first page, there is a button for "Enter Game". When the button is clicked, it will enter the game.
  • the first sub-application debugging window and the second sub-application debugging window are displayed on the screen.
  • the second sub-application debugging window corresponds to controls for invoking the simulator and the debugger, and also includes a page display area 302 and a debugging data display area 306.
  • a second page is displayed on the page display area 302, and the second page is embedded in the second sub-application debugging window.
  • "456qwe" on the second sub-application debugging window is the name corresponding to the second test account, such as the user name in the instant messaging account.
  • the name corresponding to the second test account also includes a prompt message indicating that the account is a test number. "Test virtual number” to indicate that the second test account is an added virtual number. "Xxx game” is the name of the target program.
  • the second page also displays the "Enter Game” button. When the button is clicked, the game is entered.
  • Step S208 interacting through the first page and the second page to test the target program.
  • the server can be used for interaction, and when the first page and the second page are used for interaction, the operation can be received through the first page and the second page.
  • the server stores the binding relationship between the first test account and the second test account, so the message can be transferred through the server.
  • the first terminal may store the binding relationship between the first test account and the second test account, and carry the bound test account when interacting, and the server will carry it according to the bound account Identify another page that needs to be interacted with.
  • the way of interaction between the first page and the second page is determined according to the type of the target program and the design of the program. For example, assuming that the target program is a social program, the instant messaging information entered by the user can be received on the first page, and the terminal sends the instant messaging information to the server. After receiving the instant messaging information, the server can send a message to the corresponding account of the first test account. The page forwards instant messaging information. For another example, assuming that the target program is a game program, if the terminal receives a game operation triggered on the page corresponding to the first test account, it can send the type of the operation to the server, and the server determines the operation result according to the type of operation, and sends it to the first The page and the second page send the operation result.
  • the operation on at least one of the first page and the second page may be performed by the user, for example, the tester performs the operation, performs manual testing, and the tester observes whether the program exists during the interaction. problem.
  • the operations on at least one of the first page and the second page may be performed automatically.
  • the corresponding artificial intelligence model can be trained, and the artificial intelligence model can be played against each other in a game.
  • the operation on the first page is input by the user, and the operation on the second page is output by the artificial intelligence model.
  • the second page can be generated according to the code corresponding to the first page by adding instructions to the test account, and the first page and the second page correspond to different test accounts, so the first page and the second page can be interacted with , To test the target program, improve the efficiency of program testing.
  • interacting through the first page and the second page includes at least one of the following steps: receiving a first operation input through the first page, and displaying the operation result obtained according to the first operation on the second page; or , Receive the input second operation through the second page, and display the operation result obtained according to the second operation on the first page.
  • the user may perform operations on the first page, or may perform operations on the second page.
  • the type of operation and the result of the operation are determined according to the needs and the design of the target program.
  • the type of operation can be an operation of inputting an instant messaging message, and the result of the operation is an instant messaging message.
  • the server can forward the instant messaging message to the log in to the second test account.
  • the second page displays the instant messaging message.
  • the type of operation may also be an operation of applying a game skill, and the result of the operation is the effect of applying the skill displayed on the game screen. It can be understood that the operation result obtained according to the first operation may also be displayed on the first page, and the operation result obtained according to the second operation may also be displayed on the second page.
  • the program testing method may further include the following steps:
  • step S402 the account addition page is displayed, and the account addition page displays candidate accounts.
  • the candidate account may include at least one of a virtual account and a real account.
  • the virtual account it can be written into the code of the test program, or it can be issued by the backend server corresponding to the test program. Therefore, the corresponding back-end server can also be logged in through the virtual account.
  • the login interface can be displayed on the test program.
  • the user account and password entered by the user are obtained through the login interface, the user account and password can be sent to the backend server corresponding to the test program.
  • the terminal can use the user account as a candidate account and mark the login status of the account.
  • the account addition page can be displayed automatically or triggered by the user.
  • an area for adding an account can be set.
  • the developer tool may display an account addition page entry, such as a button.
  • the account addition page can be displayed according to the trigger operation of the account addition page entry.
  • the first terminal may obtain a preset virtual account, use the preset virtual account as a candidate account, and generate an account addition page.
  • the virtual account may be preset in the server and sent to the test program in advance, and the test program saves the preset virtual account. It can also be that the virtual account is written into the code of the test program in advance.
  • the preset virtual account as a candidate account, the user can directly select the virtual account as the test account to be added, reducing the number of account addition steps.
  • the account addition page may be displayed, and the corresponding account login code is displayed on the account addition page, so that the second terminal scans the account login code and sends a login authorization instruction to the corresponding server.
  • the login authorization instruction carries the second terminal Corresponding user account; the user account corresponding to the second terminal sent by the receiving server according to the login authorization instruction is displayed as a candidate account on the account addition page.
  • the account login code is used for account login, and may be generated according to an account login request, or may be automatically displayed on the account adding interface.
  • the second terminal and the first terminal are different terminals.
  • the server may determine the unique identifier of the login request according to the account login request, and generate a QR code corresponding to the unique identifier as the account login code.
  • the unique identifier is used to identify the login request, and may be generated according to the first test account and the current time, for example.
  • the account login code can be used once or multiple times. For example, if two candidate accounts need to be added, two second terminals can be used to scan the two-dimensional codes for login respectively.
  • the login authorization instruction is used to indicate that the user account is allowed to log in at the first terminal.
  • the login authorization instruction may also carry a unique identifier corresponding to the account login code. Therefore, the server can confirm the first terminal authorized by the login authorization instruction according to the unique identifier, send the user account corresponding to the second terminal to the first terminal, and display the user account corresponding to the second terminal on the account addition page.
  • the user account logged in at the second terminal may be an instant messaging account, for example, the developer tool may be logged in through an instant messaging account.
  • Step S404 According to the account selection operation received through the account addition page, the candidate account selected by the account selection operation is used as the second test account, and the test account addition instruction is triggered.
  • the test account to be added can be selected through the account addition page.
  • the test account selection operation may be at least one of voice operation, gesture operation or touch operation.
  • the touch operation may be an operation of tapping or sliding the terminal screen.
  • a page for adding user accounts can be displayed on the test program. Multiple user accounts are displayed on the page.
  • the first terminal can use the user account as the second test account and trigger the test Add account instructions.
  • the test account addition instruction can be triggered by one operation or by multiple operations.
  • the account addition page displays a selection box corresponding to each user account.
  • the selection box can be a check box, so that you can receive Click multiple check boxes to select multiple user accounts as the second test account.
  • the test account addition instruction is triggered.
  • a control that triggers the display of the account addition page may be displayed on the developer tool.
  • the account addition page is displayed on the developer tool.
  • a QR code and the prompt message "Scan QR code to authorize login” are displayed on the account addition page.
  • the user can scan the QR code with the scanning function in the program that has logged in the instant messaging account in the second terminal, and the instant messaging program in the second terminal can display the prompt message whether to authorize the login. After the operation, the authorization login instruction is triggered. Therefore, as shown in the right diagram of FIG. 6, assuming that the user account "123456" is logged in by the second terminal, the account addition page displays the user account "123456" and the corresponding selection box. After the user has made his selection, he can click the "OK" control to trigger the test account addition instruction.
  • the program testing method may further include the following steps:
  • Step S702 receiving a code debugging instruction
  • the code debugging instruction is received through the first code debugging page or the second code debugging page
  • the first code debugging page is the code debugging page logged in by the first test account
  • the second code debugging page is The code debugging page of the second test account login.
  • the code debugging instruction may be performed through a code debugging operation.
  • the first terminal may receive a click operation on the "debugger" button in the developer tool to trigger the display of the debugging panel for receiving the debugging operation.
  • the user can input debugging parameters such as the identification of the function to be debugged in the debugging panel, and trigger the debugging instruction through the corresponding operation.
  • step S704 code debugging is performed according to the code debugging instruction, and the debugging result is obtained.
  • code debugging can be performed according to the debugging parameters.
  • the function to be debugged can be called to execute the function.
  • the first terminal may also output user log information generated during the execution of the code. Because the user log information contains a certain amount of information, it can play an auxiliary role in the debugging of the program.
  • the debugging result may be different according to different codes, for example, it may include at least one of function execution time and function call information.
  • Function execution time is the time it takes for the code to be executed once.
  • Function call information is used to describe the information of other functions called when the function is executed, so that the debugger can determine the problem of the code based on the call information.
  • the first code debugging page may be the first sub-application debugging window in FIG. 3B
  • the second code debugging page may be the second sub-application debugging window in FIG. 3B.
  • Code debugging may be performed in the first sub-application debugging window, or may be performed in the second sub-application debugging window.
  • the problems in the code can be found, and the problematic code can be modified to improve the operating efficiency of the modified target program.
  • the debugging of the program is the entire development process. Therefore, while improving the debugging efficiency, it also improves the development efficiency accordingly.
  • the program testing method further includes:
  • Step S802 Receive an adjustment instruction for adjusting the first target code, where the adjustment instruction includes code adjustment information.
  • the adjustment instruction is used to instruct to adjust the code.
  • the code adjustment information may include the code operation type and the corresponding code.
  • the code adjustment information may also be the adjusted target code itself.
  • the code operation type can be at least one of delete, insert, and update.
  • the adjustment instruction can be triggered through the code adjustment operation.
  • the code display area of the test program can display the first target code, and the code can be edited in the code display area to obtain the adjusted target code.
  • the program testing method may further include the following steps: displaying the first target code on the test program page corresponding to the first test account; receiving an adjustment operation on the first target code, and obtaining the second target code according to the adjustment operation , And trigger an adjustment instruction to adjust the first target code.
  • the test program page is a page displayed by the test program client, for example, it may be the first sub-application debugging window on the developer tool.
  • the adjustment operation may be at least one of a deletion operation, a replacement operation, or an insertion operation.
  • the second target code is the code obtained after adjusting the first target code.
  • step S804 the adjusted second target code is obtained according to the code adjustment information, and the first page and the second page are updated according to the second target code.
  • the code that needs to be deleted can be deleted.
  • the code that needs to be updated can be replaced with a new code.
  • the code adjustment information indicates that the type of insertion operation is included, a new code can be inserted at the corresponding position.
  • the code adjustment information indicates that the updated code is included, the updated code can be used as the second target code. Since the first page and the second page are generated according to the code of the target program, when the code changes, the content displayed on the page changes accordingly, so the first page and the second page can be updated.
  • updating the first page and the second page according to the second target code includes: loading the second target code in the shared runtime space; controlling the first process to execute the second target code in the shared runtime space, and updating the second target code in the shared runtime space; One page; control the second process to execute the second target code in the shared runtime space, and update the second page.
  • the process is the execution entity of the program.
  • the shared operating space is the operating space shared by the first page and the second page, such as a shared memory space.
  • the first process is a process for generating the first page
  • the second process is a process for generating the second page.
  • the developer tool needs to generate the first page
  • it can create the first process.
  • a second page needs to be generated
  • a second process can be created.
  • the first process can read the second target code from the shared running space and update the first page according to the second target code.
  • the second process can read the second target code from the shared runtime space, update the second page according to the second target code, and realize the synchronous update of the code of the target program.
  • the shared runtime space is used to load a runtime environment (Runtime environment).
  • the runtime environment is used to represent the environment data of the program at runtime, for example, it may include at least one of runtime environment data corresponding to global attributes related to the application program or runtime environment data corresponding to local attributes related to the application program.
  • the runtime environment describes the software or instructions that are executed when the program is running, especially those instructions that are not explicitly written but are essential to the normal operation of the program. For example, it can be the environment and library that the sub-application depends on when it runs.
  • the runtime environment may include information for managing storage and storing information needed to guide the running process.
  • a storage area can be obtained from the operating system for loading the runtime environment for the operation of the target code.
  • the execution engine can be used as a code interpreter for the target code. When the target code is updated, the execution engine executes the updated code. Among them, the execution engines corresponding to the first process and the second process are different.
  • generating the second page corresponding to the second test account according to the first target code includes: obtaining the first running space of the first process, where the first running space is used to load the runtime environment corresponding to the first process; creating The second process uses the first running space as a shared running space for loading the runtime environment corresponding to the second process, and uses the second process to generate a second page corresponding to the second test account according to the first target code.
  • the first page may have been created in advance. Therefore, the first process has been allocated a runtime environment for loading the first process. Therefore, when the second process is created, the first runtime space is also allocated to the second process.
  • the process is used to load the runtime environment corresponding to the second process, that is, the first runtime space is used as the shared runtime space of the first process and the second process, thereby realizing the sharing of the runtime environment of the first process and the second process, and achieving Sharing of the code of the target program. For example, when editing code through the test program page corresponding to the first page, such as the first sub-application debugging window, if the content displayed on the first page changes, the same will happen to the content displayed on the second page. Variety.
  • the method provided by the embodiment of the present application is used to test a small program, and the test program is a developer tool as an example, and the method provided by the embodiment of the present application will be described with reference to the schematic diagrams of the program testing method in some embodiments of FIG. 9. It includes the following steps:
  • the developer tool receives the program start request and starts the developer tool.
  • the developer tool is started.
  • the developer tool can display a login interface, receive user operations on the login interface, obtain a user account and password to log in to the server, and the user account is used as the primary account (becoming the first test account).
  • the target code may be imported into the developer tool by the user, or may be input in the code editing area of the developer tool.
  • the code can be a game code
  • the first page generated is the game launch page.
  • the first page is embedded in the first debugging window of the development tool.
  • test account addition instruction is received, and the test account addition instruction carries the second test account.
  • a control that triggers the account addition page may be displayed on the developer tool.
  • the user can start the multi-account test by clicking the control on the main window such as the first debugging window. For example, when a click operation on the control is received, a test account addition page may pop up, and the account addition page displays candidate virtual user accounts.
  • the user can select one or more virtual accounts as the account for the multi-account test, that is, the second test account, and click the "OK" control on the interface to trigger the test account addition instruction.
  • a second process can be created for creating a second page.
  • the second process shares the runtime environment with the first process that created the first page, that is, the main window, such as the first debugging window corresponding to the first test account, and the first debugging window corresponding to the sub-window, such as the second test account.
  • the second debugging window is shared runtime.
  • the second page is embedded in the second window of the developer tool, that is, when the second page is generated, the developer tool can also generate the second debugging window.
  • the difference between the main window and the sub-window includes: the main window can modify the code of the target program, but the sub-window cannot modify the code of the target program.
  • the target code corresponding to the sub-window changes with the target code corresponding to the main window.
  • the user can perform game operations on the first page and the second page respectively, and the first page and the second page interact through the first test account and the second test account, for example, a game battle.
  • the method corresponding to the error can be debugged. For example, if the developer finds that the error may be caused by the A function, he can enter the A function's identifier in the debugging panel of the developer tool to debug the A function.
  • the developer can modify the code in the first debugging window to obtain the modified second target code.
  • the main window and the sub-window are updated synchronously, that is, the first page and the second page can be updated according to the second target code.
  • the program testing method provided in the embodiments of the present application can be applied to test small programs to find program problems. Of course, it can also be used to test other programs.
  • mini programs can run on mobile clients.
  • the corresponding system of mobile clients can be iOS or Android.
  • Mini program developers can use IDEs to develop and debug mini programs. Developer tools can use the developers’ instant messaging account to log in.
  • the instant messaging account is changed, its login status will be synchronized to all open debugging windows, which will lead to the need to use multiple WeChat accounts to perform
  • the interactive test task cannot be completed on the same terminal, and the user needs to publish the applet in order to perform the multi-account assisted test, resulting in low test efficiency and failing to discover the interactive problems of the applet.
  • the method provided by the embodiments of the present application provides the functions of multi-account testing and debugging, where the account may also be referred to as an account.
  • a page generated based on the code of the applet can be embedded, just the login account It is different, so the scenario of multi-account testing is simulated, and the user can test whether there is any problem with the interactive function of the same program through interaction. It is understandable that you can set a test account to log in only in one terminal. If the test account is logged in to this terminal, the login status of other terminals will be invalid to ensure that the first page and the second page are interacted in the same terminal .
  • the function of the debugging window corresponding to the added test account may be different from the function of the debugging window corresponding to the main account.
  • the debugging window corresponding to the added test account has an emulator and a debugger, but there is no editor.
  • the code needs to be edited, it needs to be modified in the debugging window corresponding to the main account.
  • Each debugging window can share the runtime, so when the code of the debugging window corresponding to the main account is updated, the corresponding other debugging windows, the code is updated synchronously, and executed after compilation, to generate the updated first page and second page, thereby Improve the efficiency of small program development and debugging.
  • a program testing device may be integrated in the above-mentioned first terminal 110, and may specifically include a test account addition instruction receiving module 1002, and a first target code.
  • the test account addition instruction receiving module 1002 is configured to receive the test account addition instruction, and the test account addition instruction carries the second test account;
  • the first target code obtaining module 1004 is configured to obtain the first target code corresponding to the target program in response to the test account adding instruction, the first target code is the code corresponding to the first page, and the first test account is logged in on the first page, The first page is generated according to the first target code;
  • the second page generating module 1006 is configured to generate a second page corresponding to the second test account according to the first target code
  • the interaction module 1008 is used to interact through the first page and the second page to test the target program.
  • the program testing device further includes:
  • the code selection operation receiving module is used to receive the code selection operation in the test program, and use the code selected by the code selection operation as the target code, and the first test account is logged in the test program;
  • the first page generating module is used to generate the first page corresponding to the first test account according to the target code.
  • the program testing device further includes:
  • An adjustment instruction receiving module configured to receive an adjustment instruction for adjusting the first target code, where the adjustment instruction includes code adjustment information
  • the update module is used to obtain the adjusted second target code according to the code adjustment information, and update the first page and the second page according to the second target code.
  • the update module is used to: load the second target code in the shared runtime space; control the first process to execute the second target code in the shared runtime space, and update the first page; and control the second process to execute shared running The second target code in the space, update the second page.
  • the second page generation module 1006 is used to: obtain the first running space of the first process, and the first running space is used to load the runtime environment corresponding to the first process; The space is used as a shared runtime space for loading the runtime environment, and the second process is used to generate the second page corresponding to the second test account according to the first target code.
  • the program testing device further includes:
  • the first target code display module is used to display the first target code on the test program page corresponding to the first test account;
  • the adjustment operation receiving module is used to receive an adjustment operation on the first target code, obtain the second target code according to the adjustment operation, and trigger an adjustment instruction for adjusting the first target code.
  • the program testing device further includes: a code debugging instruction receiving module for receiving code debugging instructions, the code debugging instructions are received through the first code debugging page or the second code debugging page, the first code debugging page The code debugging page logged in for the first test account, and the second code debugging page is the code debugging page logged in by the second test account; the debugging module is used to debug the target code according to the code debugging instructions to obtain the debugging result.
  • a code debugging instruction receiving module for receiving code debugging instructions, the code debugging instructions are received through the first code debugging page or the second code debugging page, the first code debugging page The code debugging page logged in for the first test account, and the second code debugging page is the code debugging page logged in by the second test account; the debugging module is used to debug the target code according to the code debugging instructions to obtain the debugging result.
  • the interaction module is configured to perform at least one of the following steps: receiving the inputted first operation through the first page, and displaying the operation result obtained according to the first operation on the second page; or, receiving through the second page The input second operation displays the operation result obtained according to the second operation on the first page.
  • the program testing device further includes: an account addition display page module, configured to display an account addition page, where candidate accounts are displayed on the account addition page; and a test account addition instruction trigger module, configured to trigger the module according to the account received through the account addition page
  • the selection operation uses the candidate account selected by the account selection operation as the second test account, and triggers the test account addition instruction.
  • the account addition display page module is used to obtain a preset virtual account, use the preset virtual account as a candidate account, and generate an account addition page.
  • the account addition display page module is used to display the account addition page, and the corresponding account login code is displayed on the account addition page, so that the second terminal scans the account login code and sends a login authorization instruction to the corresponding server.
  • the login authorization instruction carries the user account corresponding to the second terminal; the user account corresponding to the second terminal sent by the receiving server according to the login authorization instruction is displayed as a candidate account on the account addition page.
  • Fig. 11 shows an internal structure diagram of a computer device in some embodiments.
  • the computer device may specifically be the first terminal 110 in FIG. 1.
  • the computer equipment includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus.
  • the memory includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium of the computer device stores an operating system, and may also store computer-readable instructions.
  • the processor can implement the program testing method.
  • the internal memory may also store computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor can execute the program testing method.
  • the display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen.
  • the input device of the computer equipment can be a touch layer covered on the display screen, or it can be a button, trackball or touchpad set on the housing of the computer equipment. It can be an external keyboard, touchpad, or mouse.
  • FIG. 11 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • the program testing apparatus provided in the present application may be implemented in a form of computer-readable instructions, and the computer-readable instructions may run on the computer device as shown in FIG. 11.
  • the memory of the computer device can store various program modules that make up the program testing device, for example, the test account addition instruction receiving module 1002, the first target code acquisition module 1004, the second page generation module 1006, and the interaction module 1008 shown in FIG. 10 .
  • the computer-readable instructions formed by each program module cause the processor to execute the steps in the program testing method of each embodiment of the present application described in this specification.
  • the computer device shown in FIG. 11 may receive a test account addition instruction through the test account addition instruction receiving module 1002 in the program testing device shown in FIG. 10, the test account addition instruction carries the second test account; the first target code
  • the obtaining module is used to obtain the first target code corresponding to the target program in response to the test account adding instruction, the first target code is the code corresponding to the first page, the first test account is logged in on the first page, and the first page is based on the first Target code generation;
  • the second page generation module 1006 generates the second page corresponding to the second test account according to the first target code;
  • the interaction module 1008 interacts with the first page and the second page to test the target program.
  • a computer device including a memory and a processor.
  • the memory stores computer-readable instructions.
  • the processor executes the steps of the program testing method described above.
  • the steps of the program testing method may be the steps in the program testing method of each of the foregoing embodiments.
  • a computer-readable storage medium which stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the processor executes the steps of the above-mentioned program testing method.
  • the steps of the program testing method may be the steps in the program testing method of each of the foregoing embodiments.
  • a computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the steps in the foregoing method embodiments.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

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

Abstract

本申请涉及一种程序测试方法、装置、计算机设备和存储介质,所述方法包括:接收测试账户添加指令,所述测试账户添加指令携带第二测试账户;响应于所述测试账户添加指令,获取目标程序对应的第一目标代码,所述第一目标代码为第一页面对应的代码,所述第一页面上登录有第一测试账户,所述第一页面根据所述第一目标代码生成;根据所述第一目标代码生成所述第二测试账户对应的第二页面;通过所述第一页面以及所述第二页面进行交互,以对所述目标程序进行测试。

Description

程序测试方法、装置、计算机设备和存储介质
本申请要求于2019年11月27日提交中国专利局,申请号为201911180652.7,申请名称为“程序测试方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别是涉及程序测试方法、装置、计算机设备和存储介质。
背景技术
随着计算机技术的发展,各种应用程序(Application,APP)的功能也在不断丰富。通过应用程序获取信息,进行学习或者工作越来越普遍,例如可以通过视频播放程序从对应的视频服务器中下载视频,并在终端中进行播放。
目前,为了让应用程序可以更好的进行服务,需要对应用程序进行测试,发现应用程序存在的问题,以对应用程序修改。目前,通常是在应用程序上线后,在线上对应用程序进行测试的,导致不能及时发现应用程序存在的问题,程序测试效率低。
发明内容
根据本申请提供的各种实施例,提供一种程序测试方法、装置、计算机设备和存储介质。
一种程序测试方法,由计算机设备执行,所述方法包括:接收测试账户添加指令,所述测试账户添加指令携带第二测试账户;响应于所述测试账户添加指令,获取目标程序对应的第一目标代码,所述第一目标代码为第一页面对应的代码,所述第一页面上登录有第一测试账户,所述第一页面根据所述第一目标代码生成;根据所述第一目标代码生成所述第二测试账户对应的第二页面; 及,通过所述第一页面以及所述第二页面进行交互,以对所述目标程序进行测试。
一种程序测试装置,所述装置包括:测试账户添加指令接收模块,用于接收测试账户添加指令,所述测试账户添加指令携带第二测试账户;第一目标代码获取模块,用于响应于所述测试账户添加指令,获取目标程序对应的第一目标代码,所述第一目标代码为第一页面对应的代码,所述第一页面上登录有第一测试账户,所述第一页面根据所述第一目标代码生成;第二页面生成模块,用于根据所述第一目标代码生成所述第二测试账户对应的第二页面;及,交互模块,用于通过所述第一页面以及所述第二页面进行交互,以对所述目标程序进行测试。
在一些实施例中,所述装置还包括:代码选择操接收模块,用于在测试程序中接收代码选择操作,将所述代码选择操作所指示选择的代码作为所述目标代码,所述测试程序中登录有所述第一测试账户;第一页面生成模块,用于根据所述目标代码生成所述第一测试账户对应的所述第一页面。
在一些实施例中,所述装置还包括:调整指令接收模块,用于接收对所述第一目标代码进行调整的调整指令,所述调整指令包括代码调整信息;更新模块,用于根据所述代码调整信息得到调整后的第二目标代码,根据所述第二目标代码更新所述第一页面以及所述第二页面。
在一些实施例中,所述更新模块用于:将所述第二目标代码加载在共享运行空间中;第一进程执行所述共享运行空间中的所述第二目标代码,更新所述第一页面;第二进程执行所述共享运行空间中的所述第二目标代码,更新所述第二页面。
在一些实施例中,所述第二页面生成模块用于:获取所述第一进程的第一运行空间,所述第一运行空间用于加载所述第一进程对应的运行时环境;创建所述第二进程,将所述第一运行空间作为加载运行时环境的所述共享运行空间,利用所述第二进程根据所述第一目标代码生成所述第二测试账户对应的第二页面。
在一些实施例中,所述装置还包括:第一目标代码显示模块,用于在所述 第一测试账户对应的测试程序页面上显示所述第一目标代码;调整操接收模块,用于接收对所述第一目标代码的调整操作,根据所述调整操作得到所述第二目标代码,并触发对所述第一目标代码进行调整的调整指令。
在一些实施例中,所述装置还包括:代码调试指令接收模块,用于接收代码调试指令,所述代码调试指令是通过第一代码调试页面或者第二代码调试页面中接收的,所述第一代码调试页面为第一测试账户登录的代码调试页面,所述第二代码调试页面为第二测试账户登录的代码调试页面;调试模块,用于根据所述代码调试指令对所述目标代码进行代码调试,得到调试结果。
在一些实施例中,所述交互模块用于执行以下步骤的至少一种:通过所述第一页面接收输入的第一操作,在所述第二页面显示根据所述第一操作得到的操作结果;或者,通过所述第二页面接收输入的第二操作,在所述第一页面显示根据所述第二操作得到的操作结果。
在一些实施例中,所述装置还包括:账户添加显示页面模块,用于显示账户添加页面,所述账户添加页面显示有候选账户;测试账户添加指令触发模块,用于根据通过所述账户添加页面接收的账户选择操作,将所述账户选择操作所指示选择的候选账户作为所述第二测试账户,触发所述测试账户添加指令。
在一些实施例中,所述账户添加显示页面模块用于:获取预设虚拟账户,将所述预设虚拟账户作为候选账户,生成账户添加页面。
在一些实施例中,所述账户添加显示页面模块用于:显示账户添加页面,所述账户添加页面上显示有对应的账户登录码,以使得第二终端扫描所述账户登录码,向对应的服务器发送登录授权指令,所述登录授权指令携带所述第二终端对应的用户账户;接收所述服务器根据所述登录授权指令发送的所述第二终端对应的用户账户,作为候选账户显示在所述账户添加页面上。
一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行上述程序测试方法的步骤。
一个或多个存储有计算机可读指令的非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述处理器执行上述程序测试方法的步 骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为一些实施例中提供的程序测试方法的应用环境图;
图2为一些实施例中程序测试方法的流程图;
图3A为一些实施例接收到测试账号添加指令之前的屏幕界面示意图;
图3B为一些实施例为生成第二页面之后的屏幕界面示意图;
图4为一些实施例中程序测试方法的流程图;
图5为一些实施例中账户添加页面的示意图;
图6为一些实施例中账户添加页面的示意图;
图7为一些实施例中程序测试方法的流程图;
图8为一些实施例中程序测试方法的流程图;
图9为一些实施例中程序测试方法的原理示意图;
图10为一些实施例中程序测试装置的结构框图;及
图11为一些实施例中计算机设备的内部结构框图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但除非特别说明,这些元件不受这些术语限制。这些术语仅用于 将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一页面称为第二页面,且类似地,可将第二页面称为第一页面。
图1为一些实施例中提供的程序测试方法的应用环境图。如图1所示,在该应用环境中,包括第一终端110以及服务器120。第一终端110上可以运行开发者工具,并通过开发者工具中实施本申请实施例提供的程序测试方法。例如在开发者工具中,已经登录第一测试账号,并根据用户编写的子应用程序生成了该子应用程序的程序界面,称为第一页面。当用户希望确定该子应用程序的交互功能是否存在问题时,由于该交互功能需要通过至少两个账户进行交互才能实现,则可以通过账号添加操作触发测试账户添加指令,测试账户添加指令携带第二测试账户,开发者工具响应于测试账户添加指令,将该子应用程序作为目标程序,获取目标程序对应的代码;开发者工具根据目标程序的代码生成第二测试账户对应的页面,称为第二页面,这样可以通过第一页面以及第二页面进行交互,可以对目标程序进行测试。当程序开发人员发现交互过程中程序出现问题时,例如发现程序响应速度慢或者某个功能对应的运行逻辑混乱时,开发人员可以在开发者工具中对应用程序进行调试,如果发现存在问题,则可以在开发者工具中对目标程序的代码进行修改。其中,第一页面以及第二页面之间的交互可以是通过服务器120进行的。
交互的过程具体根据目标程序确定。例如,假设子应用程序为游戏应用,例如MOBA(Multiplayer Online Battle Arena,多人在线战术竞技游戏)游戏应用,则终端展示有第一测试账户的第一游戏界面(第一页面)以及第二游戏界面(第二页面)。第一测试账户以及第二测试账户为对战双方对应的账户,则程序测试人员可以在第一游戏界面上移动第一测试账户控制的游戏对象(例如某个英雄人物)到A位置,在第二游戏界面上也显示该游戏对象移动到A位置。此时,程序测试人员可以在第二游戏界面上执行B技能对应的技能施加操作,第一终端根据该技能施加操作对该英雄人物施加B技能,该B技能会导致A英雄人物的生命值减少,则可以在第一游戏界面上显示B技能的施加过程,并显示A英雄人物的生命值减少。可以理解的是,第二游戏界面上也可以显示B技能的施加过程,并显示A英雄人物的生命值减少。
服务器120可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群,可以是提供云服务器、云数据库、云存储和CDN等基础云计算服务的云服务器。第一终端110可以是智能手机、平板电脑、笔记本电脑或者台式计算机等,但并不局限于此。第一终端110以及服务器120可以通过网络等通讯连接方式进行连接,本申请在此不做限制。
如图2所示,在一些实施例中,提出了一种程序测试方法,本实施例主要以该方法应用于上述图1中的第一终端110来举例说明。具体可以包括以下步骤:
步骤S202,接收测试账户添加指令,测试账户添加指令携带第二测试账户。
具体地,测试账户添加指令用于指示添加测试账户,可以是第一终端响应于测试账户添加操作触发的。第二测试账户的个数可以为一个或多个。“多个”是指至少两个。第二测试账户可以是预先已经注册的用户账户。第二测试账户可以包括真实用户账户或者虚拟用户账户中的至少一个。真实用户账户是指用户通过账户注册得到的。虚拟用户账户不是真实的用户账户,是虚拟出来的,例如是专门为测试程序使用的,以减少用户账户注册过程。例如,真实的用户测试账户可以是即时通讯账户,用户可以通过账户登录即时通讯应用,以进行即时通讯。而虚拟的用户账户不能登录即时通讯应用进行通讯。
在一些实施例中,终端中可以运行用于对代码进行测试的测试程序,测试程序可以接收测试账户添加指令,测试程序例如可以是开发者工具,也可以是任何可以用于在本地模拟目标程序运行时状况的程序。开发者工具也称为集成开发环境(IDE,Integrated Development Environment),是一类辅助开发计算机程序的应用软件。例如开发者工具可以为子应用开发者工具,可以用于子应用程序的开发以及调试。
子应用程序俗称为小程序,是能够在母应用提供的环境中实现的应用程序。母应用程序是承载子应用程序的应用程序,为子应用程序的实现提供环境。母应用程序是原生应用程序。原生应用程序是可直接运行于操作系统的应用程序。例如,母应用程序可以是即时通讯应用程序,子应用程序可以是文件管理应用程序、邮件应用程序或者游戏应用程序等。当子应用程序发布后,可以在母应 用程序对应的页面中展示子应用程序的图标,当用户点击该图标后,则可以在母应用提供的环境中运行该子应用程序,例如运行游戏应用,从而使用户无需预先在终端中安装该游戏应用也可以进入游戏。
在一些实施例中,测试程序可以显示账户添加页面,可以通过账户添加页面确定要添加的测试账号,作为第二测试账号,并触发测试账号添加指令。
步骤S204,响应于测试账户添加指令,获取目标程序对应的第一目标代码,第一目标代码为第一页面对应的代码,第一页面上登录有第一测试账户,第一页面根据第一目标代码生成。
具体地,程序(Application)是通过代码体现的,通过运行代码,可以执行设计的功能。在一些开发者工具中,可以将一个程序称为一个项目。在开发者工具中,也可以导入代码或者在开发者工具中编辑代码,并通过模拟器根据代码生成该代码对应的页面。页面用于显示内容,内容可以包括图片、文字、控件或者视频中的至少一种。例如,子应用开发者工具上包括子应用模拟器。子应用模拟器用于模拟当前开发的子应用在母应用中真实的逻辑表现,对于绝大部分的接口均能够在子应用模拟器上呈现出正确的状态。子应用模拟器用于模拟在母应用中正常运行子应用时所呈现的状态。
第一目标代码是目标程序的代码,第一页面是根据第一目标代码生成的。可以通过模拟器模拟程序的运行环境,并加载第一目标代码,生成第一页面。
在一些实施例中,在第一终端接收测试账户添加指令之前,程序测试方法还包括:在测试程序中,接收代码选择操作,将代码选择操作所指示选择的代码作为目标代码,测试程序中登录有第一测试账户;根据目标代码生成第一测试账户对应的第一页面。
具体地,代码选择操作可以是导入程序的代码的操作。例如,当第一次打开开发者工具时,可以导入已经编辑好的代码。第一终端中的开发者工具也可以接收代码编辑操作,得到对应的目标代码,并接收对目标代码对应的程序名称的选择操作,将该选择操作对应的程序的代码作为目标代码。
第一测试账户可以是预先已经登录的。例如,当接收到对开发者工具的图标的点击操作时,打开登录页面。当接收到用户在登录页面输入的用户账户以 及密码时,则可以登录开发者应用。开发者工具中可以导入代码,也可以编辑代码。得到需要测试的程序的代码后,开发者工具利用模拟器,加载代码生成第一页面。当需要在第一测试账号的基础上添加测试账号时,则可以通过操作触发测试账号添加指令。
在一些实施例中,第一页面可以是通过窗口(window)的形式显示的。“窗口”是屏幕上显示出来的,与一个应用程序相对应的区域。屏幕中显示出窗口,表示该窗口对应的应用程序正在运行中。由于测试程序在打开后也会存在对应的窗口,因此第一页面可以是独立的窗口,也可以是作为子窗口内嵌于测试程序对应的窗口中。例如,对于子应用程序开发者工具,当打开子应用程序开发者工具后,显示第一子应用调试窗口,用于对子应用程序进行调试,第一页面内嵌于第一子应用调试窗口中。
步骤S206,根据第一目标代码生成第二测试账户对应的第二页面。
具体地,第一终端得到第一目标代码后,根据第一目标代码生成第二测试账户对应的第二页面,第二页面登录有第二测试账号。第一终端在生成页面的过程中,还可以与对应的服务器进行交互,以进行登录。例如,如果第二测试账号是虚拟用户账号,则第一终端可以向服务器发送账号登录请求。由于第一页面以及第二页面都是根据第一目标代码生成的,因此,其页面展示的内容可以是一致的。例如,当目标程序为小程序时,则第一页面以及第二页面都可以为小程序的客户端页面,但登录的账号不同,因此可以在客户端页面上进行操作,以实现小程序提供的交互功能。
在一些实施例中,第二页面可以是通过窗口(window)的形式显示的。由于测试程序在打开后也会存在对应的窗口,因此第二页面也可以是独立的窗口,也可以是作为子窗口内嵌于测试程序对应的窗口中。例如,对于子应用程序开发者工具,第一终端在生成第二页面的同时,可以再生成第二子应用调试窗口,同时第二页面内嵌于第二子应用调试窗口中。第一子应用调试窗口以及第二子应用调试窗口用于对同一个子应用进行调试。
在一些实施例中,第一页面在第一子应用调试窗口中,第二页面在第二子应用调试调试窗口中。在生成第一子应用调试窗口时,第一终端可以获取目标 程序的应用标识(Application identification,简称appid)、代码存储路径以及程序的名称等信息,还可以获取开发者信息(例如开发者的第一测试账号)。因此可以根据应用标识确定代码存储路径,根据代码存储路径获取对应的代码生成第一页面。并在第一页面上显示目标程序的名称,在第一子应用调试窗口展示第一测试账号的名称。在生成第二子应用调试窗口时,也可以在第二页面上显示目标程序的程序名称,在第二子应用调试窗口展示第二测试账号的名称,提高窗口的可辨识度。
在一些实施例中,第一子应用调试窗口以及第二子应用调试窗口共享目标代码的运行时环境,这样,当目标代码被修改时,第一子应用调试窗口中的第一页面以及第二子应用调试窗口的第二页面可以同步改变。
在一些实施例中,第一终端可以将第一测试账号作为主账号。第一子应用调试窗口作为主窗口,第二子应用调试窗口作为子窗口。主窗口以及子窗口的功能可以存在相同之处以及不同之处。例如,子窗口与主窗口都对应有模拟器以及调试器。调试器用于对代码进行调试,因此当需要对代码进行调试时,可以在主窗口进行,也可以在子窗口进行。除此之外,主窗口还可以显示有目标代码并对应有代码编辑器,可以对代码进行编辑。
如图3A所示为一些实施例中在接收到测试账号添加指令之前的屏幕界面图,由图3A可以看出,第一页面对应的第一子应用调试窗口上对应有触发模拟器、调试器以及编辑器的控件。还包括页面显示区域302、显示被测程序的代码的代码显示区域304以及调试数据显示区域306。调试数据显示区域306例如可以显示执行代码的日志。页面显示区域302上可以显示有第一页面。其中,第一子应用调试窗口上的“123abc”为第一测试账户对应的名称,例如即时通讯账号中的用户名。“xxx游戏”为目标程序的名称。第一页面上展示有“进入游戏”的按键,当点击该按键时,则进入游戏。
如图3B所示为一些实施例中在接收到测试账号添加指令,生成第二页面之后的屏幕界面图。屏幕上显示有第一子应用调试窗口以及第二子应用调试窗口。第二子应用调试窗口上对应有调用模拟器以及调试器的控件,还包括页面显示区域302以及调试数据显示区域306。页面显示区域302上显示有第二页面,第 二页面是内嵌于第二子应用调试窗口的。第二子应用调试窗口上的“456qwe”为第二测试账户对应的名称,例如即时通讯账号中的用户名,第二测试账户对应的名称之前还包括用于表示该账号为测试号的提示信息“测试虚拟号”,以表示该第二测试账号是添加的虚拟号。“xxx游戏”为目标程序的名称。第二页面上同样展示有“进入游戏”的按键,当点击该按键时,则进入游戏。
步骤S208,通过第一页面以及第二页面进行交互,以对目标程序进行测试。
具体地,由于第一页面以及第二页面上均登录有测试账号,因此可以通过服务器进行交互,在通过第一页面以及第二页面进行交互时,可以通过第一页面以及第二页面接收操作。例如,当第二测试账号添加成功,则服务器存储第一测试账号以及第二测试账号之间的绑定关系,因此可以通过服务器进行消息的中转。又例如,当第二测试账号添加成功,则第一终端可以存储第一测试账号以及第二测试账号的绑定关系,在进行交互时,携带绑定的测试账号,服务器根据携带的绑定账号确定需要交互的另一页面。
第一页面以及第二页面交互的方式根据目标程序的类型以及程序的设计确定。例如,假设目标程序为社交程序,则可以在第一页面上接收用户输入的即时通讯信息,终端向服务器发送该即时通讯信息,服务器接收到该即时通讯信息后,可以向第一测试账号对应的页面转发即时通讯信息。又例如,假设目标程序为游戏程序,如果终端收到第一测试账号对应的页面上触发的游戏操作,则可以向服务器发送该操作的类型,服务器根据操作的类型确定操作结果,并向第一页面以及第二页面发送操作结果。
在一些实施例中,第一页面以及第二页面中至少一个页面中的操作可以是由用户执行的,例如由测试人员进行操作,进行人工测试,并由测试人员观察程序在交互过程中是否存在问题。第一页面以及第二页面中至少一个页面中的操作可以是自动执行的。例如可以训练对应的人工智能模型,该人工智能模型可以进行游戏对战。第一页面的操作由用户输入,第二页面的操作由人工智能模型输出。
上述程序测试方法,通过测试账号添加指令,可以根据第一页面对应的代码生成第二页面,且第一页面以及第二页面对应的测试账号不同,因此可以通 过第一页面以及第二页面进行交互,以对目标程序进行测试,提高了程序测试效率。
在一些实施例中,通过第一页面以及第二页面进行交互包括以下步骤的至少一种:通过第一页面接收输入的第一操作,在第二页面显示根据第一操作得到的操作结果;或者,通过第二页面接收输入的第二操作,在第一页面显示根据第二操作得到的操作结果。
具体地,用户可以是在第一页面上进行操作,也可以是在第二页面上进行操作。操作的类型以及操作结果根据需要以及目标程序的设计确定。例如操作的类型可以是输入即时通讯消息的操作,则操作结果为得到即时通讯消息,如果第一页面接收到发送即时通讯消息的操作,则服务器可以转发该即时通讯消息到第二测试账号登录的第二页面中,第二页面显示该即时通讯消息。操作的类型也可以是施加游戏技能的操作,则操作结果为游戏画面上展示的施加技能的效果。可以理解,根据第一操作得到的操作结果还可以显示在第一页面上,根据第二操作得到的操作结果还可以显示在第二页面上。
在一些实施例中,如图4所示,程序测试方法还可以包括以下步骤:
步骤S402,显示账户添加页面,账户添加页面显示有候选账户。
具体地,候选账户可以包括虚拟账户以及真实账户中的至少一种。对于虚拟账户,可以是写入到测试程序的代码中的,也可以是测试程序对应的后台服务器下发的。因此通过虚拟账户也可以登录对应的后台服务器。对于真实账户,则可以是在测试程序上显示登录界面,当通过登录界面获取到用户输入的用户账户以及密码,则可以向测试程序对应的后台服务器发送用户账户以及密码,当后台服务器验证通过,则终端可以将该用户账户作为候选账户,便标注该账号的登录态。
账户添加页面可以是自动显示的,也可以是用户触发的。例如,开发者工具的界面中,可以设置有用于添加账户的区域。又例如,开发者工具中可以显示账户添加页面入口,例如一个按键。可以根据对账户添加页面入口的触发操作显示账户添加页面。
在一些实施例中,第一终端可以获取预设虚拟账户,将预设虚拟账户作为 候选账户,生成账户添加页面。
具体地,预设虚拟账户可以有一个或多个,是预先设置的。可以是在服务器中预先设置虚拟账户,预先发送给测试程序,测试程序保存预设虚拟账户。也可以是预先将虚拟账户写入到测试程序的代码中。通过将预设虚拟账户作为候选账户,则用户可以直接选择虚拟账户作为需要添加的测试账户,减少账户添加步骤。
在一些实施例中,可以显示账户添加页面,账户添加页面上显示有对应的账户登录码,以使得第二终端扫描账户登录码,向对应的服务器发送登录授权指令,登录授权指令携带第二终端对应的用户账户;接收服务器根据登录授权指令发送的第二终端对应的用户账户,作为候选账户显示在账户添加页面上。
具体地,账户登录码用于进行账户登录,可以是根据账户登录请求生成的,也可以是自动显示在账户添加界面的。第二终端与第一终端是不同的终端。服务器可以根据账户登录请求确定该登录请求的唯一标识,并生成该唯一标识对应的二维码,作为账户登录码。该唯一标识用于标识该登录请求,例如可以是根据第一测试账号以及当前时间生成。其中账户登录码可以使用一次或多次,例如,如果需要添加两个候选账号,则可以使用两个第二终端分别扫描用于登录的二维码。
登录授权指令用于指示允许用户账号在第一终端登录。登录授权指令还可以携带账户登录码对应的唯一标识。因此服务器可以根据唯一标识确认该登录授权指令所授权的第一终端,向第一终端发送第二终端对应的用户账户,将第二终端对应的用户账户显示在账户添加页面上。
本申请实施例中,在第二终端登录的用户账户可以是即时通讯账户,例如可以通过即时通讯账户登录开发者工具。通过利用第二终端扫描账户登陆码登录,可以不在开发者工具上输入测试账号,简单便捷,且可以提高账户的安全性。
步骤S404,根据通过账户添加页面接收的账户选择操作,将账户选择操作所指示选择的候选账户作为第二测试账户,触发测试账户添加指令。
具体地,通过账户添加页面可以选择要添加的测试账户。测试账户选择操 作可以是语音操作、手势操作或者触摸操作的至少一种。触摸操作可以是点击或者滑动终端屏幕的操作。例如,测试程序上可以展示添加用户账户的页面,该页面上显示有多个用户账户,当用户点击其中的一个用户账户时,第一终端可以将该用户账户作为第二测试账户,并触发测试账户添加指令。
测试账户添加指令可以是一个操作触发的,也可以是多个操作触发的。例如,账户添加页面展示有各个用户账户对应的选择框,当接收到对选择框的点击操作时,则将对应的用户账户作为第二测试账户,其中选择框可以是复选框,这样可以接收对多个复选框的点击操作,选择多个用户账户作为第二测试账户。当账户选择完毕,接收到确认账户选择完成的操作时,触发测试账户添加指令。
如图5所示,为一些实施例中账户添加页面的示意图,在开发者工具上可以显示有触发显示账户添加页面的控件,当用户点击该控件时,在开发者工具上显示账户添加页面。账户添加页面上显示有3个虚拟账户:虚拟账户1、虚拟账户2以及虚拟账户3,还显示有各个虚拟账户对应的选择框以及显示有请求添加真实账户的功能控件“添加”。用户可以选择虚拟账户作为待添加的账户。也可以点击“添加”控件,触发登录请求。当触发登录请求后,如图6左边图所示,账户添加页面上显示有二维码以及提示信息“扫描二维码授权登录”。用户可以利用第二终端中,登录有即时通讯账户的程序中的扫描功能扫描该二维码,则第二终端中的即时通讯程序可以显示是否授权登录的提示信息,当接收到确认授权登录的操作后,则触发授权登录指令。因此,如图6右边图所示,假设第二终端登录的是用户账户“123456”,则账户添加页面显示用户账户“123456”以及对应的选择框。当用户选择完毕后,则可以点击“确定”控件,触发测试账户添加指令。
在一些实施例中,如图7所示,程序测试方法还可以包括以下步骤:
步骤S702,接收代码调试指令,代码调试指令是通过第一代码调试页面或者第二代码调试页面中接收的,第一代码调试页面为第一测试账户登录的代码调试页面,第二代码调试页面为第二测试账户登录的代码调试页面。
具体地,在通过第一页面以及第二页面进行交互的过程中,可能会发现目标程序存在问题,例如响应结果与用户预期的输出结果不一致。则需要对代码 进行调试,以发现代码存在的问题。代码调试指令可以是通过代码调试操作进行的,例如第一终端可以接收对开发者工具中的“调试器”按键的点击操作,触发显示调试面板,用于接收调试操作。用户可以在调试面板中输入要调试的函数的标识等调试参数,并通过对应的操作触发调试指令。
步骤S704,根据代码调试指令进行代码调试,得到调试结果。
具体地,得到代码调试指令后,可以根据调试参数进行代码调试。例如可以调用要调试的函数,以执行该函数。在调试时,第一终端还可以将执行代码的过程中所产生的用户日志信息输出。由于用户日志信息中包含一定的信息量,因此可以对程序的调试起到辅助作用。调试结果根据不同的代码可以不同,例如可以包括函数执行耗时和函数调用信息中的至少一种。函数执行耗时,是指代码被执行一次所耗费的时间。函数调用信息,用于描述函数在被执行时,所调用的其他函数的信息,以使得调试人员可以根据调用信息确定代码存在的问题。
其中,第一代码调试页面可以是图3B中的第一子应用调试窗口,第二代码调试页面可以是是图3B中的第二子应用调试窗口。代码调试可以是在第一子应用调试窗口进行的,也可以是在第二子应用调试窗口进行的。
本申请实施例中,通过对代码进行调试,可以发现代码中存在的问题,以对存在问题的代码进行修改,提高了修改后的目标程序的运行效率,而且由于程序的调试,是整个开发过程中的其中一个环节,因此在提高调试效率的同时,也相应提高了开发效率。
在一些实施例中,如图8所示,程序测试方法还包括:
步骤S802,接收对第一目标代码进行调整的调整指令,调整指令包括代码调整信息。
具体地,调整指令用于指示对代码进行调整。代码调整信息可以包括代码操作类型以及对应的代码。代码调整信息也可以是调整后的目标代码本身。代码操作类型可以为删除、插入以及更新的至少一种。
当需要对代码进行修改时,例如在调试过程中发现代码存在问题时,可以通过代码调整操作触发调整指令。例如测试程序的代码显示区域可以显示有第 一目标代码,可以在代码显示区域对该代码进行编辑,得到调整后的目标代码。
在一些实施例中,程序测试方法还可以包括以下步骤:在第一测试账户对应的测试程序页面上显示第一目标代码;接收对第一目标代码的调整操作,根据调整操作得到第二目标代码,并触发对第一目标代码进行调整的调整指令。
具体地,测试程序页面是测试程序客户端显示的页面,例如可以是开发者工具上的第一子应用调试窗口。调整操作可以是删除操作、替换操作或者插入操作的至少一种。第二目标代码是对第一目标代码进行调整后,得到的代码。通过在第一测试账号对应的测试程序页面上显示第一代码,用户可以直接在测试页面上修改代码,因此提高了测试的效率。
步骤S804,根据代码调整信息得到调整后的第二目标代码,根据第二目标代码更新第一页面以及第二页面。
具体地,当代码调整信息表示包括删除操作类型,则可以将需要删除的代码进行删除。当代码调整信息表示包括更新操作类型,则可以将需要更新的代码替换为新的代码。当代码调整信息表示包括插入操作类型,则可以在对应位置插入新的代码。当代码调整信息表示包括更新后的代码,则可以将更新后的代码作为第二目标代码。由于第一页面以及第二页面是根据目标程序的代码生成的,因此当代码改变,页面上显示的内容跟随改变,因此可以对第一页面以及第二页面进行更新。
在一些实施例中,根据第二目标代码更新第一页面以及第二页面包括:将第二目标代码加载在共享运行空间中;控制第一进程执行共享运行空间中的第二目标代码,更新第一页面;控制第二进程执行共享运行空间中的第二目标代码,更新第二页面。
具体地,进程是程序的执行实体。共享运行空间是第一页面以及第二页面共享的运行空间,例如共享的内存空间。第一进程是用于生成第一页面的进程,第二进程是用于生成第二页面的进行。例如开发者工具在需要生成第一页面时,可以创建第一进程。在需要生成第二页面时,可以创建第二进程。通过将第二目标代码加载在第一进程以及第二进程共享的运行空间中,因此第一进程可以从共享运行空间中读取第二目标代码,根据第二目标代码更新第一页面。第二 进程可以从共享运行空间中读取第二目标代码,根据第二目标代码更新第二页面,实现目标程序的代码的同步更新。
在一些实施例中,该共享运行空间用于加载运行时环境(Runtime environment)。运行时环境用于表示程序在运行时的环境数据,例如可以包括应用程序涉及的全局属性对应的运行时环境数据或者应用程序涉及的局部属性对应的运行时环境数据中的至少一个。运行时环境描述了程序运行的时候执行的软件或者指令,特别是那些没有明确写出,但对程序正常运行至关重要的指令。例如,可以是子应用程序运行时所依赖的环境以及库。运行时环境可以包括用于管理存储器并保存指导运行过程所需要的信息。可以从操作系统获取得到一块存储区,用于加载运行时环境,以用于目标代码的运行。在运行时,可以将执行引擎作为目标代码的代码解释器,当目标代码更新后,由执行引擎执行更新后的代码。其中,第一进程以及第二进程对应的执行引擎不同。
在一些实施例中,根据第一目标代码生成第二测试账户对应的第二页面包括:获取第一进程的第一运行空间,第一运行空间用于加载第一进程对应的运行时环境;创建第二进程,将第一运行空间作为共享运行空间,用于加载第二进程对应的运行时环境,利用第二进程根据第一目标代码生成第二测试账户对应的第二页面。
具体地,第一页面可以是预先已经创建的,因此第一进程已经分配了用于加载第一进程对应的运行时环境,因此在创建第二进程时,将第一运行空间也分配给第二进程,用于加载第二进程对应的运行时环境,即第一运行空间作为第一进程以及第二进程的共享运行空间,从而实现了第一进程与第二进程的运行时环境的共享,实现目标程序的代码的共享。举个例子,当通过第一页面对应的测试程序页面如第一子应用调试窗口编辑代码时,如果导致第一页面上显示的内容发生变化,则第二页面上的显示内容也会发生同样的变化。
以下以本申请实施例提供的方法用于对小程序进行测试,测试程序为开发者工具为例,结合图9一些实施例中程序测试方法的原理示意图,对本申请实施例提供的方法进行说明,包括以下步骤:
1、开发者工具接收程序启动请求,启动开发者工具。
具体地,当接收到用户双击开发者工具的图标的操作时,启动开发者工具。
2、根据第一测试账号以及密码登录。
具体地,启动开发者工具后,开发者工具可以显示登录界面,接收用户在登录界面的操作,获取用户账号以及密码登录服务器,该用户账号作为主账号(成为第一测试账号)。
3、获取目标代码,根据目标代码生成第一页面。
具体地,目标代码可以是用户导入到开发者工具的,也可以是在开发者工具的代码编辑区域输入的。该代码可以为游戏代码,生成的第一页面为游戏启动页面。第一页面内嵌于开发工具的第一调试窗口的。
4、接收测试账户添加指令,测试账户添加指令携带第二测试账户。
具体地,开发者工具上可以显示有触发账户添加页面的控件。用户可以通过在主窗口例如第一调试窗口上点击该控件,开启多账户测试。例如当接收到对该控件的点击操作时,可以弹出测试账户添加页面,账户添加页面显示有候选的虚拟用户账号。用户可以选择一个或多个虚拟账号作为多账户测试的账号,即第二测试账号,并点击界面上的“确定”控件,触发测试账号添加指令。
5、响应于测试账户添加指令,获取目标程序对应的第一目标代码。
6、根据第一目标代码生成第二测试账户对应的第二页面。
具体地,可以创建第二进程,用于创建第二页面。如图9所示,第二进程与创建第一页面的第一进程共享运行时环境,即主窗口,例如第一测试账号对应的第一调试窗口,与子窗口例如第二测试账号对应的第二调试窗口是共享runtime的。第二页面是内嵌于开发者工具的第二窗口的,即在生成第二页面的同时,开发者工具也可以生成第二调试窗口。主窗口与子窗口的区别包括:主窗口中可以修改目标程序的代码,而子窗口不能修改目标程序的代码,子窗口对应的目标代码跟随主窗口对应的目标代码改变。
7、通过第一页面以及第二页面进行交互,以对目标程序进行测试。
具体地,用户可以分别在第一页面以及第二页面上进行游戏操作,第一页面和第二页面通过第一测试账号以及第二测试账号进行交互,例如进行游戏对战。
8、接收代码调试指令,根据代码调试指令对目标代码进行代码调试,得到调试结果。
具体地,当交互的过程中,发现程序存在错误时,则可以对存在错误对应的方法进行调试。例如,开发人员发现该错误可能是由于A函数引起的,则可以在开发者工具的调试面板中输入A函数的标识,以对A函数进行调试。
9、接收对第一目标代码进行调整的调整指令,调整指令包括代码调整信息,根据代码调整信息获取调整后的第二目标代码。
具体地,当调试显示A函数存在问题时,则开发人员可以在第一调试窗口对代码进行修改,得到修改后的第二目标代码。
10、根据第二目标代码更新第一页面以及第二页面。
具体地,由于第一进程与第二进程共享运行时环境,因此对代码修改后,主窗口以及子窗口是同步更新的,即可以根据第二目标代码更新第一页面以及第二页面。
本申请实施例提供的程序测试方法可以应用于对小程序进行测试,以发现程序问题。当然也可以应用于对其他程序进行测试。小程序作为一种产品和技术形态,可以运行于移动客户端,移动客户端对应的系统可以为iOS或者安卓系统,小程序开发者们可以使用IDE来开发以及调试小程序。开发者工具可以使用开发者们的即时通讯账号进行登录,一般而言,当即时通讯账号改变时,其登录态将同步到所有已打开的调试窗口,这会导致对于需要通过多个微信号进行交互的测试任务无法在同一个终端完成,需要用户将小程序发布,才能进行多账号协助测试,导致测试效率低,无法发现小程序在交互时存在的问题。
而通过本申请实施例提供的方法,提供了多帐号测试以及调试的功能,其中,账户也可以称为账号。可以在主账号的基础上,添加测试账号,并生成每个测试账号对应的调试窗口,每个测试账号对应的调试窗口中,可以内嵌有根据小程序的代码生成的页面,只是登录的账号是不同的,因此模拟了多账号测试的情景,用户可以通过交互来测试同一程序的交互功能是否存在问题。可以理解,可以设置一个测试账号只能在一个终端中登录,如果测试账号在本终端登录,则在其他终端的登录态将失效,以保证第一页面以及第二页面是在同一 终端中进行交互。
其中,添加的测试账号对应的调试窗口的功能与主账号对应的调试窗口的功能可以存在不同,例如添加的测试账号对应的调试窗口存在模拟器以及调试器,但不存在编辑器。当需要编辑代码时,则需要在主账号对应的调试窗口进行修改。各个调试窗口可以共享运行时,因此当主账号对应的调试窗口的代码更新时,相应的其他调试窗口,代码同步更新,并在编译后执行,以生成更新后的第一页面以及第二页面,从而提升了小程序开发和调试的效率。
如图10所示,在一些实施例中,提供了一种程序测试装置,该程序测试装置可以集成于上述的第一终端110中,具体可以包括测试账户添加指令接收模块1002、第一目标代码获取模块1004、第二页面生成模块1006以及交互模块1008。
测试账户添加指令接收模块1002,用于接收测试账户添加指令,测试账户添加指令携带第二测试账户;
第一目标代码获取模块1004,用于响应于测试账户添加指令,获取目标程序对应的第一目标代码,第一目标代码为第一页面对应的代码,第一页面上登录有第一测试账户,第一页面根据第一目标代码生成;
第二页面生成模块1006,用于根据第一目标代码生成第二测试账户对应的第二页面;
交互模块1008,用于通过第一页面以及第二页面进行交互,以对目标程序进行测试。
在一些实施例中,程序测试装置还包括:
代码选择操接收模块,用于在测试程序中接收代码选择操作,将代码选择操作所指示选择的代码作为目标代码,测试程序中登录有第一测试账户;
第一页面生成模块,用于根据目标代码生成第一测试账户对应的第一页面。
在一些实施例中,程序测试装置还包括:
调整指令接收模块,用于接收对第一目标代码进行调整的调整指令,调整指令包括代码调整信息;
更新模块,用于根据代码调整信息得到调整后的第二目标代码,根据第二 目标代码更新第一页面以及第二页面。
在一些实施例中,更新模块用于:将第二目标代码加载在共享运行空间中;控制第一进程执行共享运行空间中的第二目标代码,更新第一页面;控制第二进程执行共享运行空间中的第二目标代码,更新第二页面。
在一些实施例中,第二页面生成模块1006用于:获取第一进程的第一运行空间,第一运行空间用于加载第一进程对应的运行时环境;创建第二进程,将第一运行空间作为加载运行时环境的共享运行空间,利用第二进程根据第一目标代码生成第二测试账户对应的第二页面。
在一些实施例中,程序测试装置还包括:
第一目标代码显示模块,用于在第一测试账户对应的测试程序页面上显示第一目标代码;
调整操接收模块,用于接收对第一目标代码的调整操作,根据调整操作得到第二目标代码,并触发对第一目标代码进行调整的调整指令。
在一些实施例中,程序测试装置还包括:代码调试指令接收模块,用于接收代码调试指令,代码调试指令是通过第一代码调试页面或者第二代码调试页面中接收的,第一代码调试页面为第一测试账户登录的代码调试页面,第二代码调试页面为第二测试账户登录的代码调试页面;调试模块,用于根据代码调试指令对目标代码进行代码调试,得到调试结果。
在一些实施例中,交互模块用于执行以下步骤的至少一种:通过第一页面接收输入的第一操作,在第二页面显示根据第一操作得到的操作结果;或者,通过第二页面接收输入的第二操作,在第一页面显示根据第二操作得到的操作结果。
在一些实施例中,程序测试装置还包括:账户添加显示页面模块,用于显示账户添加页面,账户添加页面显示有候选账户;测试账户添加指令触发模块,用于根据通过账户添加页面接收的账户选择操作,将账户选择操作所指示选择的候选账户作为第二测试账户,触发测试账户添加指令。
在一些实施例中,账户添加显示页面模块用于:获取预设虚拟账户,将预设虚拟账户作为候选账户,生成账户添加页面。
在一些实施例中,账户添加显示页面模块用于:显示账户添加页面,账户添加页面上显示有对应的账户登录码,以使得第二终端扫描账户登录码,向对应的服务器发送登录授权指令,登录授权指令携带第二终端对应的用户账户;接收服务器根据登录授权指令发送的第二终端对应的用户账户,作为候选账户显示在账户添加页面上。
图11示出了一些实施例中计算机设备的内部结构图。该计算机设备具体可以是图1中的第一终端110。如图11所示,该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、输入装置和显示屏。其中,存储器包括非易失性存储介质和内存储器。该计算机设备的非易失性存储介质存储有操作系统,还可存储有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器实现程序测试方法。该内存储器中也可储存有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器执行程序测试方法。计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。
本领域技术人员可以理解,图11中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一些实施例中,本申请提供的程序测试装置可以实现为一种计算机可读指令的形式,计算机可读指令可在如图11所示的计算机设备上运行。计算机设备的存储器中可存储组成该程序测试装置的各个程序模块,比如,图10所示的测试账户添加指令接收模块1002、第一目标代码获取模块1004、第二页面生成模块1006以及交互模块1008。各个程序模块构成的计算机可读指令使得处理器执行本说明书中描述的本申请各个实施例的程序测试方法中的步骤。
例如,图11所示的计算机设备可以通过如图10所示的程序测试装置中的测试账户添加指令接收模块1002接收测试账户添加指令,测试账户添加指令携带第二测试账户;通过第一目标代码获取模块用于响应于测试账户添加指令, 获取目标程序对应的第一目标代码,第一目标代码为第一页面对应的代码,第一页面上登录有第一测试账户,第一页面根据第一目标代码生成;通过第二页面生成模块1006根据第一目标代码生成第二测试账户对应的第二页面;通过交互模块1008通过第一页面以及第二页面进行交互,以对目标程序进行测试。
在一些实施例中,提供了一种计算机设备,包括存储器和处理器,存储器存储有计算机可读指令,计算机可读指令被处理器执行时,使得处理器执行上述程序测试方法的步骤。此处程序测试方法的步骤可以是上述各个实施例的程序测试方法中的步骤。
在一些实施例中,提供了一种计算机可读存储介质,存储有计算机可读指令,计算机可读指令被处理器执行时,使得处理器执行上述程序测试方法的步骤。此处程序测试方法的步骤可以是上述各个实施例的程序测试方法中的步骤。
在一个实施例中,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述各方法实施例中的步骤。
应该理解的是,虽然本申请各实施例的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,各实施例中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性 存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (15)

  1. 一种程序测试方法,由计算机设备执行,所述方法包括:
    接收测试账户添加指令,所述测试账户添加指令携带第二测试账户;
    响应于所述测试账户添加指令,获取目标程序对应的第一目标代码,所述第一目标代码为第一页面对应的代码,所述第一页面上登录有第一测试账户,所述第一页面根据所述第一目标代码生成;
    根据所述第一目标代码生成所述第二测试账户对应的第二页面;及
    通过所述第一页面以及所述第二页面进行交互,以对所述目标程序进行测试。
  2. 根据权利要求1所述的方法,其特征在于,所述接收测试账户添加指令之前,所述方法还包括:
    在测试程序中接收代码选择操作,将所述代码选择操作所指示选择的代码作为所述目标代码,所述测试程序中登录有所述第一测试账户;
    根据所述目标代码生成所述第一测试账户对应的所述第一页面。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    接收对所述第一目标代码进行调整的调整指令,所述调整指令包括代码调整信息;
    根据所述代码调整信息得到调整后的第二目标代码,根据所述第二目标代码更新所述第一页面以及所述第二页面。
  4. 根据权利要求3所述的方法,其特征在于,所述根据第二目标代码更新所述第一页面以及所述第二页面包括:
    将所述第二目标代码加载在共享运行空间中;
    第一进程执行所述共享运行空间中的所述第二目标代码,更新所述第一页面;及
    第二进程执行所述共享运行空间中的所述第二目标代码,更新所述第二页面。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述第一目标代码 生成所述第二测试账户对应的第二页面包括:
    获取所述第一进程的第一运行空间,所述第一运行空间用于加载所述第一进程对应的运行时环境;
    创建所述第二进程,将所述第一运行空间作为加载运行时环境的所述共享运行空间,利用所述第二进程根据所述第一目标代码生成所述第二测试账户对应的第二页面。
  6. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    在所述第一测试账户对应的测试程序页面上显示所述第一目标代码;
    接收对所述第一目标代码的调整操作,根据所述调整操作得到所述第二目标代码,并触发对所述第一目标代码进行调整的调整指令。
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    接收代码调试指令,所述代码调试指令是通过第一代码调试页面或者第二代码调试页面中接收的,所述第一代码调试页面为第一测试账户登录的代码调试页面,所述第二代码调试页面为第二测试账户登录的代码调试页面;
    根据所述代码调试指令对所述目标代码进行代码调试,得到调试结果。
  8. 根据权利要求1所述的方法,其特征在于,所述通过所述第一页面以及所述第二页面进行交互包括以下步骤的至少一种:
    通过所述第一页面接收输入的第一操作,在所述第二页面显示根据所述第一操作得到的操作结果;
    或者,
    通过所述第二页面接收输入的第二操作,在所述第一页面显示根据所述第二操作得到的操作结果。
  9. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    显示账户添加页面,所述账户添加页面显示有候选账户;
    根据通过所述账户添加页面接收的账户选择操作,将所述账户选择操作所指示选择的候选账户作为所述第二测试账户,触发所述测试账户添加指令。
  10. 根据权利要求9所述的方法,其特征在于,所述显示账户添加页面,所述账户添加页面显示有候选账户包括:
    获取预设虚拟账户,将所述预设虚拟账户作为候选账户,生成账户添加页面。
  11. 根据权利要求9所述的方法,其特征在于,所述显示账户添加页面,所述账户添加页面显示有候选账户包括:
    显示账户添加页面,所述账户添加页面上显示有对应的账户登录码,以使得第二终端扫描所述账户登录码,向对应的服务器发送登录授权指令,所述登录授权指令携带所述第二终端对应的用户账户;
    接收所述服务器根据所述登录授权指令发送的所述第二终端对应的用户账户,作为候选账户显示在所述账户添加页面上。
  12. 一种程序测试装置,所述装置包括:
    测试账户添加指令接收模块,用于接收测试账户添加指令,所述测试账户添加指令携带第二测试账户;
    第一目标代码获取模块,用于响应于所述测试账户添加指令,获取目标程序对应的第一目标代码,所述第一目标代码为第一页面对应的代码,所述第一页面上登录有第一测试账户,所述第一页面根据所述第一目标代码生成;
    第二页面生成模块,用于根据所述第一目标代码生成所述第二测试账户对应的第二页面;及
    交互模块,用于通过所述第一页面以及所述第二页面进行交互,以对所述目标程序进行测试。
  13. 根据权利要求12所述的装置,其特征在于,所述装置还包括:
    代码选择操接收模块,用于在测试程序中接收代码选择操作,将所述代码选择操作所指示选择的代码作为所述目标代码,所述测试程序中登录有所述第一测试账户;
    第一页面生成模块,用于根据所述目标代码生成所述第一测试账户对应的所述第一页面。
  14. 一种计算机设备,其特征在于,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行权利要求1至11中任一项权利要求所述程序测试方法的步骤。
  15. 一个或多个存储有计算机可读指令的非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述处理器执行权利要求1至11中任一项权利要求所述程序测试方法的步骤。
PCT/CN2020/114504 2019-11-27 2020-09-10 程序测试方法、装置、计算机设备和存储介质 WO2021103743A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20892256.7A EP3992800B1 (en) 2019-11-27 2020-09-10 Program test method and apparatus, computer device, and storage medium
US17/512,206 US11983101B2 (en) 2019-11-27 2021-10-27 Program testing method and apparatus, computer device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911180652.7A CN110928791B (zh) 2019-11-27 2019-11-27 程序测试方法、装置、计算机设备和存储介质
CN201911180652.7 2019-11-27

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/512,206 Continuation US11983101B2 (en) 2019-11-27 2021-10-27 Program testing method and apparatus, computer device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021103743A1 true WO2021103743A1 (zh) 2021-06-03

Family

ID=69852099

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/114504 WO2021103743A1 (zh) 2019-11-27 2020-09-10 程序测试方法、装置、计算机设备和存储介质

Country Status (4)

Country Link
US (1) US11983101B2 (zh)
EP (1) EP3992800B1 (zh)
CN (1) CN110928791B (zh)
WO (1) WO2021103743A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114996166A (zh) * 2022-08-02 2022-09-02 杭州高达软件系统股份有限公司 一种代码在线调试方法、系统及存储介质
CN117093466A (zh) * 2023-10-19 2023-11-21 腾讯科技(深圳)有限公司 性能测试方法、装置、电子设备及存储介质

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928791B (zh) 2019-11-27 2022-03-01 腾讯科技(深圳)有限公司 程序测试方法、装置、计算机设备和存储介质
CN112306858A (zh) * 2020-05-21 2021-02-02 北京字节跳动网络技术有限公司 测试方法、装置和电子设备
CN111930616B (zh) * 2020-07-27 2024-03-19 北京大米未来科技有限公司 数据处理方法、装置、电子设备和可读存储介质
CN112286656B (zh) * 2020-10-21 2023-08-29 百度在线网络技术(北京)有限公司 小程序模拟方法、装置、电子设备和计算机可读存储介质
CN112947945B (zh) * 2021-02-01 2023-10-20 南方电网数字平台科技(广东)有限公司 一种多类型应用发布方法、装置、计算机设备和存储介质
CN113515446A (zh) * 2021-05-08 2021-10-19 上海安畅网络科技股份有限公司 一种小程序测试方法、装置、设备及存储介质
CN113535544A (zh) * 2021-06-16 2021-10-22 杭州华橙软件技术有限公司 一种待调试子应用运行方法、计算机设备以及装置
CN115242476B (zh) * 2022-07-14 2024-02-06 上海擎朗智能科技有限公司 一种登录验证方法、装置、介质以及电子设备
CN116450535B (zh) * 2023-06-20 2023-08-29 中国联合网络通信集团有限公司 子应用调试方法、装置、计算机设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035857A (zh) * 2010-12-31 2011-04-27 北京像素软件科技股份有限公司 一种模拟多个游戏角色的群体自组织行为的方法
CN105760308A (zh) * 2016-03-31 2016-07-13 网易(杭州)网络有限公司 多客户端协同测试方法和装置
US20180247337A1 (en) * 2007-07-09 2018-08-30 Groupon, Inc. Implicitly associating metadata using user behavior
CN110928791A (zh) * 2019-11-27 2020-03-27 腾讯科技(深圳)有限公司 程序测试方法、装置、计算机设备和存储介质

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6620204B1 (en) * 1997-11-25 2003-09-16 International Business Machines Corporation Automated HTML test page and test data generation for javascript objects
US7444397B2 (en) * 2004-12-21 2008-10-28 International Business Machines Corporation Method of executing test scripts against multiple systems
KR100866627B1 (ko) * 2007-01-29 2008-11-03 삼성전자주식회사 컨트롤 플로우를 이용한 페이지 프리로드 방법 및 그시스템
US8020151B2 (en) * 2007-07-31 2011-09-13 International Business Machines Corporation Techniques for determining a web browser state during web page testing
US20090082008A1 (en) * 2007-09-21 2009-03-26 Per Thorell Mobile Phone Code Debugging Method and Apparatus
CN101295280B (zh) * 2008-06-18 2010-12-01 腾讯科技(深圳)有限公司 自动化软件调测方法及系统
US8695027B2 (en) * 2011-06-30 2014-04-08 Mcafee, Inc. System and method for application security assessment
CN103810089B (zh) * 2012-11-12 2021-12-03 Sap欧洲公司 自动测试基于姿态的应用
US9317411B2 (en) * 2013-07-31 2016-04-19 Bank Of America Corporation Testing coordinator
CN106775970B (zh) * 2016-12-01 2018-02-09 掌阅科技股份有限公司 跨进程的窗口操作同步方法、装置及电子设备
CN107704396A (zh) * 2017-10-20 2018-02-16 平安科技(深圳)有限公司 应用程序的测试方法及装置
US20190188116A1 (en) * 2017-12-20 2019-06-20 10546658 Canada Inc. Automated software testing method and system
CN109344058B (zh) * 2018-09-18 2021-06-15 北京云测信息技术有限公司 一种小程序自动化测试方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180247337A1 (en) * 2007-07-09 2018-08-30 Groupon, Inc. Implicitly associating metadata using user behavior
CN102035857A (zh) * 2010-12-31 2011-04-27 北京像素软件科技股份有限公司 一种模拟多个游戏角色的群体自组织行为的方法
CN105760308A (zh) * 2016-03-31 2016-07-13 网易(杭州)网络有限公司 多客户端协同测试方法和装置
CN110928791A (zh) * 2019-11-27 2020-03-27 腾讯科技(深圳)有限公司 程序测试方法、装置、计算机设备和存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114996166A (zh) * 2022-08-02 2022-09-02 杭州高达软件系统股份有限公司 一种代码在线调试方法、系统及存储介质
CN114996166B (zh) * 2022-08-02 2022-10-21 杭州高达软件系统股份有限公司 一种代码在线调试方法、系统及存储介质
CN117093466A (zh) * 2023-10-19 2023-11-21 腾讯科技(深圳)有限公司 性能测试方法、装置、电子设备及存储介质
CN117093466B (zh) * 2023-10-19 2024-01-16 腾讯科技(深圳)有限公司 性能测试方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
EP3992800A1 (en) 2022-05-04
EP3992800A4 (en) 2022-08-10
US20220050769A1 (en) 2022-02-17
CN110928791A (zh) 2020-03-27
CN110928791B (zh) 2022-03-01
US11983101B2 (en) 2024-05-14
EP3992800B1 (en) 2023-09-06

Similar Documents

Publication Publication Date Title
WO2021103743A1 (zh) 程序测试方法、装置、计算机设备和存储介质
US10983898B2 (en) Methods for improved web application testing using remote headless browsers and devices thereof
Vaandrager Model learning
US20180276111A1 (en) Mock services for software infrastructures
WO2020253061A1 (zh) 页面生成方法、装置、计算机设备和存储介质
WO2022252637A1 (zh) 基于浏览器的rpa实现方法、装置、设备及介质
US20200201689A1 (en) System and method for determining a process flow of a software application and for automatically generating application testing code
US11640351B2 (en) System and method for automated application testing
CN111078554A (zh) 一种小程序调试方法、装置、设备及存储介质
CN113268684A (zh) 数据处理方法、装置、终端设备以及存储介质
CN109408372A (zh) 公共组件测试方法、装置、计算机设备和存储介质
US20150199185A1 (en) System and Method for Providing Online Software Development Services
US11726897B2 (en) System and method for testing applications
US9760472B2 (en) Tenant code debugging in multi-tenant systems
US20220207165A1 (en) Information processing method, system, electronic device and computer readable storage medium
CN113778878A (zh) 接口测试方法、装置、电子设备及存储介质
CN110232018A (zh) 接口测试方法、装置、计算机设备
CN111414309B (zh) 应用程序的自动化测试方法、计算机设备和存储介质
CN110727575A (zh) 一种信息处理方法、系统、装置、以及存储介质
CN115470152A (zh) 测试代码生成方法、测试代码生成装置以及存储介质
CN111858302B (zh) 小程序的测试方法、装置、电子设备及存储介质
CN110327626B (zh) 虚拟服务器创建方法及装置
CN110825370A (zh) 移动端应用开发方法、装置及系统
CN112860585A (zh) 一种测试脚本断言生成方法及装置
CN112306844B (zh) 软件开发系统的接口测试方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20892256

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020892256

Country of ref document: EP

Effective date: 20220127

NENP Non-entry into the national phase

Ref country code: DE