Forum Discussion
nmrao
4 years agoChampion Level 3
would you please show what you have tried? and the available environments?
- sjakovac4 years agoOccasional Contributor
I can get an active environment using
def env = context.testCase.testSuite.project.getActiveEnvironment()
But I can not access Kafka service /endpoint like it's suggested for REST/SOAP service.
For example, after the previous line none of the following works:
def kafkaService = env.getService('Name of kafka service', com.eviware.soapui.config.ServiceConfig.Type.Enum.forString("KAFKA")) def kafkaService = env.getKafkaServiceAt(0)
Autocomplete/code-suggestion is not of any help so I don't know what else is available through env object. When I run following to try to discover something:
env.getProperties().each { name, val -> log.info(name + ': ' + val) }
Output is:
My environment setup is: