Printer FriendlyEmail Article Link

TTworkbench: How to use the module parameter value in my Test Adapter (TA) in TTworkbench?

Environment/Versions
 TTworkbench 32/64 Bit, Microsoft Windows/Linux
Answer
You can call moduleparameter over TCI interface like below:
Example in TTCN-3:
myModule {
    modulepar integer userID := 123;
}

Example in TA for example port plugin implementation
IntegerValue intValue = ((IntegerValue) getRb().getTciTMProvided().tciGetModulePar(TciModuleParameterIdImpl.valueOf("userID","myModule")));

However this way bypasses the separation of abstract TTCN-3 definition and TA implementation, therefore not recommended.

In the AddressbookExample we call the moduleparameter over TA parameter. In TA parameter the moduleparameters are referenced in $
notation. Please refer to the class Example_AddressBookMessageBased\AddressBookMsgRuntime\com\testingtech\ttcn\tri\AddressBookMsgPortPlu
gin.java, and have a look at the referenced modulepar over Properties > TTCN-3 > Execution > Set test adapter > Next > Next.

Product : TTplugins,Tool Handling