CN116126689A - Web automation test method based on data drive - Google Patents

Web automation test method based on data drive Download PDF

Info

Publication number
CN116126689A
CN116126689A CN202211578145.0A CN202211578145A CN116126689A CN 116126689 A CN116126689 A CN 116126689A CN 202211578145 A CN202211578145 A CN 202211578145A CN 116126689 A CN116126689 A CN 116126689A
Authority
CN
China
Prior art keywords
node
test case
codes
automation test
data drive
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211578145.0A
Other languages
Chinese (zh)
Inventor
饶屈娜
甄国钢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qiyun Digital Technology Shanghai Co ltd
Original Assignee
Qiyun Digital Technology Shanghai Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qiyun Digital Technology Shanghai Co ltd filed Critical Qiyun Digital Technology Shanghai Co ltd
Priority to CN202211578145.0A priority Critical patent/CN116126689A/en
Publication of CN116126689A publication Critical patent/CN116126689A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a web automation test framework method based on data drive data driving, which comprises the following steps: a worker writes automated test case script codes locally; submitting the newly added codes or the optimized codes to a remote git server; the maven project is integrated through Jenkins, and the selection environment is automatically constructed. The invention can quickly complete the writing of a complete automatic test case through the combined use of all nodes; for complex scene use cases, a plurality of complete automatic test case combinations can be multiplexed, the code utilization rate is improved by the node packaging implementation mode, and non-professional staff can also get on hand more quickly to complete automatic use case implementation; along with the development of the service, the automatic test framework system can flexibly expand nodes, and the expansion function is realized by adding NodeProcessors in the framework.

Description

Web automation test method based on data drive
Technical Field
The invention relates to the technical field of iterative development of computers, in particular to a web automation testing method based on data drive data driving.
Background
At present, in a agile iteration development mode, the automation case implementation is lagged with the progress of the iteratively-changed business scene, the relevance of each node is large, and the framework is not easy to expand. The existing framework is complicated in code of automatic use cases written in the framework and large in code quantity for service testing and development users, and especially for testers without coding capability, the testers are slow to get on hand. In a limited version iteration time period, it is difficult to complete the requirement test, the requirement research and development and the automatic test case writing at the same time.
In the current xml configuration implementation mode, only the request parameters are different in different scenes, the number of xml and cases is one to one, the code quantity is large after writing, and if the interfaces are updated, many xml needs to be updated. However, the scene automation use case interfaces are difficult to combine, the flow is complex, the time consumption is long, and the flexibility and the expansibility are not realized; when the business is rapidly developed, more and more automatic cases are needed to be realized, as the business system is micro-serviced, the system interface call link also becomes long and complex, the interface iteration update speed becomes fast, and the automatic case writing is realized by using the existing framework without following the change of the needed iteration update.
There is currently no effective solution to the above problems.
Disclosure of Invention
Aiming at the technical problems in the related art, the invention provides a web automation testing method based on data drive data driving, which can overcome the defects in the prior art.
In order to achieve the technical purpose, the technical scheme of the invention is realized as follows:
a web automation test framework method based on data drive data driving comprises the following steps:
s1, a worker writes an automatic test case script code locally;
s2, submitting the newly added codes or the optimized codes to a remote git server;
s3, integrating the maven items through Jenkins, and automatically constructing a selection environment;
s4, using a person to select an environment to be executed in Jenkins, automating the running of test case script codes under the environment configuration, and displaying the running result on a report.
Further, the report in step S4 shows the number of cases successful in execution, the number of cases failed in operation, and the specific cause of failure.
Further, the report in step S4 is used to determine a sync assertion failure or a database assertion failure and an interface defect.
Further, in step S4, the automated test case script code is written by a pre-processing node, a post-processing node, an http/dubbo/session node, an assertion node, a static variable node, and a sleep node.
The invention has the beneficial effects that: the invention can quickly complete the writing of a complete automatic test case through the combined use of all nodes; for complex scene use cases, a plurality of complete automatic test case combinations can be multiplexed, the code utilization rate is improved by the node packaging implementation mode, and non-professional staff can also get on hand more quickly to complete automatic use case implementation; along with the development of the service, the automatic test framework system can flexibly expand nodes, realize expansion functions by adding NodeProcessors in the framework, such as can realize the transmission of mq nodes by an Arian message body in an expandable manner, decouple the strong dependence of the service system, simulate the transmission of mq messages by an upstream system, and perform service logic processing after the mq consumption by a downstream system.
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 needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow diagram of a data driver data driven based web automation test framework method in accordance with an embodiment of the present invention;
FIG. 2 is an interface automation case composition diagram of a data driver data driven based web automation test framework method according to an embodiment of the present invention;
fig. 3 is a flowchart of an example of payment scenario based on a data driver data driven web automation test framework method according to an embodiment of 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 are derived by a person skilled in the art based on the embodiments of the invention, fall within the scope of protection of the invention.
As shown in fig. 1, according to the embodiment of the invention, a web automation test framework method based on data driver data driving, the execution flow is as follows:
step1: a tester and a developer write automatic test case script codes locally;
step2: submitting the newly added codes or the optimized codes to a remote git server;
step3: the maven project is integrated through Jenkins, and the selectable environment is automatically constructed;
step4: the user selects an environment to be executed in Jenkins, the automation test case script code can run under the configuration of the environment, and the running result is displayed on a report, the number of successful cases is executed, the number of failed cases is run and the specific reason of failure is shown; judging whether the synchronous assertion fails or the database assertion fails from the report; a tester or a developer can rapidly judge the interface defect through the generated report; the development smoking test, the regression test of testers and the environmental parameter and configuration modification of operation and maintenance staff can be completed rapidly, and the coverage of the regression test is required; in order to facilitate understanding of the above technical solutions of the present invention, the following describes the above technical solutions of the present invention in detail by a specific usage manner.
As shown in fig. 2, fig. 2 is an abstract structure diagram of a processing node combination of an interface automation use case: wherein the method comprises the steps of
1) Processing node, post processing node:
DB processing: performing operations of adding, deleting, modifying and checking on a database for permanently storing service system data;
redis treatment: performing operations of adding, deleting, modifying and checking on the Redis of the data of the short-time storage service system;
xjob processing: triggering a timing task for the intermediate key through a unique identifier of the designated task;
nacos treatment: for a certain service system, configuring a specific nano key value, modifying value, and realizing the function of automatically modifying the static configuration of the system;
f. encryption processing: for an interface provided by a company through a gateway or an interface for calling an external channel through the gateway; interacting with an external interface, and encrypting data requested by the interface and returned data by the interface; the function is to complete data encryption output by configuring an encryption mode;
h. interface processing: specific interfaces are required to be called for completion, and data construction or data deletion is required;
2) http/dubbo/session node:
URL: interface request address;
head: the request header is composed of different values;
body: requesting parameters;
return: interface return
URL, head, body, return into a complete request transmission and response;
3) Assertion node:
return sync assertion: the interface returns a data value for verification after synchronous real-time calling; the actual value is consistent with the expected value, and the assertion is successful; otherwise, the assertion fails;
db assertion: asserting values that are instantiated in a system database; the actual value is consistent with the expected value, and the assertion is successful; otherwise, the assertion fails;
c. asynchronous assertion: the asynchronous receiving service is required to be matched, the asynchronous message is stored in a database, and then the database verification is carried out;
4) Static variable node and sleep node
a. Static variable node: for various intermediate keys in the system: different environment account names and password configurations stored in the database and xxjob, redis, nacos are different, and different environment interface domain names, custom variables and the like are used; development environment: dev1, dev2; test environment: sit1, sit2, sit3, uat;
sleep node: the processing time of each interface is different, so that special scenes exist, an internal system of the interface is not processed, automatic assertion starts to be executed, the situation needs to sleep an assertion node, the assertion node is set according to the unit of seconds, and the assertion node is executed after waiting for how many seconds;
in specific use, according to the method for web automation testing framework based on data driver data driving of the present invention, as shown in fig. 3, a flowchart of a payment scenario is shown, wherein: simulating a merchant login system to obtain a login unique identifier;
simulating a user to select a dollar wallet account, triggering to inquire a collection account interface, and acquiring a collection account unique identifier;
simulating the user to input a payment amount of 1000 dollar wallet, triggering a return result of inquiring an available balance interface, and verifying that the balance of the dollar wallet is sufficient;
the system inquires the payment service to calculate the amount of the commission;
the system inquires the mobile phone number of the user, sends a short message verification code to the user, and the user receives the verification code and inputs the verification code to the system page system to verify that the payment is initiated successfully;
the unique identification of login, the queried wallet balance, the selected collection account number and the calculated commission amount are taken as elements for requesting payment, a payment request is initiated, and after the payment flow is finished, an automatic test system rule is triggered:
1) Simulated payment order data inspection
a. Whether the merchant order was generated; b. the system automatically checks whether the transaction amount in the merchant order form is correct, whether the transaction state is normal, and the like;
2) Simulated channel order data inspection
Whether the channel order is generated; b. the system automatically checks whether the transaction amount in the channel order form is correct, whether the transaction state is normal, and the like;
3) Simulated purse flowing water and billing entry inspection
a. The generated wallet running water number is correct; b. the system automatically checks whether the transaction amount, the currency and the accounting entry form, the lending direction and the like in the wallet flow water meter are correct;
4) Analog check wallet balance change notification
a. Whether the message informs the table of the data; b. informing that the template content is correct, etc.
In summary, by means of the above technical solution of the present invention, the present invention can quickly complete the writing of a complete automated test case by the combined use of the nodes; for complex scene use cases, a plurality of complete automatic test case combinations can be multiplexed, the code utilization rate is improved by the node packaging implementation mode, and non-professional staff can also get on hand more quickly to complete automatic use case implementation; along with the development of the service, the automatic test framework system can flexibly expand nodes, realize expansion functions by adding NodeProcessors in the framework, such as can realize the transmission of mq nodes by an Arian message body in an expandable manner, decouple the strong dependence of the service system, simulate the transmission of mq messages by an upstream system, and perform service logic processing after the mq consumption by a downstream system.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.

Claims (4)

1. The web automation test framework method based on data drive data driving is characterized by comprising the following steps of:
s1, a worker writes an automatic test case script code locally;
s2, submitting the newly added codes or the optimized codes to a remote git server;
s3, integrating the maven items through Jenkins, and automatically constructing a selection environment;
s4, using a person to select an environment to be executed in Jenkins, automating the running of test case script codes under the environment configuration, and displaying the running result on a report.
2. The data drive data driven based web automation test framework method of claim 1, wherein the report in step S4 shows the number of successful cases executed, the number of failed cases executed, and the specific cause of the failure.
3. The data drive data driven based web automation test framework method of claim 1, wherein the reporting in step S4 is used to determine a sync assertion failure or a database assertion failure and an interface defect.
4. The data drive based data driven web automation test framework method of claim 1, wherein the automation test case script code in step S4 is written by a pre-processing node, a post-processing node, an http/dubbo/session node, an assertion node, a static variable node, and a sleep node.
CN202211578145.0A 2022-12-09 2022-12-09 Web automation test method based on data drive Pending CN116126689A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211578145.0A CN116126689A (en) 2022-12-09 2022-12-09 Web automation test method based on data drive

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211578145.0A CN116126689A (en) 2022-12-09 2022-12-09 Web automation test method based on data drive

Publications (1)

Publication Number Publication Date
CN116126689A true CN116126689A (en) 2023-05-16

Family

ID=86309016

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211578145.0A Pending CN116126689A (en) 2022-12-09 2022-12-09 Web automation test method based on data drive

Country Status (1)

Country Link
CN (1) CN116126689A (en)

Similar Documents

Publication Publication Date Title
Apfelbaum et al. Model based testing
US10489762B2 (en) System and method for automated provisioning bill presentment and payment
CN101286131B (en) Service test method and service test system
CN109829296A (en) The sandbox implementation method of intelligent contract based on alliance's chain
CN110727580A (en) Response data generation method, full-flow interface data processing method and related equipment
CN113032398B (en) Service processing method, computer equipment and storage medium for multi-type service
CN111930617A (en) Automatic testing method and device based on data objectification
CN110659870A (en) Business audit test method, device, equipment and storage medium
CN109299001A (en) The automated testing method and electronic equipment of a kind of list under programming platform
CN111897738A (en) Automatic testing method and device based on atomic service
CN113778878A (en) Interface testing method and device, electronic equipment and storage medium
CN112613288B (en) Method, device, computer equipment and storage medium for generating bill
CN113590465A (en) Method for automatically generating mock service based on SDK
CN112651716A (en) Data processing method, device and storage medium
CN116126689A (en) Web automation test method based on data drive
Demeyer et al. Declarative workflows to efficiently manage flexible and advanced business processes
CN115827051A (en) Software integration management system, method and server
CN115167842A (en) Visual development method, device, system, electronic equipment and medium of business
CN115600972A (en) Method, device, equipment and storage medium for verifying and selling of bad assets
CN111274138B (en) Method and device for testing account merging function
CN112036836B (en) Service opening method, system and equipment
Arantes et al. Tool support for generating model-based test cases via web
US20150095889A1 (en) Evaluation system, evaluation device, and evaluation method
CN109634865A (en) A kind of code turns to survey method, apparatus and turns to survey terminal
Gupta et al. A component-based approach for test case generation

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