CN112988585A - PaaS platform test method, device, equipment and medium - Google Patents

PaaS platform test method, device, equipment and medium Download PDF

Info

Publication number
CN112988585A
CN112988585A CN202110308756.2A CN202110308756A CN112988585A CN 112988585 A CN112988585 A CN 112988585A CN 202110308756 A CN202110308756 A CN 202110308756A CN 112988585 A CN112988585 A CN 112988585A
Authority
CN
China
Prior art keywords
paas
result
paas platform
page
target interface
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
CN202110308756.2A
Other languages
Chinese (zh)
Other versions
CN112988585B (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.)
Jingdong Shuke Haiyi Information Technology Co Ltd
Original Assignee
Jingdong Shuke Haiyi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Shuke Haiyi Information Technology Co Ltd filed Critical Jingdong Shuke Haiyi Information Technology Co Ltd
Priority to CN202110308756.2A priority Critical patent/CN112988585B/en
Publication of CN112988585A publication Critical patent/CN112988585A/en
Application granted granted Critical
Publication of CN112988585B publication Critical patent/CN112988585B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/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

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)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The application discloses a PaaS platform test method, a device, equipment and a medium, comprising the following steps: element positioning is carried out on a control platform UI page of a PaaS platform by utilizing a PaaS management and control end test case, keyword driving corresponding to a positioned first target element is executed, and a test result of the control platform UI page is determined based on a first execution result of the keyword driving; the PaaS management and control end test case is a test case which is packaged with keyword drive corresponding to the first target element in advance; calling a target interface packaged in the application demo by using the PaaS access test case, calling a function corresponding to the target interface in the PaaS platform by using the target interface to obtain a function calling result, and determining a PaaS platform access test result corresponding to the target interface based on the function calling result. Therefore, the labor cost for testing the PaaS platform can be reduced, and the testing efficiency is improved.

Description

PaaS platform test method, device, equipment and medium
Technical Field
The present application relates to the field of test technologies, and in particular, to a PaaS platform test method, apparatus, device, and medium.
Background
The Platform as a Service (PaaS) Platform is suitable for micro-Service architecture application in a high concurrency scene, comprises a complete set of tools and services, and comprises a distributed message middleware, a distributed micro-Service framework, a distributed cache, distributed Service management monitoring, distributed task scheduling, a unified configuration center and the like. At present, a test method for a PaaS platform mainly adopts a manual black box test technology, including equivalence classes, boundary values, causal graphs and the like, so that on one hand, the manual black box test requires high labor cost, and on the other hand, the test efficiency is low. In summary, in the process of implementing the invention, the inventor finds that at least the problems of high labor cost and low test efficiency of the PaaS platform test in the prior art exist.
Disclosure of Invention
In view of this, an object of the present application is to provide a PaaS platform testing method, apparatus, device, and medium, which can reduce labor cost for PaaS platform testing and improve testing efficiency. The specific scheme is as follows:
in a first aspect, the present application discloses a PaaS platform testing method, including:
element positioning is carried out on a control platform UI page of a PaaS platform by utilizing a PaaS management and control end test case, keyword driving corresponding to a positioned first target element is executed, and a test result of the control platform UI page is determined based on a first execution result of the keyword driving; the PaaS management and control end test case is a test case which is packaged with keyword drive corresponding to the first target element in advance;
calling a target interface packaged in the application demo by using the PaaS access test case, calling a function corresponding to the target interface in the PaaS platform by using the target interface to obtain a function calling result, and determining a PaaS platform access test result corresponding to the target interface based on the function calling result.
Optionally, the performing, by using the test case at the PaaS management and control end, element positioning on a UI page of a console of the PaaS platform, and executing a keyword driver corresponding to the positioned first target element includes:
and performing element positioning on a control platform UI page of the PaaS platform by using the PaaS control end test case and based on the PageObject model, and executing keyword driving corresponding to the positioned first target element.
Optionally, the determining a test result of the console UI page based on the first execution result driven by the keyword includes:
adding the first execution result driven by the keyword to a preset database, and comparing a first expected result with the first execution result in the preset database to obtain a test result of the UI page of the console;
and/or displaying the first execution result driven by the keyword in the console UI page, and comparing the first expected result with the first execution result displayed by the console UI page to obtain a test result of the console UI page.
Optionally, the invoking, by using the target interface, a function corresponding to the target interface in the PaaS platform includes:
based on a communication protocol required by the function corresponding to the target interface in the PaaS platform called by the target interface, determining a target protocol template from the PaaS access test case; the PaaS access test case is packaged with an HTTP protocol template or a socket protocol template in advance;
and calling a function corresponding to the target interface in the PaaS platform by utilizing the target interface based on the target protocol template.
Optionally, the determining, based on the function call result, a PaaS platform access test result corresponding to the target interface includes:
adding the function calling result to a preset database, and comparing a second expected result with the function calling result in the preset database to obtain a PaaS platform access test result corresponding to the target interface;
and/or displaying the function calling result in the control console UI page, and comparing the second expected result with the function calling result displayed on the control console UI page to obtain a PaaS platform access test result corresponding to the target interface.
Optionally, the determining, based on the function call result, a PaaS platform access test result corresponding to the target interface includes:
element positioning is carried out on the UI page of the control console by utilizing the PaaS access test case, and keyword driving corresponding to a positioned second target element is executed;
and determining a PaaS platform access test result corresponding to the target interface based on the function calling result and a second execution result driven by the keyword corresponding to the second target element.
Optionally, the method further includes:
and acquiring the priority of the test case, and calling the test case of the PaaS control end and the PaaS access test case based on the priority of the test case.
In a second aspect, the present application discloses a PaaS platform testing apparatus, including:
the PaaS platform UI page testing module is used for carrying out element positioning on a control console UI page of a PaaS platform by utilizing a PaaS control end testing case, executing keyword driving corresponding to a positioned first target element, and determining a testing result of the control console UI page based on a first execution result of the keyword driving; the PaaS management and control end test case is a test case which is packaged with keyword drive corresponding to the first target element in advance;
the PaaS platform access test module is used for calling a target interface packaged in the application demo by using a PaaS access test case, calling a function corresponding to the target interface in the PaaS platform by using the target interface to obtain a function calling result, and then determining a PaaS platform access test result corresponding to the target interface based on the function calling result.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the PaaS platform testing method.
In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, which when executed by a processor implements the aforementioned PaaS platform testing method.
The method comprises the steps that element positioning is carried out on a control platform UI page of a PaaS platform by using a PaaS control end test case, keyword driving corresponding to a positioned first target element is executed, and a test result of the control platform UI page is determined based on a first execution result of the keyword driving; the PaaS management and control end test case is a test case which is packaged with keyword drive corresponding to the first target element in advance; calling a target interface packaged in the application demo by using the PaaS access test case, calling a function corresponding to the target interface in the PaaS platform by using the target interface to obtain a function calling result, and determining a PaaS platform access test result corresponding to the target interface based on the function calling result. Therefore, keyword driving is packaged in a test case at a PaaS management and control end, a control platform UI page of a PaaS platform is tested, a target interface is packaged in an application demo, and a test result is accessed to the PaaS platform by utilizing the PaaS access test case, so that manual coding for testing is avoided, automatic testing of the PaaS platform is realized, labor cost for testing the PaaS platform can be reduced, and testing efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic diagram of a system framework to which the PaaS platform test scheme disclosed in the present application is applied;
fig. 2 is a schematic diagram of a layered structure of a PaaS platform test service disclosed in the present application;
fig. 3 is a flowchart of a PaaS platform testing method disclosed in the present application;
fig. 4 is a flowchart of a specific PaaS platform testing method disclosed in the present application;
fig. 5 is a schematic structural diagram of a PaaS platform testing apparatus disclosed in the present application;
fig. 6 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, a test method for a PaaS platform mainly adopts a manual black box test technology, including equivalence classes, boundary values, causal graphs and the like, so that on one hand, the manual black box test requires high labor cost, and on the other hand, the test efficiency is low. In summary, in the process of implementing the invention, the inventor finds that at least the problems of high labor cost and low test efficiency of the PaaS platform test in the prior art exist. Therefore, the PaaS platform testing scheme is provided, labor cost for testing the PaaS platform can be reduced, and testing efficiency is improved.
In the PaaS platform test scheme of the present application, the adopted system framework may specifically refer to fig. 1, and specifically may include a plurality of web terminals and a plurality of clients (clients), where a web-Client distributed test manner is adopted, and a Netty (a java open source framework providing an asynchronous, event-driven network application framework and tools for rapidly developing a high-performance, high-reliability network server and a Client program) communication is adopted between a Client and a web terminal, a test plan is distributed to different web terminals and clients through load balancing, a web terminal is used for configuring test tasks based on the obtained test plan, and includes specifying the number of threads for executing test cases and executing clients, a Client is used for executing test cases corresponding to the test tasks, and may also specify the number of threads for executing test cases, and executes test cases in a command line manner, the application supports an infinite extension client. And the web end can trigger the test task at regular time so that the client executes the test case.
The client specifically executes the steps of: element positioning is carried out on a control platform UI page of a PaaS platform by utilizing a PaaS management and control end test case, keyword driving corresponding to a positioned first target element is executed, and a test result of the control platform UI page is determined based on a first execution result of the keyword driving; the PaaS management and control end test case is a test case which is packaged with keyword drive corresponding to the first target element in advance; calling a target interface packaged in the application demo by using the PaaS access test case, calling a function corresponding to the target interface in the PaaS platform by using the target interface to obtain a function calling result, and determining a PaaS platform access test result corresponding to the target interface based on the function calling result.
In addition, the Web end can inquire the test progress of the test task, the client records the test process log through log4j and the database, and the logs recorded in the 2 modes can be checked in real time through the Web end to locate the problem. And the web end can analyze the test result based on the test log and display the analysis result through multiple charts.
In addition, basic information management display and test case management can be carried out through the web end, online debugging of the test cases is supported, the test cases are directly debugged through the test case management interface, and complexity caused by debugging by using a development tool is avoided. In the application, the Web end can support single step debugging and task scheduling. Usually, after debugging is passed, the testing task is executed regularly through cron expression. After the test plan is executed, a test report is automatically generated and sent to a designated tester through a mail, and all case execution details in the test plan can be checked. And the web end can check all test cases and test task execution conditions through the dashboard, and carry out data statistics according to project dimensions.
In addition, when the PaaS platform is tested, the shell can be remotely executed through the web end to restart tomcat, and projects in Jenkins can be constructed.
Further, a PaaS platform test service may be constructed based on the PaaS platform test scheme of the present application, and the PaaS platform test service is deployed at a web end and a client, as shown in fig. 2, fig. 2 is a schematic diagram of a layered structure of the PaaS platform test service provided by the present application. The upper layer of the PaaS platform test service is an application layer, a Jenkins continuous integration tool is adopted for management, an API (application programming interface) is packaged for calling, and crontab + shell scripts are adopted for timing monitoring; the case layer manages the test cases through java codes and testng, performs logic verification, abnormal scene verification and sensitive word judgment on parameters of the test cases, and realizes multi-interface calling; the configuration layer is used for managing configuration files, hosts and personalized requirements; the public function is used for extracting common public modules, such as date acquisition, attribute acquisition, function crawling, data reading, database operation, mail short message WeChat monitoring and the like; the data management layer is mainly used for dynamically acquiring online logs, constructing basic case data and constructing special scene data; the bottom layer is a running environment which mainly supports the main stream operating systems of Linux, Windows and container Docker.
Aiming at the deployment of the PaaS platform test service on a Web end, a Springboot framework is adopted, a Mysql library is used as a database, a project is constructed and compiled through maven install, and a jar package is started. And (3) deploying the client, automatically constructing and generating a target directory, and starting the service through a bat or shell script. After deployment, system-level management can be performed on the PaaS platform test service through the Web end, and basic data of a system level, including basic data of users, roles, departments, projects, clients, parameters, logs and the like, are mainly maintained.
Referring to fig. 3, an embodiment of the present application discloses a PaaS platform testing method, including:
step S11: element positioning is carried out on a control platform UI page of a PaaS platform by utilizing a PaaS management and control end test case, keyword driving corresponding to a positioned first target element is executed, and a test result of the control platform UI page is determined based on a first execution result of the keyword driving; the PaaS management and control end test case is a test case which is packaged with keyword drive corresponding to the first target element in advance.
The console UI page may include a web-side console UI page and a mobile-side console UI page. That is, the embodiment of the application can realize the automatic test of the UI pages of the web end and the mobile end of the PaaS platform.
Moreover, the keyword driver corresponding to the web end console UI page may be encapsulated by webdriver3.0, and the keyword driver corresponding to the mobile end console UI page may be encapsulated by Appium. And written in Java and Python.
In a specific implementation manner, element positioning can be performed on a console UI page of a PaaS platform by using a PaaS management and control end test case and based on a PageObject model, and keyword driving corresponding to a positioned first target element is executed.
Thus, through the PageObject model, unified management of each console UI page can be achieved.
The embodiment can perform element positioning on the console UI page of the PaaS platform based on the keywords in the keyword driving.
In a specific embodiment, the first execution result driven by the keyword may be added to a preset database, and a first expected result is compared with the first execution result in the preset database to obtain a test result of the console UI page. If the first expected result corresponding to any keyword drive is consistent with the first execution result in the preset database, the target element corresponding to the keyword drive passes the test, otherwise, the target element does not pass the test.
In another specific implementation, the first execution result driven by the keyword may be displayed in the console UI page, and the first expected result is compared with the first execution result displayed in the console UI page to obtain a test result of the console UI page. And if the first expected result is consistent with the first execution result displayed on the UI page of the control console, the test is passed, otherwise, the test is not passed.
Specifically, the first expected result assertion may be utilized to compare the first expected result with the first execution result in the preset database, and compare the first expected result with the first execution result displayed on the console UI page.
Of course, in a specific embodiment, a first expected result may be compared with the first execution result in the preset database, and the first expected result may be compared with the first execution result displayed on the console UI page, and if the comparison results of the two manners are consistent, a test is passed to implement double verification on the execution result.
Step S12: calling a target interface packaged in the application demo by using the PaaS access test case, calling a function corresponding to the target interface in the PaaS platform by using the target interface to obtain a function calling result, and determining a PaaS platform access test result corresponding to the target interface based on the function calling result.
In a specific implementation manner, a target protocol template may be determined from the PaaS access test case based on a communication protocol required by the target interface to call a function corresponding to the target interface in the PaaS platform; the PaaS access test case is packaged with an HTTP protocol template or a socket protocol template in advance; and calling a function corresponding to the target interface in the PaaS platform by utilizing the target interface based on the target protocol template.
It should be noted that, in an actual application scenario, a service application needs to access a PaaS platform through some interfaces, in this embodiment, an application demo is written, and a target interface is encapsulated in the application demo to access the PaaS platform through the target interface, so as to implement an access test of the PaaS platform.
In addition, because communication protocols required for calling functions corresponding to the target interfaces in the PaaS platform by different target interfaces may be different, the embodiments of the present application may package an HTTP protocol template or a socket protocol template in a PaaS access test case in advance, so as to realize calling of the corresponding functions in the PaaS platform by the target interfaces.
In a specific implementation manner, the function calling result may be added to a preset database, and a second expected result is compared with the function calling result in the preset database to obtain a PaaS platform access test result corresponding to the target interface;
in another specific implementation, the function call result may be displayed in the console UI page, and the second expected result is compared with the function call result displayed in the console UI page to obtain a PaaS platform access test result corresponding to the target interface.
Specifically, the second expected result assertion may be utilized to compare the second expected result with the function call result in the preset database, and compare the second expected result with the function call result displayed on the UI page of the console.
In a specific embodiment, the function call result may be displayed in the console UI page, the console UI page is subjected to element positioning, an element value corresponding to a third target element that is positioned is obtained, the function call result displayed on the console UI page is obtained, and the PaaS platform access test result corresponding to the target interface is obtained by comparing the second expected result with the function call result displayed on the console UI page. That is, the element value of the third target element, that is, the function call result, may be obtained by element positioning. Specifically, the element positioning can be performed on the console UI page through keyword driving.
As can be seen, in the embodiment of the application, the element positioning is performed on the control console UI page of the PaaS platform by using the test case of the PaaS management and control end, the keyword driving corresponding to the positioned first target element is executed, and the test result of the control console UI page is determined based on the first execution result of the keyword driving; the PaaS management and control end test case is a test case which is packaged with keyword drive corresponding to the first target element in advance; calling a target interface packaged in the application demo by using the PaaS access test case, calling a function corresponding to the target interface in the PaaS platform by using the target interface to obtain a function calling result, and determining a PaaS platform access test result corresponding to the target interface based on the function calling result. Therefore, keyword driving is packaged in a test case at a PaaS management and control end, a control platform UI page of a PaaS platform is tested, a target interface is packaged in an application demo, and a test result is accessed to the PaaS platform by utilizing the PaaS access test case, so that manual coding for testing is avoided, automatic testing of the PaaS platform is realized, labor cost for testing the PaaS platform can be reduced, and testing efficiency is improved.
Referring to fig. 4, an embodiment of the present application discloses a specific PaaS platform testing method, including:
step S21: element positioning is carried out on a control platform UI page of a PaaS platform by utilizing a PaaS management and control end test case, keyword driving corresponding to a positioned first target element is executed, and a test result of the control platform UI page is determined based on a first execution result of the keyword driving; the PaaS management and control end test case is a test case which is packaged with keyword drive corresponding to the first target element in advance.
For the specific process of the step S21, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
Step S22: calling a target interface packaged in the application demo by using the PaaS access test case, calling a function corresponding to the target interface in the PaaS platform by using the target interface to obtain a function calling result, carrying out element positioning on the UI page of the control console, and executing keyword driving corresponding to a positioned second target element.
Step S23: and determining a PaaS platform access test result corresponding to the target interface based on the function calling result and a second execution result driven by the keyword corresponding to the second target element.
It should be noted that, in the PaaS platform access test of some interfaces, not only a target interface encapsulated in an application demo needs to be called, and a function corresponding to the target interface in the PaaS platform needs to be called by using the target interface, but also element positioning needs to be performed on the console UI page, and keyword driving corresponding to a second target element to be positioned is executed. The PaaS access test case may encapsulate the keyword driver corresponding to the second target element.
In a specific implementation manner, the function calling result may be added to a preset database, and a second expected result is compared with the function calling result in the preset database, and/or the function calling result is displayed on the console UI page, and the second expected result is compared with the function calling result displayed on the console UI page, so as to obtain a comparison result corresponding to the function calling result. Adding a second execution result driven by a keyword to a preset database, comparing a third expected result with the second execution result in the preset database, and/or displaying the second execution result driven by the keyword in the console UI page, and comparing the third expected result with the second execution result displayed by the console UI page to obtain a comparison result corresponding to the second execution result. Finally, a test result is determined based on the comparison result corresponding to the function calling result and the comparison result corresponding to the second execution result, that is, the function calling result is consistent with the second expected result, and the second execution result is consistent with the third expected result, that is, the test is passed, otherwise, the test is not passed.
In addition, in a specific implementation manner, a test case priority may be obtained, and the PaaS management and control end test case and the PaaS access test case may be called based on the test case priority. Specifically, the test case priority may be determined in the test plan.
Therefore, the embodiment meets the requirements of richer PaaS access test.
The following describes a specific procedure of PaaS platform testing according to the present solution.
A tester writes a test plan at a tester terminal, distributes the test plan to different web terminals through load balancing, configures a test task on the web terminals based on the obtained test plan, specifies an execution client, obtains a corresponding test task execution instruction from the client, performs element positioning on a console UI (user interface) page of a PaaS (platform as a service) platform by using a PaaS (platform as a service) management and control terminal test case under the control of the task execution instruction, executes keyword driving corresponding to a positioned first target element, and determines a test result of the console UI page based on a first execution result driven by the keyword; the PaaS management and control end test case is a test case which is packaged with keyword drive corresponding to the first target element in advance; calling a target interface packaged in the application demo by using the PaaS access test case, calling a function corresponding to the target interface in the PaaS platform by using the target interface to obtain a function calling result, and determining a PaaS platform access test result corresponding to the target interface based on the function calling result. And finally generating a test report after the test plan is executed, and sending the test report to corresponding testers.
Referring to fig. 5, the present application discloses, in an implementation thereof, a PaaS platform testing apparatus, including:
the PaaS platform UI page testing module 11 is configured to perform element positioning on a console UI page of a PaaS platform by using a PaaS management and control end test case, execute keyword driving corresponding to a positioned first target element, and determine a testing result of the console UI page based on a first execution result of the keyword driving; the PaaS management and control end test case is a test case which is packaged with keyword drive corresponding to the first target element in advance;
the PaaS platform access test module 12 is configured to call a target interface encapsulated in an application demo by using a PaaS access test case, call a function corresponding to the target interface in the PaaS platform by using the target interface to obtain a function call result, and determine a PaaS platform access test result corresponding to the target interface based on the function call result.
As can be seen, in the embodiment of the application, the element positioning is performed on the control console UI page of the PaaS platform by using the test case of the PaaS management and control end, the keyword driving corresponding to the positioned first target element is executed, and the test result of the control console UI page is determined based on the first execution result of the keyword driving; the PaaS management and control end test case is a test case which is packaged with keyword drive corresponding to the first target element in advance; calling a target interface packaged in the application demo by using the PaaS access test case, calling a function corresponding to the target interface in the PaaS platform by using the target interface to obtain a function calling result, and determining a PaaS platform access test result corresponding to the target interface based on the function calling result. Therefore, keyword driving is packaged in a test case at a PaaS management and control end, a control platform UI page of a PaaS platform is tested, a target interface is packaged in an application demo, and a test result is accessed to the PaaS platform by utilizing the PaaS access test case, so that manual coding for testing is avoided, automatic testing of the PaaS platform is realized, labor cost for testing the PaaS platform can be reduced, and testing efficiency is improved.
In a specific embodiment, the PaaS platform UI page test module 11 is specifically configured to perform element positioning on a console UI page of the PaaS platform by using a PaaS management and control end test case and based on a PageObject model, and execute keyword driving corresponding to a positioned first target element.
The PaaS platform UI page test module 11 is specifically configured to add a first execution result driven by the keyword to a preset database by using a PaaS management and control end test case, and compare a first expected result with the first execution result in the preset database to obtain a test result of the console UI page; and/or displaying the first execution result driven by the keyword in the console UI page, and comparing the first expected result with the first execution result displayed by the console UI page to obtain a test result of the console UI page.
The PaaS platform access test module 12 is specifically configured to utilize a PaaS management and control end test case, call a communication protocol required by a function corresponding to the target interface in the PaaS platform based on the target interface, and determine a target protocol template from the PaaS access test case; the PaaS access test case is packaged with an HTTP protocol template or a socket protocol template in advance; and calling a function corresponding to the target interface in the PaaS platform by utilizing the target interface based on the target protocol template.
The PaaS platform access test module 12 is specifically configured to add the function call result to a preset database by using a PaaS management and control end test case, and compare a second expected result with the function call result in the preset database to obtain a PaaS platform access test result corresponding to the target interface; and/or displaying the function calling result in the control console UI page, and comparing the second expected result with the function calling result displayed on the control console UI page to obtain a PaaS platform access test result corresponding to the target interface.
The PaaS platform access test module 12 is specifically configured to perform element positioning on the console UI page by using the PaaS access test case, and execute keyword driving corresponding to the positioned second target element; and determining a PaaS platform access test result corresponding to the target interface based on the function calling result and a second execution result driven by the keyword corresponding to the second target element.
In addition, the PaaS platform testing device is also used for acquiring the priority of the test case, and calling the test case of the PaaS management and control end and the test case of the PaaS access based on the priority of the test case.
Further, the embodiment of the application also provides electronic equipment. FIG. 6 is a block diagram illustrating an electronic device 20 according to an exemplary embodiment, and nothing in the figure should be taken as a limitation on the scope of use of the present application.
Fig. 6 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, and the computer program is loaded and executed by the processor 21 to implement relevant steps in the PaaS platform testing method disclosed in any one of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the storage 22 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon may include an operating system 221, a computer program 222, data 223, etc., and the storage may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device and the computer program 222 on the electronic device 20, so as to realize the operation and processing of the processor 21 on the data 223 in the memory 22, and may be Windows Server, Netware, Unix, Linux, and the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the PaaS platform testing method executed by the electronic device 20 disclosed in any of the foregoing embodiments. The data 223 may include PaaS platform test-related data collected by the electronic device 20.
Further, an embodiment of the present application further discloses a storage medium, where a computer program is stored in the storage medium, and when the computer program is loaded and executed by a processor, the steps of the PaaS platform test method disclosed in any of the foregoing embodiments are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing describes in detail a PaaS platform testing method, apparatus, device, and medium provided by the present application, and a specific example is applied in the present application to explain the principle and implementation manner of the present application, and the description of the foregoing embodiment is only used to help understand the method and core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A PaaS platform testing method is characterized by comprising the following steps:
element positioning is carried out on a control platform UI page of a PaaS platform by utilizing a PaaS management and control end test case, keyword driving corresponding to a positioned first target element is executed, and a test result of the control platform UI page is determined based on a first execution result of the keyword driving; the PaaS management and control end test case is a test case which is packaged with keyword drive corresponding to the first target element in advance;
calling a target interface packaged in the application demo by using the PaaS access test case, calling a function corresponding to the target interface in the PaaS platform by using the target interface to obtain a function calling result, and determining a PaaS platform access test result corresponding to the target interface based on the function calling result.
2. The PaaS platform testing method according to claim 1, wherein the performing element positioning on a console UI page of the PaaS platform by using a PaaS management and control end test case, and executing keyword driving corresponding to a positioned first target element comprises:
and performing element positioning on a control platform UI page of the PaaS platform by using the PaaS control end test case and based on the PageObject model, and executing keyword driving corresponding to the positioned first target element.
3. The PaaS platform testing method according to claim 1, wherein the determining a test result of the console UI page based on the keyword-driven first execution result comprises:
adding the first execution result driven by the keyword to a preset database, and comparing a first expected result with the first execution result in the preset database to obtain a test result of the UI page of the console;
and/or displaying the first execution result driven by the keyword in the console UI page, and comparing the first expected result with the first execution result displayed by the console UI page to obtain a test result of the console UI page.
4. The PaaS platform testing method according to claim 1, wherein the calling the function corresponding to the target interface in the PaaS platform by using the target interface includes:
based on a communication protocol required by the function corresponding to the target interface in the PaaS platform called by the target interface, determining a target protocol template from the PaaS access test case; the PaaS access test case is packaged with an HTTP protocol template or a socket protocol template in advance;
and calling a function corresponding to the target interface in the PaaS platform by utilizing the target interface based on the target protocol template.
5. The PaaS platform testing method according to claim 1, wherein the determining a PaaS platform access test result corresponding to the target interface based on the function call result includes:
adding the function calling result to a preset database, and comparing a second expected result with the function calling result in the preset database to obtain a PaaS platform access test result corresponding to the target interface;
and/or displaying the function calling result in the control console UI page, and comparing the second expected result with the function calling result displayed on the control console UI page to obtain a PaaS platform access test result corresponding to the target interface.
6. The PaaS platform testing method according to claim 1, wherein the determining a PaaS platform access test result corresponding to the target interface based on the function call result includes:
element positioning is carried out on the UI page of the control console by utilizing the PaaS access test case, and keyword driving corresponding to a positioned second target element is executed;
and determining a PaaS platform access test result corresponding to the target interface based on the function calling result and a second execution result driven by the keyword corresponding to the second target element.
7. The PaaS platform testing method according to any one of claims 1 to 6, further comprising:
and acquiring the priority of the test case, and calling the test case of the PaaS control end and the PaaS access test case based on the priority of the test case.
8. A PaaS platform testing device is characterized by comprising:
the PaaS platform UI page testing module is used for carrying out element positioning on a control console UI page of a PaaS platform by utilizing a PaaS control end testing case, executing keyword driving corresponding to a positioned first target element, and determining a testing result of the control console UI page based on a first execution result of the keyword driving; the PaaS management and control end test case is a test case which is packaged with keyword drive corresponding to the first target element in advance;
the PaaS platform access test module is used for calling a target interface packaged in the application demo by using a PaaS access test case, calling a function corresponding to the target interface in the PaaS platform by using the target interface to obtain a function calling result, and then determining a PaaS platform access test result corresponding to the target interface based on the function calling result.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the PaaS platform testing method according to any of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program which, when executed by a processor, implements the PaaS platform testing method according to any one of claims 1 to 7.
CN202110308756.2A 2021-03-23 2021-03-23 PaaS platform testing method, paaS platform testing device, paaS platform testing equipment and PaaS platform testing medium Active CN112988585B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110308756.2A CN112988585B (en) 2021-03-23 2021-03-23 PaaS platform testing method, paaS platform testing device, paaS platform testing equipment and PaaS platform testing medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110308756.2A CN112988585B (en) 2021-03-23 2021-03-23 PaaS platform testing method, paaS platform testing device, paaS platform testing equipment and PaaS platform testing medium

Publications (2)

Publication Number Publication Date
CN112988585A true CN112988585A (en) 2021-06-18
CN112988585B CN112988585B (en) 2024-05-17

Family

ID=76333160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110308756.2A Active CN112988585B (en) 2021-03-23 2021-03-23 PaaS platform testing method, paaS platform testing device, paaS platform testing equipment and PaaS platform testing medium

Country Status (1)

Country Link
CN (1) CN112988585B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130232474A1 (en) * 2010-09-24 2013-09-05 Waters Technologies Corporation Techniques for automated software testing
US20150339213A1 (en) * 2014-05-21 2015-11-26 Cgi Technologies And Solutions Inc. Automated testing of an application system
CN109189688A (en) * 2018-09-11 2019-01-11 北京奇艺世纪科技有限公司 A kind of generation method, generating means and the electronic equipment of test case script
CN109471793A (en) * 2018-09-29 2019-03-15 天津大学 A kind of webpage automatic test defect positioning method based on deep learning
CN109783346A (en) * 2018-12-05 2019-05-21 深圳怡化电脑股份有限公司 Keyword-driven automatic testing method and device and terminal equipment
CN109857663A (en) * 2019-01-26 2019-06-07 北京工业大学 Automatic test platform of the crucial word drive in conjunction with image similarity
CN110399299A (en) * 2019-07-17 2019-11-01 深圳证券交易所 The execution method of automated test frame and test case
CN110851356A (en) * 2019-10-30 2020-02-28 河海大学 Selenium-based Web application automatic test framework and construction method and system thereof
CN110941546A (en) * 2019-10-12 2020-03-31 平安健康保险股份有限公司 Automatic test method, device, equipment and storage medium for WEB page case
CN111124919A (en) * 2019-12-24 2020-05-08 浙江诺诺网络科技有限公司 User interface testing method, device, equipment and storage medium
CN111338970A (en) * 2020-03-25 2020-06-26 广州棒谷科技股份有限公司 WEB-side keyword-driven UI (user interface) automatic testing method
CN112035348A (en) * 2020-08-26 2020-12-04 广东博智林机器人有限公司 Automatic test platform and automatic test method thereof

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130232474A1 (en) * 2010-09-24 2013-09-05 Waters Technologies Corporation Techniques for automated software testing
US20150339213A1 (en) * 2014-05-21 2015-11-26 Cgi Technologies And Solutions Inc. Automated testing of an application system
CN109189688A (en) * 2018-09-11 2019-01-11 北京奇艺世纪科技有限公司 A kind of generation method, generating means and the electronic equipment of test case script
CN109471793A (en) * 2018-09-29 2019-03-15 天津大学 A kind of webpage automatic test defect positioning method based on deep learning
CN109783346A (en) * 2018-12-05 2019-05-21 深圳怡化电脑股份有限公司 Keyword-driven automatic testing method and device and terminal equipment
CN109857663A (en) * 2019-01-26 2019-06-07 北京工业大学 Automatic test platform of the crucial word drive in conjunction with image similarity
CN110399299A (en) * 2019-07-17 2019-11-01 深圳证券交易所 The execution method of automated test frame and test case
CN110941546A (en) * 2019-10-12 2020-03-31 平安健康保险股份有限公司 Automatic test method, device, equipment and storage medium for WEB page case
CN110851356A (en) * 2019-10-30 2020-02-28 河海大学 Selenium-based Web application automatic test framework and construction method and system thereof
CN111124919A (en) * 2019-12-24 2020-05-08 浙江诺诺网络科技有限公司 User interface testing method, device, equipment and storage medium
CN111338970A (en) * 2020-03-25 2020-06-26 广州棒谷科技股份有限公司 WEB-side keyword-driven UI (user interface) automatic testing method
CN112035348A (en) * 2020-08-26 2020-12-04 广东博智林机器人有限公司 Automatic test platform and automatic test method thereof

