![]() |
![]() |
![]() |
![]() |
![]() |
Replacing, Comparing and Merging
In this exercise you are going to merge the two test suites, the Example_A and the Example_B that you have just created. First you should change some names in one test suite though - to make it different - and then compare it with the other.
What You Will Learn
- To start search for a specified pattern and to replace matches
- To compare two TTCN documents
- To merge two TTCN documents
Searching and Replacing
The first thing you should do is to change some text in Example_B. The reason for this is that there would be no use comparing the documents - which you are soon going to do - if they both are the same.
You can start the search from both the Browser and the Table Editor, and in this case you will do it from the Browser:
Comparing Two Documents
When you have changed some text in Example_B, you can compare it to Example_A to see if any similarities exist:
- Ensure that the test suites Example_A and Example_B are opened.
- Select the entire test suite Example_B
- Select Compare from the Browser Tools menu.
- Make the dialog settings as depicted in Figure 56.
- Click the Compare button.
- Delete the selected items from Example_B.
Merging Two Documents
The Merge tool is used for merging one TTCN document (complete or partial) into another. This only works on condition that the documents do not conflict, that is, if an item in one document has the same name as another item in the other document. This will not be a problem now, as you have already compared the documents and deleted the similarities.
The final exercise in this tutorial is that you should merge what is left of Example_B into Example_A:
- Select Example_A in the Documents chapter. That is the suite that you are going to merge Example_B into
- Click the Merge button.
- If you look at the Example_A Browser, you should see that the suites have been merged into one. This is also depicted in Figure 58.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |