Background technology
According to " the total technical specification book of programme-controlled exchange " of The Ministry of Information Industry of the People's Republic of China, MOII promulgation, when call is tested, promptly to the off-hook that repeats, on-hook, dialing, RT register traffic, according to various situations record respectively, it is complicated and uninteresting to work.Adopt manual testing's method, in test process, not only expend in a large number manually, take a large amount of testing equipments, but also be easy to take place the situation of omission, test leakage.
The analog caller of current commercialization need be connected with switch by analog line, then, by its interface editing call flow, after the call flow editor, can begin test, and the result of test can add up.For example: the AM2 call signal generator of American Communications observation and control technology company (Ameritec Corporation) promptly is this analoglike calling set, and there is following problem in it:
Necessarily require the standard interface of hardware, and the standard of docking port and reliability requirement are higher;
For the test of miscellaneous service, need program, and the process of programming is more loaded down with trivial details, support that the ability of programming is also more weak, can not adapt to the situation of multiple business;
The process of the various flow processs of switch inside, various resource status and analog call can not be write down in the test process, therefore the information of dealing with problems fully can't be provided;
In addition, the hardware cost of commercial analog caller is very high, is not suitable for researching and developing the needs of switching equipment.
Summary of the invention
The objective of the invention is provides a kind of automatic protocol test macro and method of testing in order to overcome the defective of prior art.Test macro of the present invention, the manual testing of call or interior signaling business can be changed into the automatic protocol test, replace expensive analog caller, finish the test of various telecommunication services automatically with the automatic protocol tester, to reduce the input of test manpower, reduce testing cost.Method of testing of the present invention not only can be tested automatically to indivedual test cases, and for a plurality of test cases, can also carry out the batch processing test, saves the testing time.
The automatic protocol testing execution module comprises:
Test process analog module: be used for the various operations of analog subscriber, carry out test procedure and handle.
Test signaling detection module: be used to check the implementation status of various signalings, by communication module, to automatically
The result of rules testing control module circular test.
When a certain use-case was tested, the testing procedure of automatic protocol method of testing of the present invention was as follows:
1 test procedure with the dependence test standard is input to automatic tester.
2 automatic testers are converted into rules the digital coding that can automatically perform.
3 automatic testers generate the test result data of standard according to digitized test procedure.
4 automatic tester start-up control module and Executive Modules are carried out the test (comprising test process analog module and test signaling detection module) of corresponding rules, and the actual result and the standard of record test.Detect the operating position of various resources simultaneously, carry out record.
5 after control module and Executive Module execution EOT, and the result that automatic tester will be tested generates test log, carries out corresponding record.
6 automatic testers generate relevant report after the result with standard compares.
Embodiment
Be call typical case test procedure below, from importing automatic tester to a standard procedure finishing whole test job.
As shown in Figure 1, three parts of the present invention are by the information such as control, test result of transmitting alternately of communication module.
Automatic protocol test macro of the present invention, form by following three parts: the primary processor of computer workstation and automatic protocol test and management module, stored-program control exchange and automatic protocol testing control module, stored-program control exchange from processor and automatic protocol testing execution module.
Wherein, automatic protocol test and management module comprises:
The test case generation module: the interface of man-machine interaction is provided, test procedure is converted into the digital coding that the automatic protocol tester can be discerned, and, with the code storage finished in test procedure and testing standard database.
Test procedure standard processing module: by the test procedure of existing digitalization, generate the test result of standard, be stored in test procedure and the testing standard database, for later test result provides canonical reference.
Test procedure and testing standard database: be used for digitized test procedure of storage and testing standard.
Automatic test and management module: be used to initiate and manage the process of automatic test, comprise the process of batch processing test, and the result that will test store in test log and the test result data storehouse into.
Test log and test result data storehouse: the result and the test log that are used to store automatic test.
Communication module: the information interaction that is used for automatic protocol test and management module and automatic protocol testing control module (200) and automatic protocol testing execution module.
Batch processing test module: be used to handle the test service that can carry out batch processing, comprise the editor of batch processing test file, the summary and the record that carry out process control and batch processing test result of batch processing test.It is by initiating and sum up test job in batches alternately with automatic test and management module.
The automatic protocol testing control module comprises:
The system resource detection module: be used for detecting the process of testing automatically, the operating position of system resource, if note abnormalities, the system resource detection module will send a warning message to the automatic protocol testing control module.
Test result collection module: collect the result of every test operation from the testing execution module that the automatic protocol testing control module is transmitted, and carry out interim record.
Automatic protocol testing control module: be used for controlling, undertaken alternately by communication module and automatic protocol test and management module and automatic protocol testing execution module for the rules of whole test.
Communication module: the information interaction that is used for this module and automatic protocol test and management module, automatic protocol testing execution module.
As shown in Figure 2, be a typical call flow,, convert thereof into and be following test procedure as a test case at this:
Test coding: XXXX
Purpose: the correctness of test telephone call
Project: standard telephone is called out
Sub-project: user A dials user B
Pretest condition: user A, user B free time
Configuration: standard configuration
Test-types: functional test
The time sequential routine sequence:
1) off-hook
2) listen dialing tone
3) dialing TN
4) TN ring contains and just shakes five times
5) ring-back tone is listened in caller
6) The Calling Party Hooks On
This test procedure is imported by the test case generation module and encoded, its coding situation as shown in Figure 3.As shown in Figure 4, through the later test procedure of coding, be stored in test procedure and the testing standard database, for later test is prepared.After the input of finishing use-case, by test procedure standard processing module, generate the standard results of this test case, also deposit in test procedure and the testing standard database.At this moment, test preparation is ready, can carry out the test of standard.
By automatic test and management module, digitized test procedure sends to the automatic protocol testing control module, starts test specifically.
The automatic protocol testing control module is at first carried out initialization to system resource detection module, test result collection module, automatic protocol testing execution module; Start-up system resource detection module and test result collection module are started working then; Send digitized test procedure simultaneously to the test process analog module; After preparation was ready, notice test process analog module began test.
In the process of test, the test signaling detection module detects the various signalings on the processor of switch, and the result that will test preserves temporarily.And the system resource detection module is responsible for checking the operating position of the various call resources on the switch primary processor, and carries out corresponding record.
After EOT, automatic protocol testing control module notice test result collection module begins to collect the result.The result that test signaling detection module and system resource detection module will be tested reports to the test result collection module, carries out the collection and the arrangement of test result.The test result collection module sends the baseline results of test to test log and test result data storehouse by the automatic protocol testing control module, and notifies automatic test and management module, and this test assignment is finished.
So far, the tester just can carry out corresponding process operations by browsing test log and the problem of finding in the test operation is checked in the test result data storehouse.
As a plurality of test cases, in the time of need testing, can carry out the batch processing test to these test cases.
Be the batch processing test process of a standard that gathers from batch processing test file input, batch processing test, to the batch processing test result below.
As shown in Figure 5, at first,, carry out the editor of batch processing test file by the batch processing test module.File format is as follows:
Autoexec XXXX
1?1?1
1?2?1
1?2?2
1?3?1
1?3?4
The beginning of file is a note, and with this mark as autoexec, the numeral of back is the chapters and sections item of each individual event test.
Secondly, start the batch processing test, batch processing test processes module is initiated the batch processing test, needs first of test to send to automatic test and management module with drafting.Carry out as the test of standard by automatic test and management module.By test log and test result data storehouse, with the test outcome record in test log.
In the 3rd step,, proceed test so if also have untreated test case.
At last,, then put test result in order, generate the report of batch processing test if finished last test.
Adopt automatic protocol test macro of the present invention and method of testing, can use the automatic protocol tester that call and interior signaling are tested, and interior signaling is directly analyzed, produce report; Can use graphical interfaces easily, test procedure is edited, produce the test case code automatically, finish relevant test job immediately; Automatically audit test result's correctness produces test report automatically; For a plurality of test cases, can also carry out the batch processing test;
Automatic protocol tester among the present invention can be installed in the switch easily, for the test job at dispatch from the factory machine and the scene of opening, can carry out comprehensive, careful test by the automatic protocol tester, and can produce detailed report.Various version switch for different manufacturers can be tested automatically, saves manpower, and can avoid the work problems such as test leakage, omission of problem of a large amount of manual testings, and greatly reduces hardware cost.