CN111459818B - Visual test method and device - Google Patents

Visual test method and device Download PDF

Info

Publication number
CN111459818B
CN111459818B CN202010243510.7A CN202010243510A CN111459818B CN 111459818 B CN111459818 B CN 111459818B CN 202010243510 A CN202010243510 A CN 202010243510A CN 111459818 B CN111459818 B CN 111459818B
Authority
CN
China
Prior art keywords
parameters
configuration file
test
file
tester
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.)
Active
Application number
CN202010243510.7A
Other languages
Chinese (zh)
Other versions
CN111459818A (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.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010243510.7A priority Critical patent/CN111459818B/en
Publication of CN111459818A publication Critical patent/CN111459818A/en
Application granted granted Critical
Publication of CN111459818B publication Critical patent/CN111459818B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Abstract

The invention provides a visual test method and a visual test device, wherein the visual test method comprises the following steps: determining an initial configuration file from a plurality of preset configuration files, wherein preset parameters contained in each configuration file correspond to parameters to be modified in a test code file, acquiring test parameters, replacing target parameters in the initial configuration file with the test parameters to obtain a target configuration file, starting a script file to run the test code file, generating a visual window, acquiring identification information, calling the test parameters in the target configuration file, and testing a function to be tested corresponding to the identification information. Therefore, parameters which are required to be modified by a tester in the test code are referred to as parameters in the configuration file, the tester only needs to modify the parameters in the configuration file and then execute the script file, the test code does not need to be modified, and the problem that the test code cannot be operated due to the fact that the tester directly modifies the test code is avoided, so that the test efficiency is improved.

Description

Visual test method and device
Technical Field
The invention relates to the technical field of software testing, in particular to a visual testing method and device.
Background
The software test is to test each function in the software before the software is put into operation, is an important component part of the software development process, and is a key step of software quality assurance.
In the prior art, each function in software is tested, a developer is required to write test codes for use by testers, and the testers directly modify the test codes when using the test codes.
Disclosure of Invention
The invention provides a visual test method and a visual test device, which aim to solve the problems that the test code is directly modified, and the test code which is not modified is easily modified during operation, so that the test code cannot normally run, and the test efficiency is low.
In order to achieve the above object, the present invention provides the following technical solutions:
a visual testing method, comprising:
responding to the operation of a tester, and determining an initial configuration file from a plurality of preset configuration files; each configuration file at least comprises a preset parameter, and each preset parameter corresponds to a parameter to be modified in the test code file;
obtaining test parameters input by a tester, and determining target parameters from all preset parameters contained in the initial configuration file;
replacing the target parameters with the test parameters to obtain a target configuration file;
when a script file starting instruction is received, starting the script file to run the test code file;
generating a visual window and acquiring identification information input by the tester through the visual window; the identification information is used for representing a function to be tested in software;
and calling the test parameters in the target configuration file, testing the function to be tested corresponding to the identification information to obtain a test result, and displaying the test result in the visual window.
In the above method, optionally, the obtaining the identification information input by the tester through the visualization window includes:
generating first prompt information and displaying the first prompt information in the visual window; the first prompt information is used for prompting the testers to input identification information;
and acquiring the identification information input by the tester through the visual window.
In the above method, optionally, after the displaying the test result in the visualization window, the method further includes:
responding to the test parameter changing request to obtain new test parameters;
determining parameters corresponding to the new test parameters in a target configuration file, and changing the parameters corresponding to the new test parameters in the target configuration file into the new test parameters to obtain a new target configuration file;
when the change of the configuration file is detected, generating second prompt information, and displaying the second prompt information in the visual window to prompt a tester to input new identification information;
acquiring new identification information input by a tester through the visual window;
and calling the new test parameters in the new target configuration file, testing the function to be tested corresponding to the new identification information, and displaying the test result of testing the function to be tested corresponding to the new identification information in the visual window.
In the foregoing method, optionally, before determining the initial configuration file from the plurality of preset configuration files in response to the operation of the tester, the method further includes:
determining an environment configuration file from a plurality of preset configuration files; the environment configuration file at least comprises a server configuration file and a permission configuration file;
obtaining server configuration parameters and authority configuration parameters input by a tester;
and respectively configuring the server configuration file and the authority configuration file according to the server configuration parameters and the authority configuration parameters.
In the above method, optionally, the configuring the server configuration file and the permission configuration file according to the server configuration parameter and the permission configuration parameter respectively includes:
changing preset parameters contained in the server configuration file into the server configuration parameters according to the server configuration parameters;
and changing preset parameters contained in the authority configuration file into the server configuration parameters.
A visual testing device, comprising:
the first determining unit is used for responding to the operation of a tester and determining an initial configuration file from a plurality of preset configuration files; each configuration file at least comprises a preset parameter, and each preset parameter corresponds to a parameter to be modified in the test code file;
the first acquisition unit is used for acquiring test parameters input by a tester and determining target parameters from all preset parameters contained in the initial configuration file;
the replacing unit is used for replacing the target parameters with the test parameters to obtain a target configuration file;
the starting unit is used for starting the script file when receiving a script file starting instruction so as to run the test code file;
the first generation unit is used for generating a visual window and acquiring identification information input by the tester through the visual window; the identification information is used for representing a function to be tested in software;
the first test unit is used for calling the test parameters in the target configuration file, testing the function to be tested corresponding to the identification information, obtaining a test result, and displaying the test result in the visual window.
In the above apparatus, optionally, the first generating unit may acquire identification information input by the tester through the visualization window, and be configured to:
generating first prompt information and displaying the first prompt information in the visual window; the first prompt information is used for prompting the testers to input identification information;
and acquiring the identification information input by the tester through the visual window.
The above device, optionally, further comprises:
the second acquisition unit is used for responding to the test parameter changing request and acquiring new test parameters;
a changing unit, configured to determine a parameter corresponding to the new test parameter in the target configuration file, and change the parameter corresponding to the new test parameter in the target configuration file to the new test parameter, so as to obtain a new target configuration file;
the second generation unit is used for generating second prompt information when the change of the configuration file is detected, and displaying the second prompt information in the visual window so as to prompt a tester to input new identification information;
the third acquisition unit is used for acquiring new identification information input by the tester through the visual window;
the second testing unit is used for calling the new testing parameters in the new target configuration file, testing the function to be tested corresponding to the new identification information, and displaying the testing result of testing the function to be tested corresponding to the new identification information in the visual window.
The above device, optionally, further comprises:
the second determining unit is used for determining an environment configuration file from a plurality of preset configuration files; the environment configuration file at least comprises a server configuration file and a permission configuration file;
the fourth acquisition unit is used for acquiring server configuration parameters and authority configuration parameters input by the testers;
and the configuration unit is used for respectively configuring the server configuration file and the authority configuration file according to the server configuration parameters and the authority configuration parameters.
In the above apparatus, optionally, the configuration unit performs, according to the server configuration parameter and the permission configuration parameter, respectively configuring the server configuration file and the permission configuration file, where the configuration unit is configured to:
changing preset parameters contained in the server configuration file into the server configuration parameters according to the server configuration parameters;
and changing preset parameters contained in the authority configuration file into the server configuration parameters.
A storage medium comprising stored instructions, wherein the instructions, when executed, control a device in which the storage medium resides to perform the above-described visual test method.
An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to perform the above-described visual testing method by one or more processors.
Compared with the prior art, the invention has the following advantages:
the invention provides a visual test method and a visual test device, wherein the visual test method comprises the following steps: responding to the operation of a tester, and determining an initial configuration file from a plurality of preset configuration files; each configuration file at least comprises one preset parameter, and each preset parameter corresponds to a parameter to be modified in the test code file; obtaining test parameters input by a tester, and determining target parameters from all preset parameters contained in an initial configuration file; replacing the target parameters with the test parameters to obtain a target configuration file; when a script file starting instruction is received, starting the script file to run a test code file; generating a visual window, and acquiring identification information input by a tester through the visual window; the identification information is used for representing the function to be tested; and calling the test parameters in the target configuration file, testing the function to be tested corresponding to the identification information, obtaining a test result, and displaying the test result in a visual window. According to the technical scheme provided by the invention, the parameters which are required to be modified by the tester in the test code are referred to as the parameters in the configuration file, the tester only needs to modify the parameters in the configuration file and then execute the script file, the test code is not required to be modified, and the problem that the test code cannot be operated due to the fact that the tester directly modifies the test code is avoided, so that the test efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a visual testing method provided by the invention;
FIG. 2 is a flow chart of a visual testing method according to another embodiment of the present invention;
FIG. 3 is a flow chart of a visual testing method according to another embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a visual testing device according to the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor devices, distributed computing environments that include any of the above devices or devices, and the like.
The embodiment of the invention provides a visual testing method which can be applied to various system platforms, wherein an execution main body of the visual testing method can be operated on a processor of terminal equipment, and a flow chart of the visual testing method is shown in fig. 1 and specifically comprises the following steps:
s101, responding to the operation of a tester, and determining an initial configuration file from a plurality of preset configuration files.
In the method provided by the invention, each parameter to be modified in the test code file is referenced as a parameter in the configuration file in advance, and optionally, the configuration file at least comprises a permission configuration file, a server configuration file and a test parameter configuration file. The authority configuration file and the server configuration file are used for configuring a tested test environment, and the test parameter configuration file is used for configuring each function to be tested in the software.
Optionally, each configuration file may be stored in the same folder, the tester may click to open the folder, select the configuration file to be configured from the folder for configuration, and the processor determines an initial configuration file from a plurality of preset configuration files in response to the operation of the tester, where the initial configuration file is the file to be configured selected by the tester, and each configuration file at least includes one preset parameter, and each preset parameter corresponds to a parameter to be modified in the test code file.
It should be noted that, when a tester tests each function in software for the first time, it needs to configure the test environment, that is, it needs to configure the permission configuration file and the server configuration file.
S102, acquiring test parameters input by a tester, and determining target parameters from all preset parameters contained in an initial configuration file.
After selecting a configuration file to be configured, a tester inputs test parameters corresponding to the function to be tested, a processor responds to the test parameters input by the tester, selects preset parameters corresponding to the test parameters from all preset parameters contained in the initial configuration file, and takes the preset parameters corresponding to the test parameters in the initial configuration file as target parameters.
S103, replacing the target parameters with the test parameters to obtain a target configuration file.
And replacing the target parameters in the initial configuration file with the test parameters to obtain the target configuration file.
S104, when a script file starting instruction is received, starting the script file to run the test code file.
When a script file starting instruction is received, enabling the script file to run a test code file, wherein the test code file is a file generated by packaging test codes in advance, and the source code of the test code is the code of each function in the test software. For an already packaged test code, the test code cannot be modified by a tester.
Alternatively, the script file may be a shell script file, where the shell script file is used to execute the test code, that is, the start script file is equivalent to running the test code in the test code file.
Optionally, each jar file to be referred in the test code can be stored under the same folder, and when the test code file runs, each jar file in the folder is directly called.
It should be noted that, the folders stored in the configuration file and the folders stored in the jar files are different folders.
S105, generating a visual window, and acquiring identification information input by a tester through the visual window.
After the script file is started, the test code file is operated to generate a visual window, and after the initialization of the code is completed, identification information input by a tester through the visual window is obtained, wherein the identification information is used for representing a function to be tested in software, and optionally, the process of obtaining the identification information input by the tester through the visual window specifically comprises the following steps:
generating first prompt information and displaying the first prompt information in a visual window; the first prompt information is used for prompting a tester to input identification information;
and acquiring the identification information input by the tester through the visual window.
In the method provided by the embodiment of the invention, the first prompt information is generated in the visual window, the testers are prompted to input the identification information, the testers respond to the first prompt information, the identification information of the function to be tested is input in the visual window, and the processor acquires the identification information input by the testers.
S106, calling test parameters in the target configuration file, testing the function to be tested corresponding to the identification information, obtaining a test result, and displaying the test result in a visual window.
After the script file is started, the test codes in the test code file are always in an operation state, and after the identification information input by a tester through the visual window is received, the test parameters of the target configuration file are called to test the function to be tested corresponding to the identification information, so that a test result is obtained.
The test results are presented in a visualization window.
According to the visual test method provided by the embodiment of the invention, the operation of a tester is responded, an initial configuration file is determined from a plurality of preset configuration files, each configuration file at least comprises one preset parameter, each preset parameter corresponds to a parameter to be modified in a test code file, the test parameters input by the tester are obtained, the target parameters are determined from all preset parameters contained in the initial configuration file, the target parameters are replaced by the test parameters, the target configuration file is obtained, when a script file starting instruction is received, the script file is started to run the test code file, a visual window is generated, identification information input by the tester through the visual window is obtained, the identification information is used for representing a function to be tested, the test parameters in the target configuration file are called, the function to be tested corresponding to the identification information is tested, a test result is obtained, and the test result is displayed in the visual window. By applying the visual test method provided by the embodiment of the invention, the parameters which are required to be modified by the tester in the test code are referred to as the parameters in the configuration file, the tester only needs to modify the parameters in the configuration file and then execute the script file, the modification of the test code is not required, and the problem that the test code cannot be operated due to the direct modification of the test code by the tester is avoided, so that the test efficiency is improved.
After the test results are displayed in the visualization window in step S106 disclosed in fig. 1 in the above embodiment of the present invention, the flowchart is shown in fig. 2, and may further include the following steps:
s201, responding to a test parameter changing request, and acquiring new test parameters.
After the test result is displayed in the visual window, the tester can also continuously change the test parameters, and optionally, the test parameters can be changed by changing the test parameters corresponding to the current function to be tested, or by changing the preset parameters corresponding to other functions to be tested in the software.
The test parameter is changed by the tester, namely, the new test parameter is input by opening the test parameter configuration file, the change of the test parameter is realized, and when the new test parameter is input by the tester, namely, the tester sends a test parameter change request, the processor responds to the test parameter change request, and the new test parameter is obtained.
When the tester sends the test parameter change request, the visual window may not need to be closed.
S202, determining parameters corresponding to the new test parameters in the target configuration file, and changing the parameters corresponding to the new test parameters in the target configuration file into the new test parameters to obtain the new target configuration file.
The parameters corresponding to the new test parameters in the target configuration file are determined, and optionally, the parameters corresponding to the new test parameters in the target configuration file may be the above-mentioned test parameters or preset parameters in the target configuration file, when a tester wants to test the function to be tested by replacing other test parameters, the parameters corresponding to the new test parameters in the target configuration file are the test parameters, and when the tester wants to test other functions to be tested in the software, the parameters corresponding to the new test parameters in the target configuration file are the preset parameters. For example, at the beginning of the visual test, a tester firstly tests the function a to be tested, the preset parameter a in the initial configuration file is changed into the test parameter a, after the test of the function a to be tested by the test parameter a is completed, the tester also wants to test the function a to be tested, and the test parameter a is the parameter corresponding to the new test parameter in the target configuration file; if the tester does not test the function A to be tested but tests the function B to be tested, the preset parameter B is the parameter corresponding to the new test parameter in the target configuration.
And changing the parameters corresponding to the new test parameters in the target configuration file into the new test parameters to obtain the new target configuration file.
And S203, when the change of the configuration file is detected, generating second prompt information, and displaying the second prompt information in a visual window to prompt a tester to input new identification information.
Because the visual window is always in an open state, the script file can be considered to be in a starting state all the time, the test code file can also be in an operating state all the time, when the change of the configuration file is detected by the test code in the test code file, second prompt information is generated, and the second prompt information is displayed in the visual window so as to prompt a tester to input new identification information.
S204, acquiring new identification information input by the tester through the visual window.
After the tester inputs new identification information through the visual window, the new identification information is acquired, wherein the new identification information is used for representing a new function to be tested in the software.
S205, calling new test parameters in the new target configuration file, testing the function to be tested corresponding to the new identification information, and displaying the test result of testing the function to be tested corresponding to the new identification information in the visual window.
And calling new test parameters in the new target configuration file, testing the function to be tested corresponding to the new identification information to obtain a new test result, and displaying the new test result in the visual window, namely displaying the test result for testing the function to be tested corresponding to the new identification information in the visual window.
In the visual test method provided by the embodiment of the invention, when the function in the software is required to be continuously tested, the visual window is not required to be closed, after the parameter corresponding to the new test parameter in the target configuration file is changed to the new test parameter, the test code in the running state generates the second prompt information when the change of the configuration file is detected, so that a tester is prompted to input the new identification information through the visual window, and the new test parameter in the new target configuration file is called according to the new identification information input by the tester to test the function to be tested corresponding to the new identification information. By applying the visual test method provided by the embodiment of the invention, the test can be performed for a plurality of times, the script file is not required to be started repeatedly in the test process, only the parameters in the configuration file are required to be modified, the operation of a tester is convenient, and the test speed is high.
Before determining the initial configuration file from the plurality of preset configuration files in response to the operation of the tester, which is referred to in step S101 in the embodiment of the present invention shown in fig. 1, the flowchart may further include the following steps as shown in fig. 3:
s301, determining an environment configuration file from a plurality of preset configuration files; the environment configuration file includes at least a server configuration file and a rights configuration file.
Before a tester begins testing, the testing environment first needs to be configured. Optionally, the tester configures the tested environment and can test by clicking on the environment configuration file in the selection configuration file.
And responding to the operation of a tester, determining an environment configuration file from a plurality of preset configuration files, wherein the environment configuration file at least comprises a server configuration file and a permission configuration file, the server configuration file is used for configuring a server IP, and the permission configuration file is used for configuring a calling party system.
S302, acquiring server configuration parameters and authority configuration parameters input by a tester.
And acquiring server configuration parameters and authority configuration parameters input by a tester.
S303, respectively configuring the server configuration file and the authority configuration file according to the server configuration parameters and the authority configuration parameters.
The method comprises the steps of respectively configuring a server configuration file and a permission configuration file according to the server configuration parameter and the permission configuration parameter, configuring the server configuration file according to the server configuration parameter, configuring the permission configuration file according to the permission configuration parameter, and respectively configuring the server configuration file and the permission configuration file according to the server configuration parameter and the permission configuration parameter, wherein the method specifically comprises the following steps:
and changing preset parameters contained in the server configuration file into server configuration parameters according to the server configuration parameters.
And changing preset parameters contained in the authority configuration file into server configuration parameters.
In the method provided by the embodiment of the invention, the preset parameters contained in the server configuration file are changed into the server configuration parameters according to the server configuration parameters input by the tester, and the preset parameters contained in the permission configuration file are changed into the permission configuration parameters according to the permission configuration parameters input by the tester.
Corresponding to the method shown in fig. 1, the embodiment of the present invention further provides a visual testing device, which is used for implementing the method shown in fig. 1, and the structural schematic diagram of the visual testing device is shown in fig. 4, and specifically includes:
a first determining unit 401, configured to determine an initial configuration file from a plurality of preset configuration files in response to an operation of a tester; each configuration file at least comprises a preset parameter, and each preset parameter corresponds to a parameter to be modified in the test code file;
a first obtaining unit 402, configured to obtain test parameters input by a tester, and determine target parameters from preset parameters included in the initial configuration file;
a replacing unit 403, configured to replace the target parameter with the test parameter to obtain a target configuration file;
a starting unit 404, configured to, when receiving a script file starting instruction, start the script file to run the test code file;
a first generating unit 405, configured to generate a visual window, and obtain identification information input by the tester through the visual window; the identification information is used for representing a function to be tested in software;
and the first test unit 406 is configured to call the test parameters in the target configuration file, test the function to be tested corresponding to the identification information, obtain a test result, and display the test result in the visualization window.
According to the visual testing device provided by the embodiment of the invention, the initial configuration file is determined from a plurality of preset configuration files in response to the operation of a tester, each configuration file at least comprises one preset parameter, each preset parameter corresponds to a parameter to be modified in a test code file, the test parameters input by the tester are obtained, the target parameters are determined from all preset parameters contained in the initial configuration file, the target parameters are replaced by the test parameters, the target configuration file is obtained, when a script file starting instruction is received, the script file is started to run the test code file, a visual window is generated, identification information input by the tester through the visual window is obtained, the identification information is used for representing the function to be tested, the test parameters in the target configuration file are called, the function to be tested corresponding to the identification information is tested, the test result is obtained, and the test result is displayed in the visual window. By applying the visual testing device provided by the embodiment of the invention, the parameters which are required to be modified by the tester in the testing code are referred to as the parameters in the configuration file, the tester only needs to modify the parameters in the configuration file and then execute the script file, the testing code is not required to be modified, and the problem that the testing code cannot be operated due to the fact that the tester directly modifies the testing code is avoided, so that the testing efficiency is improved.
In one embodiment of the present invention, based on the foregoing solution, the first generating unit 405 performs obtaining the identification information input by the tester through the visualization window, for:
generating first prompt information and displaying the first prompt information in the visual window; the first prompt information is used for prompting the testers to input identification information;
and acquiring the identification information input by the tester through the visual window.
In one embodiment of the present invention, based on the foregoing scheme, it may be further configured to:
the second acquisition unit is used for responding to the test parameter changing request and acquiring new test parameters;
a changing unit, configured to determine a parameter corresponding to the new test parameter in the target configuration file, and change the parameter corresponding to the new test parameter in the target configuration file to the new test parameter, so as to obtain a new target configuration file;
the second generation unit is used for generating second prompt information when the change of the configuration file is detected, and displaying the second prompt information in the visual window so as to prompt a tester to input new identification information;
the third acquisition unit is used for acquiring new identification information input by the tester through the visual window;
the second testing unit is used for calling the new testing parameters in the new target configuration file, testing the function to be tested corresponding to the new identification information, and displaying the testing result of testing the function to be tested corresponding to the new identification information in the visual window.
In one embodiment of the present invention, based on the foregoing scheme, it may be further configured to:
the second determining unit is used for determining an environment configuration file from a plurality of preset configuration files; the environment configuration file at least comprises a server configuration file and a permission configuration file;
the fourth acquisition unit is used for acquiring server configuration parameters and authority configuration parameters input by the testers;
and the configuration unit is used for respectively configuring the server configuration file and the authority configuration file according to the server configuration parameters and the authority configuration parameters.
In one embodiment of the present invention, based on the foregoing solution, the configuration unit performs configuration of the server configuration file and the rights configuration file according to the server configuration parameter and the rights configuration parameter, respectively, for:
changing preset parameters contained in the server configuration file into the server configuration parameters according to the server configuration parameters;
and changing preset parameters contained in the authority configuration file into the server configuration parameters.
The embodiment of the invention also provides a storage medium, which comprises stored instructions, wherein the equipment where the storage medium is located is controlled to execute the visual test method when the instructions run.
The embodiment of the present invention further provides an electronic device, whose structural schematic diagram is shown in fig. 5, specifically including a memory 501, and one or more instructions 502, where the one or more instructions 502 are stored in the memory 501, and configured to be executed by the one or more processors 503, where the one or more instructions 502 perform the following operations:
responding to the operation of a tester, and determining an initial configuration file from a plurality of preset configuration files; each configuration file at least comprises a preset parameter, and each preset parameter corresponds to a parameter to be modified in the test code file;
obtaining test parameters input by a tester, and determining target parameters from all preset parameters contained in the initial configuration file;
replacing the target parameters with the test parameters to obtain a target configuration file;
when a script file starting instruction is received, starting the script file to run the test code file;
generating a visual window and acquiring identification information input by the tester through the visual window; the identification information is used for representing a function to be tested in software;
and calling the test parameters in the target configuration file, testing the function to be tested corresponding to the identification information to obtain a test result, and displaying the test result in the visual window.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present invention.
From the above description of embodiments, it will be apparent to those skilled in the art that the present invention may be implemented in software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present invention.
The above describes in detail a visual testing method and apparatus provided by the present invention, and specific examples are applied herein to illustrate the principles and embodiments of the present invention, and the above examples are only used to help understand the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. A method of visual testing, comprising:
responding to the selection operation of the tester, and determining the configuration file selected by the tester as an initial configuration file from a plurality of preset configuration files; each configuration file at least comprises a preset parameter, and each preset parameter corresponds to a parameter to be modified in the test code file;
obtaining test parameters input by a tester, and determining target parameters from all preset parameters contained in the initial configuration file;
replacing the target parameters with the test parameters to obtain a target configuration file;
when a script file starting instruction is received, starting the script file to run the test code file; the test code file is a file generated by encapsulating the test code in advance, and the encapsulated test code cannot be modified;
generating a visual window and acquiring identification information input by the tester through the visual window; the identification information is used for representing a function to be tested in software;
and calling the test parameters in the target configuration file, testing the function to be tested corresponding to the identification information to obtain a test result, and displaying the test result in the visual window.
2. The method of claim 1, wherein the obtaining the identification information input by the tester through the visualization window comprises:
generating first prompt information and displaying the first prompt information in the visual window; the first prompt information is used for prompting the testers to input identification information;
and acquiring the identification information input by the tester through the visual window.
3. The method of claim 1, wherein after the presenting the test results in the visualization window, further comprising:
responding to the test parameter changing request to obtain new test parameters;
determining parameters corresponding to the new test parameters in a target configuration file, and changing the parameters corresponding to the new test parameters in the target configuration file into the new test parameters to obtain a new target configuration file;
when the change of the configuration file is detected, generating second prompt information, and displaying the second prompt information in the visual window to prompt a tester to input new identification information;
acquiring new identification information input by a tester through the visual window;
and calling the new test parameters in the new target configuration file, testing the function to be tested corresponding to the new identification information, and displaying the test result of testing the function to be tested corresponding to the new identification information in the visual window.
4. The method of claim 1, wherein prior to determining the initial profile from the plurality of preset profiles in response to the tester operation, further comprising:
determining an environment configuration file from a plurality of preset configuration files; the environment configuration file at least comprises a server configuration file and a permission configuration file;
obtaining server configuration parameters and authority configuration parameters input by a tester;
and respectively configuring the server configuration file and the authority configuration file according to the server configuration parameters and the authority configuration parameters.
5. The method of claim 4, wherein configuring the server profile and the rights profile in accordance with the server configuration parameters and the rights configuration parameters, respectively, comprises:
changing preset parameters contained in the server configuration file into the server configuration parameters according to the server configuration parameters;
and changing preset parameters contained in the authority configuration file into the server configuration parameters.
6. A visual testing device, comprising:
the first determining unit is used for responding to the selection operation of the tester and determining the configuration file selected by the tester as an initial configuration file from a plurality of preset configuration files; each configuration file at least comprises a preset parameter, and each preset parameter corresponds to a parameter to be modified in the test code file;
the first acquisition unit is used for acquiring test parameters input by a tester and determining target parameters from all preset parameters contained in the initial configuration file;
the replacing unit is used for replacing the target parameters with the test parameters to obtain a target configuration file;
the starting unit is used for starting the script file when receiving a script file starting instruction so as to run the test code file; the test code file is a file generated by encapsulating the test code in advance, and the encapsulated test code cannot be modified;
the first generation unit is used for generating a visual window and acquiring identification information input by the tester through the visual window; the identification information is used for representing a function to be tested in software;
the first test unit is used for calling the test parameters in the target configuration file, testing the function to be tested corresponding to the identification information, obtaining a test result, and displaying the test result in the visual window.
7. The apparatus according to claim 6, wherein the first generation unit performs acquisition of identification information input by the tester through the visualization window for:
generating first prompt information and displaying the first prompt information in the visual window; the first prompt information is used for prompting the testers to input identification information;
and acquiring the identification information input by the tester through the visual window.
8. The apparatus as recited in claim 6, further comprising:
the second acquisition unit is used for responding to the test parameter changing request and acquiring new test parameters;
a changing unit, configured to determine a parameter corresponding to the new test parameter in the target configuration file, and change the parameter corresponding to the new test parameter in the target configuration file to the new test parameter, so as to obtain a new target configuration file;
the second generation unit is used for generating second prompt information when the change of the configuration file is detected, and displaying the second prompt information in the visual window so as to prompt a tester to input new identification information;
the third acquisition unit is used for acquiring new identification information input by the tester through the visual window;
the second testing unit is used for calling the new testing parameters in the new target configuration file, testing the function to be tested corresponding to the new identification information, and displaying the testing result of testing the function to be tested corresponding to the new identification information in the visual window.
9. The apparatus as recited in claim 6, further comprising:
the second determining unit is used for determining an environment configuration file from a plurality of preset configuration files; the environment configuration file at least comprises a server configuration file and a permission configuration file;
the fourth acquisition unit is used for acquiring server configuration parameters and authority configuration parameters input by the testers;
and the configuration unit is used for respectively configuring the server configuration file and the authority configuration file according to the server configuration parameters and the authority configuration parameters.
10. The apparatus of claim 9, wherein the configuration unit performs configuration of the server configuration file and the rights configuration file according to the server configuration parameter and the rights configuration parameter, respectively, for:
changing preset parameters contained in the server configuration file into the server configuration parameters according to the server configuration parameters;
and changing preset parameters contained in the authority configuration file into the server configuration parameters.
CN202010243510.7A 2020-03-31 2020-03-31 Visual test method and device Active CN111459818B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010243510.7A CN111459818B (en) 2020-03-31 2020-03-31 Visual test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010243510.7A CN111459818B (en) 2020-03-31 2020-03-31 Visual test method and device

Publications (2)

Publication Number Publication Date
CN111459818A CN111459818A (en) 2020-07-28
CN111459818B true CN111459818B (en) 2023-11-21

Family

ID=71679398

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010243510.7A Active CN111459818B (en) 2020-03-31 2020-03-31 Visual test method and device

Country Status (1)

Country Link
CN (1) CN111459818B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112256571A (en) * 2020-10-20 2021-01-22 苏州市软件评测中心有限公司 Test case generation method and device and storage medium
CN113535493B (en) * 2021-07-23 2023-08-25 北京天融信网络安全技术有限公司 Method, device, medium and equipment for judging and testing mimicry Web server
CN113572662B (en) * 2021-07-30 2024-02-06 北京天融信网络安全技术有限公司 Network testing method, device, electronic equipment and readable storage medium
CN115144678B (en) * 2022-09-01 2022-12-09 卡斯柯信号(北京)有限公司 Visual test condition configuration method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104217029A (en) * 2014-09-26 2014-12-17 北京国双科技有限公司 Configuration file modification method and configuration file modification device
CN105279090A (en) * 2015-11-17 2016-01-27 中国建设银行股份有限公司 Test script generating method and test script generating device applied in financial field
CN107085516A (en) * 2017-03-31 2017-08-22 北京奇艺世纪科技有限公司 A kind of method and device for changing configuration
CN107357734A (en) * 2017-07-19 2017-11-17 中国银行股份有限公司 A kind of unit test method and device
WO2018010552A1 (en) * 2016-07-12 2018-01-18 博彦科技股份有限公司 Test method and device
CN109086199A (en) * 2018-06-22 2018-12-25 网宿科技股份有限公司 A kind of automation generates the method for test script, terminal and can storage medium
CN109710508A (en) * 2018-08-20 2019-05-03 平安普惠企业管理有限公司 Test method, test device, test equipment and computer readable storage medium
CN110020298A (en) * 2017-10-27 2019-07-16 北京国双科技有限公司 Parameter display method and apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060099987A1 (en) * 2004-11-05 2006-05-11 Nextel Communications, Inc. System and method of providing data fill application to support large-scale configuration changes

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104217029A (en) * 2014-09-26 2014-12-17 北京国双科技有限公司 Configuration file modification method and configuration file modification device
CN105279090A (en) * 2015-11-17 2016-01-27 中国建设银行股份有限公司 Test script generating method and test script generating device applied in financial field
WO2018010552A1 (en) * 2016-07-12 2018-01-18 博彦科技股份有限公司 Test method and device
CN107085516A (en) * 2017-03-31 2017-08-22 北京奇艺世纪科技有限公司 A kind of method and device for changing configuration
CN107357734A (en) * 2017-07-19 2017-11-17 中国银行股份有限公司 A kind of unit test method and device
CN110020298A (en) * 2017-10-27 2019-07-16 北京国双科技有限公司 Parameter display method and apparatus
CN109086199A (en) * 2018-06-22 2018-12-25 网宿科技股份有限公司 A kind of automation generates the method for test script, terminal and can storage medium
CN109710508A (en) * 2018-08-20 2019-05-03 平安普惠企业管理有限公司 Test method, test device, test equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN111459818A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
CN111459818B (en) Visual test method and device
WO2018223717A1 (en) Webpage front-end testing method, device, system, apparatus and readable storage medium
CN111026645B (en) User interface automatic test method and device, storage medium and electronic equipment
CN109726100A (en) Application performance test method, apparatus, equipment and computer readable storage medium
JP5689400B2 (en) Computer program verification of unexpected responses to access requests
CN110032519A (en) Cloud function adjustment method, device, computer equipment and storage medium
Majchrzak et al. Context-dependent testing of applications for mobile devices
CN104156305A (en) Application program testing method and device
CN107102937B (en) User interface testing method and device
CN112699044B (en) Pressure testing method, equipment and storage medium
US9075921B2 (en) Error simulation
CN111104123A (en) Automatic deployment of applications
CN108287781B (en) Memory occupation monitoring method, device and system
CN112613275A (en) Receipt generation method and device, computer equipment and storage medium
CN111104331A (en) Software management method, terminal device and computer-readable storage medium
CN106484604B (en) Application test control method and device
CN112764796A (en) Installation package generation system
CN110837467A (en) Software testing method, device and system
CN106844186B (en) Offline test method of application and terminal equipment
CN113672826A (en) Page jump method, device, computer equipment and storage medium
CN114942890A (en) User interface testing method, device, equipment and medium
Maras et al. Towards specifying pragmatic software reuse
CN110058893B (en) Application control display method and device
CN107665115B (en) Software development platform and method
CN111026651A (en) Test method, test device, storage medium and electronic equipment

Legal Events

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