CN112115044A - Automatic testing method and system for electric power information communication equipment - Google Patents

Automatic testing method and system for electric power information communication equipment Download PDF

Info

Publication number
CN112115044A
CN112115044A CN202010807829.8A CN202010807829A CN112115044A CN 112115044 A CN112115044 A CN 112115044A CN 202010807829 A CN202010807829 A CN 202010807829A CN 112115044 A CN112115044 A CN 112115044A
Authority
CN
China
Prior art keywords
test
task
management
automatic
physical layer
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
CN202010807829.8A
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.)
China Electric Power Research Institute Co Ltd CEPRI
Original Assignee
China Electric Power Research Institute Co Ltd CEPRI
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 China Electric Power Research Institute Co Ltd CEPRI filed Critical China Electric Power Research Institute Co Ltd CEPRI
Priority to CN202010807829.8A priority Critical patent/CN112115044A/en
Publication of CN112115044A publication Critical patent/CN112115044A/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/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/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/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an automatic testing method and system for power information communication equipment. The automated test system comprises: a web front end and a server end; the web front end is used for realizing human-computer interaction in service functions such as entrusted management, task management, sample management, case management, instrument management, user management, statistical management, log management and the like related to the automated testing; and the server side is used for realizing the test topology automatic configuration based on the physical layer switch and the multi-tenant task scheduling based on the disassembled task state machine, implementing the test process and acquiring the test result of the tested electric power information communication equipment from the test instrument. The testing method and the system have the advantages of high automation degree, high testing efficiency and good stability of testing results.

Description

Automatic testing method and system for electric power information communication equipment
Technical Field
The invention belongs to the technical field of automatic testing, and particularly relates to an automatic testing method and system for power information communication equipment.
Background
With the advance of the work of "internet +", smart grids supported by communication networks and computer information networks are becoming the trend of the future, in which power information communication devices play a crucial role. The system test of the electric power information communication equipment is an important link for guaranteeing the function, performance and stability of the equipment.
At present, the testing means of the electric power information communication equipment is mainly manual testing, the testing mode needs a large amount of manpower participation, and due to the fact that subjective factors are more, results possibly tested by different testing personnel have large differences, the stability is poor, the maintenance cost is high, and the efficiency is low.
Disclosure of Invention
The invention provides an automatic testing method and system for power information communication equipment, and aims to solve the problems of poor stability and low efficiency in the test of the power information communication equipment in the prior art.
In a first aspect, the present invention provides an automatic test system for power information communication equipment, including:
a web front end and a server end;
the web front end is used for realizing human-computer interaction in service functions such as entrusted management, task management, sample management, case management, instrument management, user management, statistical management, log management and the like related to the automated testing;
and the server side is used for realizing the test topology automatic configuration based on the physical layer switch and the multi-tenant task scheduling based on the disassembled task state machine, implementing the test process and acquiring the test result of the tested electric power information communication equipment from the test instrument.
In a second aspect, the present invention provides an automated testing method for power information communication equipment, including:
forming a local area network by the tested equipment and the testing tool through a physical layer switch;
a test case with a unique identifier is pre-configured on a test software system, and multi-user parallel test is supported;
corresponding to test cases of different test equipment, carrying out occupation and release operations of ports of the physical switch by calling an API (application program interface) of the physical switch;
when multi-user parallel testing is carried out, tasks are distributed and received based on a multi-tenant task scheduling mechanism of a disassembled task state machine.
The automatic testing method and the system for the power information communication equipment, disclosed by the invention, have the advantages that the automatic testing characteristics of the power information communication equipment are combined, the automatic testing for the power information communication equipment such as a router, a switch, an EPON, a server, a load balancer and a communication power supply is realized, and the automatic testing requirement of the power information communication equipment detection is met; when the test case is executed, the automatic switching of the test network topology is realized, and the aim of unattended test is fulfilled; the test tasks of multiple tenants are isolated and set through the task queue, so that the real-time control of the tasks by the multiple tenants is ensured; the test efficiency is high, and the stability of the test result is good.
Drawings
A more complete understanding of exemplary embodiments of the present invention may be had by reference to the following drawings in which:
fig. 1 is a schematic composition diagram of an automated testing system for power information communication equipment according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an automated testing system for power information communication equipment according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of an automated testing method for power information communication equipment according to an embodiment of the present invention;
fig. 4 is a test flowchart of an automated test system for power information communication equipment according to an embodiment of the present invention.
Detailed Description
The exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, however, the present invention may be embodied in many different forms and is not limited to the embodiments described herein, which are provided for complete and complete disclosure of the present invention and to fully convey the scope of the present invention to those skilled in the art. The terminology used in the exemplary embodiments illustrated in the accompanying drawings is not intended to be limiting of the invention. In the drawings, the same units/elements are denoted by the same reference numerals.
Unless otherwise defined, terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Further, it will be understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense.
Partial description of terms:
dut (device Under test): device under test
In order to improve the testing efficiency, the importance and value of the automatic testing have reached a wide consensus in the industry, but due to the high technical content and numerous influencing factors required by the automatic testing, the coverage condition is not ideal at present in operators and equipment manufacturers.
In order to improve the automatic testing efficiency of large-batch equipment, the automatic testing method and the automatic testing system for the electric power information communication equipment, provided by the invention, utilize a pre-designed test rule to input the link relation between a plurality of groups of equipment to be tested and a testing tool, so that unattended operation in a test room can be realized.
After the automatic testing method and the automatic testing system are started, a plurality of testers can simultaneously use the testing tool to respectively test a plurality of groups of devices, the parallel work of the testers can be realized, and the device utilization rate of the testing tool is improved.
Specifically, test cases are compiled according to relevant standards of power communication, and different automatic test scripts are implemented in the automatic test method and the automatic test system. The automatic test method and the system call different test cases to develop test items.
As shown in fig. 1 and fig. 2, an embodiment of the present invention provides an automated testing system for power information communication equipment, including:
a web front end and a server end;
the web front end is used for realizing human-computer interaction in service functions such as entrusted management, task management, sample management, case management, instrument management, user management, statistical management, log management and the like related to the automated testing;
and the server side is used for realizing the test topology automatic configuration based on the physical layer switch and the multi-tenant task scheduling based on the disassembled task state machine, implementing the test process and acquiring the test result of the tested electric power information communication equipment from the test instrument.
Further, the software framework of the automated testing method and system comprises:
the system comprises a background database processing module, a business process management module, a test case management module, a test tool management module and a test report management module;
the background database processing module comprises a MySQL database, and the MySQL database is used for storing and inquiring entrusted information, task information, sample information, user information, test results, test logs, test cases and test tools, processing data and presenting pages;
the business process management module is used for realizing test entrustment and task management, test case and test tool management, test automation process control, automatic generation of test reports and uploading of test records;
the test case management module is used for realizing test scripting of the test cases and associating the test cases with the entrusts, wherein the test cases are defined and called by adopting a Json file format;
the test tool management module supports tested power information communication equipment of a test instrument including a physical layer switch; the interface controller is used for detecting the state of each interface of the test tool at intervals and controlling the occupation and the release of the interfaces;
and the test report management module is used for selecting one of the execution results as a final result according to the presentation form of the test result predefined in the test case and the multiple execution results after the test execution is finished, filling the result into the corresponding position of the Excel template, and packing, compressing and storing the original test record and the test result according to the entrustment.
Further, the server includes a user application management unit, a service management unit, a resource management unit and a test management support unit:
the user application management unit enables a plurality of testers to simultaneously and respectively perform a plurality of test tasks; the user application management unit realizes a plurality of automatic test modules through an automatic test application management agent interface; each automatic test module corresponds to a web page, and each test application is realized through a service agent in the background;
the service management unit realizes the functions of protocol adaptation, service registration, service routing, flow control, service quality, interface management proxy and the like through bus access; in the background, the following functions are respectively realized through a use case management agent, a tool management agent and a test report management agent:
realized through a testreport service: processing and presenting records, confirming and selecting results, calling a report template and testing original records of the report;
implementation by Tools service: adding an instrument and a physical layer switch, monitoring port states, occupying and releasing ports, and calling the instrument and the physical layer switch;
realized by a Testcase service: developing a test case, debugging and uploading the case, associating with a commission and executing the case;
the resource management unit realizes the following functions in the background through a resource management agent:
accessing and managing user information and entrusting information in a database DB through a client server;
accessing and managing task information and sample information in a database DB through a task server;
accessing and managing a test case, a test result, a test tool and a test calendar in the database DB through the test server;
and the test management supporting unit is used for inputting the information of the test instrument and the tested equipment into the database DB or calling the information of the test instrument and the tested equipment from the database DB.
Further, the processing flow of the automated testing method and system includes:
creating a consignment, wherein when equipment with one model is tested, a corresponding consignment is created; the entrusts comprise basic customer information and sample information;
case association: after the test entrusts are created, associating test cases for the entrusts; wherein the content of the first and second substances,
the automatic test method and the system have uploaded various test cases in a zip format in advance; each test case contains only one case information and configuration parameter, a pre-test script and a formal test script, and also comprises one or more xml test instrument configuration files and optional case description and description document files;
and (3) task allocation: assigning the entrusts related to the test cases to each tester as test tasks to be executed, wherein the test tasks are recorded with completion time requirement information;
task receiving: test tasks are assigned to relevant tester names; if no objection exists, the task is accepted; otherwise, the task is cancelled, and the task is redistributed to other testers;
the test personnel respectively access the WEB front end management and execute the test tasks under the names of the test personnel;
and (3) test configuration: associating each test task with the tested power information communication equipment and the test instrument, determining an associated test case and configuring case parameters;
and (3) test execution: when the test task is executed, the pre-test or the formal test can be carried out; according to the test strategy, the automatic retesting times can be set for the test cases with failed execution; during the test, the tester may pause or terminate the test;
and (3) generating a test result: after the test execution is finished, automatically generating a test record, selecting a required test result from a plurality of test records and confirming the test result; and if the test result is normal, generating a test report.
Submitting a test report: and after the test report is generated, the test report is submitted to a unified detection management system through interface calling.
Furthermore, the server also comprises an execution engine and a scheduling module when the server is used for scheduling the multi-tenant tasks based on the disassembled task state machine;
the task is disassembled into a plurality of subtasks according to the execution stage of the task; the execution engine executes each task by taking a single subtask as a minimum execution unit;
an overall state machine for maintenance tasks, comprising:
initializing a task queue, listening to the task queue by a scheduling module,
after the scheduling module reads the tasks from the task queue, initializing corresponding execution units and modifying a task state machine;
the scheduling module monitors the operation of a tester on a task through a web front end;
if the operation on the task is termination operation, the scheduling module informs the execution unit of termination, the execution unit exits after saving the information, and the scheduling module modifies the state machine;
if the operation on the task is the pause operation, the scheduling module informs the execution unit to suspend, the execution unit suspends after the execution of the current subtask is finished, and the scheduling module modifies the state machine;
if the operation on the task is a continuous operation, the execution unit is informed to continue, the execution unit is called again to execute, and the scheduling module modifies the state machine into execution;
after all subtasks are executed, the task result information is stored, the scheduling module modifies the task state machine to be completed, and the execution unit is destroyed.
Further, when the multi-tenant task scheduling based on the task state machine is disassembled, the task disassembling comprises the following steps:
checking all configurations of the tasks of each tenant, and respectively checking completeness in the task configurations according to the dependence of each stage contained in the configuration;
substituting the configuration items in the configuration of each subtask into the replacement respectively to generate new configuration, and packaging the obtained new configuration and subtask information to generate a new task;
wherein the task disassembling depends on the detachability of the tasks, and the contextual dependency exists between the tasks.
Further, when the server side realizes the test topology automation configuration based on the physical layer switch,
calling an API (application program interface) of a physical layer switch according to the test requirement, and carrying out port occupation and release operation; wherein, to the encapsulation of physical layer switch API, include:
mapping and associating the two ports; the ports are independent and are not communicated with other ports; port UP; a port DOWN; the structure of all physical layer switch ports is retrieved and the topology is modified according to the content.
Further, when designing a physical layer switch data structure, for a single port of the physical layer switch, a member is provided in the structure body of the used data structure; when a member exists in the structure, the port of the physical layer switch is independent and is not communicated with other ports;
for a port group of a physical layer switch, using a data structure having two or more members within a fabric body; when there are two members within the fabric, it is also meant to connect the ports of the two physical layer switches.
Furthermore, during automatic testing, a testing environment is formed by the testing instrument, the tested power information communication equipment, the physical layer switch and the automatic testing system;
the machine room is internally provided with a test instrument, tested power information communication equipment, a physical layer switch and a server end of the automatic test system;
and a WEB end of the automatic test system is arranged outside the machine room.
Further, the measured electric power information communication apparatus includes: the system comprises a router, a switch, an EPON, a server, a load balancer, a communication power supply and the like.
The automatic test method and the system realize the automatic test method and the system architecture scheme and the functional module division of the electric power information communication equipment; according to the characteristics of the electric power information communication equipment, an automatic testing method and a system processing flow of the electric power information communication equipment are formed, and the automatic testing requirement of the electric power information communication equipment detection is met; the method is based on the network topology switching of the physical layer switch, the mapping rule definition of a port is carried out through designing a data structure, and the physical layer switch API is packaged to be convenient for being butted with the interface of the automatic test method and the system, so that the automatic switching of the test network topology is ensured when a test case is executed, and the aim of testing unattended operation is fulfilled; based on the detachability of the task set, the maintenance of the task overall state machine is achieved by controlling the execution of the subtasks after the task is disassembled, and the tasks of multiple tenants are isolated and set through the task queue, so that the real-time control of the tasks by the multiple tenants is ensured.
As shown in fig. 1, the method and system for automatically testing the power information communication device adopt a B/S architecture, and implement user browsing and operation in a Web GUI form, thereby implementing functions of automatic detection and management of devices such as test entrustment, task management, personnel management, test statistics and test logs.
The automatic testing method and system for the electric power information communication equipment are composed of a web front end and a server end. The web front end mainly realizes man-machine interaction in service functions such as entrusted management, task management, sample management, case management, instrument management, user management, statistical management, log management and the like related to the automated testing; the server side realizes the test topology automatic configuration based on the physical layer switch and implements the functions of test process control, pre-test, process data extraction, test result recording, system interaction and the like. And the server side also realizes the multi-tenant task scheduling based on the disassembled task state machine.
As shown in fig. 1 and 2, a software framework of the automated testing method and system includes 5 main functional modules, such as a background database processing module, a business process management module, a test case management module, a test tool management module, and a test report management module. The specific composition and function of each module are as follows:
1) background database processing module
The Database adopts a MySQL Database, can store and query the contents of entrusted information, task information, sample information, user information, test results, test logs, test cases, test tools and the like, and processes and presents the data on pages.
2) Business process management module
The business process management module comprises:
a) test entrustment and task management submodule
b) Test case and test tool management submodule
c) Test automation process control submodule
d) Automatic generation submodule of test report
e) Test record uploading sub-module
3) Test case management module
The test case management module is mainly realized as follows:
a) test cases are scripted, test cases are uploaded singly or in batches as required, and case parameters can be edited or adjusted;
b) the test case is associated with the entrustment, namely, the entrustment tests which contents are clear;
c) and selecting which cases are tested and executed in the one-time execution process, and confirming and selecting according to the test execution result.
The test cases adopt a modularized design idea, so that test case sets can be flexibly added/deleted, and later maintenance and use are facilitated. Specifically, the use case is defined and called in detail by adopting a Json file format.
Specifically, json (javascript Object notification) is a lightweight data exchange format. JSON employs a text format that is completely language independent, and these properties make JSON an ideal data exchange language.
4) Test tool management module
The test tool management module mainly supports tested devices such as test instruments such as a spirent, namely a Testcenter, an Avalanche and a switch, and comprises the following steps: adding the machine frame IP address of the corresponding test tool into the automatic test method and the automatic test system; if the test tool is detected, the state of each interface of the test tool is automatically detected every 10 seconds, and the occupation and release functions of the interfaces are provided.
Specifically, a server side develops a special sub-thread pool, and monitors the physical state of each port of the test instrument as up or down. The ethernet link between the test meter and the different DUTs can be dynamically implemented by the division of the ports. Specifically, communication with the test meter changes the physical state up or down of each port of the test meter.
In particular, the port occupancy or release decision is specified by the test script.
Specifically, in the test execution process, flow construction, control, statistics and the like can be realized and log output is generated through calling of the API interface of the test tool, so that the test tool can be used for debugging when abnormal errors occur.
In the automated testing method and system of the embodiment, according to different test cases, the test network is built by the test script, so that different topological structures are realized, and the automated testing method and system are used for executing automatic testing of multiple devices.
In specific implementation, a Testcenter test instrument, a Device Under Test (DUT) and the automatic test method and system of the embodiment form a test networking environment.
The device to be tested of the automated testing method and system of the embodiment comprises: the system comprises a router, a switch, an EPON, a server, a load balancer, a communication power supply and the like.
During specific implementation, a DUT (device under test), a test instrument, a physical layer switch and the like are arranged in the machine room; and a test WEB end is arranged outside the machine room.
And the topological structure of the test instrument is automatically changed according to the test script without manual switching.
5) Test report management module
The presentation form of the test result is predefined in the test case. After the test execution is finished, selecting one of the execution results as a final result, filling the result into a corresponding position of an Excel template, and packing, compressing and storing an original test record and the Excel test result according to a delegation; the test result can be downloaded, and the test report can be uploaded to a unified detection management system through HTTP interface calling.
As shown in fig. 2, the automated testing method and system support user authority management, integrate resource information such as commission information, user information, task information, sample information, test cases, test results, test tools, and test calendars, support test report service, test tool service, and test case service, and implement functions such as test case management agent, test instrument tool management agent, and test report management agent.
The server side comprises a user application management unit which enables a plurality of testers to simultaneously and respectively perform a plurality of test tasks; when the system is implemented specifically, the user application management unit realizes a plurality of automatic test modules through the automatic test application management agent interface; each automatic test module corresponds to a web page, and each test application is realized through a service agent in the background.
The server side also comprises a service management unit which realizes the functions of protocol adaptation, service registration, service routing, flow control, service quality, interface management agent and the like through bus access. In the background, the following functions are respectively realized through a use case management agent, a tool management agent and a test report management agent:
realized through a testreport service: processing and presenting records, confirming and selecting results, calling a report template and testing original records of the report;
implementation by Tools service: adding an instrument and a physical layer switch, monitoring port states, occupying and releasing ports, and calling the instrument and the physical layer switch;
realized by a Testcase service: developing a test case, debugging and uploading the case, associating with a commission and executing the case;
at the server end, the system also comprises a resource management unit which realizes the following functions through a resource management agent in the background:
accessing and managing user information and entrusting information in a database DB through a client server;
accessing and managing task information and sample information in a database DB through a task server;
accessing and managing a test case, a test result, a test tool and a test calendar in the database DB through the test server;
the server side also comprises a test management supporting unit which is used for inputting the information of the test instrument and the tested equipment into the database DB or calling the information of the test instrument and the tested equipment from the database DB;
wherein, the external detection system is connected with the protocol in an adaptive way.
As shown in fig. 3, the method for automatically testing power information communication equipment according to the embodiment of the present invention includes:
step S100: forming a local area network by the tested equipment and the testing tool through a physical layer switch;
step S200: a test case with a unique identifier is pre-configured on a test software system, and multi-user parallel test is supported;
step S300: corresponding to test cases of different test equipment, carrying out occupation and release operations of ports of the physical switch by calling an API (application program interface) of the physical switch;
step S400: when multi-user parallel testing is carried out, tasks are distributed and received based on a multi-tenant task scheduling mechanism of a disassembled task state machine.
The automatic testing method of the electric power information communication equipment has the same technical concept, the same technical scheme and the same technical effect as the automatic testing system of the electric power information communication equipment, and the details are not repeated here.
As shown in fig. 4, the process flow of the automated test system includes:
1) and (3) entrusting and creating: testing a model of equipment needs to correspond to a commission. The request includes basic customer information, sample information, and the like. This step creates a commission for the model number device test.
2) Case association: after the test delegation is created, the test case is associated with the delegation.
It should be understood that a plurality of zip-format test cases are uploaded in the test system in advance. Each test case contains only one piece of case information and configuration parameters, a pre-test script and a formal test script, and also comprises one or more xml test instrument configuration files and optional case description and description document files.
After uploading, the background decompresses the use case file, analyzes the json configuration parameter file, obtains the parameters and information of the use case, writes the parameters and information into the Mysql database, and deletes the corresponding database record when the use case is deleted.
The test case is used for indicating test content and test steps, and also indicates a port connection relation for the tested equipment, namely the switch.
After the test cases are associated for delegation, the test case list corresponding to the sample is determined, and the test cases can be distributed to specific testing personnel.
3) And (3) task allocation: after the cases are associated, a test task is distributed. Specifically, the test cases are distributed to which testers to complete, which test cases are completed by each tester, the completion time requirement, and the like.
4) Task receiving: test tasks are assigned to relevant tester names; if no objection exists, the task is accepted; otherwise, the task is cancelled and the task is redistributed to other testers.
After being received by the testers, each test case becomes a test task corresponding to each tester respectively; and each tester respectively accesses the WEB front end management and executes the test task under the name of the tester.
5) And (3) test configuration: the method comprises the steps of associating each test task with a DUT (such as a switch) and a test instrument, configuring the DUT, selecting an associated test case and configuring case parameters.
Specifically, when a machine frame of a physical layer switch is added by using a web front end, an IP address of the machine frame is input, the machine frame is added or selected, after the machine frame of the physical layer switch is added or selected, information of all ports of each board card under the machine frame is displayed at the web front end, and in a subsequent test, port occupation and port release needs to be set.
Specifically, when a test instrument is added by using a web front end, the IP address of a machine frame is input, and the machine frame is added or selected; after a machine frame of the test instrument is added or selected, displaying all port information of each board card under the machine frame at the front end of the web; and may set up either the occupied or released test meter port.
Specifically, when adding a DUT device using a web front end, selecting a DUT name (e.g., the first device must select DUT1, and so on), and setting a transmission interval (i.e., the interval time between each command issued to the DUT, in ms); and acquiring a topological relation record file (such as a script file) of the port occupied by the test case corresponding to each DUT device.
6) And (3) test execution: when the test task is executed, the test can be performed in a pre-test mode or a formal test mode. According to the test strategy, the automatic retesting times can be set for the test cases with failed execution; during the test, the test may be paused or terminated.
Specifically, the prediction is a test service provided for testing the matching condition of the test environment and the test case in advance, a formal report cannot be generated in the prediction test, and the formal report is generated only once in the formal test.
7) And (3) generating a test result: after the test execution is finished, automatically generating a test record, selecting a required test result from a plurality of test records and confirming the test result; if the test result is normal, generating a test report; if the test result is abnormal, the test can be performed again.
Specifically, whether the test result of the test case is normal or not is automatically determined according to a pre-stored test standard and specification (such as a standard and specification published by a national grid company).
8) Submitting a test report: after the test report is generated, the report can be submitted to a unified detection management system through interface calling.
Reasonable task scheduling is the key to improving the level of automated testing. The automatic testing system aims at multi-tenant task scheduling, common time scheduling strategies are not adopted, multi-tenant task scheduling based on a disassembled task state machine is adopted, multi-tenant interactive task scheduling is achieved, tenants are transparent and unaware, and a single tenant can perform real-time interactive operation on own tasks.
Specifically, the task is decomposed into a plurality of subtasks according to the execution stage of the task. The execution engine executes each task with a single subtask as the smallest execution unit, and simultaneously maintains the overall state machine of the task.
Specifically, the multi-tenant task scheduling based on the disassembled task state machine comprises two parts of task disassembling and state machine maintenance.
Specifically, when a multi-tenant test task is faced, task disassembly is performed for each tenant, the configuration of each subtask is regenerated according to the task configuration of each tenant, and the tasks are reorganized and packaged into a new task. The method specifically comprises the following steps:
1.1) check task configuration
And checking all configurations of the tasks of each tenant, and respectively checking completeness in the task configurations according to the dependence of each stage contained in the configuration. For example, the task configuration is set AS1, 2, 3, BS1, 2, 3, CS1, 2, 3, and cs3532, bs2.. BSn, CS1, cs2.. CSn, wherein the dependencies of the stages are AS1, as2.. ASn, BS1, bs2.. BSn, CS1, and cs2.. CSn, and if the dependencies of the stages are AS1, as2.. ASn, BS1, bs2.. BSn, CS1, and cs2.. CSn, the subsets are not S.
1.2) subtask configuration Generation
And for the configuration AS1, AS2.. ASn, BS1, BS2.. BSn, CS1 and CS2.. CSn of each subtask in the first step, respectively substituting the configuration items a, b and c into the replacement to generate a new configuration AS1, AS2.. ASn, BS1, BS2.. BSn, CS1 and CS2.. CSn, and packaging the obtained configuration and subtask information to generate a new task.
Specifically, the task is mainly decomposed depending on the detachability of the task, for example, the task is a task set, the set includes a series of tasks, and context dependencies may exist between the tasks. The configuration of each subtask is regenerated according to the task configuration, and the tasks are reorganized and packaged into new tasks. The method specifically comprises the following steps:
1.1) check task configuration
Checking all configurations of the tasks, and checking completeness in the task configurations according to the dependence of each stage contained in the task configurations. If the task configuration is set S { a ═ 1, b ═ 2, and c ═ 3}, where the dependency of each stage is S1, S2.. Sn, then it is sufficient to check S1, S2, and Sn is not a subset of S.
1.2) subtask configuration Generation
And for the configuration S1.. Sn of each subtask in the first step, substituting the configuration items a, b and c in S into replacement respectively to generate a new configuration S1 ', S2.. Sn', and packaging the obtained subtask information to generate a new task.
2) Maintenance of task state machines
The maintenance of the task state machine is to carry out scheduling execution according to the new task generated by packaging, and mainly comprises the following steps:
the method comprises the following steps: initializing a task queue, and monitoring the task queue by a scheduling module;
step two: pushing the obtained tasks corresponding to the testers to a task queue, and monitoring a task state machine;
step three: after the scheduling module reads the tasks from the task queue, initializing an execution unit and modifying a task state machine;
step four: and the scheduling module monitors the operation of a tester on the task through the web front end.
If the operation is termination operation, the execution unit is informed to terminate, the execution unit exits after saving the information, and the scheduling module modifies the state machine; if the operation is suspended, the execution unit is informed to suspend, the execution unit suspends after the execution of the current subtask, and the scheduling module modifies the state machine; if the operation is continued, the execution unit is informed to continue, the execution unit is called to execute again, and the scheduling module modifies the state machine to be in execution.
Step five: and after all subtasks are executed, saving task result information, modifying the task state machine to be completed, and destroying the execution unit.
In conclusion, the automatic test system achieves maintenance of the task overall state machine by controlling execution of subtasks after task disassembly based on the detachability of the task set, and the tasks of multiple tenants are isolated and set through the task queue, so that the real-time control of the tasks by the multiple tenants is ensured; the testing efficiency is improved while friendly and convenient human-computer interaction is realized; the multi-tenant interactive task scheduling is realized, the tenants are transparent and unaware, a single tenant can perform real-time interactive operation on own tasks, and the use experience of testers is improved.
Furthermore, the automatic test system realizes automatic switching of network topology based on the physical layer switch, and each test task is automatically connected with a resource connection line used by a test case according to the logic topology during execution. Specifically, the network topology structure of the test is automatically and dynamically changed according to the test content, so that the time for the tester to frequently insert/change the wiring to/from the machine room is saved, the unattended automatic test is really realized, the test problem caused by wiring errors is avoided, and the test reliability and efficiency are improved. The automatic test system also provides a means for constructing topology through a platform during manual test.
Specifically, all interface connection information is entered statically by a system administrator. Specifically, according to the test requirement, port occupation and release operation is carried out by calling an API (application program interface) of a physical layer switch; according to the test content, the network topology structure of the test is dynamically changed, and the test efficiency is improved.
Specifically, when a physical layer switch data structure is designed, a mapping relationship of interfaces, such as connection/disconnection of a single port, connection/disconnection of two ports, and the like, is established according to a predefined rule; and automatically generating a preset network topology structure again according to the mapping relation of the port ports.
Specifically, for a single port of a physical layer switch, the data structure used is as follows:
{
‘chassis’:<chassis_number>‘Slot’:<slot_number>,
‘Port’:<port_number>,
}
for example: the data structure { ' sessions ': 1 ', ' slot ': 1 ', ' port ': 1 ' } represents port No. 1 located on interface No. 1 of subrack No. 1. For a port group of a physical layer switch, the data structure used is as follows:
[{‘chassis’:’1’,’slot’:’1’,’port’:’1’},{‘chassis’:’1’,’slot’:’1’,’port’:’2’}],
where there are two members in the data structure, meaning that the ports of the two physical layer switches (i.e., port number 1 on interface number 1 of subrack and port number 2 on interface number 1 of subrack) are connected.
Further, the following data structure { ' sessions ': 1 ', ' slot ': 1 ', ' port ': 3 ' } has one member and may also mean that this physical layer switch port (i.e., port No. 3 located on interface No. 1 of subrack No. 1) is independent and not in communication with other ports.
For all physical layer switch ports, e.g., 3 port ports on slot 1 of rack 1, the following data structure (i.e., structure) is used:
[
[{‘chassis’:’1’,’slot’:’1’,’port’:’1’},{‘chassis’:’1’,’slot’:’1’,’port’:’2’}],
[{‘chassis’:’1’,’slot’:’1’,’port’:’3’}],
]。
2) physical layer switch API encapsulation
In order to interface with an automatic test system, API encapsulation of various operations is required to be performed on a physical layer switch, which is convenient for being called by the automatic test system of a third party to simplify the operation. The APIs that mainly need to be encapsulated include:
2.1) mapping and associating two ports;
2.2) the port is independent and is not communicated with other ports;
2.3) Port UP;
2.4) Port DOWN;
2.5) retrieving the structure of all physical layer switch ports and modifying the topology according to the content.
2.6) application modifications
The automatic network topology switching method based on the physical layer switch of the automatic testing system solves the problems of low testing efficiency caused by complex and various network topology environments during large-scale equipment testing, and realizes flexible automatic topology change.
Compared with the network topology change realized by the network switch and the automatic configuration of the network switch, the automatic switching method of the network topology based on the physical layer switch of the automatic testing system does not involve the difficulty of network protocol interaction, and can avoid the influence of the automatic switching of the ports on the testing environment.
The automatic test system is based on the network topology switching method of the physical layer switch, the connection relation between the physical layer switch and each port of the test instrument is dynamically controlled according to the port connection relation recorded in the test case, the network topology structure in the test is automatically switched, the test efficiency is improved, and the automatic test is really unattended.
The invention has been described above by reference to a few embodiments. However, other embodiments of the invention than the one disclosed above are equally possible within the scope of the invention, as would be apparent to a person skilled in the art from the appended patent claims.
Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise herein. All references to "a// the [ device, component, etc ]" are to be interpreted openly as at least one instance of a device, component, etc., unless explicitly stated otherwise. The steps of any method disclosed herein do not have to be performed in the exact order disclosed, unless explicitly stated.

Claims (10)

1. An automatic test system for power information communication equipment is characterized by comprising:
a web front end and a server end;
the web front end is used for realizing human-computer interaction in service functions such as entrusted management, task management, sample management, case management, instrument management, user management, statistical management, log management and the like related to the automated testing;
and the server side is used for realizing the test topology automatic configuration based on the physical layer switch and the multi-tenant task scheduling based on the disassembled task state machine, implementing the test process and acquiring the test result of the tested electric power information communication equipment from the test instrument.
2. The automated test system of claim 1,
the software framework of the automated testing system comprises:
the system comprises a background database processing module, a business process management module, a test case management module, a test tool management module and a test report management module;
the background database processing module comprises a MySQL database, and the MySQL database is used for storing and inquiring entrusted information, task information, sample information, user information, test results, test logs, test cases and test tools, processing data and presenting pages;
the business process management module is used for realizing test entrustment and task management, test case and test tool management, test automation process control, automatic generation of test reports and uploading of test records;
the test case management module is used for realizing test scripting of the test cases and associating the test cases with the entrusts, wherein the test cases are defined and called by adopting a Json file format;
the test tool management module supports various tested power information communication devices; the interface controller is used for detecting the state of each interface of the test tool at intervals and controlling the occupation and the release of the interfaces;
and the test report management module is used for selecting one of the execution results as a final result according to the presentation form of the test result predefined in the test case and the multiple execution results after the test execution is finished, filling the result into the corresponding position of the Excel template, and packing, compressing and storing the original test record and the test result according to the entrustment.
3. The automated test system of claim 1,
the server side comprises a user application management unit, a service management unit, a resource management unit and a test management supporting unit:
the user application management unit enables a plurality of testers to simultaneously and respectively perform a plurality of test tasks; the user application management unit realizes a plurality of automatic test modules through an automatic test application management agent interface; each automatic test module corresponds to a web page, and each test application is realized through a service agent in the background;
the service management unit realizes the functions of protocol adaptation, service registration, service routing, flow control, service quality, interface management proxy and the like through bus access; in the background, the following functions are respectively realized through a use case management agent, a tool management agent and a test report management agent:
realized through a testreport service: processing and presenting records, confirming and selecting results, calling a report template and testing original records of the report;
implementation by Tools service: adding an instrument and a physical layer switch, monitoring port states, occupying and releasing ports, and calling the instrument and the physical layer switch;
realized by a Testcase service: developing a test case, debugging and uploading the case, associating with a commission and executing the case;
the resource management unit realizes the following functions in the background through a resource management agent:
accessing and managing user information and entrusting information in a database DB through a client server;
accessing and managing task information and sample information in a database DB through a task server;
accessing and managing a test case, a test result, a test tool and a test calendar in the database DB through the test server;
and the test management supporting unit is used for inputting the information of the test instrument and the tested equipment into the database DB or calling the information of the test instrument and the tested equipment from the database DB.
4. The automated test system of claim 1,
the processing flow of the automatic test system comprises the following steps:
and (3) entrusting and creating: when testing equipment of a model, establishing a corresponding entrust; the entrusts comprise basic customer information and sample information;
case association: after the test entrusts are created, associating test cases for the entrusts; wherein the content of the first and second substances,
the automatic test system is pre-uploaded with a plurality of test cases in a zip format; each test case contains only one case information and configuration parameter, a pre-test script and a formal test script, and also comprises one or more xml test instrument configuration files and optional case description and description document files;
and (3) task allocation: assigning the entrusts related to the test cases to each tester as test tasks to be executed, wherein the test tasks are recorded with completion time requirement information;
task receiving: test tasks are assigned to relevant tester names; if no objection exists, the task is accepted; otherwise, the task is cancelled, and the task is redistributed to other testers so that each tester can respectively access the WEB front-end management and execute the test task under the name of the tester;
and (3) test configuration: associating each test task with the tested power information communication equipment and the test instrument, determining an associated test case and configuring case parameters;
and (3) test execution: when the test task is executed, the pre-test or the formal test can be carried out; according to the test strategy, the automatic retesting times can be set for the test cases with failed execution; during the test, the tester may pause or terminate the test;
and (3) generating a test result: after the test execution is finished, automatically generating a test record, selecting a required test result from a plurality of test records and confirming the test result; and if the test result is normal, generating a test report.
Submitting a test report: and after the test report is generated, the test report is submitted to a unified detection management system through interface calling.
5. The automated test system of claim 1,
the server side also comprises an execution engine and a scheduling module when the server side schedules the multi-tenant tasks based on the disassembled task state machine;
the task is disassembled into a plurality of subtasks according to the execution stage of the task; the execution engine executes each task by taking a single subtask as a minimum execution unit;
an overall state machine for maintenance tasks, comprising:
initializing a task queue, listening to the task queue by a scheduling module,
after the scheduling module reads the tasks from the task queue, initializing corresponding execution units and modifying a task state machine;
the scheduling module monitors the operation of a tester on a task through a web front end;
if the operation on the task is termination operation, the scheduling module informs the execution unit of termination, the execution unit exits after saving the information, and the scheduling module modifies the state machine;
if the operation on the task is the pause operation, the scheduling module informs the execution unit to suspend, the execution unit suspends after the execution of the current subtask is finished, and the scheduling module modifies the state machine;
if the operation on the task is a continuous operation, the execution unit is informed to continue, the execution unit is called again to execute, and the scheduling module modifies the state machine into execution;
after all subtasks are executed, the task result information is stored, the scheduling module modifies the task state machine to be completed, and the execution unit is destroyed.
6. The automated test system of claim 5,
when the multi-tenant task scheduling based on the task disassembling state machine is carried out, the task disassembling comprises the following steps:
checking all configurations of the tasks of each tenant, and respectively checking completeness in the task configurations according to the dependence of each stage contained in the configuration;
substituting the configuration items in the configuration of each subtask into the replacement respectively to generate new configuration, and packaging the obtained new configuration and subtask information to generate a new task;
wherein the task disassembling depends on the detachability of the tasks, and the contextual dependency exists between the tasks.
7. The automated test system of claim 1,
when the server side realizes the test topology automation configuration based on the physical layer switch,
calling an API (application program interface) of a physical layer switch according to the test requirement, and carrying out port occupation and release operation; wherein, to the encapsulation of physical layer switch API, include:
mapping and associating the two ports; the ports are independent and are not communicated with other ports; port UP; a port DOWN; the structure of all physical layer switch ports is retrieved and the topology is modified according to the content.
8. The automated test system of claim 7,
in designing a physical layer switch data structure,
for a single port of a physical layer switch, using a data structure having one member within the fabric; when a member exists in the structure, the port of the physical layer switch is independent and is not communicated with other ports;
for a port group of a physical layer switch, using a data structure having two or more members within a fabric body; when there are two members within the fabric, it is also meant to connect the ports of the two physical layer switches.
9. The automated test system of claim 1,
during automatic testing, a testing environment is formed by a testing instrument, tested power information communication equipment, a physical layer switch and the automatic testing system;
the machine room is internally provided with a test instrument, tested power information communication equipment, a physical layer switch and a server end of the automatic test system;
a WEB end of the automatic test system is arranged outside the machine room;
the measured electric power information communication device includes: the system comprises a router, a switch, an EPON, a server, a load balancer, a communication power supply and the like.
10. An automatic test method for power information communication equipment is characterized by comprising the following steps:
forming a local area network by the tested equipment and the testing tool through a physical layer switch;
a test case with a unique identifier is pre-configured on a test software system, and multi-user parallel test is supported;
corresponding to test cases of different test equipment, carrying out occupation and release operations of ports of the physical switch by calling an API (application program interface) of the physical switch;
when multi-user parallel testing is carried out, tasks are distributed and received based on a multi-tenant task scheduling mechanism of a disassembled task state machine.
CN202010807829.8A 2020-08-12 2020-08-12 Automatic testing method and system for electric power information communication equipment Pending CN112115044A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010807829.8A CN112115044A (en) 2020-08-12 2020-08-12 Automatic testing method and system for electric power information communication equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010807829.8A CN112115044A (en) 2020-08-12 2020-08-12 Automatic testing method and system for electric power information communication equipment

Publications (1)

Publication Number Publication Date
CN112115044A true CN112115044A (en) 2020-12-22

Family

ID=73804067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010807829.8A Pending CN112115044A (en) 2020-08-12 2020-08-12 Automatic testing method and system for electric power information communication equipment

Country Status (1)

Country Link
CN (1) CN112115044A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112684368A (en) * 2020-12-24 2021-04-20 四川灵通电讯有限公司 Network communication equipment maintenance system
CN112817859A (en) * 2021-02-04 2021-05-18 深圳市吉祥腾达科技有限公司 Automatic testing method and system for intelligent connection platform
CN114546510A (en) * 2022-04-25 2022-05-27 芯天下技术股份有限公司 Verification method and device for suspend function, electronic equipment and storage medium
CN115543806A (en) * 2022-10-08 2022-12-30 武汉赫尔墨斯智能科技有限公司 Method for supporting automatic calling and automatic matching automatic execution case test

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246439A (en) * 2008-03-18 2008-08-20 中兴通讯股份有限公司 Automatized test method and system based on task scheduling
CN101447892A (en) * 2008-11-24 2009-06-03 中兴通讯股份有限公司 Distributed test method, system and test server
CN105335293A (en) * 2015-11-30 2016-02-17 努比亚技术有限公司 Automatic testing system and method based on parallel ports
CN107315683A (en) * 2017-06-22 2017-11-03 四川长虹电器股份有限公司 The automatic test platform and method of testing of a kind of Android Mobile solution
CN111026635A (en) * 2019-09-27 2020-04-17 珠海随变科技有限公司 Software project testing system, method, device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246439A (en) * 2008-03-18 2008-08-20 中兴通讯股份有限公司 Automatized test method and system based on task scheduling
CN101447892A (en) * 2008-11-24 2009-06-03 中兴通讯股份有限公司 Distributed test method, system and test server
CN105335293A (en) * 2015-11-30 2016-02-17 努比亚技术有限公司 Automatic testing system and method based on parallel ports
CN107315683A (en) * 2017-06-22 2017-11-03 四川长虹电器股份有限公司 The automatic test platform and method of testing of a kind of Android Mobile solution
CN111026635A (en) * 2019-09-27 2020-04-17 珠海随变科技有限公司 Software project testing system, method, device and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112684368A (en) * 2020-12-24 2021-04-20 四川灵通电讯有限公司 Network communication equipment maintenance system
CN112817859A (en) * 2021-02-04 2021-05-18 深圳市吉祥腾达科技有限公司 Automatic testing method and system for intelligent connection platform
CN114546510A (en) * 2022-04-25 2022-05-27 芯天下技术股份有限公司 Verification method and device for suspend function, electronic equipment and storage medium
CN114546510B (en) * 2022-04-25 2022-07-08 芯天下技术股份有限公司 Verification method and device for suspend function, electronic equipment and storage medium
CN115543806A (en) * 2022-10-08 2022-12-30 武汉赫尔墨斯智能科技有限公司 Method for supporting automatic calling and automatic matching automatic execution case test
CN115543806B (en) * 2022-10-08 2024-06-07 武汉赫尔墨斯智能科技有限公司 Method for supporting automatic calling, automatic matching and automatic executing case test

Similar Documents

Publication Publication Date Title
CN112115044A (en) Automatic testing method and system for electric power information communication equipment
CN109634728B (en) Job scheduling method and device, terminal equipment and readable storage medium
US7117411B2 (en) Methods and systems for testing communications network components
US7253606B2 (en) Framework that maximizes the usage of testhead resources in in-circuit test system
US6170065B1 (en) Automatic system for dynamic diagnosis and repair of computer configurations
CN109388530A (en) Blade server-oriented automatic test platform and test method
US20090300423A1 (en) Systems and methods for software test management in cloud-based network
CN109617759A (en) Block catenary system stability test method, apparatus, equipment and storage medium
CN107608901B (en) Jmeter-based testing method and device, storage medium and electronic equipment
US11405302B1 (en) Methods, systems, and computer readable media for network testing using configurable test infrastructure
CN105117346A (en) Automatic testing method and system for distributed system of virtualization platform
CN111130922A (en) Airborne information safety automatic test method and test platform
CN110764036B (en) Intelligent distribution transformer terminal test method and system
CN102291274A (en) System and method for realizing automatic adaptation of network testing instrument
CN113658351A (en) Product production method and device, electronic equipment and storage medium
CN112256588A (en) Resource allocation method for application program test, computer readable storage medium and tester
CN109587349B (en) Multimedia agent line testing method and device, electronic equipment and storage medium
CN109274533B (en) Web service fault positioning device and method based on rule engine
CN113094266B (en) Fault testing method, platform and equipment for container database
CN111404763A (en) Core network performance test method, device and system
CN114238091A (en) Resident interactive service cluster testing method and system
CN116909894B (en) Virtual-real fusion hybrid dynamic test platform design method
CN111984523B (en) Message processing task testing method, device, system, equipment and medium
US20240069099A1 (en) Methods, systems, and computer readable media for using a testbed transpiler
Hirschfeld et al. Cloud‐based simulation studies in R‐A tutorial on using doRedis with Amazon spot fleets

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