CN111176971A - Code quality testing system and method based on UI automation - Google Patents

Code quality testing system and method based on UI automation Download PDF

Info

Publication number
CN111176971A
CN111176971A CN201811335763.6A CN201811335763A CN111176971A CN 111176971 A CN111176971 A CN 111176971A CN 201811335763 A CN201811335763 A CN 201811335763A CN 111176971 A CN111176971 A CN 111176971A
Authority
CN
China
Prior art keywords
automation
test
code
automatic
library
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
CN201811335763.6A
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.)
Wuxi Yazuo Online Technology Co ltd
Original Assignee
Wuxi Yazuo Online 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 Wuxi Yazuo Online Technology Co ltd filed Critical Wuxi Yazuo Online Technology Co ltd
Priority to CN201811335763.6A priority Critical patent/CN111176971A/en
Publication of CN111176971A publication Critical patent/CN111176971A/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

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)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a code quality testing system and method based on UI automation, which comprises a Robot FrameWork, a code Library management module and a code Library execution module, wherein the Robot FrameWork is used as a bottom layer FrameWork for bearing the whole working platform and is used for managing a Selenium Library, an Apium Library, an automation case compiling and executing module; the Selenium Library implements automation of the H5 page and BOH; the Apium Library realizes the automation of code scanning and ordering, a POS machine and a mobile end platform; the automatic testing continuous integration is realized by using the Robot FrameWork and Jenkins modes. The invention solves the problem of personnel stress, and simultaneously increases additional benefits, such as a trustable result, task execution without human intervention, and even a scene which cannot be covered by manpower, thereby integrally improving the testing efficiency and quality.

Description