Also Published As

Publication number Publication date
CN112988585B (en) 2024-05-17

Similar Documents

Publication Publication Date Title
CN109302522B (en) Test method, test device, computer system, and computer medium
CN111124919A (en) User interface testing method, device, equipment and storage medium
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN106326088B (en) Method and device for realizing construction of test object and device for realizing service configuration test
CN107608901B (en) Jmeter-based testing method and device, storage medium and electronic equipment
CN112241360A (en) Test case generation method, device, equipment and storage medium
CN110659198A (en) Application program test case execution method and device and software test system
CN115658529A (en) Automatic testing method for user page and related equipment
CN112269742A (en) Jenkins-based automatic white box testing method and device and readable storage medium
CN117215910A (en) Interface test frame generation method, test method, electronic device and storage medium
CN113656304B (en) Testing method, device and storage medium of front-end application program
CN114064465A (en) Stability testing method based on Linux cloud platform
CN113672502A (en) Program multi-system testing method and corresponding device, equipment and medium
CN111538659B (en) Interface testing method, system, electronic equipment and storage medium of business scene
CN112988585B (en) PaaS platform testing method, paaS platform testing device, paaS platform testing equipment and PaaS platform testing medium
CN112596750B (en) Application testing method and device, electronic equipment and computer readable storage medium
CN114385493A (en) Performance test method and device, electronic equipment and storage medium
CN113535560B (en) Test execution method, device, storage medium and computing equipment
CN103019927B (en) A kind of performance test methods and system
CN113094266B (en) Fault testing method, platform and equipment for container database
CN115544518A (en) Vulnerability scanning engine implementation method and device, vulnerability scanning method and electronic equipment
CN112560041B (en) Method, apparatus and computer storage medium for automated quality verification detection
CN115454856A (en) Multi-application security detection method, device, medium and electronic equipment
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium
CN113986714A (en) Automatic continuous testing method and device based on containerization

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Information Technology Co.,Ltd.

Address before: 601, 6th floor, building 2, yard 18, Kechuang 11th Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Applicant before: Jingdong Shuke Haiyi Information Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant