![]() |
![]() |
![]() |
![]() |
![]() |
Finding and Sorting Tables
As an alternative to the Browser, you can use the Finder for displaying TTCN tables in a list, without the ordering restrictions imposed by the TTCN tree structure.
You can search for and display tables in the Finder. The search may for example be based on name, type and content. You can use the entire TTCN document, entire TTCN Suite system, tables selected in TTCN Browser or the Finder Results List as search source, and extend, replace or restrict the number of tables displayed in Finder Results List in any number of steps.
Another way of searching is relationally. This means that you search for tables that reference or are referenced by tables selected in the Finder Results List or in TTCN Browser. The relational search cannot be combined with the ordinary.
The tables that will be displayed in Finder Results List after a search, can be sorted by a number of criteria:
Reversed sorting is also possible.
In addition, it is possible to for example open, analyze, copy, rename, export to MP file and delete tables from the Finder Results List, but not cut, paste and insert since that require a tree context.
Searching and Replacing
The Search and Replace tool exists in the upper part of the Table Editor, see "Editing Tables" on page 1266 in chapter 30, Editing TTCN Documents (in Windows). Its settings and functionality is absolutely the same as on UNIX, see "Searching and Replacing" on page 1180 in chapter 25, The TTCN Table Editor (on UNIX) for information on the TTCN Table Editor on UNIX. The difference is only that there are buttons instead of Search Menu items.
Opening the Finder
The Finder consists of four areas:
- The Find/Relational Find area, where you specify criteria for the tables to be found and inserted in the Results List.
- The Search In area, where you can select to search for tables in the entire document, entire system, tables selected in Browser or only in the Results List.
- The Find mode area, where you can specify should the Results List keep previously found tables or not.
- The Results List, where the sorted list of TTCN tables are kept.
About Search Criteria
Search criteria are used for restricting a search. This means that if you do not specify any search criteria - all fields are empty and no buttons are clicked - before you click the Find button, all dynamic TTCN tables of the test system component will be displayed.
Consequently, if you specify one or more search criteria, TTCN tables that match at least one of the criteria, will be displayed in the Finder. Additionally, this means that specifying all possible search criteria has the same effect as specifying none. This is merely as a convenience for quickly adding all tables of the test system component, as the closed search criteria is not meaningful.
Finding Tables
- Select the Find tab.
- Select Document, System, Results List or Browser Selection in the Search in area to search for tables in:
- If you select Document, the search area will be the entire TTCN document.
- If you select System, the search area will be the entire TTCN system.
- If you select Results List, the search criteria will be used to restrict the set of TTCN tables already present in the Results List.
- If you select Browser Selection, the search area will be the tables selected in the TTCN Browser.
- Select Extend or Replace in the Find mode area to choose should Results List keep previously found tables or not.
- Optionally, select one or several table types in the Of type list. No table types selected means that any table type appropriate.
- Click a Search mode radio button.
- This selection affects the text you type in the Name and Contains fields. If you are not going to use those fields in the search, the search mode does not affect the search at all.
- Optionally, type some text in the Name field.
- Optionally, type some text in the Contains field.
- Optionally, click one or several Status buttons to sort out tables of a different parse status.
- Click Find.
Finding Tables Relationally
You can search for tables that are referenced by, and that reference tables, that are displayed and selected in the Results list or selected in TTCN Browser. It is required that the TTCN document is analyzed before start Relational Find. To do this:
- Select the Relational Find tab.
- Select one or several tables in the Results List.or in TTCN Browser and select one of the following radio buttons:
- Select one of the following radio buttons:
- Select Document, System, Results List or Browser Selection in the Search in area to search for tables in:
- If you select Document, the search area will be the entire TTCN document.
- If you select System, the search area will be the entire TTCN system.
- If you select Results List, the search criteria will be used to restrict the set of TTCN tables already present in the Results List.
- If you select Browser Selection, the search area will be the tables selected in TTCN Browser.
- Select Extend or Replace in the Find mode area to choose should Results List keep previously found tables or not.
- Click Find.
Results List operations
The Results List contains a subset of all dynamic TTCN tables in the TTCN system. You can perform most standard operation (copy, delete, rename, open in Table Editor, export to MP, Analyze, etc) on the tables. However, it is not possible to cut, paste or insert tables, since this requires the structural context of the Browser.
Sorting the Results List
The contents of the Results List can be sorted if you click on the header of the information column. The available information is:
Click a second time on the header to sort the list in reverse order.
Clearing the Results List
Click Clear to clear the contents of the Results List.
When it is necessary to remove some individual tables from Results List, select them, right-click and choose Remove from Results List menu item.
Export to MP file
Tables from Results List may be exported to an MP file. To do this select Tables, right-click and choose Export.
How to isolate a single Test Case
A single Test Case may be isolated from a Test Suite together with all its dependent tables using the Finder.
- Analyze the Test Suite. The analysis must complete successfully without any errors.
- Select in the TTCN Browser window the Test Case that should be isolated (it may not be a single Test Case, and in fact even not a Test Case - you can select any table(s) that should be exported together with all their dependent tables).
- Start the Finder, open the "Relational Find" pane. In the section "Relations to selected node(s) in:" you select the "Browser Selections" and "All nodes directly and indirectly referenced by the selected node(s)". In the section "Search In:" you select "System", if the Test Suite is Modular. If the Test Suite is not modular, you can do the search in "Document".
- Press "Find" button. All tables that required by the selected in TTCN Browser window Test Case will appear in Results List.
- Select all these tables (click on the first table and then press Shift key and click on the last one), then right-click and choose "Export" in pop-up menu. Give the file name for the new file, that will contains all these tables.
In the case where you have a Modular Test Suite, the tables that belong to different modules will be exported to different files. Therefore the prompt to give new filenames will appear for each one of the exported tables. As a result the exported Test Suite will also be Modular and the original structure will be kept. If it is necessary to convert it into a non-modular Test Suite, use the Generate Flat View option from the Analyze TTCN dialog, see "Analyze TTCN" on page 118 in chapter 2, The Organizer.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |