Dynamically set JMS Properties from groovy code
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
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?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you please help me?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you please provide an answer?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What a patience!
What is happening with your script?
What properties would you like to add?
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@qazwsx ,
Can you please refer the below script?
https://github.com/nmrao/soapUIGroovyScripts/edit/master/groovy/jms/SetJMSProperties.groovy
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 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]
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regards,
Rao.
