Method, device and system for automatically testing base station service
Technical Field
The invention relates to the field of communication test, in particular to a method, a device and a system for automatically testing a base station service.
Background
Currently, 4G (the 4Generation mobile communication technology, fourth Generation mobile communication technology) mobile communication networks are under full development, the scale of LTE (Long Term Evolution) base stations and network construction of operators is increasing, and users continuously increase requirements for high-speed mobile communication, so that 4G + networks are also under upgrade and expansion. New base station products and versions are continually being iterated by the vendors to meet the ever-increasing market demands and user requirements. The increase of versions brings more business testing work, consumes a large amount of manpower, material resources and time, and influences the precision and accuracy of the test due to the participation of manpower.
With the development of automation technology, automatic testing technology and means for base station service functions are becoming more and more abundant, and the traditional testing means is to achieve the testing effect of the base station functions by simulating users to operate real terminals, and to compile test scripts to control the terminals and the base stations.
In the process of implementing the technical solution of the embodiment of the present application, the inventor of the present application finds at least the following technical problems in the prior art:
the modules for developing and maintaining the automatic test programs of the base station are not clear enough, and the code amount of the required programs is large when a certain test service is executed, so that the modules of the automatic test programs are not clear enough, and the reusability and the portability are low. And when a base station test control interface changes or a script needs to be applied to the automatic test of other types of LTE base stations, development work of updating or transplanting a large amount of test scripts is usually brought.
Disclosure of Invention
The invention provides a method, a device and a system for automatically testing a base station service, which are used for solving the problems of low testing efficiency and accuracy in the prior art.
In a first aspect, a method for automatically testing base station service is provided, where the method includes:
setting test parameters in a built-in automatic test program based on a first automatic test scene; the automatic test program comprises at least two service layers which are divided based on the functions of the service test of the base station, wherein each service layer corresponds to different keywords respectively;
determining a service layer to be mobilized according to the test parameters;
calling the service layer to be dispatched layer by layer according to the keywords of the service layer, executing the function corresponding to the service layer to be dispatched, and finishing the first automatic test;
optionally, the automatic test program includes 4 service layers, which are a bottom layer, an action layer, a service event layer, and a case layer from bottom to top in sequence, specifically:
the bottom layer is used for storing library files, and each library file corresponds to a name corresponding to the function realized by the test program stored in the library;
the action layer is used for packaging the action of the first automatic test and obtaining corresponding keywords based on the keywords of the bottom layer;
the business event layer is used for packaging the first automatically tested business event and acquiring corresponding keywords based on the keywords of the bottom layer and the keywords of the action layer;
and the case layer sets test parameters according to the first automatic test scene and calls keywords corresponding to other service layers except the case layer related to the scene.
Optionally, based on at least two service layers included in the automatic test program, calling, layer by layer, the keyword corresponding to each service layer, executing a function corresponding to the keyword of each service layer, and completing the first automatic test specifically includes:
determining a first test case set corresponding to a first automatic test in a case layer based on a scene of the first automatic test;
acquiring specific keywords packaged in the first test case set, calling keywords corresponding to each layer in the service layer by layer from a case layer to a bottom layer according to the specific keywords, and acquiring a first name of a library corresponding to the bottom layer;
and calling the bottom-layer related library corresponding to the first name, and executing a test program in the related library to complete the first automatic test.
Optionally, a first test case set corresponding to the first automatic test in the case layer is determined based on a scenario of the first automatic test, and the method includes:
receiving test parameters corresponding to the first automatic test scene through the case layer, and determining a first test case set corresponding to the first automatic test in the case layer according to test data and the test parameters.
Optionally, after the first base station divides the automatic test program into 4 service layers, the method includes:
and sending the service layer of the first base station to a second base station, so that the second base station executes automatic test by using the received service layer.
Optionally, the service layer of the first base station is sent to a second base station, and the method includes:
determining attribute parameters of the second base station different from those of the first base station, and determining a library different from the first base station in a service layer of the second base station according to the attribute parameters;
and modifying the test programs of the different libraries according to the attribute parameters, so that the second base station obtains a service layer with the same test function as the first base station.
Optionally, the service layer of the first base station is sent to a second base station, and the method further includes:
determining a test case set of the second base station different from the first base station, and determining different keywords in a service layer of the second base station and a service layer of the first base station according to the different test case sets;
and modifying different keywords in the service layer according to the different test case sets, so that the second base station obtains the service layer with the same test scene as the first base station.
Optionally, the determining, according to the different test case sets, a keyword in a service layer of the second base station that is different from a keyword in a service layer of the first base station includes:
when a second base station comprises a service process and an event of a service event layer different from the first base station, the first base station determines a second user keyword of the first base station corresponding to the service process and the event of the different service event layer, modifies the second user keyword of the first base station to obtain the second user keyword corresponding to the service event layer of the second base station, and enables the second user keyword corresponding to the service event layer of the second base station to call a test program for realizing automatic test.
Optionally, determining, according to the different test case sets, a keyword in the service layer of the second base station that is different from the keyword in the service layer of the first base station, where the method further includes:
when a second base station comprises actions of action layers different from the first base station, the first base station determines the first user keywords of the first base station corresponding to the actions of the different action layers, modifies the first user keywords of the first base station to obtain the first user keywords of the action layers of the second base station, and enables the first user keywords of the action layers of the second base station to call a test program for realizing automatic test.
In a second aspect, the present invention provides an apparatus for automatically testing a base station service, the apparatus comprising:
the setting module is used for setting test parameters in a built-in automatic test program based on a first automatic test scene; the automatic test program comprises at least two service layers which are divided based on the functions of the service test of the base station, wherein each service layer corresponds to different keywords respectively;
the determining module is used for determining the service layer to be mobilized according to the test parameters;
and the calling module is used for calling the service layer to be dispatched layer by layer according to the keywords of the service layer, executing the function corresponding to the service layer to be dispatched and finishing the first automatic test.
Optionally, the automatic test program includes 4 service layers, which are a bottom layer, an action layer, a service event layer, and a case layer from bottom to top in sequence, specifically:
the bottom layer is used for storing library files, and each library file corresponds to a name corresponding to the function realized by the test program stored in the library;
the action layer is used for packaging the action of the first automatic test and obtaining corresponding keywords based on the keywords of the bottom layer;
the business event layer is used for packaging the first automatically tested business event and acquiring corresponding keywords based on the keywords of the bottom layer and the keywords of the action layer;
and the case layer sets test parameters according to the first automatic test scene and calls keywords corresponding to other service layers except the case layer related to the scene.
Optionally, the calling module is specifically configured to:
determining a first test case set corresponding to a first automatic test in a case layer based on a scene of the first automatic test;
acquiring specific keywords packaged in the first test case set, calling keywords corresponding to each layer in the service layer by layer from a case layer to a bottom layer according to the specific keywords, and acquiring a first name of a library corresponding to the bottom layer;
and calling the bottom-layer related library corresponding to the first name, and executing a test program in the related library to complete the first automatic test.
Optionally, the apparatus further comprises:
and the sending module is used for sending the service layer of the first base station to a second base station so that the second base station executes automatic test by using the received service layer.
Optionally, the sending module includes:
a first determining unit, configured to determine an attribute parameter of the second base station that is different from the attribute parameter of the first base station, and determine, according to the attribute parameter, a base in a service layer of the second base station that is different from the first base station;
and the first modifying unit is used for modifying the test programs of the different libraries according to the attribute parameters so that the second base station obtains a service layer with the same test function as the first base station.
Optionally, the sending module includes:
a second determining unit, configured to determine a test case set of the second base station that is different from the first base station, and determine, according to the different test case set, a keyword in the service layer of the second base station that is different from the keyword in the service layer of the first base station;
and the second modification unit is used for modifying different keywords in the service layer according to the different test case sets, so that the second base station obtains the service layer with the same test scene as the first base station.
Optionally, the first modifying unit is specifically configured to, when the second base station includes a service flow and an event of a service event layer different from that of the first base station, determine the second user keyword of the first base station corresponding to the service flow and the event of the different service event layer, modify the second user keyword of the first base station to obtain the second user keyword corresponding to the service event layer of the second base station, so that the second user keyword corresponding to the service event layer of the second base station can invoke a test program for implementing automatic testing.
Optionally, the second modifying unit is specifically configured to, when a second base station includes an action of an action layer different from that of the first base station, determine the first user keyword of the first base station corresponding to the action of the different action layer, modify the first user keyword of the first base station to obtain the first user keyword of the action layer of the second base station, so that the first user keyword of the action layer of the second base station can invoke a test program for implementing automatic testing.
In a third aspect, the present invention further provides a system for automatically testing a base station service, where the system includes a tested base station group, a test mobile terminal, a test client, and a network transmission device, where the tested base station group is connected to the test mobile terminal through a radio frequency line, the test client is connected to the test mobile terminal through a control line, and the network transmission device is connected to the tested base station group and the test client through a network or an optical fiber, specifically:
the tested base station group is used for receiving the test parameters sent by the test client, setting the test parameters and communicating with the test mobile terminal;
and the test client is used for acquiring the state information of the tested base station group and/or the test mobile terminal.
Optionally, the system further includes an adjustable signal attenuator, an application server, and a network side server, where:
the adjustable signal attenuator is respectively connected with the tested base station group and the mobile terminal through radio frequency wires, is connected with the testing client through a control wire, and is used for receiving an attenuation instruction sent by the testing client and controlling signal attenuation in the communication process of the tested base station group and the testing mobile terminal;
the application server is connected with the network side server through a network cable or an optical fiber;
and the network side server is connected with the network transmission equipment through a network cable or an optical fiber.
The invention also provides a computer apparatus comprising a processor for implementing any of the methods described in the first aspect when executing a computer program stored in a memory.
The present invention also provides a computer readable storage medium having stored thereon computer instructions which, when run on a computer, cause the computer to perform any of the methods described in the first aspect.
Through the embodiment, the development and maintenance of the base station test program can be modularized, a large amount of program codes do not need to be modified when a certain test service is executed, and the problems of reusability, portability and the like are solved. And when the base station test control interface changes or the script needs to be applied to the automatic test of LTE base stations of other models, the development work of updating or transplanting a large amount of test scripts can be reduced, so that the test efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for automatically testing a base station service according to a first embodiment of the present invention;
fig. 2 is a schematic structural diagram of a service layer operated by a method for automatically testing a service of a base station according to a first embodiment of the present invention;
fig. 3 is a schematic flow chart of a method for automatically testing base station services according to another embodiment of the present invention;
fig. 4 is a block diagram of a base station service automatic testing apparatus according to another embodiment of the present invention;
fig. 5 is a block diagram of a system for automatically testing base station services according to another embodiment of the present invention;
fig. 6 is a block diagram of a specific base station service automatic test system according to another embodiment of the present invention;
fig. 7 is a schematic structural diagram of a computer device according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to specific embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. The embodiments and features of the embodiments of the present invention may be arbitrarily combined with each other without conflict. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
Example one
As shown in fig. 1, taking a cross-base station data service handover test as an example, an embodiment of the present invention provides an automatic test method for a base station service, where the method includes:
s101, setting test parameters in a built-in automatic test program based on a first automatic test scene; the automatic test program comprises at least two service layers which are divided based on the functions of the service test of the base station, wherein each service layer corresponds to different keywords respectively;
s102, determining a service layer to be mobilized according to the test parameters;
s103, calling the service layer to be dispatched layer by layer according to the keywords of the service layer, executing the function corresponding to the service layer to be dispatched, and completing the first automatic test.
It should be noted that, when the automatic testing method described in the first embodiment of the present invention is used in an actual scene, the present invention is not limited to specific models, categories, and the like of base stations.
Preferably, as shown in fig. 2, in S101, the automatic test program includes 4 service layers, which are a bottom layer, an action layer, a service event layer, and a use case layer from bottom to top, specifically:
the bottom layer is used for storing library files, and each library file corresponds to a name corresponding to the function realized by the test program stored in the library;
the action layer is used for packaging the action of the first automatic test and obtaining corresponding keywords based on the keywords of the bottom layer;
the business event layer is used for packaging the first automatically tested business event and acquiring corresponding keywords based on the keywords of the bottom layer and the keywords of the action layer;
and the case layer sets test parameters according to the first automatic test scene and calls keywords corresponding to other service layers except the case layer related to the scene.
Specifically, the bottom layer is composed of Python keywords, including built-in keywords, user keywords, third-party library keywords and custom library keywords of the system platform, and is a basis for realizing the automatic test script program. The third party library comprises an FTP library and the like. Custom libraries include, but are not limited to: the mobile terminal control library, the adjustable signal attenuator control library, the base station communication control library and the like, wherein the python keyword functions realized by the libraries comprise:
mobile terminal control library: controlling UE attachment/detachment, inquiring attachment state, inquiring cell, inquiring signal strength, saving air interface signaling message, inquiring target signaling according to time interval, soft reset and the like;
the adjustable signal attenuator control library is realized based on a serial port communication library: setting initial attenuation values of all channels, setting attenuation ranges and starting/stopping attenuation;
base station communication control library: and inquiring/setting a base station parameter CLI channel.
Specifically, the function that the action layer can realize is as follows:
(1) the action of logging in the base station operation maintenance WEB is named as a first user keyword of 'logging in WEB' by using built-in keywords, and the first user keyword 'configuration cell information', 'configuration base station neighbor cell information' and 'reactivation cell' are continuously packaged and realized according to the same method and named;
(2) based on network management and core network equipment SOCKET communication, realizing a first user keyword for 'obtaining a base station log packet' and 'inquiring load established by UE';
(3) using the keywords of the base station communication control library, packaging and realizing the action of inquiring the current neighbor cell list of the base station and naming the first user keywords as the 'inquiring neighbor cell list';
(4) the method comprises the steps that keywords of a mobile terminal control library are respectively packaged to realize and are named as first user keywords of 'terminal registration', 'terminal current cell number inquiry', 'UE current RSRP value inquiry' and 'target signaling inquiry';
(5) using FTP library keyword package to realize and name the first user keywords of 'initiating FTP file download service', 'inquiring current FTP speed' and 'stopping download service';
(6) the first user key of "set initial attenuation value", "set attenuation range", "start attenuation", "restore initial attenuation state" is implemented and named using the adjustable attenuator control library package.
The above-mentioned keyword naming has no fixed sequence or precedence order, and can be randomly operated.
Specifically, the test flow of the service event layer is as follows:
firstly, electrifying and starting base station hardware, logging in a base station OAM by using 'logging WEB', setting cell related information by using 'configuration cell information', setting a neighbor cell by using 'configuration base station neighbor cell information', and activating the cell by using a 'reactivation cell'; the same operation is performed on another base station by using the same step, and attention needs to be paid to the fact that the cells of the two base stations are mutually matched as the adjacent cells of the other side;
a second step of setting the signal attenuation of the channel communicated with one of the base stations (set as base station a) to minimum and the signal attenuation of the channel communicated with the other base station (set as base station B) to maximum using the "set initial attenuation value", and setting the attenuation range of the signal channel of the base station A, B using the "set attenuator range";
thirdly, through the first two steps of operation, the mobile terminal is controlled and tested to be registered on the base station A by using 'terminal registration', and at the moment, the registered cell number is inquired by using 'inquiring the current cell number of the terminal', so that the cell information configured for the base station A is confirmed;
step four, downloading a known file from the FTP service of the application server by using the 'initiating FTP file downloading service', and confirming the existing rate by using the 'inquiring the current FTP rate', which indicates that the file starts to be downloaded;
fifthly, attenuation operation is executed by using 'starting attenuation', so that radio frequency signal channel signals connected with an adjustable signal attenuator base station A and a base station B are respectively subjected to opposite control of attenuation increase and attenuation decrease, the step is 1dB, in the attenuation process, the condition that the signal intensity of a terminal on a cell of the base station A is gradually weakened by using 'inquiring the current RSRP value of UE', meanwhile, the condition of rate change can be inquired by using 'inquiring the current FTP rate', and the real-time rate is continuously stored; as the base station a signal received by the test mobile terminal becomes smaller, a handover process will be triggered;
sixthly, when the current cell number of the terminal is inquired to be changed into the cell of the base station B by using the 'inquiry terminal current cell number', inquiring whether the current FTP rate exists or not by using the 'inquiry current FTP rate', and then inquiring whether the air interface of the terminal has a signaling for successful switching or not by using an 'inquiry target signaling', namely judging whether the switching is successful or not;
and seventhly, after the switching test is finished, environment recovery is carried out by respectively using the 'recovery initial attenuation state' and the 'stop downloading service', the terminal is registered in the cell of the base station A again, and then the 'obtaining base station log packet' is used for downloading and storing the base station log in the test process to the test client side so as to facilitate subsequent manual check.
The steps are compiled by using a test program, and the second user keyword 'cross-base station data service switching test' on the service level is packaged and named. It should be noted that, the above steps are a specific business process, and have a fixed sequence.
Specifically, the case layer calls, according to the scene requirement of the automatic test, the corresponding keywords of each service layer except the case layer related to the scene, specifically including: the corresponding name of the bottom layer, the corresponding keyword of the action layer and the corresponding keyword of the business event layer are packaged to form a test case set; in the embodiment of the present invention, specifically, the base station needs to complete multiple automatic tests according to actual scenarios, and the "cross-base-station data service switching test" is only one service among multiple automatic test items.
The above operation steps specifically complete a specific packaging implementation process of a certain use case. The service layer after the encapsulation is portable, that is, in order to enable the second base station to use the same service layer as the first base station and to achieve the purpose of synchronously executing the automatic test, the service layer of the first base station may be sent to the second base station. Of course, in a specific implementation process, the service layer of the first base station may also be sent to other apparatuses capable of performing a specific test, which is not described herein again. It should be noted that the functions of each service layer are not limited to the above-mentioned functions, and the functions of each service layer are not limited in the embodiments of the present invention.
Further, as shown in fig. 3, based on at least two service layers included in the automatic test program, calling, layer by layer, the keyword corresponding to each service layer, executing a function corresponding to the keyword of each service layer, and completing the first automatic test specifically includes:
s201, determining a first test case set corresponding to a first automatic test in a case layer based on a scene of the first automatic test;
s202, obtaining specific keywords packaged in the first test case set, calling the keywords corresponding to each layer in the service layer by layer from a case layer to a bottom layer according to the specific keywords, and obtaining a first name of a library corresponding to the bottom layer;
s203, calling the bottom-layer related library corresponding to the first name, and executing a test program in the related library to complete the first automatic test.
In a possible implementation manner, the base station needs to perform automatic testing of a cross-base-station data service switching test, specifically, firstly, test parameters are set in a case layer, namely, a command for realizing the cross-base-station data service switching is called, and the times of automatic testing can also be set at the same time, so that the purpose of repeatedly executing multiple times of stability tests is achieved, and a corresponding case of the automatic testing in the case layer is determined according to the corresponding test parameters; then, calling the keywords corresponding to each layer in the service layer by layer from the use case layer to the bottom layer through the specific keywords encapsulated in the corresponding use case set: firstly, determining a business process and an event of a business event layer, and acquiring a corresponding keyword of the corresponding business event layer; then, determining the corresponding action of the action layer through the keywords of the corresponding business event layer, and obtaining the corresponding keywords of the corresponding action layer; next, determining the corresponding library name of the bottom layer through the keyword of the corresponding action layer; and finally, finding out specific test programs corresponding to the library names, and executing the test programs, thereby completing the automatic test of the cross-base-station data service switching test.
In order to adapt to the implementation of various different test scenarios, parameters can be further added, for example, cross-base station switching based on an S1 interface or an X2 interface, the test implementation of two different scenarios can be specifically implemented and completed in a "cross-base station data service switching test", and the parameters are provided as a differential setting switch. And will not be described in detail.
Optionally, sending the service layer of the first base station to a second base station specifically includes:
determining attribute parameters of the second base station different from those of the first base station, and determining a library different from that of the first base station in a service layer of the second base station according to the attribute parameters;
and modifying the test programs of the different libraries according to the attribute parameters, so that the second base station obtains a service layer with the same test function as the first base station.
In a specific implementation process, different attribute parameters may be changes of a model, an interface, and the like of the device, which may cause that a part of the test program after transmission may not normally run. Specifically, the specific attribute parameters may be obtained from the operation specification of the device, and the test programs of different libraries are modified according to the attribute parameters, so that the second base station obtains a service layer having the same test function as the first base station.
Similarly, in the embodiment of the present invention, a test case set that is different between the second base station and the first base station may also be determined first, and then different keywords in the service layer of the second base station and in the service layer of the first base station may be determined according to the different test case set;
and modifying different keywords in the service layer according to the different test case sets, so that the second base station obtains the service layer with the same test scene as the first base station.
In a specific implementation process, different test case sets are different because a service flow and an event of automatic testing are changed due to upgrading of a protocol or a scheme of a product, and/or changes of a product graphical interface and an interaction command cause invalidation of a test script, and an action of automatic testing is changed due to updating, for example, a submenu of an operation interface is changed, and the packaged test case sets are different. Specifically, different keywords in the service layer are modified according to the different test case sets, so that the second base station obtains the service layer having the same test scenario as the first base station.
First, when a protocol or a scheme of a second base station is upgraded to cause a service flow and an event of an automatic test to change, specifically, a second user keyword of a service event layer of the second base station is different from a second user keyword of an action layer of the first base station. Then, specifically, first, the second user keyword of the first base station corresponding to the service flow and the event of the different service event layer is determined at the first base station; then, modifying the second user keyword of the first base station at a second base station to obtain a second user keyword corresponding to the service event layer of the second base station, and enabling the second user keyword corresponding to the service event layer of the second base station to be named the same as the second user keyword of the service event layer of the first base station, and enabling the second base station to call a test program for realizing automatic test.
Secondly, when the operation graphical interface and the interaction command of the second base station are changed, the test script is invalid, and the action to be updated causes the position change of the automatic test, specifically, the first user keyword of the action layer of the second base station is different from the first user keyword of the action layer of the first base station. Then, specifically, first, the first user keyword of the first base station corresponding to the action of the different action layer is determined at the first base station; then, modifying the first user keyword of the first base station at a second base station, and obtaining the first user keyword of the action layer of the second base station, so that the first user keyword of the action layer of the second base station is the same as the first user keyword of the action layer of the first base station, and the second base station can invoke a test program for realizing automatic test.
Example two
As shown in fig. 4, an embodiment of the present invention further provides a base station service testing apparatus, where the apparatus includes:
a setting module 301, configured to set a test parameter in a built-in automatic test program based on a first automatic test scenario; the automatic test program comprises at least two service layers which are divided based on the functions of the service test of the base station, wherein each service layer corresponds to different keywords respectively;
a determining module 302, configured to determine a service layer to be invoked according to the test parameter;
a calling module 303, configured to call, layer by layer, the service layer to be scheduled according to the keyword of the service layer, execute a function corresponding to the service layer to be scheduled, and complete the first automatic test.
Preferably, the automatic test program includes 4 service layers, which are a bottom layer 21, an action layer 22, a service event layer 23, and a use case layer 24 from bottom to top, specifically:
the bottom layer 21 is used for storing library files, and each library file corresponds to a name corresponding to a function realized by a test program stored in a library;
the action layer 22 is configured to encapsulate the action of the first automatic test, and obtain a corresponding keyword based on the keyword of the bottom layer;
the business event layer 23 is configured to encapsulate the first automatically tested business event, and obtain a corresponding keyword based on the bottom keyword and the keyword of the action layer;
the use case layer 24 sets test parameters according to the first automatic test scenario, and calls keywords corresponding to the rest of the service layers except the use case layer related to the scenario.
Further, the calling module 303 is specifically configured to:
determining a first test case set corresponding to a first automatic test in a case layer based on a scene of the first automatic test;
acquiring specific keywords packaged in the first test case set, calling keywords corresponding to each layer in the service layer by layer from a case layer to a bottom layer according to the specific keywords, and acquiring a first name of a library corresponding to the bottom layer;
and calling the bottom-layer related library corresponding to the first name, and executing a test program in the related library to complete the first automatic test.
Further, the calling module 303 is further specifically configured to receive, through the use case layer, a test parameter corresponding to the scenario of the first automatic test, and determine, according to the test data and the test parameter, a first test use case set corresponding to the first automatic test in the use case layer.
Further, the apparatus further comprises: and the sending module is used for sending the service layer of the first base station to a second base station so that the second base station executes automatic test by using the received service layer.
Further, the sending module includes a first determining unit, configured to determine an attribute parameter that is different from the first base station, and determine, according to the attribute parameter, a library that is different from the first base station in a service layer of the second base station; and the first modifying unit is used for modifying the test programs of the different libraries according to the attribute parameters so that the second base station obtains a service layer with the same test function as the first base station.
Further, the first modifying unit is specifically configured to, when the second base station includes a service flow and an event of a service event layer different from that of the first base station, determine the second user keyword of the first base station corresponding to the service flow and the event of the different service event layer, modify the second user keyword of the first base station to obtain the second user keyword corresponding to the service event layer of the second base station, so that the second user keyword corresponding to the service event layer of the second base station can invoke a test program for implementing automatic testing.
Further, the sending module further includes a second determining unit, configured to determine a test case set that is different from the first base station for the second base station, and determine, according to the different test case set, a keyword that is different from the keyword in the first base station service layer in the second base station service layer;
and the second modification unit is used for modifying different keywords in the service layer according to the different test case sets, so that the second base station obtains the service layer with the same test scene as the first base station.
Further, the second modifying unit is specifically configured to, when a second base station includes an action of an action layer different from that of the first base station, determine the first user keyword of the first base station corresponding to the action of the different action layer, modify the first user keyword of the first base station to obtain the first user keyword of the action layer of the second base station, so that the first user keyword of the action layer of the second base station can invoke a test program for implementing automatic testing.
EXAMPLE III
As shown in fig. 5, a third embodiment of the present invention provides a system for automatically testing a base station service, where the system includes: a tested base station group 501, a testing mobile terminal 502, a testing client 503 and a network transmission device 504, wherein the tested base station group 501 is connected with the testing mobile terminal 502 through a radio frequency line, the testing client 503 is connected with the testing mobile terminal 502 through a control line, and the network transmission device 504 is respectively connected with the tested base station group 501 and the testing client 503 through a network line or an optical fiber, specifically:
the tested base station group 501 is configured to receive the test parameters sent by the test client 503, set the test parameters, and communicate with the test mobile terminal 502;
the testing client 503 is configured to obtain status information of the tested base station group 501 and/or the testing mobile terminal 502.
The specific functions of the test client 503 include:
1. the parameters and the state of each base station to be tested can be remotely inquired and set, and information such as equipment logs can be acquired;
2. the base station network manager can be logged in to trigger management operations of the network manager and the base station, such as remote upgrading, log collection and the like;
3. the method can remotely log in a test core network and manage the states of the base station and the terminal on the core network side through instruction operation.
It should be noted that the specific functions of the test client in the embodiment of the present invention are not limited to the three functions described above, and a user may set the functions of the test client according to a requirement.
Further, if a plurality of base station services need to be tested, the system for automatically testing the base station services in the embodiment of the present invention further includes an adjustable signal attenuator, an application server, and a network side server, where:
the adjustable signal attenuator is respectively connected with the tested base station group and the mobile terminal through radio frequency wires, is connected with the testing client through a control wire, and is used for receiving an attenuation instruction sent by the testing client and controlling signal attenuation in the communication process of the tested base station group and the testing mobile terminal;
the application server is connected with the network side server through a network cable or an optical fiber;
and the network side server is connected with the network transmission equipment through a network cable or an optical fiber.
It should be noted that the network side server includes devices such as a base station network manager and a test core network, and the specific type of the network side server is not limited in the embodiment of the present invention.
In a specific application, preferably, a system for automatically testing a base station service is shown in fig. 6, and the system includes: the system comprises a tested base station group 601, an adjustable signal attenuator 602, a test client 603, a test mobile terminal 604, network transmission equipment 605, a base station network manager 606, a test core network 607 and an application server 608.
The tested base station group 601, the base station network manager 606 and the test core network 607 are connected to a network transmission device 608 (usually a switch or a router) by using a network cable or an optical fiber, and the test client 603 is also connected to the network transmission device 608 by using the network cable or the optical fiber, so as to perform test control and interaction with each network element device in the networking.
It is worth noting that the application server 608 installs various real application servers including, but not limited to, FTP file servers, media playing services, WEB services, etc. for mobile terminal traffic test communication. And, the test mobile terminal 604 is connected with the test client 603 in a USB manner to generate a virtual serial port and a virtual network port, and the test client 603 sends an instruction to control terminal behaviors including attachment, detachment, restart, empty parameter query, and the like based on the virtual serial port, and initiates and terminates mobile services based on the network port.
Example four
As shown in fig. 7, the computer apparatus includes a processor 701 and a memory 702, where the processor 701 is configured to implement the steps of the method for automatically testing a base station service provided in the first embodiment of the present invention when executing a computer program stored in the memory 702.
Optionally, the processor 701 may specifically be a central processing unit, an Application Specific Integrated Circuit (ASIC), one or more Integrated circuits for controlling program execution, a hardware Circuit developed by using a Field Programmable Gate Array (FPGA), or a baseband processor.
Optionally, processor 701 may include at least one processing core.
Optionally, the electronic device further includes a Memory 702, and the Memory 702 may include a Read Only Memory (ROM), a Random Access Memory (RAM), and a disk Memory. The memory 702 is used for storing data required by the processor 701 in operation. The number of the memories 702 is one or more. The memory 702 is shown in fig. 7, but it should be noted that the memory 702 is not an optional functional block, and is shown by a dotted line in fig. 7.
EXAMPLE five
The embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer instruction, and when the computer instruction runs on a computer, the computer is enabled to execute the steps of the method for automatically testing a base station service provided in the first embodiment of the present invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.