CN116521572A - Webpage script visual verification method, system, terminal equipment and storage medium - Google Patents

Webpage script visual verification method, system, terminal equipment and storage medium Download PDF

Info

Publication number
CN116521572A
CN116521572A CN202310797693.0A CN202310797693A CN116521572A CN 116521572 A CN116521572 A CN 116521572A CN 202310797693 A CN202310797693 A CN 202310797693A CN 116521572 A CN116521572 A CN 116521572A
Authority
CN
China
Prior art keywords
test
script
data source
webpage
visual verification
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
CN202310797693.0A
Other languages
Chinese (zh)
Other versions
CN116521572B (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.)
Tianjin Jincheng Bank Ltd By Share Ltd
Original Assignee
Tianjin Jincheng Bank Ltd By Share 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 Tianjin Jincheng Bank Ltd By Share Ltd filed Critical Tianjin Jincheng Bank Ltd By Share Ltd
Priority to CN202310797693.0A priority Critical patent/CN116521572B/en
Publication of CN116521572A publication Critical patent/CN116521572A/en
Application granted granted Critical
Publication of CN116521572B publication Critical patent/CN116521572B/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/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to the technical field of test development, and provides a webpage script visual verification method, a system, terminal equipment and a storage medium, wherein the method comprises the following steps: receiving service data source information selected from a webpage by a user and an input test script; uploading a test script to a file server for storage, wherein the test script describes service data source information and characteristic variable processing logic which need to be transmitted; receiving a test type selected from a webpage by a user and an input target characteristic variable; after a test instruction input by a user is detected, service data source information corresponding to a target characteristic variable is requested through HTTP, and processing logic of the target characteristic variable in a test script is downloaded and called from a file server for testing, so that a corresponding test result is obtained; and visually displaying the test result in the webpage so as to ensure the reliability of processing logic of the feature variable in the code script to be issued.

Description

Webpage script visual verification method, system, terminal equipment and storage medium
Technical Field
The application relates to the technical field of test development, in particular to a webpage script visual verification method, a system, terminal equipment and a storage medium.
Background
In development projects of various applications, systems and the like, feature variable code scripts are written according to business requirements and the like, and then updated into the projects. However, if the code is directly released to the feature variable server without testing after writing the code, the following problem may occur. For example, the inability to know the script output results, for which the returned results are not controllable, can have serious consequences; in addition, it is not known whether the processing logic of the script is correct, and it is often necessary to manually observe the entry indicators. Of course, even if verification is desired, the current verification scheme, particularly for the input item, does not have a standard of checking whether the verification input item is completed or not, and the like.
Disclosure of Invention
In view of this, embodiments of the present application provide a web script visual verification method, apparatus, terminal device, and readable storage medium.
In a first aspect, an embodiment of the present application provides a method for visual verification of a web page script, including:
receiving service data source information selected from a webpage by a user and an input test script;
uploading the test script to a file server for storage, wherein the test script describes the business data source information and characteristic variable processing logic which need to be transmitted in;
when testing is needed, receiving a test type selected by a user from the webpage and an input target characteristic variable, and after a test instruction is detected, downloading and calling the processing logic of the target characteristic variable in the test script from the file server through HTTP request of service data source information corresponding to the target characteristic variable to test so as to obtain a corresponding test result;
and visually displaying the test result in the webpage.
In some embodiments, the web page comprises a script configuration area, a code block editing area, a test configuration area and a test block editing area;
the script configuration area is used for providing configuration items of the service data source information, the characteristic variable file names and the input item major categories;
the code block editing area is used for editing the test script by a user;
the test configuration area is used for providing a plurality of test type selection configuration items, and interfaces of the test block editing areas corresponding to different test types are different;
and the test block editing area is used for editing the feature variable to be verified and displaying the test result by a user.
In some embodiments, the service data source information includes: at least one of the target feature variables is dependent on a data source; wherein each of the dependent data sources is derived from corresponding underlying business data in the approval system.
In some embodiments, the test types include: unit test type and batch test type;
the unit test type comprises one or more of text single-case test, service number single-case test and strategy set single-case test.
In some embodiments, a batch test file uploading area is provided in the test block editing area corresponding to the batch test type, where the batch test file to be uploaded is used to record, in a table form, a service number, a module number, a service type and a correct value to which a target feature variable to be tested belongs, and the correct value is used to compare with a return value obtained through testing, so as to obtain a test result.
In some embodiments, when the selected test type is the batch test type, testing the target feature variable includes:
respectively calling a characteristic variable single test interface through asynchronous multithreading to perform synchronous test on each data recorded in the batch test file based on the processing logic, so as to obtain a return value;
and comparing whether the return value of the characteristic variable corresponding to each data is consistent with the correct value, if so, outputting yes, and if not, outputting no.
In some embodiments, in the comparing process of whether the return value and the correct value are consistent, if a strictly-compared configuration instruction is detected, comparing the return value of the target feature variable and the correct value according to an ASCII value principle, if the return value and the correct value are the same, confirming consistency, otherwise, confirming inconsistency; if the strictly-compared configuration instructions are not detected, comparing according to the character string principle, if the configuration instructions are the same, confirming consistency, otherwise, confirming inconsistency.
In some embodiments, when the test result is visually displayed in the web page, the method includes:
displaying the total number of test strips, the number of passing test strips and the number of failed test strips of the batch test, and providing a downloading function of each test result detail; the download type comprises a full record and a difference record, wherein the full record is used for displaying all test results; the difference record is used to show only test content for which the return value is inconsistent with the correct value.
In a second aspect, embodiments of the present application provide a web script visual verification system, including: the device comprises a feature change processing platform and a file server, wherein the feature change processing platform comprises a front end of a page and a back end of a feature;
the front end of the page is used for receiving service data source information selected from the webpage by a user and an input test script; the test script describes the business data source information and characteristic variable processing logic which need to be transmitted in;
the feature back end is used for uploading the test script to a file server for storage;
the front end of the webpage is also used for receiving a test type selected by a user from the webpage and an input target characteristic variable when the test is required;
the feature back end is also used for requesting service data source information corresponding to the target feature variable through HTTP after a test instruction is detected, downloading and calling the processing logic of the target feature variable in the test script from the file server to test, and obtaining a corresponding test result;
the front end of the page is also used for visually displaying the test result.
In a third aspect, embodiments of the present application provide a terminal device, where the terminal device includes a processor and a memory, where the memory stores a computer program, and the processor is configured to execute the computer program to implement the web script visual verification method.
In a fourth aspect, embodiments of the present application provide a readable storage medium storing a computer program that, when executed on a processor, implements the web script visual verification method.
The embodiment of the application has the following beneficial effects:
according to the webpage script visual verification method, service data source information is selected from a webpage, a test script is input, and the test script is uploaded to a file server for storage, wherein the test script describes service data source information and feature variable processing logic which need to be input; then, during testing, according to the selected test type and the input target characteristic variable, requesting service data source information corresponding to the target characteristic variable through HTTP, and downloading and calling processing logic of the target characteristic variable in the test script from a file server to test so as to obtain a corresponding test result; and finally, carrying out real-time visual display on the test result in the webpage. The method ensures the reliability and the like of processing logic of the feature variable in the code script to be issued by visually verifying whether the feature variable script can reach the expectations in the webpage interface.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 illustrates a first flow chart of a web script visual verification method of an embodiment of the present application;
FIG. 2 illustrates a web page interface schematic for implementing a script visual verification method;
FIG. 3 illustrates a system flow diagram of a web script visual verification method of an embodiment of the present application;
FIG. 4 illustrates an example of a table in a batch file of a web script visual verification method in accordance with an embodiment of the present application;
FIG. 5 is a schematic diagram showing a test result of a visual verification method for web page script according to an embodiment of the present application;
FIG. 6 is a diagram of a download configuration interface of a web script visual verification method according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a visual verification system for web page scripts according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments.
The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
In the following, the terms "comprises", "comprising", "having" and their cognate terms may be used in various embodiments of the present application are intended only to refer to a particular feature, number, step, operation, element, component, or combination of the foregoing, and should not be interpreted as first excluding the existence of or increasing the likelihood of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing. Furthermore, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of this application belong. The terms (such as those defined in commonly used dictionaries) will be interpreted as having a meaning that is identical to the meaning of the context in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in connection with the various embodiments.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The embodiments described below and features of the embodiments may be combined with each other without conflict.
FIG. 1 illustrates a flow chart of a web script visual verification method of an embodiment of the present application. The webpage script visual verification method comprises the following steps:
s110, receiving service data source information selected from a webpage by a user and an input test script, wherein the test script describes service data source information and feature variable processing logic which need to be input.
In this embodiment, the service data source mainly originates from an upstream service approval system, and provides basic data (i.e. raw service related data which is not processed) to the feature variable processing platform, so that the platform processes the corresponding feature variable. And feature variable processing logic refers to processing rules for script feature variables that need to be published to the server. For example, a feature variable may be defined as the number of users that meet a certain condition, and then the processing logic of the feature variable may be how to count or filter out specific rules that meet the condition, and so on.
For example, before the user needs to issue the script code containing the feature variable, a corresponding test script may be input into the web page and configured for configuring a corresponding service data source type, and then a test of the target feature variable is performed. For example, taking a financial scenario as an example, the business data source types described above may include, but are not limited to, tax, loan authorization, personal and business personnel, and the like, a variety of business data sources, which are not limited herein.
In one embodiment, the web page may be designed with multiple regions, each region for implementing a corresponding function. For example, as shown in FIG. 2, these regions may include, but are not limited to, including, for example, script configuration regions, code block editing regions, test configuration regions, test block editing regions, and the like.
The script configuration area is mainly used for providing a selection configuration item and the like for service data source information, and can also be used for providing a unique corresponding characteristic variable file name, a service class and the like of the test script. It can be understood that the feature variable file name can be used for inquiring the script in the script database, and the script is also more in number because of a plurality of service types, and the script of which service to be inquired can be further and quickly positioned by the service large-class configuration of the test script, so that the inquiry efficiency and the like can be improved.
The code block editing area is mainly used for a user to edit the test script, namely, the user can edit or modify script codes in the area.
The test configuration area is mainly used for providing a plurality of test type selection configuration items; for example, unit test types, batch test types, and the like may be included. Further, for different test types, for example, the unit test types may further include one or more of text single-case test, service number single-case test, policy set single-case test, and the like, which are not limited herein.
The test block editing area is mainly used for a user to edit feature variables to be verified and display test results, wherein interfaces of the test block editing areas corresponding to different test types are different. This is because, when the test types are different, there is a differentiated display effect due to the difference in the number of tests and the specific test results.
S120, uploading the test script to a file server for storage.
The file server is a resource server for storing a test script file edited by a user on a web interface, and of course, other resource data such as pictures and character strings may be stored in addition to the test script, which is not limited herein. In one embodiment, an S3 file server or the like may be employed. In this embodiment, the test script is uploaded and stored to the file server by adopting the HTTP manner, so that each time the script is stored, if the corresponding test script needs to be tested again or modified later, the test script can be conveniently downloaded to the local area from the file server, so that the local compiling analysis can be performed at any time; on the other hand, unified management of all scripts is convenient.
S130, when testing is needed, receiving a test type selected by a user in a webpage and an input target feature variable, and after a test instruction is detected, downloading and calling processing logic of the target feature variable in a test script from a file server through HTTP request service data source information corresponding to the target feature variable to test so as to obtain a corresponding test result.
As shown in fig. 3, the user may determine the test type and the target feature variable first, and further, after the feature variable processing platform receives a start test instruction input by the user, the platform will query the corresponding service data source from the database according to the input test type and the corresponding specific information and perform data calling or loading, and download the processing logic for processing the target feature variable from the file server, where, of course, if the processing logic is cached locally, the processing logic may not need to be downloaded from the file server again, and compiling and executing the script may be directly performed, so as to obtain the corresponding test result. And finally, returning the test result to the front end of the platform for display.
In this embodiment, the selectable test types include various types, such as unit test types, batch test types, and the like. Wherein the unit test type is used for individual testing of a single feature variable, and the batch test type can be used for batch testing of a plurality of feature variables simultaneously.
For unit test types, in one embodiment, service number singlets, policy set singlets, etc., may be further included, where the scope of the policy set singlets tested may be less than the service number singlets.
For example, when selecting a business number, a business number to be tested (typically, data already existing in a history item) may be input in the test configuration area, for example, when a loan occurs, the business number is a001, and then a001 may be input to perform test regression data. Correspondingly, the test result after the test script is run by using the data of the service number A001 is displayed in the test block editing area, wherein the test result comprises the data returned after the processing treatment is carried out on the characteristic variable to be verified. When the policy set list is selected, a preset policy set can be called to run the test script, and the corresponding test result can be checked in the test block editing area.
For batch test types, in one implementation manner, a batch test file uploading area may be set in the test block editing area corresponding to the batch test type, where the batch test file is used to record contents such as a service number, a module number, a service type, a correct value and the like of the target feature variable to be tested in a table form in a branching manner. The correct value is used for comparing with the return value obtained through the test, and then a test result is obtained.
In the test process, taking the batch test type as an example, in one implementation mode, the target feature variables are tested in batches, and users can upload the target feature variables to the platform after filling the target feature variables according to the batch test file template; furthermore, the platform can call the characteristic variable single test interface through asynchronous multithreading respectively so as to carry out synchronous test based on processing logic on each data recorded in the batch test file, and a return value is obtained; and comparing whether the return value of the characteristic variable corresponding to each data is consistent with the correct value, if so, outputting yes, and if not, outputting no.
For example, assuming that there are history cases a1, a2, a3 (3 records are tested in batch, one record corresponds to one single test), as shown in fig. 4, the feature variable to be processed is that the key is name, the value (correct value) is Zhang three, li four, wang five, then the batch test file can be obtained after filling according to the following table, wherein the first three columns are the service number, the module number and the service type to which the feature variable belongs, and finally, the feature variable is uploaded to the platform and tested.
It should be noted that, in the present embodiment, a strict type and a conventional type of comparison may be adopted in the comparison of feature variables. For example, in the comparison process of whether the return value and the correct value of the feature variable agree with each other, if a strictly-aligned configuration instruction is detected, the return value and the correct value of the target feature variable are compared according to the ASCII value principle (corresponding to the strict type). If the two types of information are the same, confirming consistency, otherwise, confirming inconsistency; if no strictly aligned configuration instruction is detected, comparing according to the character string principle (corresponding to the conventional type), if the configuration instruction is the same, confirming the consistency, otherwise, confirming the inconsistency.
When comparing, the regular expression can be used to judge whether the return value is a numerical value, if so, the return value is converted into the numerical value to be compared, for example, 0 (return value) and 0.0 (correct value), and if the two values are inconsistent according to a strict comparison mode; otherwise, if the two values are compared according to the character string principle, the two values are judged to be consistent. For another example, if the return value is true and the correct value is 1, the two values are determined to be inconsistent according to a strict comparison scheme; otherwise, if the two values are compared according to the character string principle, the two values are judged to be consistent. It can be understood that whether the feature variables in the script to be issued reach the expected test analysis can be ensured to be more accurate by distinguishing whether the feature variables are strictly compared or not.
And S140, visually displaying the test result in the webpage.
The visual display is performed, and the test result of the test can be displayed according to the actual display requirement. For example, for unit testing, the test results may be presented directly in the test block edit field. For batch testing, detailed test contents such as the total number of test strips, the number of passing test strips, the number of failed test strips, etc. may be provided, as shown in fig. 5, and a download function of each test result detail may also be provided. Further alternatively, as shown in fig. 6, for the downloading function aspect, different types such as a full record and a difference record may be provided, where the full record is used for displaying all test results, that is, whether the column data in the table is the same or not; and the difference record is used for only showing the test content of which the return value is inconsistent with the correct value, namely only showing different column data results.
According to the webpage script visual verification method, the characteristic variables are subjected to editing operation of the test script and configuration of different test types are provided on the webpage interface, so that real-time single test or batch test of the characteristic variables is realized, further, the test results are subjected to visual display, a user can intuitively know the execution results of the script, whether processing logic of the characteristic variables is correct or not is verified based on historical data of the existing service data source, and the method is equivalent to a verification standard. In addition, the script edited each time can be uploaded to the file server, so that the characteristic variables can be traced back by using the stored script when each time of improvement, and the test verification efficiency and the like can be accelerated.
Fig. 7 shows a schematic diagram of a configuration of a web script visual verification system 10 according to an embodiment of the present application. Illustratively, the netpage script visual verification system 10 includes a feature variable processing platform 11 and a file server 12, wherein the feature variable processing platform 11 includes a page front end 111, a feature back end 112, each of which is responsible for processing operations differently.
Specifically, the page front end 111 is configured to receive service data source information selected by a user from a web page and an input test script, where the test script describes service data source information and feature variable processing logic that need to be input.
Feature backend 112 is used to upload test scripts to file server 12 for storage.
The front end 111 of the webpage is further configured to receive a test type selected by a user from the webpage and an input target feature variable when the test is required;
the feature back end 112 is further configured to download and call processing logic of the target feature variable in the test script from the file server for testing through HTTP request of service data source information corresponding to the target feature variable after the test instruction is detected, so as to obtain a corresponding test result.
The front end 111 of the page is also used to visually display the test results.
It will be appreciated that the apparatus of this embodiment corresponds to the web script visual verification method of the above embodiment, and the options in the above embodiment are equally applicable to this embodiment, so the description thereof will not be repeated here.
The application also provides a terminal device, such as a computer, and the like, and the terminal device illustratively comprises a processor and a memory, wherein the memory stores a computer program, and the processor enables the terminal device to execute the webpage script visual verification method or the functions of each module in the webpage script visual verification system by running the computer program.
The processor may be an integrated circuit chip with signal processing capabilities. The processor may be a general purpose processor including at least one of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU) and a network processor (Network Processor, NP), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application.
The Memory may be, but is not limited to, random access Memory (Random Access Memory, RAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read-Only Memory, PROM), erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc. The memory is used for storing a computer program, and the processor can correspondingly execute the computer program after receiving the execution instruction.
The present application also provides a readable storage medium for storing the computer program for use in the above terminal device. For example, the readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, of the flow diagrams and block diagrams in the figures, which illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules or units in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application.

Claims (10)

1. A web script visual verification method, comprising:
receiving service data source information selected from a webpage by a user and an input test script;
uploading the test script to a file server in real time for storage, wherein the test script describes the business data source information and characteristic variable processing logic which need to be transmitted in;
when testing is needed, receiving a test type selected by a user from the webpage and an input target characteristic variable, and after a test instruction is detected, downloading and calling the processing logic of the target characteristic variable in the test script from the file server through HTTP request of service data source information corresponding to the target characteristic variable to test so as to obtain a corresponding test result;
and visually displaying the test result in the webpage.
2. The visual verification method of web page script according to claim 1, wherein the web page comprises a script configuration area, a code block editing area, a test configuration area and a test block editing area;
the script configuration area is used for providing a selected configuration item of the service data source information, a characteristic variable file name and a configuration item of a service major class;
the code block editing area is used for editing the test script by a user;
the test configuration area is used for providing a plurality of test type selection configuration items, and interfaces of test block editing areas corresponding to different test types are different;
and the test block editing area is used for editing the feature variable to be verified and displaying the test result by a user.
3. The web script visual verification method of claim 2, wherein the service data source information comprises: at least one of the target feature variables is dependent on a data source; wherein each of the dependent data sources is derived from corresponding underlying business data in the approval system.
4. A web script visual verification method as claimed in claim 2 or claim 3 wherein said test type comprises: unit test type and batch test type;
the unit test type comprises one or more of text single-case test, service number single-case test and strategy set single-case test.
5. The visual verification method of web page script according to claim 4, wherein a batch test file uploading area is provided in the test block editing area corresponding to the batch test type, wherein the batch test file to be uploaded is used for recording the service number, the module number, the service type and the correct value of the target feature variable to be tested in a table form in a branching manner, and the correct value is used for comparing with the return value obtained through the test, so as to obtain the test result.
6. The web script visual verification method of claim 5, wherein when the selected test type is the batch test type, testing the target feature variable comprises:
respectively calling a characteristic variable single test interface through asynchronous multithreading to perform synchronous test on each data recorded in the batch test file based on the processing logic, so as to obtain a return value;
comparing whether the return value of the characteristic variable corresponding to each data is consistent with the correct value, if so, outputting yes, and if not, outputting no;
in the comparison process of whether the return value is consistent with the correct value, if a strictly-compared configuration instruction is detected, comparing the return value of the target characteristic variable with the correct value according to an ASCII value principle, if the return value is the same, confirming that the return value is consistent with the correct value, otherwise, confirming that the return value is inconsistent with the correct value; if the strictly-compared configuration instructions are not detected, comparing according to the character string principle, if the configuration instructions are the same, confirming consistency, otherwise, confirming inconsistency.
7. The web script visual verification method according to claim 6, wherein when the test result is visually displayed in the web page, the method comprises:
displaying the total number of test strips, the number of passing test strips and the number of failed test strips of the batch test, and providing a downloading function of each test result detail; the download type comprises a full record and a difference record, wherein the full record is used for displaying all test results; the difference record is used to show only test content for which the return value is inconsistent with the correct value.
8. A web script visual verification system, comprising: the device comprises a feature change processing platform and a file server, wherein the feature change processing platform comprises a front end of a page and a back end of a feature;
the front end of the page is used for receiving service data source information selected from the webpage by a user and an input test script; the test script describes the business data source information and characteristic variable processing logic which need to be transmitted in;
the feature back end is used for uploading the test script to a file server for storage;
the front end of the webpage is also used for receiving a test type selected by a user from the webpage and an input target characteristic variable when the test is required;
the feature back end is also used for requesting service data source information corresponding to the target feature variable through HTTP after a test instruction is detected, downloading and calling the processing logic of the target feature variable in the test script from the file server to test, and obtaining a corresponding test result;
the front end of the page is also used for visually displaying the test result.
9. A terminal device, characterized in that it comprises a processor and a memory, said memory storing a computer program, said processor being adapted to execute said computer program to implement the web script visual verification method of any of claims 1-7.
10. A readable storage medium, characterized in that it stores a computer program which, when executed on a processor, implements the web script visual verification method according to any one of claims 1-7.
CN202310797693.0A 2023-07-03 2023-07-03 Webpage script visual verification method, system, terminal equipment and storage medium Active CN116521572B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310797693.0A CN116521572B (en) 2023-07-03 2023-07-03 Webpage script visual verification method, system, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310797693.0A CN116521572B (en) 2023-07-03 2023-07-03 Webpage script visual verification method, system, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116521572A true CN116521572A (en) 2023-08-01
CN116521572B CN116521572B (en) 2023-09-19

Family

ID=87390659

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310797693.0A Active CN116521572B (en) 2023-07-03 2023-07-03 Webpage script visual verification method, system, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116521572B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6857090B2 (en) * 2001-05-14 2005-02-15 Samsung Electronics Co., Ltd. System and method for automatically analyzing and managing loss factors in test process of semiconductor integrated circuit devices
CN104360920A (en) * 2014-12-02 2015-02-18 微梦创科网络科技(中国)有限公司 Automatic testing method and device for interface
CN106897227A (en) * 2017-03-06 2017-06-27 环胜电子(深圳)有限公司 A kind of the control display methods and system of dynamic web page test
CN107133180A (en) * 2017-06-07 2017-09-05 腾讯科技(深圳)有限公司 Method of testing, test device and the storage medium of dynamic page
CN110704304A (en) * 2019-09-06 2020-01-17 平安普惠企业管理有限公司 Application program testing method and device, storage medium and server
WO2020248849A1 (en) * 2019-06-14 2020-12-17 平安科技(深圳)有限公司 Webpage language switching method and apparatus, and terminal device
CN113722229A (en) * 2021-09-06 2021-11-30 挂号网(杭州)科技有限公司 Software testing method and device, electronic equipment and storage medium
CN113806150A (en) * 2021-08-16 2021-12-17 济南浪潮数据技术有限公司 Method, system, equipment and storage medium for remote testing of storage server
CN113900958A (en) * 2021-10-29 2022-01-07 中国电信股份有限公司 Test case script generation method, system, medium and electronic device
CN115658529A (en) * 2022-11-03 2023-01-31 平安银行股份有限公司 Automatic testing method for user page and related equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6857090B2 (en) * 2001-05-14 2005-02-15 Samsung Electronics Co., Ltd. System and method for automatically analyzing and managing loss factors in test process of semiconductor integrated circuit devices
CN104360920A (en) * 2014-12-02 2015-02-18 微梦创科网络科技(中国)有限公司 Automatic testing method and device for interface
CN106897227A (en) * 2017-03-06 2017-06-27 环胜电子(深圳)有限公司 A kind of the control display methods and system of dynamic web page test
CN107133180A (en) * 2017-06-07 2017-09-05 腾讯科技(深圳)有限公司 Method of testing, test device and the storage medium of dynamic page
WO2020248849A1 (en) * 2019-06-14 2020-12-17 平安科技(深圳)有限公司 Webpage language switching method and apparatus, and terminal device
CN110704304A (en) * 2019-09-06 2020-01-17 平安普惠企业管理有限公司 Application program testing method and device, storage medium and server
CN113806150A (en) * 2021-08-16 2021-12-17 济南浪潮数据技术有限公司 Method, system, equipment and storage medium for remote testing of storage server
CN113722229A (en) * 2021-09-06 2021-11-30 挂号网(杭州)科技有限公司 Software testing method and device, electronic equipment and storage medium
CN113900958A (en) * 2021-10-29 2022-01-07 中国电信股份有限公司 Test case script generation method, system, medium and electronic device
CN115658529A (en) * 2022-11-03 2023-01-31 平安银行股份有限公司 Automatic testing method for user page and related equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘艳平;费琪;陈伟;: "单元测试框架GTest的自动调用机制分析", 微型电脑应用, no. 05 *

Also Published As

Publication number Publication date
CN116521572B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
US10296563B2 (en) Automated testing of perceptible web page elements
US8893089B2 (en) Fast business process test case composition
EP2778929B1 (en) Test script generation system
CN108628748B (en) Automatic test management method and automatic test management system
CN111522728A (en) Method for generating automatic test case, electronic device and readable storage medium
US9703683B2 (en) Software testing coverage
US10936396B2 (en) Systems and methods for validation of test results in network testing
CN112488652A (en) Work order auditing method, system, terminal and storage medium
CN110990274A (en) Data processing method, device and system for generating test case
JP5684878B2 (en) Systems and methods for providing compliance inspection and detailed analysis of software applications
US8606762B2 (en) Data quality administration framework
CN111858354A (en) Method and device for automatically generating test report, storage medium and electronic equipment
CN115437933A (en) Automatic testing method and device, computer equipment and storage medium
CN111737148A (en) Automatic regression testing method and device, computer equipment and storage medium
CN113778878A (en) Interface testing method and device, electronic equipment and storage medium
CN116521572B (en) Webpage script visual verification method, system, terminal equipment and storage medium
CN112861491A (en) Report processing method and device, electronic equipment and computer readable storage medium
US11119763B2 (en) Cognitive selection of software developer for software engineering task
Ereiz Automating Web Application Testing Using Katalon Studio
RU2728809C1 (en) Method and system for validating complex data structures in a complex micro-service architecture with visual display of results
US20080195453A1 (en) Organisational Representational System
CN114356374A (en) Vehicle data processing method and device and vehicle
CN113722225A (en) Page testing method and device, computer equipment and storage medium
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN112363944A (en) Method and equipment for comparing return values of multiple environment interfaces

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