Code quality testing system and method based on UI automation
Technical Field
The invention mainly relates to the field of code testing, in particular to a code quality testing system and method based on UI automation.
Background
In the manual testing process, a cured test scenario and an exploratory test scenario usually exist, and for the cured test scenario, a tester is required to spend a lot of time and energy to pay attention, and the scenarios can be subdivided into a normal scenario and an abnormal scenario. In general, the normal scenario is relatively fixed in use, i.e. each result of input and output is consistent, and the exception scenario is the same, but because of the data of the input exception, different results may be generated.
It can be seen from this point that the normal scenario and the abnormal scenario are different for the tester, i.e. the input and the output are different, and in the automation process, the purpose of the solidification test automation can be achieved by reasonably parameterizing the different input and output. In the exploratory test, almost all elements, operable interfaces, even third-party apps and the like are tested, an effective exploratory test and an invalid exploratory test are inevitably generated in the test process, and aiming at the effective exploratory test, after the test is completed, the test can be converted into an automatic test case and converted into a curing test, so that the test quality is improved. For manual cure testing, the following problems tend to exist:
(1) manual testing is inefficient in recording test results, and a large number of manual tests are required, so that the cost is high.
(2) The manual test is easy to cause test errors or scene test errors, so that invalid work is caused.
(3) The repeated amount of the curing test is large, so that the testers generate psychological inertia, and the control of the product quality is not facilitated.
For these reasons, it is necessary to provide an automated testing scheme for solving the problems encountered in manual testing, so as to ensure that the stages of data input, result output, test data collection, test report analysis, and the like of the solidification test can be automatically executed, thereby quickly and effectively completing the testing task, and controlling the overall testing process from each stage to prove that the automated testing result is accurate and reliable.
The patent of the invention of China has been published, application number CN201110037410.X, patent name: test code quality assessment, application date: 20110131, the present invention relates to a test environment that may include quality assessment of test code used to test application code. Several quality assessments may be determined from analysis of test code in compiled or source code form, including assessment of descriptive assertions made by the test code, dependency assessments, rank complexity assessments, return value assertions, variable parameter assertions, and test validity history. The quality assessment may also include test code analysis related to the application code, including exception capture, boundary conditions, assertions to return values, and other assessments. The test code evaluations may be presented in a user interface with the test code and may be used to manage the testing process of the application. The test code evaluation may be integrated into a code development application having a graphical user interface.
Disclosure of Invention
The invention provides a code quality testing system based on UI automation, aiming at the defects in the prior art, the code quality testing system based on UI automation is provided, and comprises a Robot FrameWork which is used as a bottom layer frame to bear the whole working platform and is used for managing a Selenium Library, an Appliumlibrary and an automation case compiling and executing module;
the Selenium Library implements automation of the H5 page and BOH;
the Apium Library realizes the automation of code scanning and ordering, a POS machine and a mobile end platform;
the automatic testing continuous integration is realized by using the Robot FrameWork and Jenkins modes.
Preferably, the language for writing the automatic use case adopts a natural language, and the natural language is Chinese.
Preferably, the mobile terminal comprises an android real machine, an IOS real machine and a virtual device.
A code quality testing method based on UI automation is characterized by comprising the following steps:
s1, carrying out development coding and automatic code writing or maintenance according to the requirement clarification;
s2, evaluating the compiled automation codes, and if no problem exists, submitting the automation codes to an automation environment; if the problem exists, modifying the code;
s3, performing daily construction, API/UI and other automatic tests on the codes submitted to the automatic environment, and mainly aiming at ensuring that a core process can pass after new codes are developed and submitted, so that automatic quick regression is achieved;
s4, entering a test stage after the detection constructed every day passes, using an automatic case to execute the test of the whole test stage, and compiling a new logic function into an automatic script, wherein the manual test can focus on exploratory test due to automatic intervention; s5, after the steps are passed, delivering the product for use; if the BUG exists, the BUG is repaired, and meanwhile, an automatic script is written, so that the subsequent test regression is facilitated.
Preferably, the UI automation test comprises the following steps:
s1, firstly, a client creates a task, and sends a restful request like a remote server through an http request, namely a browser;
s2, the remote server side analyzes the content of the http request and executes corresponding operation;
and S3, after the remote server executes the completion operation, returning the response result of the operation, namely success or failure, to the client.
Preferably, the API automated testing comprises the steps of:
s1, a client obtains an installation package of a mobile App, determines an execution device and an execution case, and then sends the information to a server;
s2, the server automatically allocates an application server to execute a specific use case according to the sequence of the requests, the parameter information and the like;
and S3, selecting an android real machine, an IOS real machine and a virtual machine to test according to different parameters and use cases.
The invention has the beneficial effects that: the problem of personnel's pressure is solved, increase extra income simultaneously, for example dependable result, the task execution of unmanned intervention, can accomplish the scene that artifical can't cover even to holistic promotion efficiency of software testing and quality.
Drawings
FIG. 1 is a flow chart of the present invention;
Detailed Description
As shown in fig. 1, the present invention includes: the system comprises a Robot FrameWork, a management platform and an automation case compiling and executing module, wherein the Robot FrameWork is used as a bottom layer frame to bear the whole working platform and is used for managing a Selenium Library, an Apium Library and an automation case compiling and executing module;
the Selenium Library implements automation of the H5 page and BOH;
the Apium Library realizes the automation of code scanning and ordering, a POS machine and a mobile end platform;
the automatic testing continuous integration is realized by using the Robot FrameWork and Jenkins modes.
In this embodiment, preferably, the language for writing the automation use case is a natural language, and the natural language is chinese.
The language selection is set, so that the participants can use the automatic tool quickly, accurately and conveniently, and therefore, all the participants need to write the automatic case easily without a coding basis by writing the case in Chinese.
In this implementation, preferably, the mobile terminal includes an android native machine, an IOS native machine, and a virtual device.
Set up above-mentioned removal end, diversified removal end improves the suitability of equipment test.
A code quality testing method based on UI automation is characterized by comprising the following steps: s1, carrying out development coding and automatic code writing or maintenance according to the requirement clarification;
s2, evaluating the compiled automation codes, and if no problem exists, submitting the automation codes to an automation environment; if the problem exists, modifying the code;
s3, performing daily construction, API/UI and other automatic tests on the codes submitted to the automatic environment, and mainly aiming at ensuring that a core process can pass after new codes are developed and submitted, so that automatic quick regression is achieved;
s4, entering a test stage after the detection constructed every day passes, using an automatic case to execute the test of the whole test stage, and compiling a new logic function into an automatic script, wherein the manual test can focus on exploratory test due to automatic intervention; s5, after the steps are passed, delivering the product for use; if the BUG exists, the BUG is repaired, and meanwhile, an automatic script is written, so that the subsequent test regression is facilitated.
Preferably, in this embodiment, the UI automation test includes the following steps:
s1, firstly, a client creates a task, and sends a restful request like a remote server through an http request, namely a browser;
s2, the remote server side analyzes the content of the http request and executes corresponding operation;
and S3, after the remote server executes the completion operation, returning the response result of the operation, namely success or failure, to the client.
Preferably, in this embodiment, the API automated testing comprises the following steps:
s1, a client obtains an installation package of a mobile App, determines an execution device and an execution case, and then sends the information to a server;
s2, the server automatically allocates an application server to execute a specific use case according to the sequence of the requests, the parameter information and the like;
and S3, selecting an android real machine, an IOS real machine and a virtual machine to test according to different parameters and use cases.
The scheme is suitable for Web end, mobile end hybrid App, native App and H5 App. And adding a Chropath component in the Chrome browser to automatically acquire the path of the XPATH.
(1) UI automation can be automatically executed, result feedback, result statistics and analysis are achieved, manual intervention is not needed in the process, and results are accurate and reliable.
(2) UI automation can help manual testers to reduce the work of curing tests, and the testers can put more attention on digging actual business scenes.
(3) UI automation is a link in the whole quality ecological chain, and the overall software quality can be improved.
The above-described embodiments are merely illustrative of the principles and utilities of the present patent application and are not intended to limit the present patent application. Modifications and variations can be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of this patent application. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical concepts disclosed in the present application shall be covered by the claims of this patent application.

Claims (6)

1. A code quality testing system based on UI automation, comprising: the system comprises a Robot FrameWork, a software FrameWork and an automation case compiling and executing module, wherein the Robot FrameWork is used as a bottom layer FrameWork to bear the whole working platform and is used for managing a Selenium Library, an Appliumlibrary and the automation case compiling and executing module;
the Selenium Library implements automation of the H5 page and BOH;
the Apium Library realizes the automation of code scanning and ordering, a POS machine and a mobile end platform; the RobotFrameWork and Jenkins approach is used to achieve automated testing for continued integration.
2. The UI automation-based code quality testing system of claim 1, wherein: the language for writing the automatic use case adopts a natural language, and the natural language is Chinese.
3. The UI automation-based code quality testing system of claim 2, wherein: the mobile terminal comprises an android real machine, an IOS real machine and virtual equipment.
4. A code quality testing method based on UI automation is characterized by comprising the following steps:
s1, carrying out development coding and automatic code writing or maintenance according to the requirement clarification;
s2, evaluating the compiled automation codes, and if no problem exists, submitting the automation codes to an automation environment; if the problem exists, modifying the code;
s3, performing daily construction, API/UI and other automatic tests on the codes submitted to the automatic environment;
s4, entering a test stage after the detection constructed every day passes, executing the test of the whole test stage by using an automatic case, and writing a new logic function into an automatic script;
s5, after the steps are passed, delivering the product for use; if the BUG exists, the BUG is repaired, and meanwhile, an automatic script is written, so that the subsequent test regression is facilitated.
5. The UI automation-based code quality testing method of claim 4, wherein: the UI automation test comprises the following steps:
s1, firstly, a client creates a task, and sends a restful request like a remote server through an http request, namely a browser;
s2, the remote server side analyzes the content of the http request and executes corresponding operation;
and S3, after the remote server executes the completion operation, returning the response result of the operation, namely success or failure, to the client.
6. The UI automation-based code quality testing method of claim 5, wherein the API automation test comprises the following steps:
s1, a client obtains an installation package of a mobile App, determines an execution device and an execution case, and then sends the information to a server;
s2, the server automatically allocates an application server to execute a specific use case according to the sequence of the requests, the parameter information and the like;
and S3, selecting an android real machine, an IOS real machine and a virtual machine to test according to different parameters and use cases.
CN201811335763.6A 2018-11-11 2018-11-11 Code quality testing system and method based on UI automation Pending CN111176971A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811335763.6A CN111176971A (en) 2018-11-11 2018-11-11 Code quality testing system and method based on UI automation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811335763.6A CN111176971A (en) 2018-11-11 2018-11-11 Code quality testing system and method based on UI automation

Publications (1)

Publication Number Publication Date
CN111176971A true CN111176971A (en) 2020-05-19

Family

ID=70651769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811335763.6A Pending CN111176971A (en) 2018-11-11 2018-11-11 Code quality testing system and method based on UI automation

Country Status (1)

Country Link
CN (1) CN111176971A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112380143A (en) * 2020-12-15 2021-02-19 福建新大陆支付技术有限公司 POS product automatic testing method, system, equipment and computer storage medium
CN112579443A (en) * 2020-12-08 2021-03-30 温氏食品集团股份有限公司 Automatic testing method and platform of intelligent testing robot
CN116257458A (en) * 2023-05-16 2023-06-13 国网信息通信产业集团有限公司 Automatic testing method and system for mobile API (application program interface) in hybrid development mode

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095677A (en) * 2016-06-08 2016-11-09 上海爱数信息技术股份有限公司 The RESTful Webservice automatic interface testing method realized based on Robot Framework
CN106326127A (en) * 2016-08-29 2017-01-11 浪潮电子信息产业股份有限公司 Automatic testing method
CN108427646A (en) * 2018-04-13 2018-08-21 中国民航信息网络股份有限公司 Android App automated test frames construction method based on Appium and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095677A (en) * 2016-06-08 2016-11-09 上海爱数信息技术股份有限公司 The RESTful Webservice automatic interface testing method realized based on Robot Framework
CN106326127A (en) * 2016-08-29 2017-01-11 浪潮电子信息产业股份有限公司 Automatic testing method
CN108427646A (en) * 2018-04-13 2018-08-21 中国民航信息网络股份有限公司 Android App automated test frames construction method based on Appium and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张ZX: "Appium+Robot Framework+Jenkins从环境搭建到测试执行实现移动端的自动化测试", 《HTTPS://BLOG.CSDN.NET/FENGDEZHUDI/ARTICLE/DETAILS/53203729》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112579443A (en) * 2020-12-08 2021-03-30 温氏食品集团股份有限公司 Automatic testing method and platform of intelligent testing robot
CN112380143A (en) * 2020-12-15 2021-02-19 福建新大陆支付技术有限公司 POS product automatic testing method, system, equipment and computer storage medium
CN112380143B (en) * 2020-12-15 2022-08-16 福建新大陆支付技术有限公司 POS product automatic testing method, system, equipment and computer storage medium
CN116257458A (en) * 2023-05-16 2023-06-13 国网信息通信产业集团有限公司 Automatic testing method and system for mobile API (application program interface) in hybrid development mode
CN116257458B (en) * 2023-05-16 2023-10-17 国网信息通信产业集团有限公司 Automatic testing method and system for mobile API (application program interface) in hybrid development mode

Similar Documents

Publication Publication Date Title
US20210011840A1 (en) Software testing method, system, apparatus, device medium, and computer program product
CN103164328B (en) The regression testing method of a kind of business function, Apparatus and system
Ramya et al. Testing using selenium web driver
CN101241467B (en) Automatized white box test system and method facing to WEB application
US7596778B2 (en) Method and system for automatic error prevention for computer software
Rodriguez et al. Software verification and validation technologies and tools
CN111176971A (en) Code quality testing system and method based on UI automation
CN111209185B (en) Keyword-based automated testing method and computer-readable storage medium
CN106484613A (en) A kind of interface automated test frame based on fitnese
CN103186463B (en) Determine the method and system of the test specification of software
Mijatov et al. A Framework for Testing UML Activities Based on fUML.
CN109669851A (en) Performance test script method for recording based on Selenium automation
US9274933B2 (en) Pretest setup planning
Job Automating and optimizing software testing using artificial intelligence techniques
CN111966575B (en) Graphic automatic test method for aviation onboard display software
Mann et al. Automated software test optimization using test language processing.
Imran et al. A comparative study of QTP and load runner automated testing tools and their contributions to software project scenario
Tanaka et al. Selenium based testing systems for analytical data generation of website user behavior
CN115629956A (en) Software defect management method and system based on interface automatic test
CN114661615A (en) FPGA software testing method and device
Ibrahim et al. Finite State Machine-Model Based Testing on Website Application
US10296449B2 (en) Recording an application test
CN108415843B (en) Selenium Remote Control-oriented Java test code quality evaluation method
CN111078524A (en) Continuous integration test method based on electric power 6+1 system
CN117234946B (en) Automatic test method and related equipment for project library system

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200519

RJ01 Rejection of invention patent application after publication