Ask a Question

Dynamically set JMS Properties from groovy code

SOLVED
qazwsx
Occasional Contributor

Dynamically set JMS Properties from groovy code

Dears,

 

Can you please tell me if there is any way to set JMS Property from groovy code?

soapJMS.png

I tried different ways to find a solution but unfortunately, nothing is working.

I can't use for example something like this ${#TestCase#PROPERTY_NAME}, because the number of JMS properties might be different like also names of properties.

 

Can you please help me with this topic?

19 REPLIES 19
qazwsx
Occasional Contributor

Can you please help me?

qazwsx
Occasional Contributor

Can you please provide an answer?

nmrao
Community Hero

@qazwsx,

What a patience!

What is happening with your script?
What properties would you like to add?


Regards,
Rao.
qazwsx
Occasional Contributor

Is there is any possibility to add JMS Properties dynamically? Because in my case a number of these properties will be different, also a value of the key.

For eg., I will have a data source with the data loop and inside I will have a JMS Request. And during the first iteration

JMS Request will have 2 keys:

Key Value
Key1 Value1
Key2 Value2

and during the second iteration will have 3 keys:

Key Value
Key3 Value3
Key4 Value4
Key5 Value5

and so on.

In some cases, JMS Request might have 0 keys.

 

I'm searching for a solution for this kind case.

nmrao
Community Hero

qazwsx
Occasional Contributor

I'm getting this error:

groovy.lang.MissingPropertyException: No such property: httpRequest for class: com.eviware.soapui.impl.wsdl.teststeps.JMSTestStep error at line: 18

nmrao
Community Hero

@qazwsx ,

 

Difficult to say without more information.

 

Can you please post the result of below statements?

log.info step.metaClass
log.info step.metaClass.methods*.name


Regards,
Rao.
qazwsx
Occasional Contributor

  • Wed Feb 13 11:44:53 CET 2019: INFO: org.codehaus.groovy.runtime.HandleMetaClass@46689895[groovy.lang.MetaClassImpl@46689895[class com.eviware.soapui.impl.wsdl.teststeps.JMSTestStep]]
  • Wed Feb 13 11:44:53 CET 2019: INFO: [equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait, addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, getChildren, getDashboardDbId, getProject, initItemOrder, isNotifyPropertyChanged, notifyPropertyChanged, release, removePropertyChangeListener, removePropertyChangeListener, setDashboardDbId, setNotifyPropertyChanged, afterLoad, afterSave, beforeSave, clearIdCache, dependsOn, getConfig, getDescription, getExternalAction, getExternalDependencies, getIcon, getId, getName, getParent, getSettings, getWsdlModelItemById, getWsdlModelItemByName, initItemOrder, initWsdlModelItemOrder, release, resetConfigOnMove, resolve, setConfig, setDescription, setExternalAction, setIcon, setName, afterCopy, afterCreateFromGUI, cancel, clone, dependsOn, finish, getDefaultSourcePropertyName, getDefaultTargetPropertyName, getLabel, getModelItem, getPropertiesLabel, getRequiredInterfaces, getTestCase, getTestStepTitle, hasEditor, isDisabled, isForLoadTest, prepare, resetConfigOnMove, setDisabled, setName, addTestPropertyListener, firePropertyValueChanged, getProperties, getProperty, getPropertyAt, getPropertyCount, getPropertyList, getPropertyNames, getPropertyValue, hasProperties, hasProperty, moveProperty, moveProperty, propertyRenamed, release, removeTestPropertyListener, setPropertyValue, afterLoad, beforeSave, cancel, getAuthProfileHolder, getConnectionFactoryProducer, getConnectionProducer, getContextProducer, getDestinationProducer, getIcon, getIconAnimator, getMessageConsumerProducer, getRequestStep, getRequiredInterfaces, getSessionProducer, propertyChange, release, run, setConnectionFactoryProducer, setConnectionProducer, setContextProducer, setDestinationProducer, setMessageConsumerProducer, setName, setSessionProducer, addPropertyChangeListener]
nmrao
Community Hero

Thanks. Possible to attach the screen shot of test case?


Regards,
Rao.
cancel
Showing results for 
Search instead for 
Did you mean: