CN115250249B - IPv6 Ready-based automatic testing method, device, medium and equipment - Google Patents

IPv6 Ready-based automatic testing method, device, medium and equipment Download PDF

Info

Publication number
CN115250249B
CN115250249B CN202211071114.6A CN202211071114A CN115250249B CN 115250249 B CN115250249 B CN 115250249B CN 202211071114 A CN202211071114 A CN 202211071114A CN 115250249 B CN115250249 B CN 115250249B
Authority
CN
China
Prior art keywords
tested
ipv6
host
tested host
test
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.)
Active
Application number
CN202211071114.6A
Other languages
Chinese (zh)
Other versions
CN115250249A (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.)
Beijing Unita Information Technology Co ltd
Original Assignee
Beijing Unita 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 Beijing Unita Information Technology Co ltd filed Critical Beijing Unita Information Technology Co ltd
Priority to CN202211071114.6A priority Critical patent/CN115250249B/en
Publication of CN115250249A publication Critical patent/CN115250249A/en
Application granted granted Critical
Publication of CN115250249B publication Critical patent/CN115250249B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
    • G06F11/3423Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time where the assessed time is active or idle time

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an IPv6 Ready-based automatic testing method, device, medium and equipment, wherein the method comprises the following steps: s1) acquiring TIME information of each stage in the process of incomplete restarting of a tested host when the IPv6Ready test suite is executed, and acquiring TIME1 consumed by the incomplete restarting of the tested host; and S2) executing a test command on the test machine through a Python script, simultaneously checking log output information, automatically executing different tested host restart strategies through judging the output information, and completing test suite case execution, wherein the tested host is not completely restarted according to the TIME1 duration in the step S1) when the output information rebot _ async is executed. When the test suite is used for IPv6Ready test, the invention can automatically identify the key restart time point of the test equipment through the script and carry out reasonable automatic remote restart control on the tested equipment in the Case execution process so as to liberate the tester to automatically complete the test.

Description

IPv6 Ready-based automatic testing method, device, medium and equipment
Technical Field
The invention relates to the technical field of IPv6 testing. In particular to an IPv6 Ready-based automatic testing method, a device, a medium and equipment.
Background
With the continuous enhancement of network information construction, the trend that the IPv6 protocol effectively supplements the defects of the IPv4 protocol is more and more important. The IPv6Ready test safety and reliability are approved by the international and national unified certification of IPv 6.
The test process needs to be manually operated according to the prompt requirement of the test suite case to restart the equipment, and meanwhile, the restart process and the time sequence requirement of the test case are strictly limited, otherwise, the test case fails to test due to the time sequence problem.
1. And (5) prompting reboot: after the tested device is restarted, the system needs to wait for the complete restart success, and can normally log in, and the next operation can be carried out.
2. Prompt reboot _ async: after the tested device is restarted, the test suite can enter the next step without waiting for the complete restart of the tested device to be successful, and the system restart time at the position has uncertainty.
3. Up to 100-200 test cases require manual 1 and 2 procedures.
As described above, significant effort and test unpredictability are brought to the test work.
Disclosure of Invention
Therefore, the technical problem to be solved by the present invention is to provide an IPv6 Ready-based automated testing method, apparatus, medium, and device, which can automatically identify a key restart time point of a testing device through a script when a testing suite is used to perform an IPv6Ready test, and perform reasonable automated remote restart control on the tested device during a Case execution process, so as to liberate testing personnel to automatically complete a test.
In order to solve the technical problems, the invention provides the following technical scheme:
an IPv6 Ready-based automatic testing method comprises the following steps:
s1) acquiring TIME information of each stage in the incomplete restarting process of a tested host when the IPv6Ready test suite is executed, and acquiring TIME1 consumed by the incomplete restarting of the tested host;
and S2) executing a test command on the test machine through a Python script, simultaneously checking log output information, automatically executing different tested host restart strategies through judging the output information, and completing test suite case execution, wherein the tested host is not completely restarted according to the TIME1 duration in the step S1) when the output information rebot _ async is executed.
In the above automatic testing method based on IPv6Ready, in step S1), the specific step of obtaining the TIME1 when the tested host is not completely restarted is as follows:
s1-1) logging in a tested host in a testing machine security shell protocol;
s1-2) restarting a tested host on a testing machine through a session window, and recording the data time of operation;
s1-3) monitoring whether reboot msg appears in a restart log of the tested host through a serial port which is communicated with the tested host on a testing machine: BIOS, when reboot msg occurs: when BIOS is in use, the tested host computer is not completely restarted, and corresponding data time is recorded;
s1-4) calculating the TIME consumed by the tested host computer due to incomplete restart according to the data TIME acquired in the step S1-2) and the step S1-3).
In the above automatic testing method based on IPv6Ready, in step S1), the step of obtaining TIME1 consumed by the incomplete reboot of the tested host further includes:
s1-5) the tested host system is restarted and successfully logs in the tested host through a secure shell protocol and records corresponding data TIME, and TIME2 consumed by the complete restart of the tested host system is calculated according to the step S1-2) and the step S1-3) and the data TIME obtained in the step.
In the IPv6 Ready-based automatic testing method, in the step S1-4), the TIME1 consumed by the incomplete restart of the tested host is the TIME1 1 ~TIME1 n The median or mean of (1), wherein, TIME1 j J is more than or equal to 1 and less than or equal to n, and n is a positive integer, wherein j is more than or equal to 1 and is less than or equal to n, and the value of TIME1 is obtained by calculation after the step S1-2) and the step S1-3) are performed for the jth TIME.
In the above automatic testing method based on IPv6Ready, step S2) specifically includes the following steps:
s2-1) logging in a tested host on a testing machine through a secure shell protocol;
s2-2) carrying out IPv6 test on the tested host through the session window on the tester and running a use case in the IPv6 test suite;
s2-3) detecting the execution output information of the use case operated in the step S2-2), and executing a Python script and restarting the tested host when a rebot or rebot _ async character appears in the execution output information;
and S2-4) after the tested host is restarted, repeating the steps S2-1) -S2-3) to circularly carry out IPv6 detection on the tested host, wherein in the process of completing a whole set of IPv6 detection on the same tested host, cases executed in any two circulations are different.
In the IPv6 Ready-based automatic testing method, in the step S2-3), the tested host is completely restarted and the login of the secure shell protocol is completed; and when the reboot _ async appears in the execution output information, performing incomplete restarting on the tested host according to the TIME1 duration interval.
According to the IPv6 Ready-based automatic testing method, the control terminal is used for controlling the plurality of testing machines to carry out IPv6 detection on the tested host through Jenkins task scheduling.
An IPv6Ready automatic testing device comprises a testing machine, wherein the testing machine is in communication connection with a tested host through a serial port and a link0 port; the testing machine is pre-loaded with a computer program, and the computer program realizes the automatic testing method based on IPv6Ready when being executed by the processor.
A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the IPv6 Ready-based automated testing method described above.
A computer device comprising a readable storage medium, a processor, and a computer program stored on the readable storage medium and executable on the processor, the computer program, when executed by the processor, implementing the IPv6 Ready-based automated testing method described above.
The technical scheme of the invention achieves the following beneficial technical effects:
1. the test efficiency is improved, the labor cost is reduced, and parallel batch processing can be realized.
2. The test accuracy and consistency are improved, and the uncertainty caused by manual intervention is reduced.
3. The method is suitable for IPv6Ready testing of various software and hardware systems.
Drawings
Fig. 1 is a schematic diagram of a first network device and a second network device performing network communication by using an intermediate device according to the present invention;
FIG. 2 is a schematic flowchart of obtaining a TIME spent on restarting the tested host computer TIME1;
FIG. 3 is a schematic flow chart of a tested host IPv6Ready test automation based on TIME1;
FIG. 4 is a schematic diagram of a multi-suite IPv6Ready test networking;
FIG. 5 is a schematic diagram of a computer apparatus capable of IPv6Ready based automated testing according to the present invention;
fig. 6 is an IPv6Ready test log output information interface.
Detailed Description
The invention is further illustrated below with reference to examples.
The IPv6Ready automatic testing device comprises a testing machine (TN) which is in communication connection with a tested host (NUT) through a serial port (COM 1) and a network card port (Link 0); the testing machine is pre-loaded with a computer program, and the computer program realizes the automatic testing method based on IPv6Ready when being executed by the processor.
As shown in fig. 1, the IPv6 Ready-based automated testing method includes the following steps:
s1) acquiring TIME information of each stage in the incomplete restarting process of the tested host when the IPv6Ready test suite is executed, and acquiring TIME1 consumed by the incomplete restarting of the tested host, wherein the specific steps are as follows:
s1-1) logging in a tested host machine in a testing machine security shell protocol (SSH);
s1-2) restarting a tested host on a testing machine through a session window (PID 1), and recording the data time of operation;
s1-3) monitoring whether reboot msg appears in a restart log of the tested host through a serial port which is communicated with the tested host on a testing machine: BIOS, when reboot msg appears: when BIOS is carried out, the tested host is indicated to be incompletely restarted, and corresponding data time is recorded;
s1-4) calculating the TIME consumed by incomplete restart of the tested host according to the data TIME acquired in the step S1-2) and the step S1-3); wherein, the tested host is incompleteThe TIME1 consumed by the full restart is TIME1 1 ~TIME1 n The median or mean of (1), wherein, TIME1 j Calculating the value of TIME1 after the step S1-2) and the step S1-3) are performed for the jth TIME, wherein j is more than or equal to 1 and less than or equal to n, n is a positive integer, and the value of n depends on the requirement of a user on the Case passing rate;
s1-5) completing the complete restart of the host system to be tested, successfully logging in the host to be tested through a secure shell protocol and recording corresponding data TIME, and calculating the TIME consumed by the complete restart of the host system to be tested by TIME2 according to the step S1-2) and the step S1-3) and the data TIME obtained in the step;
s2) executing a test command on a test machine through a Python script, simultaneously checking log output information, automatically executing different tested host restart strategies through judging the output information, and completing test suite case execution, wherein the tested host is not completely restarted according to the TIME1 duration in the step S1) when the output information reboot _ async is executed, and the log output information is shown in FIG. 6; the method comprises the following specific steps:
s2-1) logging in a tested host on a testing machine through a secure shell protocol;
s2-2) carrying out IPv6 test on the tested host through the session window on the tester and running a Case in the IPv6 test suite;
s2-3) detecting the execution output information of the use case operated in the step S2-2), and executing a Python script and restarting the tested host when a rebot or rebot _ async character appears in the execution output information; when the rebot appears in the execution output information, the tested host is completely restarted and the login of the secure shell protocol is completed; when the reboot _ async appears in the execution output information, performing incomplete restarting on the tested host according to TIME1 TIME interval;
and S2-4) after the tested host is restarted, repeating the steps S2-1) to S2-3) to circularly detect the IPv6 of the tested host, wherein in the process of completing a whole set of IPv6 detection on the same tested host, the use cases executed in any two circulations are different.
Based on the IPv6 Ready-based automated testing method, correspondingly, this embodiment further provides a computer-readable storage medium storing a computer program, where the computer program, when executed by a processor, implements the following steps: the method comprises the steps of firstly obtaining TIME1 consumed by the incomplete restart of a tested host through a testing machine, then executing an IPv6Ready test command on the testing machine through Python scripts, carrying out the incomplete restart of the tested host according to the TIME length of the TIME1 when the executed output information appears reboot _ async, and circularly executing the IPv6Ready test on the tested host.
As shown in fig. 5, based on the IPv6Ready automated testing method, apparatus and computer-readable storage medium, in this embodiment, there is further provided a computer device, which includes a readable storage medium, a processor and a computer program stored on the readable storage medium and executable on the processor, where the readable storage medium and the processor are both disposed on a bus, and the processor implements the following steps when executing the computer program: the method comprises the steps of firstly obtaining TIME1 consumed by the incomplete restart of a tested host through a testing machine, then executing an IPv6Ready test command on the testing machine through Python scripts, carrying out the incomplete restart of the tested host according to the TIME length of the TIME1 when the executed output information appears reboot _ async, and circularly executing the IPv6Ready test on the tested host.
In this embodiment, as shown in fig. 4, a batch parallel test for multiple IPv6Ready test networks is also provided, where the batch parallel test is implemented by using a Control terminal (Control) through Jenkins task scheduling. Jenkins issues execution tasks and distributes test scripts to each TN to execute, and the Jenkins monitors multiple sets of execution, so that test manpower is further released, and efficiency is improved in a doubled mode.
Because the IPv6Ready test includes a plurality of test suites, each test suite includes different types and different numbers of cases, the restart type of the host to be tested may be different when each Case is executed, some cases are reboot _ async (not complete restart), some cases are reboot (complete restart), how to obtain accurate TIME1 TIME is a key for subsequent execution, and once TIME judgment of TIME1 is wrong or unreasonable, case execution failure may be caused, and test results and test efficiency may be affected. Compared with the existing IPv6Ready testing method, the Case passing rate of the IPv6Ready test performed by using the IPv6 Ready-based automatic testing method is 100%, the number of required testers is greatly reduced, and the workload of the testers is also sharply reduced.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications are possible which remain within the scope of the appended claims.

