CN114741325A - Recording method and device of test script for application system test - Google Patents

Recording method and device of test script for application system test Download PDF

Info

Publication number
CN114741325A
CN114741325A CN202210659046.9A CN202210659046A CN114741325A CN 114741325 A CN114741325 A CN 114741325A CN 202210659046 A CN202210659046 A CN 202210659046A CN 114741325 A CN114741325 A CN 114741325A
Authority
CN
China
Prior art keywords
test
browser
script
recording
tested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210659046.9A
Other languages
Chinese (zh)
Other versions
CN114741325B (en
Inventor
梁俊杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Wind Gather Intelligence Technology Co ltd
Original Assignee
Wuhan Wind Gather Intelligence Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Wind Gather Intelligence Technology Co ltd filed Critical Wuhan Wind Gather Intelligence Technology Co ltd
Priority to CN202210659046.9A priority Critical patent/CN114741325B/en
Publication of CN114741325A publication Critical patent/CN114741325A/en
Application granted granted Critical
Publication of CN114741325B publication Critical patent/CN114741325B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The application provides a recording method and a recording device of a test script for application system testing, which are used for ensuring that the interference caused by the local browser environment of test tool equipment can be ignored in recording and playing back of the test script by implanting a browser engine in a test tool. The method comprises the following steps: the processing equipment acquires task data of the test task; the processing equipment detects whether the testing tool equipment is provided with a browser program or not; if not, the processing equipment calls a pre-implanted browser engine, initiates a test request to the application system to be tested through a browser environment provided by the browser engine, and monitors and records the response process and the result of the application system to be tested to the test request; the processing equipment generates a performance test result based on a response result of the application system to be tested to the test request, and completes script recording work of the test script to be recorded based on recording related test behaviors in the test process.

Description

Recording method and device of test script for application system test
Technical Field
The application relates to the field of testing, in particular to a method and a device for recording a test script for testing an application system.
Background
In the process of system testing, the situation that the functional service provided by the application system to be tested is a network service often occurs, that is, the performance test of the web service to be tested is involved.
In the context of testing web services, a testing tool needs to send a large number of processing requests to an application system to be tested locally through a browser program to test the performance of the application system to be tested, wherein, in order to improve testing efficiency, automated testing work is generally executed through a testing script.
In the existing research process of related technologies, the inventor finds that, in the standardized testing process, a test script is obtained by sending a request to an application system to be tested by using a browser provided by a testing tool environment (a local system), and monitoring and recording a processing process and a result of an application server, but when the environment where the testing tool is located is not or cannot provide a proper browser to reflect the optimal performance of the application system to be tested in actual use, the recording work of the test script cannot be normally completed, and the use of the test script and the testing work of the system are negatively affected.
Disclosure of Invention
The application provides a recording method and a recording device of a test script for application system testing, which are used for implanting a browser engine in a test tool, so that interference caused by a local browser environment of equipment can be omitted in early recording work and later playback work of the test script, and normal use of the test script and normal operation of system test work are ensured.
In a first aspect, the present application provides a method for recording a test script for an application system test, where the method includes:
the processing equipment acquires task data of the test task, the test task is specifically used for initiating a test to the application system to be tested, and a test object of the system test is specifically web service of the application system to be tested;
the processing equipment detects whether a local system is provided with a browser program or not;
if not, the processing equipment calls a browser engine pre-implanted in the testing tool, initiates a testing request to the application system to be tested through a browser environment provided by the browser engine, and monitors and records the response process and the result of the application system to be tested to the testing request;
the processing equipment generates a performance test result based on the response process and the result of the application system to be tested to the test request, and completes the script recording work of the test script to be recorded based on the recording of the related test behavior in the test process.
With reference to the first aspect of the present application, in a first possible implementation manner of the first aspect of the present application, the detecting, by a processing device, whether a browser program is installed in a local system includes:
the method comprises the steps that a processing device detects whether a local device model belongs to a preset device model, the preset device model is specifically used for identifying special equipment for system testing, and a local system of the special equipment is not provided with a browser program;
if yes, the processing equipment confirms that the local system does not install the browser program.
With reference to the first aspect of the present application, in a second possible implementation manner of the first aspect of the present application, the detecting, by a processing device, whether a browser program is installed in a local system includes:
the processing equipment detects whether the browser performance of a browser program installed in a local system is lower than that of a browser engine pre-implanted in a test tool;
if yes, the processing equipment ignores that the local system is provided with the browser program.
With reference to the first aspect of the present application, in a third possible implementation manner of the first aspect of the present application, the detecting, by a processing device, whether a browser program is installed in a local system includes:
the method comprises the steps that a processing device detects whether the browser type of a browser program installed in a local system belongs to a preset browser type, wherein the preset browser type is specifically used for identifying that the performance of a browser is lower than that of a browser engine pre-implanted in a test tool;
if yes, the processing equipment ignores that the local system is provided with the browser program.
With reference to the first aspect of the present application, in a fourth possible implementation manner of the first aspect of the present application, after completing a script recording operation of a test script to be recorded, the method further includes:
and the processing equipment executes a new system test task through the test script to be recorded, and in the test process, the same logic as that in the script recording process is adopted to judge whether a browser engine pre-implanted in the test tool is called to initiate a corresponding test request.
In a second aspect, the present application provides an apparatus for recording a test script for testing an application system, the apparatus comprising:
the system comprises an acquisition unit, a test unit and a processing unit, wherein the acquisition unit is used for acquiring task data of a test task, the test task is specifically used for initiating a system test to an application system to be tested, and a test object of the system test is specifically web service of the application system to be tested;
the detection unit is used for detecting whether the local system is provided with the browser program or not, and if not, the detection unit is triggered;
the test unit is used for calling a browser engine pre-implanted in the test tool, initiating a test request to the application system to be tested through a browser environment provided by the browser engine, and monitoring and recording the response process and the result of the application system to be tested to the test request;
and the recording unit is used for generating a performance test result based on the response process and the result of the application system to be tested to the test request, and finishing the script recording work of the test script to be recorded based on the recording related test behavior in the test process.
With reference to the second aspect of the present application, in a first possible implementation manner of the second aspect of the present application, the detecting unit is specifically configured to:
detecting whether a local equipment model belongs to a preset equipment model, wherein the preset equipment model is specifically used for identifying special equipment for system test, and a local system of the special equipment is not provided with a browser program;
and if so, confirming that the local system does not install the browser program.
With reference to the second aspect of the present application, in a second possible implementation manner of the second aspect of the present application, the detecting unit is specifically configured to:
detecting whether the browser performance of a browser program installed in a local system is lower than that of a browser engine pre-implanted in a test tool;
if yes, the installation of the browser program in the local system is ignored.
With reference to the second aspect of the present application, in a third possible implementation manner of the second aspect of the present application, the detecting unit is specifically configured to:
detecting whether the browser type of a browser program installed in a local system belongs to a preset browser type, wherein the preset browser type is specifically used for identifying that the browser performance is lower than that of a browser engine pre-implanted in a test tool;
if yes, the installation of the browser program in the local system is ignored.
With reference to the second aspect of the present application, in a fourth possible implementation manner of the second aspect of the present application, the test unit is further configured to:
and executing a new system test task through the test script to be recorded, and judging whether to call a browser engine pre-implanted in the tool to initiate a corresponding test request or not by adopting the same logic as that in the script recording process in the test process.
In a third aspect, the present application provides a processing device, including a processor and a memory, where the memory stores a computer program, and the processor executes the method provided in the first aspect of the present application or any one of the possible implementation manners of the first aspect of the present application when calling the computer program in the memory.
In a fourth aspect, the present application provides a computer-readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the method provided in the first aspect of the present application or any one of the possible implementations of the first aspect of the present application.
From the above, the present application has the following advantageous effects:
in the process of recording the test script, the method detects whether the local system is provided with a browser program, if not, a browser engine pre-implanted in the test tool can be called to complete the test work through the browser environment provided by the browser engine, and the script recording work of the test script to be recorded is completed based on the relevant test behavior recorded in the test process, so that the interference caused by the fact that the local system does not provide the browser environment is avoided, in addition, because the browser engine is implanted in the test tool and can provide the browser environment, the interference caused by the fact that the local system does not provide the browser environment can also be avoided in the subsequent playback operation, under the working mechanism of the test script, the interference caused by the local browser environment of the equipment can be ignored in the early recording work and the later playback work, the normal use of the test script and the normal operation of the system test work are ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a recording method of a test script for testing an application system according to the present application;
FIG. 2 is a schematic flow chart of recording a test script according to the present application;
FIG. 3 is a schematic interface diagram of a visualization interface of the present application;
FIG. 4 is a schematic structural diagram of a recording apparatus for a test script for testing an application system according to the present application;
FIG. 5 is a schematic diagram of a processing apparatus according to the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and in the claims of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Moreover, the terms "comprises," "comprising," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not expressly listed or inherent to such process, method, article, or apparatus. The naming or numbering of the steps appearing in the present application does not mean that the steps in the method flow must be executed in the chronological/logical order indicated by the naming or numbering, and the named or numbered flow steps may be changed in execution order according to the technical purpose to be achieved, as long as the same or similar technical effects are achieved.
The division of the modules presented in this application is a logical division, and in practical applications, there may be another division, for example, multiple modules may be combined or integrated into another system, or some features may be omitted, or not executed, and in addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, and the indirect coupling or communication connection between the modules may be in an electrical or other similar form, which is not limited in this application. The modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in a plurality of circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present disclosure.
Before introducing the recording method of the test script for the application system test provided by the present application, first, the background content related to the present application is introduced.
The recording method, the recording device and the computer readable storage medium for the test script for the application system test can be applied to processing equipment and are used for ensuring that the test script can ignore interference caused by local browser environment of the equipment in the early recording work and the later playback work by implanting a browser engine into a test tool, and the normal use of the test script and the normal operation of the system test work are ensured.
In the recording method of the test script for the application system test, the execution main body may be a recording device of the test script for the application system test, or different types of processing devices such as a server, a physical host, or User Equipment (UE) that integrates the recording device of the test script for the application system test. The recording device of the test script for the application system test may be implemented in a hardware or software manner, the UE may specifically be a terminal device such as a smart phone, a tablet computer, a notebook computer, a desktop computer, or a Personal Digital Assistant (PDA), and the processing device may be set in a device cluster manner.
Next, a method for recording a test script for testing an application system provided by the present application is described.
First, referring to fig. 1, fig. 1 shows a schematic flow chart of a recording method of a test script for an application system test according to the present application, where the recording method of a test script for an application system test provided by the present application may specifically include the following steps:
step S101, a processing device obtains task data of a test task, the test task is specifically used for initiating a test to an application system to be tested, and a test object of the system test is specifically a web service of the application system to be tested;
the test task can be manually configured for a worker, and can also be automatically triggered and generated by processing triggering conditions such as new contents appearing on an automatic monitoring system of equipment.
After the task data of the test task is obtained, the processing device can perform system test and record the test script based on the task content described by the task data.
It can be understood that, in practical application, the recording work of the test script is also performed in the form of a task, and is generally completed with a real system test, that is, the related test operation can be recorded in the test process of a test task, so that the test script is obtained by recording, and the related test operation involved in the process of the test task can be restored by the subsequent test script, thereby achieving the effects of restoring the application scenario and automatically executing the system test.
It can be understood that, for the system test and the test mode executed by the corresponding test script, the test mode is configured under a preset test rule, so that the system performance of the application system to be tested under the test rule can be measured.
For example, if the test rule is the maximum number of concurrent users of the test system, the test script may configure a corresponding processing request under the test rule, so that a performance test result of the maximum concurrent user of the application system to be tested may be obtained.
The specific test rule related to the test script may be specifically adjusted according to actual needs and corresponding standard test rules, which is not specifically limited herein.
In addition, for the browser environment targeted in the test script recording processing of the present application, the web service provided by the application system to be tested corresponds to the browser environment, when testing the performance of the web service, a user needs to be simulated locally from the processing device, and a corresponding processing request is initiated to the application system to be tested, and these processing requests can be understood as web requests sent in the past through the browser environment, specifically, the whole test script recording operation, and can also be understood with reference to a flowchart of the test script recorded in the present application shown in fig. 2.
A test script may be understood as a series of instructions involved in system testing, which may be executed by an automated testing tool, that is, the test script may execute system testing by loading a test script configured in the testing tool (typically embodied in a separate application program).
Step S102, the processing equipment detects whether a local system is provided with a browser program, and if not, step S103 is triggered;
it is to be understood that the present application is specifically directed to interference that may be caused by a browser environment of a local system during a system test process, where the local system may be understood as a system environment other than a test script during a process of executing a system test and recording the test script by a processing device, and in colloquial, the system environment other than the test script on the processing device.
For example, a separate browser program may be configured on the processing device to perform web-up functions such as web browsing.
For some processing devices, when performing system test, the browser program may not be configured, so that it is necessary to manually check the situation in time and configure the corresponding browser program.
For this case, the present application may detect whether a browser program is installed on the local system of the processing device.
Step S103, the processing equipment calls a browser engine pre-implanted in the testing tool, initiates a testing request to the application system to be tested through a browser environment provided by the browser engine, and monitors and records the response process and the result of the application system to be tested to the testing request;
it is easy to see that, because the browser engine is directly embedded in the test tool in advance, after the browser engine is loaded, the browser engine can directly provide a corresponding browser environment for the processing equipment, so that the problem that a local system of the processing equipment has a browser program vacancy is solved, and the system test can be normally executed.
The browser engine, which may also be referred to as a browser program or a browser kernel, may be a general-purpose browser engine, or may be a browser engine specially processed for implanting a test tool in an actual application, and may be specifically adjusted according to an actual situation.
For example, a general browser engine such as Chrome browser engine, IE browser engine, Firefox browser engine, etc. may be embedded in the test tool.
In addition, because the browser engine is directly implanted into the test tool, a use environment can be better built between the test script content and the browser engine, so that a more stable and efficient test effect can be obtained when the system test is completed through the internal browser engine, for example, a more adaptive and general script language can be adopted to support the calling and running of the browser engine.
It can be understood that when a formal system test is not initiated (a processing request is not sent to an application system to be tested yet), or the system test is not completed, or the recording work of the test script is not completed, the test script in the current state may be referred to as a test script to be configured, that is, a test script in an incomplete state.
In the test script to be configured, besides the basic frame and the dynamic data to be identified, corresponding test behavior recording data can exist along with different uncompleted states.
After the problem that the local system of the processing equipment cannot provide a normal browser environment is overcome, normal system test can be initiated to the application system to be tested, namely, a large number of processing requests are sent to observe the response of the application system to be tested to the received processing requests.
In the testing process, the response result fed back by the application system to be tested can be received from the outside of the system, and the response result of the application system to be tested can be obtained in an active mode through a monitoring program configured in the application system to be tested.
And step S104, the processing equipment completes script recording work of the test script to be recorded based on the relevant test behaviors recorded in the test process while generating a performance test result based on the response process and the result of the application system to be tested to the test request.
After the response results of the application system to be tested to the different processing requests sent to the processing device locally are obtained, the response results can be processed into corresponding performance test results according to the data processing related to the data conversion processing, the data processing, the result presentation mode and the like of the preset performance test results based on the response results.
The final performance test result is embodied under the test rule related to the initial test task, and can be specifically presented in the modes of pictures, texts, reports and the like.
In addition, for the test script, the recording of the test behavior in the system test process can also be finished after the system test is finished, and the script recording work is finished based on the current test script state, so that the test script capable of playing back the system test scene is obtained.
It can be understood that, since the browser engine is already called in the early stage of the test script (to-be-configured test script), the test script in the completed state can also call the browser engine, so that the built-in browser engine can also be called later when the test script is used for carrying out a new system test, and thus, the problem that the browser environment is lost in a local system when a subsequent new system test is carried out can be avoided.
It can be seen from the embodiment shown in fig. 1 that, in the process of recording the test script, the present application detects whether the local system is installed with the browser program, if not, the browser engine pre-implanted in the test tool can be called to complete the test work through the browser environment provided by the browser engine, and based on the test behavior recorded in the test process, the script recording work of the test script to be recorded is completed, so as to avoid the interference caused by the browser environment not provided by the local system, furthermore, since the browser engine built in the test tool is called when the test script is recorded to provide the browser environment, the interference caused by the browser environment not provided by the local system can be avoided in the subsequent playback operation, and under the working mechanism of the test script, the interference caused by the browser environment of the local device can be ignored in both the previous recording work and the later playback work, the normal use of the test script and the normal operation of the system test work are ensured.
The steps of the embodiment shown in fig. 1 and the possible implementation manner thereof in practical applications will be described in detail.
It can be understood that, in the system test process, the present application focuses on relevant matters of the browser environment, and for the specific aspects of how to send the processing request to the application system to be tested through the browser environment, how to specifically obtain the response result of the application system to be tested to the processing request, how to specifically obtain the performance test result based on the response result, and the like, the data processing related to the general system test process may be used, so the following contents mainly introduce the configuration processing of the browser environment.
As an exemplary implementation manner, it is considered that, when some special models of processing devices exist in actual operation, the processing devices themselves are not installed with the browser program, and on one hand, the processing devices may be limited by factory setting requirements of the processing devices in the former period, and on the other hand, the processing devices may also be limited by setting requirements in the later period, that is, the processing devices are not installed with the browser program, and the processing devices may be caused by objective conditions or artificial conditions. For such a specific processing device, which knows in advance that the processing device is not configured with the browser program, the device model of the specific processing device may be identified, that is, the processing device detects whether the local system is installed with the browser program, which may specifically include:
the method comprises the steps that a processing device detects whether a local device model belongs to a preset device model, the preset device model is specifically used for identifying special equipment for system testing, and a local system of the special equipment is not provided with a browser program;
if yes, the processing equipment confirms that the local system does not install the browser program.
Under the setting, obviously, the program detection of the browser program in the system can be avoided, whether the browser program is installed in the local system or not can be simply and conveniently determined directly through the machine type of the equipment, and the method is very concise in operation and has higher practicability.
In addition, it can be understood that the browser engine embedded in the testing tool according to the present application may have a higher browser performance through a related optimization setting, so that a better browser environment can be provided for system testing, and therefore, the present application also considers that, if a local system is encountered and a browser program is already installed, if the browser performance of the local system is lower than that of the browser engine embedded in the testing tool, the browser program may be ignored, and the browser engine embedded in the testing tool is changed to provide a better browser environment for system testing, and in addition, it should be noted that, because the browser engine is embedded in the testing tool, a more stable and smooth operation effect may be obtained compared with the browser program external to the testing tool.
In this case, in practical applications, two broad types of application modes can be specifically included.
First, real-time detection of performance
In another exemplary implementation manner, the detecting, by the processing device, whether the browser program is installed in the local system may specifically include:
the processing equipment detects whether the browser performance of a browser program installed in a local system is lower than that of a browser engine pre-implanted in a test tool;
if yes, the processing equipment ignores that the local system is provided with the browser program.
It is understood that the comparison of the browser performances is performed based on the browser performances detected in real time.
The performance of the browser related to the application is specifically quantified through indexes of different aspects such as resource occupation, running speed and stability.
Second, determining performance through browser type
In another exemplary implementation manner, the detecting, by the processing device, whether the browser program is installed in the local system may specifically include:
the method comprises the steps that a processing device detects whether the browser type of a browser program installed in a local system belongs to a preset browser type, wherein the preset browser type is specifically used for identifying that the performance of a browser is lower than that of a browser engine pre-implanted in a test tool;
if yes, the processing equipment ignores that the local system is provided with the browser program.
It can be found that the type of the preset browser related to the method is similar to the type of the preset device mentioned above, and a negligible browser program (dedicated device) is determined in advance, and then in the process that the processing device automatically judges whether to select a browser engine built in a test tool, the advantage of simple and convenient judgment can be achieved, a large amount of data processing work is saved, and the judgment result can be obtained very quickly.
After the recording of the test script is completed, that is, after the recording of the script of the test script to be recorded is completed, the test script at this time can be stored for playback and new system test, and when a new round of system test is executed, the logic with the same recording process of the test script can be adopted to judge whether a browser engine implanted in a test tool is adopted to provide a browser environment for the system test, so that interference caused by the fact that a browser program does not exist in a local system is avoided, and even interference caused by the fact that the local system has lower browser performance is achieved, that is, the recording method of the test script for the application system test provided by the application can further comprise the following subsequent steps:
and the processing equipment executes a new system test task through the test script to be recorded, and in the test process, the same logic is adopted as that in the script recording process to judge whether a browser engine pre-implanted in the tool is called to initiate a corresponding test request.
In addition, for the recording work of the test script, the recording work can be presented through a visual interface, so that the state monitoring and the real-time intervention of workers are facilitated.
As an example, in the test script recording work, the following may be included:
1. entering a script management interface;
2. clicking a simulation recording button of an upper menu bar operation module, as shown in an interface schematic diagram of a visualization interface of the application shown in fig. 3;
3. and inputting the access address of the application system to be recorded in the popped interface after the loading is finished, and recording the operation to be tested subsequently.
The above is an introduction of the method for recording the test script for the application system test provided by the present application, which is convenient for better implementing the method for recording the test script for the application system test provided by the present application.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a recording apparatus of a test script for an application system test according to the present application, in which the recording apparatus 400 of a test script for an application system test may specifically include the following structure:
the acquiring unit 401 is configured to acquire task data of a test task, where the test task is specifically configured to initiate a system test to an application system to be tested, and a test object of the system test is specifically a web service of the application system to be tested;
a detecting unit 402, configured to detect whether a local system has a browser program installed, and if not, trigger a testing unit 403;
the testing unit 403 is configured to invoke a browser engine pre-implanted in the testing tool, initiate a test request to the application system to be tested through a browser environment provided by the browser engine, and monitor and record a response process and a result of the application system to be tested to the test request;
the recording unit 404 is configured to complete script recording of the test script to be recorded based on recording related test behaviors in the test process while generating a performance test result based on a response process and a result of the test request by the application system to be tested.
In an exemplary implementation manner, the detecting unit 402 is specifically configured to:
detecting whether a local equipment model belongs to a preset equipment model, wherein the preset equipment model is specifically used for identifying special equipment for system test, and a local system of the special equipment is not provided with a browser program;
and if so, confirming that the local system does not install the browser program.
In another exemplary implementation manner, the detecting unit 402 is specifically configured to:
detecting whether the browser performance of a browser program installed in a local system is lower than that of a browser engine pre-implanted in a test tool;
if yes, the installation of the browser program in the local system is ignored.
In another exemplary implementation manner, the detecting unit 402 is specifically configured to:
detecting whether the browser type of a browser program installed in a local system belongs to a preset browser type, wherein the preset browser type is specifically used for identifying that the browser performance is lower than that of a browser engine pre-implanted in a test tool;
if yes, the installation of the browser program in the local system is ignored.
In yet another exemplary implementation, the test unit 402 is further configured to:
and executing a new system test task through the test script to be recorded, and judging whether to call a browser engine pre-implanted in the tool to initiate a corresponding test request or not by adopting the same logic as that in the script recording process in the test process.
Referring to fig. 5, fig. 5 shows a schematic structural diagram of a processing device according to the present application, specifically, the processing device according to the present application may include a processor 501, a memory 502, and an input/output device 503, where when the processor 501 is used to execute a computer program stored in the memory 502, each step of the recording method for a test script for an application system test in the embodiment corresponding to fig. 1 is implemented; alternatively, the processor 501 is configured to implement the functions of the units in the corresponding embodiment as shown in fig. 4 when executing the computer program stored in the memory 502, and the memory 502 is configured to store the computer program required by the processor 501 to execute the method for recording the test script for the application system test in the corresponding embodiment as shown in fig. 1.
Illustratively, a computer program may be partitioned into one or more modules/units, which are stored in memory 502 and executed by processor 501 to accomplish the present application. One or more modules/units may be a series of computer program instruction segments capable of performing certain functions, the instruction segments being used to describe the execution of a computer program in a computer device.
The processing devices may include, but are not limited to, a processor 501, a memory 502, and an input-output device 503. Those skilled in the art will appreciate that the illustration is merely an example of a processing device and does not constitute a limitation of the processing device and may include more or less components than those illustrated, or combine certain components, or different components, for example, the processing device may also include a network access device, a bus, etc., through which the processor 501, the memory 502, the input output device 503, etc., are connected.
The Processor 501 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center for the processing device and the various interfaces and lines connecting the various parts of the overall device.
The memory 502 may be used to store computer programs and/or modules, and the processor 501 may implement various functions of the computer device by running or executing the computer programs and/or modules stored in the memory 502, as well as invoking data stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the processing apparatus, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The processor 501, when executing the computer program stored in the memory 502, may specifically implement the following functions:
acquiring task data of the test task, wherein the test task is specifically used for initiating a test to an application system to be tested, and a test object of the system test is specifically a web service of the application system to be tested;
detecting whether a local system is provided with a browser program;
if not, calling a browser engine pre-implanted in the test tool, initiating a test request to the application system to be tested through a browser environment provided by the browser engine, and monitoring and recording the response process and the result of the application system to be tested to the test request;
and when a performance test result is generated based on the response process and the result of the application system to be tested to the test request, the script recording work of the test script to be recorded is completed based on the recording of the related test behavior in the test process.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the above-described specific working processes of the recording apparatus and the processing device for a test script for an application system test and the corresponding units thereof may refer to the description of the recording method for a test script for an application system test in the embodiment corresponding to fig. 1, and are not described herein again in detail.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
Therefore, the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps of the method for recording the test script for the application system test in the embodiment corresponding to fig. 1 in the present application, and specific operations may refer to the description of the method for recording the test script for the application system test in the embodiment corresponding to fig. 1, which is not described herein again.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disk, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps of the method for recording the test script for the application system test in the embodiment corresponding to fig. 1, the beneficial effects that can be achieved by the method for recording the test script for the application system test in the embodiment corresponding to fig. 1 can be achieved, which are described in detail in the foregoing description and are not repeated herein.
The method, the apparatus, the processing device and the computer-readable storage medium for recording the test script for the application system test provided by the present application are introduced in detail, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understanding the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A recording method of a test script for application system testing is characterized by comprising the following steps:
the method comprises the steps that a processing device obtains task data of a test task, wherein the test task is specifically used for initiating a test to an application system to be tested, and a test object of the system test is specifically web service of the application system to be tested;
the processing equipment detects whether a local system is provided with a browser program;
if not, the processing equipment calls a browser engine pre-implanted in a test tool, initiates a test request to the application system to be tested through a browser environment provided by the browser engine, and monitors and records the response process and the result of the application system to be tested to the test request;
the processing equipment generates a performance test result based on the response process and the result of the application system to be tested to the test request, and completes the script recording work of the test script to be recorded based on the recording of the related test behavior in the test process.
2. The method of claim 1, wherein the processing device detecting whether a browser program is installed on a local system comprises:
the processing equipment detects whether a local equipment model belongs to a preset equipment model, wherein the preset equipment model is specifically used for identifying special equipment for system test, and a local system of the special equipment is not provided with the browser program;
and if so, the processing equipment confirms that the browser program is not installed in the local system.
3. The method of claim 1, wherein the processing device detecting whether a browser program is installed on a local system comprises:
the processing equipment detects whether the browser performance of the browser program installed in a local system is lower than that of the browser engine pre-implanted in the testing tool;
and if so, the processing equipment ignores that the browser program is installed in the local system.
4. The method of claim 1, wherein the processing device detecting whether a browser program is installed on the local system comprises:
the processing equipment detects whether the browser type of the browser program installed in a local system belongs to a preset browser type, wherein the preset browser type is specifically used for identifying that the performance of a browser is lower than that of a browser engine pre-implanted in the test tool;
and if so, the processing equipment ignores that the browser program is installed in the local system.
5. The method according to claim 1, wherein after completing the script recording operation of the test script to be recorded, the method further comprises:
and the processing equipment executes a new system test task through the test script to be recorded, and in the test process, the same logic as that in the script recording process is adopted to judge whether to call the browser engine pre-implanted in the test tool to initiate a corresponding test request.
6. An apparatus for recording a test script for testing an application system, the apparatus comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring task data of a test task, the test task is specifically used for initiating a system test to an application system to be tested, and a test object of the system test is specifically a web service of the application system to be tested;
the detection unit is used for detecting whether the local system is provided with the browser program or not, and if not, the detection unit is triggered;
the testing unit is used for calling a browser engine pre-implanted in a testing tool, initiating a testing request to the application system to be tested through a browser environment provided by the browser engine, and monitoring and recording a response process and a result of the application system to be tested to the testing request;
and the recording unit is used for generating a performance test result based on the response process and the result of the application system to be tested to the test request, and finishing the script recording work of the test script to be recorded based on the related test behavior recorded in the test process.
7. The apparatus according to claim 6, wherein the detection unit is specifically configured to:
detecting whether a local equipment model belongs to a preset equipment model, wherein the preset equipment model is specifically used for identifying special equipment for system test, and the local system of the special equipment is not provided with the browser program;
and if so, confirming that the local system does not install the browser program.
8. The apparatus according to claim 6, wherein the detection unit is specifically configured to:
detecting whether the browser performance of the browser program installed in a local system is lower than that of the browser engine pre-implanted in a test tool;
if yes, ignoring that the local system installs the browser program.
9. The apparatus according to claim 6, wherein the detection unit is specifically configured to:
detecting whether the browser type of the browser program installed in a local system belongs to a preset browser type, wherein the preset browser type is specifically used for identifying that the browser performance is lower than that of a browser engine pre-implanted in the test tool;
if yes, ignoring that the local system installs the browser program.
10. The apparatus of claim 6, wherein the testing unit is further configured to:
and executing a new system test task through the test script to be recorded, and judging whether to call the browser engine pre-implanted in the tool to initiate a corresponding test request or not by adopting the same logic as that in the script recording process in the test process.
CN202210659046.9A 2022-06-13 2022-06-13 Recording method and device of test script for application system test Active CN114741325B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210659046.9A CN114741325B (en) 2022-06-13 2022-06-13 Recording method and device of test script for application system test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210659046.9A CN114741325B (en) 2022-06-13 2022-06-13 Recording method and device of test script for application system test

Publications (2)

Publication Number Publication Date
CN114741325A true CN114741325A (en) 2022-07-12
CN114741325B CN114741325B (en) 2022-09-30

Family

ID=82287018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210659046.9A Active CN114741325B (en) 2022-06-13 2022-06-13 Recording method and device of test script for application system test

Country Status (1)

Country Link
CN (1) CN114741325B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770502A (en) * 2009-12-30 2010-07-07 深圳市同洲电子股份有限公司 Scripting method, device and embedded browser
CN104765678A (en) * 2014-01-08 2015-07-08 阿里巴巴集团控股有限公司 Method and device for testing applications on mobile terminal
CN106776318A (en) * 2016-12-15 2017-05-31 北京蓝海讯通科技股份有限公司 A kind of test script method for recording and system
US20180293157A1 (en) * 2017-04-10 2018-10-11 Fmr Llc Automated script creation and source code generation for testing mobile devices
CN108845949A (en) * 2018-07-24 2018-11-20 浙江数链科技有限公司 A kind of performance test methods and platform
CN110413501A (en) * 2018-04-26 2019-11-05 腾讯科技(深圳)有限公司 Browser compatibility test method, device, system and readable storage medium storing program for executing
US10853218B1 (en) * 2018-12-17 2020-12-01 Shutterstock, Inc. Recording and playback of a web browser session
CN113127369A (en) * 2021-05-11 2021-07-16 武汉迎风聚智科技有限公司 Processing method and device for execution script
CN113238850A (en) * 2021-06-01 2021-08-10 平安科技(深圳)有限公司 RPA implementation method, device, equipment and medium based on browser
CN113515453A (en) * 2021-06-24 2021-10-19 航天中认软件测评科技(北京)有限责任公司 Webpage testing system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770502A (en) * 2009-12-30 2010-07-07 深圳市同洲电子股份有限公司 Scripting method, device and embedded browser
CN104765678A (en) * 2014-01-08 2015-07-08 阿里巴巴集团控股有限公司 Method and device for testing applications on mobile terminal
CN106776318A (en) * 2016-12-15 2017-05-31 北京蓝海讯通科技股份有限公司 A kind of test script method for recording and system
US20180293157A1 (en) * 2017-04-10 2018-10-11 Fmr Llc Automated script creation and source code generation for testing mobile devices
CN110413501A (en) * 2018-04-26 2019-11-05 腾讯科技(深圳)有限公司 Browser compatibility test method, device, system and readable storage medium storing program for executing
CN108845949A (en) * 2018-07-24 2018-11-20 浙江数链科技有限公司 A kind of performance test methods and platform
US10853218B1 (en) * 2018-12-17 2020-12-01 Shutterstock, Inc. Recording and playback of a web browser session
CN113127369A (en) * 2021-05-11 2021-07-16 武汉迎风聚智科技有限公司 Processing method and device for execution script
CN113238850A (en) * 2021-06-01 2021-08-10 平安科技(深圳)有限公司 RPA implementation method, device, equipment and medium based on browser
CN113515453A (en) * 2021-06-24 2021-10-19 航天中认软件测评科技(北京)有限责任公司 Webpage testing system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
III: "Playwright怎么使用", 《HTTPS://M.YISU.COM/ZIXUN/621880.HTML》 *
赵春朋: "python:初识自动化测试playwright库", 《HTTPS://WWW.UCLOUD.CN/YUN/124435.HTML》 *

Also Published As

Publication number Publication date
CN114741325B (en) 2022-09-30

Similar Documents

Publication Publication Date Title
CN107193750B (en) Script recording method and device
CN106844136B (en) Method and system for collecting program crash information
CN107832100B (en) APK plug-in loading method and terminal thereof
CN105607986A (en) Acquisition method and device of user behavior log data
CN108255708B (en) Method, device, storage medium and equipment for accessing production file in test environment
CN109344066B (en) Method, system and terminal for testing browser page
CN109831351B (en) Link tracking method, device, terminal and storage medium
CN112783761A (en) Method, device and system for testing cold start duration of application program
CN110688168A (en) Method, device and equipment for improving starting speed of application program and storage medium
CN111597110A (en) Page testing method and device, electronic equipment and storage medium
WO2017206476A1 (en) Method, device and apparatus for detecting cpu occupation
CN111813646A (en) Method and device for injecting application probe in docker container environment
CN107621963B (en) Software deployment method, software deployment system and electronic equipment
CN110928777B (en) Test case processing method, device, equipment and storage medium
CN112231206A (en) Script editing method for application program test, computer readable storage medium and test platform
CN107102937B (en) User interface testing method and device
CN116166525A (en) Method and device for generating test script
CN111651232A (en) One-machine multi-control method, device and system and electronic equipment
CN111090593A (en) Method, device, electronic equipment and storage medium for determining crash attribution
CN111414309A (en) Automatic test method of application program, computer equipment and storage medium
CN112241373A (en) Automatic test method, test device, processor and test system
CN114741325B (en) Recording method and device of test script for application system test
CN108563578B (en) SDK compatibility detection method, device, equipment and readable storage medium
CN109995931B (en) Method and device for realizing automatic calling
CN115237441A (en) Upgrade test method, device and medium based on cloud platform

Legal Events

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