CN1115628C - Software simulation test method - Google Patents
Software simulation test method Download PDFInfo
- Publication number
- CN1115628C CN1115628C CN 99117118 CN99117118A CN1115628C CN 1115628 C CN1115628 C CN 1115628C CN 99117118 CN99117118 CN 99117118 CN 99117118 A CN99117118 A CN 99117118A CN 1115628 C CN1115628 C CN 1115628C
- Authority
- CN
- China
- Prior art keywords
- message
- sdl
- software
- name
- tested
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The present invention relates to an SDL software simulation test method which relates to a computer software testing technique, and more specifically, relates to a universal simulation test method for SDL software in the telecommunication industry. The test method comprises the following steps: establishing a test case through analyzing an SDL chart and relative system design documents; sending an input message and a message body to the tested SDL software; capturing an output message sent by the tested SDL software, and comparing the output message of the SDL software with an output message obtained from the SDL chart to testify whether a system expressed by an informal language and that expressed by a formal language are consistent or not.
Description
The present invention relates to the computer software testing technology, specifically, relate to a kind of general-purpose simulation method of testing of SDL software.
SDL (Specification and Description Language) is a kind of formal descriptive language that CCITT formulates, it mainly is conceived to the behavior of regulation telecommunication system, a kind of information is delivered to another person from a people exactly, so it uses in telecommunications industry quite extensive.Because SDL is a kind of formal ideographic language, therefore when adopting the SDL language to carry out product development, general way is: use the SDL language that system is described in detail earlier, generate SDL system diagram and fate map etc., then SDL figure is realized with non-formalization language such as C/C++ or compilation, promptly generate SDL software.Since finish the personnel of this two parts work may be separately to the difference of system understanding, and the method problem in realizing, often there is difference in the system that therefore different personnel express.
In the prior art, there have been some directly to analyze to SDL figure, whether consistent test generates the commercial tool software of respective objects machine application program then, but do not have a kind of non-formalization language and the expressed system of formalization language instrument or method of testing.
The objective of the invention is to propose a kind of general SDL software simulator test method, whether the SDL software that various non-formalization language are realized carries out simulation test, consistent with the expressed system of formalization language to verify non-formalization language.
The object of the present invention is achieved like this, constructs a kind of SDL software simulator test method, may further comprise the steps:
1, analyze SDL figure and related system design documentation, formulate test case, test case comprises input message and the output message that is used for testing SDL software;
2, message simulation router sends input message to tested SDL software;
3, message is caught and comparison program is caught the output message that tested SDL software is sent, and the relatively output message of SDL software and the output message in the test case.
Implement SDL software simulator test method provided by the invention, can check the realization of SDL software whether consistent with SDL figure.And SDL method for testing software provided by the invention is not limited to a certain product, also is not subjected to the restriction of operation platform, is a kind of general means of testing, utilize method of the present invention, can improve program reliability, improve testing efficiency and program quality, and can reduce the software test cost greatly.
In conjunction with the accompanying drawings and embodiments, further specify characteristics of the present invention.
Fig. 1 is a SDL software simulator test function relationship synoptic diagram; Fig. 2 is to use method of the present invention to carry out the step of SDL software simulator test; Fig. 3 is message name and message code name respective file synoptic diagram; Fig. 4 is message name and message body name respective file synoptic diagram; Fig. 5 is message body name and concrete message content respective file synoptic diagram; Fig. 6 is the input information test use-case that uses in the SDL software simulator test; Fig. 7 is an output message test case in the SDL software simulator test; Fig. 8 is the program circuit that the simulation of SDL software input message sends; Fig. 9 is that SDL software output message is caught and the comparison program flow process; Figure 10 is the part of the input information test use-case that uses in the SDL software simulator test; Figure 11 is the part of output message test case in the SDL software simulator test; Figure 12 is a simple SDL state transition diagram.
For further specifying the method that the present invention relates to, the key concept that relates among the present invention is described as follows:
(1) SDL fate map: refer to adopt the standardized graphical symbol of a cover to describe the dynamic behaviour of a system in the present invention.
(2) SDL state transition diagram: be translated as the state synoptic chart sometimes, its fundamental purpose is to provide general description and more presumable transition between them of each state of a process, and this figure is made up of state symbol, the directed arc of expression transition and the startup that can choose wantonly and stop element.
(3) SDL process: refer to fate map in the present invention, the one group of code that has identical functions with the SDL fate map that uses that non-formalization language (as C/C++ commonly used, compilation etc.) realizes according to SDL.
(4) SDL software: in the present invention is a general designation to the SDL process.
(5) SDL figure is the general designation to SDL fate map and SDL state transition diagram in the present invention, and promptly it can refer to the SDL state transition diagram separately, also can refer to the SDL fate map separately, also can be to comprise the two simultaneously.
Fig. 1 is described the group method of SDL software simulator test.SDL software input message simulation router 101 is used to read input information test use-case, and sends simulation message to tested SDL software 102, thereby excites tested SDL software 102 operations.SDL software output message is caught and comparison program 103 is used to read the output message test case and catch the message that tested SDL software 102 sends, compare with the output message test case of reading in internal memory, whether consistent thereby check SDL software is realized with SDL figure.The specific implementation of message simulation router 101 as shown in Figure 8, message catch and the specific implementation of comparison program 103 as shown in Figure 9, will be described in more detail below.
Described test case generates according to SDL figure and system design document.Therefore, can use these test cases to verify the correctness that SDL software is realized,, then can adopt at present a lot of business softwares, verify as ObjectGEODE as for the correctness of SDL figure.
In specific implementation, message simulation router 101 is caught comparison program 103 with message and can be realized in a process, also can realize in different processes.All output messages of tested SDL software 102 all are directed to test procedure, and this can realize by direct modification tested program, also can send function by heavily loaded message and realize, or directly revise message transmission function and realize.
In decision when when tested SDL software sends message, following certain methods is generally arranged: (1) timed sending, a timer promptly is set, promptly send a message at interval every a regular time to tested process, the weak point of this method is to be difficult in the time interval determine, if the time interval is oversizely fixed, then system testing efficient is not high, if time interval Ding Detai is short, then cause message congestion easily.(2) promptly send next message after receiving the message that tested process sends out, but because tested process is not to receive that whenever a message promptly outwards sends message, therefore, this method can't be kept down always to tested process.Send next message to tested process when (3) utilizing tested process to carry out state transition, all will carry out state transition because tested process is whenever received a message, or move to other state, or migrate to current state.Therefore, utilize tested state of a process to move to excite that to send next message to tested process be than more efficient and feasible a kind of method, this also is a feature place of the present invention.
Fig. 2 is to use method provided by the present invention, carries out the step of SDL software test: at first carry out 201, analyze SDL figure and related system design documentation, thereby generate as Fig. 3, Fig. 4, Fig. 5, Figure 6 and Figure 7 test case; Carry out 202 then, use test procedure 101 as shown in Figure 8 to send input message to tested SDL software 102; Carry out 203 at last, the message of using test procedure 103 more tested SDL softwares 102 as shown in Figure 9 to send.Thereby can verify SDL software is realized whether consistent with SDL figure.
Fig. 3 represents the corresponding relation of message name and message code name, as the corresponding message code name 100 of message name IN_EVENT1.Test procedure is when tested software sends message, use be the message code name, but other people reading for convenience directly adopts message name will more help understanding to test case in test case.In addition by message name and message code name are preserved as data file, thereby can realize that test procedure and test case separate, when promptly testing different SDL software or adopting different test cases repeatedly to test, as long as revise the test case data file, and needn't revise test procedure, thereby can improve testing efficiency greatly.Test case shown in this figure can obtain by analyzing tested SDL software or system design document.
Fig. 4 represents the corresponding relation of message name and message body name, by to the message body name, helps the processing to identical message different messages body situation.As in Fig. 4, message IN_EVENT1 has two message body names, A1 and A2, and this represents that tested SDL software, may be with two kinds of different message bodies when receiving same message IN_EVENT1, A1 and A2, thus finish different processing.Test case shown in this figure can obtain from the system design document.
Fig. 5 represents the corresponding relation of message body name and message body content.In the message body content shown in Fig. 5, can from the system design document, obtain.In the system design document, message body content is generally some self-defining data structures, and the length of different field and the implication of representative in the structure have been provided, when the test case file of writing as shown in Figure 5, should be with the message body STRUCTURE DECOMPOSITION for being unit with the byte, and by low byte preceding high byte after order be arranged in order, test procedure is after reading in message body content like this, can directly be kept in the array of a unsigned char type, as the message body of corresponding message.
Fig. 6 represents the input message to tested SDL software 102 transmissions.Among Fig. 6, each row is promptly represented a test case, the process that expression is got back to this state point from SDL process initial state point again through state transition, or from the process of initial state point through the last STOP of state transition.For can not getting back to initial state point and the state machine of STOP not again, can be successively excite message as a test case state transition each time.This test case is from the SDL fate map, or the generation of SDL state transition diagram, is used for the SDL process is carried out the test in specified path or all paths.In Fig. 6, each bar test case is all represented with input message body name, use the message body name rather than use message name to represent that the main cause of a test case is that same message name has different message bodies, test procedure can't confirm to use which bar message body like this, use the message body name to represent that then there is not this problem in a test case, because can find unique message name from the message body name.
Test case shown in Figure 7 is corresponding one by one with test case shown in Fig. 6.Corresponding input message and message body will produce corresponding output message and message body shown in Figure 7 according to SDL figure among Fig. 6.Whether the output message that test case shown in Figure 7 will be used for more tested SDL process is correct, thereby determines whether the SDL process is consistent with SDL figure.Since the uncertainty of output message body, the general content that does not compare the output message body, and only compare the output message code name.But in order to keep the consistance of testing software, test case shown in Figure 7 is still represented with the message body name with Fig. 6 is the same, rather than message name.
Fig. 3 can be used as text and preserves to various test cases shown in Figure 7, also can be used as database and preserves, and can make amendment easily like this.If save as other form, then should develop the corresponding modification maintenance tool.
Fig. 8 is the workflow of SDL software input message simulation router 101, in this flow process,
1) at first carries out 801, message name and message code name are read in internal memory, promptly read in data as shown in Figure 3, set up the one-to-one relationship of message name and message code name;
2) then carry out 802, message name and message body name are read in internal memory, promptly read in data as shown in Figure 4, in this process, result according to 801 will adopt the message name of string representation to convert corresponding message digital code to, thereby sets up the corresponding relation of message code name and message body name;
3) carry out 803, message body name and message body content are read in internal memory, promptly read in data as shown in Figure 5; The message code name forms test case with message body content like this;
4) carry out 804, will import the information test use-case and read in internal memory, promptly read in data as shown in Figure 6, after obtaining test case, import the message simulator program and wait for that promptly tested process carries out state transition;
5) carry out 805, initialization test use-case pointer i and transmission message pointer j;
6) carry out 806, have only tested process to carry out state transition, then carry out 807, send a piece of news, and will send message pointer j sensing a piece of news down to tested process;
7) carry out 808, judge whether a test case uses, if use, then carry out 809, pointer i is pointed to next bar test case, if all test cases all use, then can finish test or start anew to carry out second time test, otherwise, wait for when tested process is carried out state transition next time to the tested simulation message that sends, so circulation.
Fig. 9 is that SDL software output message is caught and the workflow of comparison program, similar with Fig. 8,901 to 904 are used for the output test case is read in internal memory, 905 pointers that are used for will using the output message comparison procedure carry out initialization, carry out 906 and wait for that tested process outwards initiates a message, after receiving message, carry out 907 and carry out relatively working of message name, the message name that is about to receive compares with message name in the output test case of reading in internal memory in advance, if make mistakes then carry out 908 wrong paths record got off, otherwise carry out 909, relatively whether the output message pointer arrives this test case tail, if arrive this test case tail, then carry out 910 with next bar test case of pointed, and carry out 911 and judge whether that useful test case all uses, if, then finish relatively, wait for reception message otherwise return 906.
By customization to test case file, can realize a kind of controlled SDL software test procedure, if promptly the user is interested in some paths of SDL software, can only provide the test case of this paths so, can finish test to wall scroll or one group of particular path.In Figure 12, return SA one from state SA and have two paths, if only want to test a paths wherein, as passing through message IN_EVENT1 from state point SA, IN_EVENT3, get back to initial state point SA behind the IN_EVENT4, then can only provide the test case relevant, as Figure 10, shown in Figure 11 with this paths.
Concrete case study on implementation: Figure 12 who introduces the inventive method at last represents a simple SDL state transition diagram, and this figure one has three states, SA, SB and SC.SDL system design document and SDL figure can write as Fig. 3 Fig. 4 by analysis, Fig. 5, Fig. 6, test case shown in Figure 7, with Fig. 8, test procedure shown in Figure 9 is with tested SDL program compiling link, and generation can be carried out target program, the operational objective program, promptly begin to carry out automatic testing process, end of run, the file of analytic record mistake can judge SDL software is realized whether consistent with the SDL fate map.Usually,,, can be easy to find out the difference between the two, and provide clearer and more definite guidance for the location of problem by method of the present invention by always having some difference between developer SDL process that realizes and the SDL figure that designs by the system designer.
When SDL software is carried out simulation test, can use the true environment of tested software operation, or debugging enironment, also can use various simulated environments.Here, simulated environment refer to provide the SDL running software to support but with the different environment of true environment of tested software operation.In 186 veneers, then can on veneer, carry out simulation test as tested SDL running software, also can adopt PC Windows environment to simulate the environment of a SDL running software, thereby finish the simulation test of SDL software SDL software.The simulation of indication is the input of the tested SDL software of simulation among the present invention, thus the operation of excitation tested software.
Claims (8)
1, a kind of SDL software simulator test method may further comprise the steps: (1) analyzes SDL figure and related system design documentation, formulates test case, and test case comprises input message and the output message that is used for testing SDL software; (2) message simulation router (101) sends input message to tested SDL software (102); (3) message is caught and comparison program (103) is caught the output message that tested SDL software is sent, and the relatively output message of SDL software and the output message in the test case.
2, SDL software simulator test method as claimed in claim 1, it is characterized in that: all output messages of described tested SDL software (102) are directed to all that message is caught and comparison program (103), this can realize by direct modification tested program, also can send function and realize, or directly revise message transmission function and realize by heavily loaded message.
3, SDL software simulator test method as claimed in claim 1 is characterized in that: when described tested SDL software (102) sends message, be to send next message to tested process when utilizing tested process to carry out state transition.
4, SDL software simulator test method as claimed in claim 1 is characterized in that: described test case is to be obtained by the process that SDL process initial state point is got back to this state point again through state transition; Or obtain from the process of initial state point through state transition last STOP; For not getting back to initial state point and the state machine of STOP not again, excite message as a test case state transition each time successively.
5, SDL software simulator test method as claimed in claim 1 is characterized in that: described test case is by message name, message code, message body name, message body content structure.
6, SDL software simulator test method as claimed in claim 5, it is characterized in that: described message name and message code name are preserved as data file; Described message body STRUCTURE DECOMPOSITION is for being unit with the byte, and by low byte preceding high byte after order be arranged in order.
7, SDL software simulator test method as claimed in claim 1 is characterized in that: the specific implementation of described message simulation router (101) comprises the steps:
1) message name and message code name are read in internal memory (801);
2) message name and message body name are read in internal memory (802);
3) message body name and message content are read in internal memory (803);
4) will import the information test use-case and read in internal memory (804);
5) initialization test use-case pointer i and transmission message pointer j (805);
6) judge the whether state transition (806) of tested process;
7) tested process sends a piece of news, and will send message pointer j sensing a piece of news (807) down;
8) judge whether a test case uses (808);
9) test case pointer i is pointed to next bar test case (809);
10), then can finish test (810) if all test cases all use;
11) otherwise, wait for when tested process is carried out state transition next time to the tested simulation message (806) that sends, promptly get back to step 6).
8, SDL software simulator test method as claimed in claim 1 is characterized in that: described message is caught and the specific implementation of comparison program (103) comprises the steps:
1) message name and message code name are read in internal memory (901);
2) message name and message body name are read in internal memory (902);
3) message body name and message content are read in internal memory (903);
4) will import the information test use-case and read in internal memory (904);
5) pointer that will use in the output message comparison procedure is carried out initialization (905);
6) receive tested process outwards initiate a message (906);
7) receive message after, carry out relatively working of message name, the message name that is about to receive compares (907) with message name in the output test case of reading in internal memory in advance;
8) if make mistakes then with wrong paths record get off (908);
9) otherwise, relatively whether the output message pointer arrives this test case tail (909);
10) if arrive this test case tail, then with next bar test case (910) of pointed;
11) judge whether that useful test case all uses (911);
12) if then finish relatively (912);
13) wait for otherwise again receiving message (906), promptly get back to step 6).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 99117118 CN1115628C (en) | 1999-09-30 | 1999-09-30 | Software simulation test method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 99117118 CN1115628C (en) | 1999-09-30 | 1999-09-30 | Software simulation test method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1282917A CN1282917A (en) | 2001-02-07 |
CN1115628C true CN1115628C (en) | 2003-07-23 |
Family
ID=5279764
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 99117118 Expired - Fee Related CN1115628C (en) | 1999-09-30 | 1999-09-30 | Software simulation test method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1115628C (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100337216C (en) * | 2004-09-04 | 2007-09-12 | 华为技术有限公司 | Software test method |
CN100340997C (en) * | 2004-09-04 | 2007-10-03 | 华为技术有限公司 | Automatic test method of application |
CN100407161C (en) * | 2004-09-09 | 2008-07-30 | 北京航空航天大学 | Dynamic software clustering test method |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100340986C (en) * | 2004-09-08 | 2007-10-03 | 华为技术有限公司 | Method and apparatus for analog satellite card |
CN100414512C (en) * | 2004-09-09 | 2008-08-27 | 北京航空航天大学 | Software associated fault inspection |
CN100385410C (en) * | 2005-01-26 | 2008-04-30 | 华为技术有限公司 | Method for generating software test expectative result by use of standard tester and relavant software test method |
CN101231614B (en) * | 2008-02-02 | 2010-06-02 | 南京大学 | Method for locating software unsoundness based on execution track block semblance |
CN102999423B (en) * | 2012-11-15 | 2016-03-02 | 华为技术有限公司 | A kind of method and apparatus of multinuclear test |
-
1999
- 1999-09-30 CN CN 99117118 patent/CN1115628C/en not_active Expired - Fee Related
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100337216C (en) * | 2004-09-04 | 2007-09-12 | 华为技术有限公司 | Software test method |
CN100340997C (en) * | 2004-09-04 | 2007-10-03 | 华为技术有限公司 | Automatic test method of application |
CN100407161C (en) * | 2004-09-09 | 2008-07-30 | 北京航空航天大学 | Dynamic software clustering test method |
Also Published As
Publication number | Publication date |
---|---|
CN1282917A (en) | 2001-02-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110427331B (en) | Method for automatically generating performance test script based on interface test tool | |
Bacchelli et al. | Extracting structured data from natural language documents with island parsing | |
CN1307553C (en) | Apparatus and method for syntactic analysis expanding mark language file | |
CN101261579A (en) | Method for accomplishing VBScript language trans-platform uses | |
CN111026670B (en) | Test case generation method, test case generation device and storage medium | |
CN112597033B (en) | Automatic interface testing method and device | |
CN1115628C (en) | Software simulation test method | |
CN101288071A (en) | Method and computer unit for determining computer service names | |
US7409619B2 (en) | System and methods for authoring domain specific rule-driven data generators | |
CN112286784B (en) | Test case generation method, device, server and storage medium | |
CN101770388A (en) | Method and device for obtaining chip code information | |
CN112181426B (en) | Assembly program control flow path detection method and device | |
US20090064092A1 (en) | Visual programming language optimization | |
Al Salem et al. | A review on grammar-based fuzzing techniques | |
CN116346660A (en) | Data processing method, device, equipment and medium based on dependent replacement service | |
Robert et al. | Deriving an SDL specification with a given architecture from a set of MSCs | |
CN114880673A (en) | Method and system for detecting private data leakage aiming at applet source code | |
Zhang et al. | How Effective Are They? Exploring Large Language Model Based Fuzz Driver Generation | |
Fisher et al. | An automated analysis methodology to detect inconsistencies in web services with WSDL interfaces | |
Desel et al. | A test case generator for the validation of high-level Petri nets | |
CN117195918B (en) | Translation method of software development kit and software development system | |
US20050027470A1 (en) | Interactive stub apparatus for testing a program and stub program storage medium | |
CN117520293A (en) | Data calibration method and system for data migration | |
CN115017032A (en) | FPGA code rule detection method, device and equipment | |
CN117311716A (en) | Method, device, equipment and medium for analyzing protobuf |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20030723 Termination date: 20170930 |