Configuring JMX for Wildfly in SoapUI Regression Test

Setting JAVA_OPTS

In the standalone configuration file (${JBOSS_HOME}/bin/standalone.conf in Linux, ${JBOSS_HOME}/bin/standalone.conf.bat in Windows, append the following and localize each statement based on your target OS:

Window:

set "JAVA_OPTS=%JAVA_OPTS% -Dorg.connectopensource.enablejmx=true"

Unix:

JAVA_OPTS="$JAVA_OPTS -Dorg.connectopensource.enablejmx=true"

Copying wildfly JMX artfiact into SOAP UI library

Copy jboss-cli-client.jar from (${JBOSS_HOME}/bin/client into SOAPUI Home Library ${soapUI_HOME}/lib

Add New User Account for JMX testing

Navigate to ${JBOSS_HOME}/bin and execute the following command to add new user account for JMX testing:

Window:

add-user.bat -s <username> <password>

Unix:

add-user.sh -s <username> <password>

NOTE: Preferred username, password to use are : admin/adminadmin



Modifying SOAPUI Regression Tests:

In each soapUI regression test, modify as following:

  • Update serverURL in soapUI project in Load Script test:

    • Replace def serverUrl = 'service:jmx:rmi://' + jmxHost + ':' + jmxPort + '/jndi/rmi://' + jmxHost + ':' + jmxPort + '/jmxrmi';
      with def serverUrl = 'service:jmx:http-remoting-jmx://'+jmxHost+ ':' + jmxPort;

  • Update project properties based on wildfly server setting:

    • "ASUsername"→wildfly username in ManagementRealm <you find under ${JBOSS_HOME}/standalone/configuration/mgmt-users.properties>

    • ASPassword→wildlfy password.

    • JMXHost→Ex: localhost

    • JMXPort→ wildfly management port number: Ex: 9990

  • Reload soapUI project.

[verified: JMX-services]

  • Goto: %WILDFLY_HOME%/bin/jconsole.bat

  • Remote-Process: <code>service:jmx:http-remoting-jmx://localhost:9990</code>

  • Under: admin/adminadmin

  • Goto: MBeans-tab: look-for: org.connectopensource.mbeans, Object:Configuration

  • MBeanInfo > ObjectName: org.connectopensource.mbeans:type=Configuration