UCS User Guide - 12 -

------

UCS User Guide V1.3.3

1 Introduction 4

1.1 Project history 4

1.2 Assumptions 5

1.3 Contact Info& Resources 5

1.3.1 Project web site: 5

1.3.2 Email address: 5

1.3.3 Download web site 5

2 Software Installation 5

2.1 Installation 5

2.2 Directory structure 5

2.3 Configuration 7

2.4 Running 10

3 Usage 12

3.1 Project management 12

3.1.1 Create a project 12

3.1.2 Open or reload existing project 15

3.2 CORBA Client Simulation 16

3.2.1 Start the server of factory demo 16

3.2.2 Attach a IOR to client 17

3.2.3 Invoke operation 19

3.2.4 Fill request parameter 20

3.2.5 Return an interface type 21

3.2.6 Save test case 22

3.2.7 Load test case 23

3.2.8 Search test case 23

3.2.9 Auto save all test case 23

3.2.10 Auto load all test case 24

3.2.11 Auto load one test case 24

3.2.12 One note for Operation Tree Display 25

3.3 CORBA Server Simulation 25

3.3.1 Fill reply parameter or exception 25

3.3.2 Create servant 26

3.4 CORBA Server extending 28

3.4.1 Prerequisite 28

3.4.2 Steps 28

3.4.3 Q&A 28

3.4.4 Appendix: Mapping Table 30

3.5 IDL Browser 31

3.6 CORBA Client Operation Flow 31

3.6.1 OpenOperationFlow 32

3.6.2 AddOperation 32

3.6.3 InsertOperation 33

3.6.4 MoveUp 33

3.6.5 MoveDown 33

3.6.6 RemoveAllOperation 33

3.6.7 SaveOperationFlow & ExecuteOperationFlow 33

3.6.8 How to set parameter replacement 34

3.6.9 How to set match condition 35

3.6.10 How to set AutomaticAddMatchCondition 36

3.6.11 How to enable iterator function 36

3.6.12 How to set execution number for every operation? 37

3.6.13 How to set repetition number for the whole operation flow? 37

3.6.14 How to set comments for every operation? 37

3.6.15 Others 38

3.7 Test Spec Generating 38

3.7.1 Use it as test case document 39

3.7.2 Use it as test report document 39

3.8 Notification Service 40

3.8.1 Notification service management 40

3.8.2 Notification sending and receiving 41

3.9 Naming Service 42

3.9.1 Naming server 42

3.9.2 Naming service management 42

3.10 GIOP Message Interceptor 43

3.10.1 GIOP Filter Model 43

3.10.2 GIOP filter tools 44

3.10.3 Fix IOR: 44

3.10.4 Quick start Interceptor 46

3.10.5 Start Interceptor 49

3.10.6 Stop Interceptor 49

3.11 Utility 50

3.11.1 Ping IOR 50

3.11.2 Parse IOR 51

3.11.3 Merge IOR 51

3.12 Console mode 52

3.12.1 Client Operation Flow 52

3.12.2 Naming service browsing in Console mode 53

3.12.3 Ping/Parse IOR in Console mode 54

3.12.4 Notification Tools 54

3.13 UCS plugin 57

3.13.1 IOpFlowNodePlugin.java 58

3.13.2 IStructureEventActionPlugin.java 59

3.14 How to enable SSL function 61

3.14.1 Key stores 61

3.14.2 Configuring SSL properties 62

3.15 Description of “Notifications” Menu 65

3.16 How to use “CMTreeBrowser” tool 65

4 Appendix 67

4.1 FAQ 67

4.1.1 How to start multi UCS instances on same machine? 67

4.1.2 Why my UCS Plugin can not be executed? 67

4.2 Regular Expression 67

4.2.1 Some Simple patterns 67

4.2.2 Sequences and alternatives 68

4.2.3 Some predefined character classes 68

4.2.4 Boundary matchers 68

4.2.5 Greedy quantifiers 68

4.2.6 Types of quantifiers 69

4.2.7 Quantifier examples 69

4.2.8 Escaping metacharacters 69

4.2.9 Spaces 69

4.3 Tips for UCS Tool Usage 70

4.3.1 Double-click on “Notification Output”table, it will display the detailed info in one Text-window. 70

4.3.2 Double-click one table column title on the “NsManager”table, it will autmatically sort accordlingly. 71

4.3.3 Right-click on the “NsManager”table, it will save the table contents. 71

1  Introduction

1.1  Project history