Claims (8)

1. An IPv6 Ready-based automatic testing method is characterized by comprising the following steps:
s1) acquiring TIME information of each stage in the process of incomplete restarting of a tested host when the IPv6Ready test suite is executed, and acquiring TIME1 consumed by the incomplete restarting of the tested host, wherein the specific steps are as follows:
s1-1) logging in a tested host in a safety shell protocol of a testing machine;
s1-2) restarting a tested host on a testing machine through a session window, and recording the data time of operation;
s1-3) monitoring whether reboot msg appears in a restart log of the tested host through a serial port which is communicated with the tested host on a testing machine: BIOS, when reboot msg occurs: when BIOS is in use, the tested host computer is not completely restarted, and corresponding data time is recorded;
s1-4) calculating the TIME consumed by the tested host computer due to incomplete restart according to the data TIME acquired in the step S1-2) and the step S1-3);
s2) executing a test command on a test machine through a Python script, simultaneously checking log output information, automatically executing different tested host restart strategies through judging the output information, and completing test suite case execution, wherein the specific operation is as follows: carrying out IPv6 test on a tested host computer on a tester through a session window, running a Case in an IPv6 test suite, detecting the execution output information of the running Case, executing a Python script when a rebot or a rebot _ async character appears in the execution output information, and restarting the tested host computer; when the reboot appears in the execution output information, the tested host is completely restarted and the login of the secure shell protocol is completed; and when the reboot _ async appears in the execution output information, performing incomplete restarting on the tested host according to the TIME1 duration interval in the step S1).
2. The IPv6 Ready-based automatic testing method of claim 1, wherein in step S1), the specific step of obtaining the TIME1 when the tested host is not completely restarted further comprises:
s1-5) the host system to be tested is completely restarted, the host to be tested is successfully logged in through a secure shell protocol, corresponding data TIME is recorded, and TIME2 consumed by the complete restart of the host system to be tested is calculated according to the data TIME obtained in the step S1-2), the step S1-3) and the step.
3. The IPv6 Ready-based automatic testing method of claim 2, wherein in step S1-4), the TIME1 consumed by the tested host in the incomplete restart is TIME1 1 ~TIME1 n The median or mean of (1), wherein, TIME1 j J is more than or equal to 1 and less than or equal to n, and n is a positive integer, wherein j is more than or equal to 1 and is less than or equal to n, and the value of TIME1 is obtained by calculation after the step S1-2) and the step S1-3) are performed for the jth TIME.
4. The IPv6 Ready-based automated testing method of any one of claims 1-3, wherein step S2) is utilized to perform IPv6 testing on tested host cycles, and in the process of completing a whole set of IPv6 testing on the same tested host, cases executed in any two cycles are different.
5. The IPv6 Ready-based automatic testing method of any one of claims 1-3, wherein the control terminal is used for controlling a plurality of testing machines to carry out IPv6 detection on the tested host through Jenkins task scheduling.
6. An IPv6Ready automatic testing device is characterized by comprising a testing machine, wherein the testing machine is in communication connection with a tested host through a serial port and a network card port; the testing machine is pre-loaded with a computer program, and when the computer program is executed by a processor, the IPv6 Ready-based automatic testing method of any one of claims 1-5 is realized.
7. A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the IPv6 Ready-based automated testing method of any one of claims 1 to 5.
8. A computer device comprising a readable storage medium, a processor, and a computer program stored on the readable storage medium and executable on the processor, wherein the computer program, when executed by the processor, implements the IPv6 Ready-based automated testing method of any one of claims 1 to 5.
CN202211071114.6A 2022-09-02 2022-09-02 IPv6 Ready-based automatic testing method, device, medium and equipment Active CN115250249B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211071114.6A CN115250249B (en) 2022-09-02 2022-09-02 IPv6 Ready-based automatic testing method, device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211071114.6A CN115250249B (en) 2022-09-02 2022-09-02 IPv6 Ready-based automatic testing method, device, medium and equipment

Publications (2)

Publication Number Publication Date
CN115250249A CN115250249A (en) 2022-10-28
CN115250249B true CN115250249B (en) 2023-02-03

Family

ID=83700652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211071114.6A Active CN115250249B (en) 2022-09-02 2022-09-02 IPv6 Ready-based automatic testing method, device, medium and equipment

Country Status (1)

Country Link
CN (1) CN115250249B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01217650A (en) * 1988-02-26 1989-08-31 Nec Corp Test executing system for software simulator
CN103746879A (en) * 2013-12-28 2014-04-23 国家电网公司 Testing system and method for consistency of IPv6 (Internet Protocol Version 6) protocol
CN103970660A (en) * 2014-05-19 2014-08-06 浪潮电子信息产业股份有限公司 Total system stability automatic test method based on crontab
CN111666200A (en) * 2019-03-08 2020-09-15 福建天泉教育科技有限公司 Testing method and terminal for time consumption of cold start of PC software
CN112486834A (en) * 2020-12-07 2021-03-12 苏州浪潮智能科技有限公司 Method and device for supporting test node restart based on jenkins

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114546736A (en) * 2022-01-13 2022-05-27 宁波小匠物联网科技有限公司 Automatic serial port testing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01217650A (en) * 1988-02-26 1989-08-31 Nec Corp Test executing system for software simulator
CN103746879A (en) * 2013-12-28 2014-04-23 国家电网公司 Testing system and method for consistency of IPv6 (Internet Protocol Version 6) protocol
CN103970660A (en) * 2014-05-19 2014-08-06 浪潮电子信息产业股份有限公司 Total system stability automatic test method based on crontab
CN111666200A (en) * 2019-03-08 2020-09-15 福建天泉教育科技有限公司 Testing method and terminal for time consumption of cold start of PC software
CN112486834A (en) * 2020-12-07 2021-03-12 苏州浪潮智能科技有限公司 Method and device for supporting test node restart based on jenkins

Also Published As

Publication number Publication date
CN115250249A (en) 2022-10-28

Similar Documents

Publication Publication Date Title
CN104717337A (en) Method for testing mobile application in batch and equipment used in method
CN104572422A (en) Memory monitoring achievement method based on startup and shutdown of Linux system
CN102571498A (en) Fault injection control method and device
CN111949551A (en) Application program testing method, device, equipment and storage medium
CN104615523A (en) Fatigue testing method of BMC management module based on IPMI protocol
WO2016082543A1 (en) Device testing method and testing device
CN112650676A (en) Software testing method, device, equipment and storage medium
CN103731663A (en) Method and device for testing smart television
CN110198222B (en) Plug-and-play test method and test master station for power distribution automation terminal
CN115250249B (en) IPv6 Ready-based automatic testing method, device, medium and equipment
CN110134558B (en) Method and device for detecting server
CN111181808B (en) Method and system for testing BMC IP access control
CN111078484A (en) Power-off test method, device, equipment and storage medium for system upgrading
CN110990289A (en) Method and device for automatically submitting bug, electronic equipment and storage medium
CN109508269A (en) Test method and system are restarted under a kind of windows system
CN111666200A (en) Testing method and terminal for time consumption of cold start of PC software
CN111722997B (en) Abnormality detection method for automated test and computer-readable storage medium
CN115827358A (en) Automatic test system, method and device for PFR function and storage medium
CN110737595A (en) automatic testing method and device
CN114281615B (en) Automatic testing system and method for consistency of stored data
CN111800296B (en) Method, system, equipment and storage medium for capturing and analyzing network data of real-time system
CN117472474B (en) Configuration space debugging method, system, electronic equipment and storage medium
CN116382968B (en) Fault detection method and device for external equipment
CN111752773B (en) Method and device for realizing power-on self-check verification of clustered system
CN107390115B (en) Method for detecting SC serial port and MC serial port of IO in raid memory in batch

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
OR01 Other related matters
OR01 Other related matters