CN112035356A - Automatic testing method and system for web application compatibility - Google Patents

Automatic testing method and system for web application compatibility Download PDF

Info

Publication number
CN112035356A
CN112035356A CN202010891866.1A CN202010891866A CN112035356A CN 112035356 A CN112035356 A CN 112035356A CN 202010891866 A CN202010891866 A CN 202010891866A CN 112035356 A CN112035356 A CN 112035356A
Authority
CN
China
Prior art keywords
test
compatibility
testing
report
automatic
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
CN202010891866.1A
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.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud 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 Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202010891866.1A priority Critical patent/CN112035356A/en
Publication of CN112035356A publication Critical patent/CN112035356A/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 discloses an automatic testing method and system for web application compatibility, which relate to the technical field of automatic testing and comprise the following implementation processes: the research and development personnel push the web application codes to the code warehouse; the tester writes an automatic test script and pushes the test script to a code warehouse; a research and development worker logs in a visual page to configure a system type and a browser type which need to test compatibility, and submits a test application; a tester logs in a visual page, selects a code warehouse and a code test script to be tested according to a test application, and configures an automatic test flow; triggering an automatic test flow manually or regularly to test; and after the test is finished, outputting a monitoring report and a test result report of the test flow process, and feeding back the monitoring report and the test result report to research and development personnel. The invention realizes the visual configuration of the test process, the self-defined combination of the test scenes, the automation of the test process and the monitoring of the whole process, and can solve the problems of complicated test process of the web application compatibility and easy error.

Description

Automatic testing method and system for web application compatibility
Technical Field
The invention relates to the technical field of automatic testing, in particular to an automatic testing method and system for web application compatibility.
Background
With the rapid development of the internet technology, different processor architectures, different operating systems, different browser kernels and different browser types appear, and in order to ensure that a developed web application can be normally accessed in various software and hardware environments, various combined environment tests need to be performed, so that the problems brought about are as follows: how to quickly build a test environment and carry out comprehensive test. The existing measures are manual treatment, so that the efficiency is low and errors are easy to occur.
In the conventional mode, the test steps are as follows:
step 1: deployment personnel manually install various required operating systems (such as windows, CentOS, Ubuntu), and manually judge hardware environment information (such as processor architecture: x86, arm or mips, and the like);
step 2: the deployment personnel manually installs different browsers, and needs to select according to different systems and processor architectures;
and step 3: a deployment worker manually installs a running ring on which the software package depends and deploys an application;
and 4, step 4: the tester manually performs compatibility tests for different environments.
Disclosure of Invention
The invention provides an automatic testing method and system for web application compatibility, aiming at the problems that in the existing compatibility testing process of web application, a large amount of manpower is required to be consumed to manually build an environment according to different processor architectures, different systems and different browser types and the process is complicated and easy to make mistakes, so that the visual configuration of the testing process, the self-defined combination of the testing scenes, the automation of the testing process, the monitoring of the whole process and the like are realized, and the problems that the process is complicated and easy to make mistakes are solved.
Firstly, the invention provides an automatic testing method for web application compatibility, and the technical scheme adopted for solving the technical problems is as follows:
an automated testing method for web application compatibility comprises the following steps:
s1, the developer pushes the web application code to a code warehouse;
s2, compiling an automatic test script by a tester, and pushing the automatic test script to a code warehouse;
s3, configuring a system type and a browser type which need to be tested for compatibility by logging in a visual page by research personnel, and submitting a test application by logging in the visual page by the research personnel;
s4, logging in a visual page by a tester, selecting a code warehouse and a code test script to be tested according to the test application, and configuring an automatic test flow;
s5, triggering an automatic test flow manually or regularly to test;
and S6, after the test is finished, outputting a monitoring report and a test result report of the test flow process, and feeding back the monitoring report and the test result report to research personnel.
Optionally, in step S2, the automated test script written by the tester includes a functional test part, a compatibility test part and a test report generation part, wherein,
the compatibility testing part performs screenshot on testing processes under different testing scenes, performs picture preprocessing on the stored screenshot to extract characteristic values of multiple latitudes, performs batch comparison analysis according to the extracted characteristic values of the multiple dimensions, considers that the characteristic values are the same if a comparison result is within a specified range of a preset value, otherwise, considers that the characteristic values are different, and finally outputs a comparison result;
the test report generating part generates a report containing a function test result and a compatibility test result in each scene, wherein the test report generating part generates a report of the compatibility test result according to a comparison result output by the compatibility test part.
Further optionally, in step S3, the system type to be tested for compatibility may be windows-x86_64, centros-x 86_64, or centros-aarch 64;
the browser type that needs to be tested for compatibility may be Chrome browser-Chrome kernel or Firefox browser-Firefox kernel or 360 browser-IE + Chrome dual kernel.
Further optionally, in step S5, jenkins is used as a task scheduling tool, so that process configurability is realized, requirements of different test scenarios are met, a process can be monitored, traceability requirements of a test process are met, the process can be triggered manually or regularly, and requirements of testing according to needs are met.
Further optionally, the background integration prometheus monitoring in step S5 is implemented to monitor the operation conditions of the entire test platform and the test case in real time, and to reflect the test process and the test result;
the implementation background of step S5 further integrates ELK, which is used to collect log information of the whole test platform and test case in real time, and can be downloaded to view or viewed through a page, so as to help research and development testers to find problems occurring in the analysis test process.
Further optionally, in step S3, the container technology based on the kubernets cluster is combined with a container arrangement management tool to satisfy the combination test of different scenarios.
Secondly, the invention provides an automatic testing system for web application compatibility, and the technical scheme adopted for solving the technical problems is as follows:
an automatic test system for web application compatibility comprises a code warehouse, a process arrangement module, an automatic test module and a process monitoring module;
the code warehouse stores web application codes pushed by research personnel and automatic test scripts written by testers;
when research personnel logs in the visual page, the flow arrangement module configures the system type and the browser type which need to test the compatibility based on the container technology of the Kubernetes cluster, and submits a test application by using the visual page after the configuration is completed;
when a tester logs in a visual page, a flow arranging module uses jenkins as a task scheduling tool, selects a code warehouse and a code test script to be tested, and configures an automatic test flow;
the automatic test module has two modes of manual or timing triggering, carries out function test and compatibility test according to the automatic test flow configured by the flow arrangement module, and generates a report containing the function test result and the compatibility test result in each scene after the test is finished;
the process monitoring module monitors and analyzes the whole automatic test process and outputs a monitoring report.
Optionally, when the related automatic testing module performs compatibility testing according to the automatic testing process configured by the process arrangement module, screenshots are performed on testing processes in different testing scenes, the stored screenshots are subjected to picture preprocessing to extract characteristic values of multiple latitudes, batch comparison analysis is performed according to the extracted characteristic values of the multiple dimensions, if the comparison results are within a specified range of a preset value, the characteristic values are considered to be the same, otherwise, the characteristic values are considered to be different, comparison results are output, and finally, a report containing the compatibility testing results in each scene is generated according to the comparison results.
Further optionally, the type of system to be tested for compatibility may be windows-x86_64 or centros-x 86_64 or centros-aarch 64;
the browser type that needs to be tested for compatibility may be Chrome browser-Chrome kernel or Firefox browser-Firefox kernel or 360 browser-IE + Chrome dual kernel.
Compared with the prior art, the automatic testing method and the system for the web application compatibility have the following beneficial effects that:
1) the invention is based on the container technology of the Kubernetes cluster, realizes the functions of visual configuration of a test process, self-defined combination of test scenes, automation of the test process, monitoring of the whole process and the like, and can solve the problems of complicated test process of web application compatibility and easy error;
2) the invention mainly solves the problems that the compatibility test scenes of browsers with different processor architectures, different operating systems and different kernel types are various and manual work cannot quickly and comprehensively test, and realizes the automatic test process with the full-scene programmable configuration and monitoring.
Drawings
FIG. 1 is a flow chart of a method according to a first embodiment of the present invention;
fig. 2 is a connection block diagram of the second embodiment of the present invention.
The reference information in the drawings indicates:
1. a code warehouse, 2, a flow arrangement module, 3, an automatic test module,
4. and 5, a process monitoring module, and a visual page.
Detailed Description
In order to make the technical scheme, the technical problems to be solved and the technical effects of the present invention more clearly apparent, the following technical scheme of the present invention is clearly and completely described with reference to the specific embodiments.
The first embodiment is as follows:
with reference to fig. 1, the present embodiment provides an automated testing method for web application compatibility, which includes the following steps:
s1, the developer pushes the web application code to the code warehouse.
And S2, the tester writes an automatic test script and pushes the automatic test script to a code warehouse.
In this step, the automated test script written by the tester includes a functional test part, a compatibility test part and a test report generation part, wherein:
the compatibility testing part performs screenshot on testing processes under different testing scenes, performs picture preprocessing on the stored screenshot to extract characteristic values of multiple latitudes, performs batch comparison analysis according to the extracted characteristic values of the multiple dimensions, considers that the characteristic values are the same if a comparison result is within a specified range of a preset value, otherwise, considers that the characteristic values are different, and finally outputs a comparison result;
the test report generating part generates a report containing a function test result and a compatibility test result in each scene, wherein the test report generating part generates a report of the compatibility test result according to a comparison result output by the compatibility test part.
S3, the research and development personnel log in the visual page, configure the system type and the browser type which need to test the compatibility based on the container technology of the Kubernetes cluster, and also log in the visual page to submit the test application.
In this step, the system type to be tested for compatibility may be windows-x86_64, or centros-x 86_64, or centros-aarch 64.
In this step, the browser type to be tested for compatibility may be Chrome browser-Chrome kernel or Firefox browser-Firefox kernel or 360 browser-IE + Chrome dual kernel.
And S4, logging in a visual page by a tester, selecting a code warehouse and a code test script to be tested according to the test application, and configuring an automatic test flow.
And S5, triggering an automatic test flow manually or regularly to perform the test.
After the step manually or regularly triggers the automatic test flow,
jenkins is used as a task scheduling tool to realize flow configurability and meet the requirements of different test scenes,
and (3) integrating the prometheus monitoring, monitoring the running conditions of the whole test platform and the test case in real time, reflecting the test process and results, and meeting the traceability requirement of the test process.
In the testing process in the step, log information of the whole testing platform and the testing example is collected in real time through the ELK integrated in the background, and can be downloaded and checked or checked through a page so as to help research and development testers to find and analyze problems occurring in the testing process.
And S6, after the test is finished, outputting a monitoring report and a test result report of the test flow process, and feeding back the monitoring report and the test result report to research personnel.
Example two:
with reference to fig. 2, the present embodiment provides an automated testing system for web application compatibility, which includes a code warehouse 1, a process arrangement module 2, an automated testing module 3, and a process monitoring module 4.
The code warehouse 1 stores web application codes pushed by developers and automated test scripts written by testers.
When research personnel logs in the visual page 5, the flow arrangement module 2 configures a system type and a browser type which need to test compatibility based on a container technology of a Kubernetes cluster, and submits a test application by using the visual page 5 after the configuration is completed. In this embodiment, the system type to be tested for compatibility may be windows-x86_64, or centros-x 86_64, or centros-aarch 64; the browser type that needs to be tested for compatibility may be Chrome browser-Chrome kernel or Firefox browser-Firefox kernel or 360 browser-IE + Chrome dual kernel.
When a tester logs in the visual page 5, the process arrangement module 2 uses jenkins as a task scheduling tool, selects the code warehouse 1 and the code test script to be tested, and configures an automatic test process.
The automatic test module 3 has two modes of manual or timing triggering, the automatic test module 3 performs function test and compatibility test according to the automatic test flow configured by the flow arrangement module 2, and generates a report containing the function test result and the compatibility test result in each scene after the test is completed. In this embodiment, when the automated testing module 3 performs compatibility testing according to the automated testing process configured by the process arrangement module 2, screenshots are performed on testing processes in different testing scenes, picture preprocessing is performed on the saved screenshots to extract characteristic values of multiple latitudes, batch comparison analysis is performed according to the extracted characteristic values of multiple dimensions, if the comparison results are within a specified range of preset values, the characteristic values are considered to be the same, otherwise, the characteristic values are considered to be different, comparison results are output, and finally, a report containing the compatibility testing results in each scene is generated according to the comparison results.
The process monitoring module 4 monitors and analyzes the whole automatic test process and outputs a monitoring report.
In summary, the automatic testing method and system for web application compatibility can realize the functions of visual configuration of a testing process, custom combination of testing scenes, automation of the testing process, monitoring of the whole process and the like, and can solve the problems of complexity and easy error of the testing process of web application compatibility.
The principles and embodiments of the present invention have been described in detail using specific examples, which are provided only to aid in understanding the core technical content of the present invention. Based on the above embodiments of the present invention, those skilled in the art should make any improvements and modifications to the present invention without departing from the principle of the present invention, and therefore, the present invention should fall into the protection scope of the present invention.

Claims (9)

1. An automated testing method for web application compatibility is characterized by comprising the following steps:
s1, the developer pushes the web application code to a code warehouse;
s2, compiling an automatic test script by a tester, and pushing the automatic test script to a code warehouse;
s3, configuring a system type and a browser type which need to be tested for compatibility by logging in a visual page by research personnel, and submitting a test application by logging in the visual page by the research personnel;
s4, logging in a visual page by a tester, selecting a code warehouse and a code test script to be tested according to the test application, and configuring an automatic test flow;
s5, triggering an automatic test flow manually or regularly to test;
and S6, after the test is finished, outputting a monitoring report and a test result report of the test flow process, and feeding back the monitoring report and the test result report to research personnel.
2. The method of claim 1, wherein in step S2, the automated test script written by the tester comprises a functional test part, a compatibility test part and a test report generation part, wherein,
the compatibility testing part performs screenshot on testing processes under different testing scenes, performs picture preprocessing on the stored screenshot to extract characteristic values of multiple latitudes, performs batch comparison analysis according to the extracted characteristic values of the multiple dimensions, considers that the characteristic values are the same if a comparison result is within a specified range of a preset value, otherwise, considers that the characteristic values are different, and finally outputs a comparison result;
the test report generating part generates a report containing a function test result and a compatibility test result in each scene, wherein the test report generating part generates a report of the compatibility test result according to a comparison result output by the compatibility test part.
3. The method of claim 2, wherein in step S3, the type of system to be tested for compatibility is windows-x86_64, centros-x 86_64, or centros-aarch 64;
the browser type that needs to be tested for compatibility may be Chrome browser-Chrome kernel or Firefox browser-Firefox kernel or 360 browser-IE + Chrome dual kernel.
4. The method according to claim 2, wherein in step S5, jenkins is used as a task scheduling tool to implement process configurability, meet different test scenario requirements, monitor the process, meet the traceability requirement of the test process, and trigger the process manually or regularly to meet the requirement of on-demand testing.
5. The method for automatically testing the compatibility of web applications as claimed in claim 2, wherein the step S5 is implemented by integrating prometheus monitoring in the background, and is used for monitoring the operation status of the whole testing platform and the testing instance in real time and reflecting the testing process and results;
the implementation background of step S5 further integrates ELK, which is used to collect log information of the whole test platform and test case in real time, and can be downloaded to view or viewed through a page, so as to help research and development testers to find problems occurring in the analysis test process.
6. The method for automatically testing the compatibility of the web application according to any one of claims 1 to 5, wherein in step S3, a container technology based on a Kubernets cluster is combined with a container arrangement management tool to meet the combined test of different scenarios.
7. An automatic test system for web application compatibility is characterized by comprising a code warehouse, a process arrangement module, an automatic test module and a process monitoring module;
the code warehouse stores web application codes pushed by research personnel and automatic test scripts written by testers;
when research personnel logs in the visual page, the flow arrangement module configures the system type and the browser type which need to test the compatibility based on the container technology of the Kubernetes cluster, and submits a test application by using the visual page after the configuration is completed;
when a tester logs in a visual page, a flow arranging module uses jenkins as a task scheduling tool, selects a code warehouse and a code test script to be tested, and configures an automatic test flow;
the automatic test module has two modes of manual or timing triggering, carries out function test and compatibility test according to the automatic test flow configured by the flow arrangement module, and generates a report containing the function test result and the compatibility test result in each scene after the test is finished;
the process monitoring module monitors and analyzes the whole automatic test process and outputs a monitoring report.
8. The system of claim 7, wherein when the automated testing module performs the compatibility test according to the automated testing process configured by the process layout module, the automated testing module performs screenshot on testing processes in different testing scenes, performs picture preprocessing on the saved screenshot to extract characteristic values of multiple latitudes, performs batch comparison analysis according to the extracted characteristic values of the multiple latitudes, determines that the characteristic values are the same if the comparison result is within a specified range of a preset value, determines that the characteristic values are different if the comparison result is not within the specified range of the preset value, outputs the comparison result, and finally generates a report containing the compatibility test result in each scene according to the comparison result.
9. The system of claim 7, wherein the type of system to be tested for compatibility is windows-x86_64, centros-x 86_64, or centros-aarch 64;
the browser type that needs to be tested for compatibility may be Chrome browser-Chrome kernel or Firefox browser-Firefox kernel or 360 browser-IE + Chrome dual kernel.
CN202010891866.1A 2020-08-28 2020-08-28 Automatic testing method and system for web application compatibility Pending CN112035356A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010891866.1A CN112035356A (en) 2020-08-28 2020-08-28 Automatic testing method and system for web application compatibility

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010891866.1A CN112035356A (en) 2020-08-28 2020-08-28 Automatic testing method and system for web application compatibility

Publications (1)

Publication Number Publication Date
CN112035356A true CN112035356A (en) 2020-12-04

Family

ID=73587490

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010891866.1A Pending CN112035356A (en) 2020-08-28 2020-08-28 Automatic testing method and system for web application compatibility

Country Status (1)

Country Link
CN (1) CN112035356A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113836036A (en) * 2021-10-15 2021-12-24 中国电力科学研究院有限公司 Automatic testing method, system, equipment and storage medium for browser compatibility

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113836036A (en) * 2021-10-15 2021-12-24 中国电力科学研究院有限公司 Automatic testing method, system, equipment and storage medium for browser compatibility

Similar Documents

Publication Publication Date Title
CN103631720B (en) The generation method and apparatus of test case
KR101132560B1 (en) System and method for automatic interface testing based on simulation for robot software components
CN111124919A (en) User interface testing method, device, equipment and storage medium
CN113778898B (en) User interface automatic test method and device, electronic equipment and storage medium
CN112241360A (en) Test case generation method, device, equipment and storage medium
CN111897727A (en) Software testing method and device, computer equipment and storage medium
CN112817853A (en) Automatic test method, system and electronic equipment
Alferidah et al. Automated software testing tools
CN112596784A (en) Iterative version deployment method and device
CN112269742A (en) Jenkins-based automatic white box testing method and device and readable storage medium
CN117370203B (en) Automatic test method, system, electronic equipment and storage medium
CN112035356A (en) Automatic testing method and system for web application compatibility
US20210406158A1 (en) Systems and methods for automated device testing
Barbosa et al. Verification and validation of (real time) COTS products using fault injection techniques
CN109739760B (en) Code debugging test method and device and storage medium
CN115934559A (en) Testing method of intelligent form testing system
CN113238953A (en) UI automation test method and device, electronic equipment and storage medium
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium
CN113868140A (en) Automatic testing method and storage medium
CN111813662A (en) User behavior driven sustainable integration test method, device and equipment
CN111752823A (en) Method, device and equipment for testing vehicle-mounted power supply application software
CN118227506B (en) UI (user interface) automatic test system and method based on RPA (remote procedure alliance) robot
CN114116466B (en) Unit test method, device and medium based on operation log
CN113608996B (en) Mirror image compiling test method, system, device and readable storage medium
CN110597736B (en) Test data generation method and device

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