As CORBA user, we have used many test tools to improve our software developing and testing. However, so far no one can fully satisfy us. So we made a decision to make a super CORBA test tool, which is Ultra CORBA Simulator.

UCS owns extraordinary performance and equips a lot of excellent features. The following description will give you a basic impression.

Ø  Powerful IDL parser

UCS implemented owned IDL parser. So it doesn’t depend on CORBA Interface Repository Service from any vendor. This is the reason why UCS can load project with a lot of IDL files very quickly, while other tools have to take a lot of time to import IDL files into IR Service.

Ø  Friendly User Interface

UCS represents all IDL operations and parameters as tree view. It is rather easy for user to fill parameters even without any training.

Ø  Reused Test Case

The IDL operation with parameters can be saved as XML file. So your test case can be distributed to your team member and reloaded with UCS.

Ø  Automatic Operation Flow

To support automatic test, UCS provides a way to create operation flow. An operation flow contains a set of operations. The operation may have dependency relationship. And also UCS support result match function. So that user can only pay attention to the result. Only if result is not passed you should check the error.
The operation flow could be executed in both GUI mode and console mode.

Ø  Easy Test Script

To extend CORBA Server simulation, if the parameters filled in GUI tree view can not meet your test requirement, you can write script, which follow Java grammar. E.g. you can read some files to give the client reply, or you may give different reply according to different incoming parameter.

Ø  Useful Utilities

To support fault diagnosing during software developing and testing phase UCS provides many useful utilities such as Notification/Naming Service management, GIOP diagnosing, and so on.

For the detail usage, refer to chapter 3.

1.2  Assumptions

Here we assume that you are software developer or tester with basic CORBA knowledge.

1.3  Contact Info& Resources

1.3.1  Project web site:

http://ucs.sourceforge.net

1.3.2  Email address:

1.3.3  Download web site

http://sourceforge.net/projects/ucs/

2  Software Installation

2.1  Installation

Installation is simple; just unzip the zip file (UCS_V1.3.3.zip) to one folder.

The prerequisite to run this application, is that you have the JDK1.4.0.2 or above version in your machine.

2.2  Directory structure

UCSV1.3.3\

+---bin

+---demo

+---doc

+---etc

+---lib

+---oemlib

+---plugin

+---projects

| +---CallBackDemo

| | +---classes

| | | +---Generated Source

| | | +---Money

| | | \---package cache

| | +---dsi

| | | \---src

| | +---etc

| | +---idl

| | +---log

| | +---scripts

| | \---src

| | \---Money

| +---FactoryDemo

| | +---classes

| | | +---Money

| | | \---package cache

| | +---dsi

| | | \---src

| | +---etc

| | +---idl

| | +---log

| | +---scripts

| | \---src

| | \---Money

| +---NotificationDemo

| | +---dsi

| | | \---src

| | +---etc

| | +---idl

| | | \---include

| | +---ior

| | | \---ucs

| | +---log

| | \---scripts

| | +---AttachSequencePushConsumer

| | \---SendOutOneNotification

| +---test

| | +---dsi

| | | \---src

| | +---etc

| | +---idl

| | +---ior

| | | \---ucs

| | +---log

| | \---scripts

| \---TMF

| +---dsi

| | \---src

| +---etc

| +---idl

| | +---omgidl

| | \---tnmsidl

| +---ior

| | \---ucs

| +---log

| \---scripts

+---src

+---template

\---trace

2.3  Configuration

The UCS properties file “CorbaMNQ.properties “is located in etc subfolder, and the project properties file “CorbaMNQ.properties” is located in every project’s etc subfolder.

When UCS opens a project, if it doesn’t find the project properties file, it will use the UCS properties file.

The meaning of each item in the properties file is listed as below:

#################################

# CorbaMNQ configuration

#################################

# The display time for show dynamic Gif welcome picture

# value (less than 0) means no welcome picture show.

# Unit: seconds

# Default value: 3 seconds

# This property is obsolete.

CorbaMNQ.gif.showtime=-1

# The maximum file length for Separate notification log file, if the maximum file length is reached, then a new separate notification

# log file will be created automatically.

# Unit: KBytes

# Normally, if suppose one trap with 1.8 KBytes, then 20MBytes could store more than 10,000 traps.

# Default value: 20000 KBytes (20MBytes)

# Minimum value: 1000 KBytes (1MBtyes)

CorbaMNQ.notification.logfile.maxlength=20000

# Whether to store notifications in file or not

# 1 -- enable, 0 -- disable

# Default value: 1 (enable)

CorbaMNQ.notification.logfile.status=0

# Set the maximum row values for the table which storing the notifications

# Default value: 5000

# Minimum value: 0

CorbaMNQ.notification.logtable.maxrow=5000

# Whether to display the test case output in Client Output window

# True or False

# Default value: True

CorbaMNQ.testcase.outputInClientWindow=True

# Whether to provide the default valid interface value in client input or servant output

# True or False

# Default value: False

CorbaMNQ.idl.defaultInterface=True

# Whether to parse idl quickly, and make the idl browser in "no comments" mode for sub node

# True or False

# Default value: False

CorbaMNQ.idl.deletecomments=False

# Whether to load the customized servant method

# True or False

# Default value: False

CorbaMNQ.dsi.customized=False

# Whether to display the client results in "OperationEntry" view

# True or False

# Default value: True

CorbaMNQ.dii.resultInTree=False

# Whether to display the test case output in "OperationFlow" view

# True or False

# Default value: True

CorbaMNQ.dii.testcaseInTree=True

# Whether to put the output of SequencePushConsumer to "Notification output" table

# True or False

# Default value: True

CorbaMNQ.seqPushConsumerInTable=False

# Assign one Corba Notification Receiver Plug-in Class. User can implement some special function within this plug-in, such as formatted output, etc.

# Default value: None

CorbaMNQ.notification.action.plugin=

# The background color for the GUI interface.

# Integer value

# Default value: -1

CorbaMNQ.background.color=-1

All the above setting could be changed directly in the properties file (using some text editor) or change it directly via the GUI interface.

SettingàConfig setting…

2.4  Running

After your installation, pls. modify the JAVA_HOME property value in the startup scripts, (Windows -- ucs.bat, Unix -- ucs.sh). To make sure that this variable is consistent with your machine setting.

If not set it in the scripts, then UCS will automatically find one available java virtual machine to run it.

The above is the welcome screen that you could choose to open an existing project or create a new project. All newly created projects will be stored in the subfolder “projects”.

Note:

·  When you create a new project, pls. make sure the project name is not an existing one.

·  When you open an existing project, pls. make sure that you have chosen the project file “corba.project”.

Then, you’ll get the following windows:

3  Usage

3.1  Project management

You could create, open or reload one project.

All those operation could be found in the “Project” menu.

3.1.1  Create a project

After you create one new project, the application will create all necessary folders & files for this project (which is stored in ‘projects’ subfolder). You could find one subfolder with the same name as the project name. And then, you could copy all the necessary idl files in the “./projects/ProjectName/idl” folder. (All files with *.idl format under this folder, including subfolders, will be parsed by UCS.) Then you just reload the project, and then you refresh your project data.

Step1: ProjectàNew …

Step2: After creation, you will see

Step 3: copy all the necessary idl files to project’s idl subfolder

Step 4: After reload the project: ProjectàReload, you will see

3.1.2  Open or reload existing project

When you open an existing project, pls. make sure that you have chosen the project file “corba.project”. See below:

In any case that IDL files are changed (e.g. IDL files added, deleted, modified, etc.), you need to reload the project to make it effective immediately. (ProjectàReload)

3.2  CORBA Client Simulation

Simulating client means that generating a CORBA client without coding, and you can use this client to test servers.

Make sure that you have opened a project, and which includes IDL files. For example, we open factory demo project.

3.2.1  Start the server of factory demo

You have to set JAVA_HOME before launch this server, after that what you need to do is double click “Server.bat” which exists in the directory of FactoryDemo.

3.2.2  Attach a IOR to client

Choose Invoice interface, and then client “associate an IOR to selected interface” button.

If you don’t choose an interface named Accounting, and this button will be disabled.

.

.

The following dialog will show.

Click yes button, and choose “MyAccounet.ior”

Press enter.

Choose another interface, and click Accounting interface again. You can see the changes in common output pane.

3.2.3  Invoke operation

You can call get_outstanding_balance operation by right click it.

Following results will be showed in client output pane.

3.2.4  Fill request parameter

By clicking “create_invoice” operation, the right pane can switch to operation entry pane automatically.

You can input data that you want to these text fields. If you don’t know their data types, just see the status bar.

3.2.5  Return an interface type

When you call “create invoice” operation, there would return an interface. Click return value, you will get an object reference.

You can attach IOR to “Invoice” interface, call its operations.

3.2.6  Save test case

You can also save you test case.

The stored file is xml format with “.op” suffix, and can be opened by any text editor (e.g. notepad).