Pages

Sunday, August 10, 2014

Test your WebLogic 12.1.3 enviroment with Robot

Robot Framework is a generic test automation framework which has an easy-to-use tabular test data syntax and it utilizes the keyword-driven testing approach. This means we can write our tests in readable and understandable text.

If we combine this with the REST Management interface of WebLogic 12.1.3 we are able to test every detail of a WebLogic domain configuration and when we combine this with selenium or other Robot plugins we can also test our Web Applications or REST/Web Services.

So after all your provisioning and application deployments actions we can test our new environment in just a few minutes and Administrators or Testers can make or extend these tests without any developer knowledge.

Here is an example of some WebLogic domain tests


The only thing a developer should do, is to use make these test sentences, so called keywords

Here is the matching keyword example


Off course you don't need to use keywords but then you will get something like this. :-)


For this we need to enable the REST Management interface Weblogic 12.1.3 ( WebLogic Console -> Domain -> General -> Advanced -> Enable RESTful Management Services ) and install the robotframework-requests add-on.

Click here for more information about the WebLogic REST management service and you can use Postman ( a Chrome plugin)  to test your REST calls.

Next we can add our tests & keywords in a subfolder.



And run pybot rest_testsuites



With this as output


The detail report 




With the Selenium plugin (robotframework-selenium2library ) we can also test a web application deployed on a WebLogic server. In this example I will use the WebLogic Console application to test the selenium plugin.

run pybot console_testsuites


Our test


The matching resource file with the keywords.



For more information about Robot in combination with WebLogic you can also read the great blogs of my colleague Mark Nelson http://redstack.wordpress.com/tag/robot/

Here you can download the github workspace https://github.com/biemond/robot-weblogic

Enjoy

Thursday, August 7, 2014

Create with WLST a SOA Suite, Service Bus 12.1.3 Domain

When you want to create a 12.1.3 SOA Suite, Service Bus Domain, you have to use the WebLogic config.sh utility.  The 12.1.3 config utility is a big improvement when you compare this to WebLogic 11g. With this I can create some complex cluster configuration without any after configuration.
But if you want to automate the domain creation and use it in your own (provisioning) tool/script then you can use the following scripts to create a normal SOA Suite, Service Bus domain together with BPM, BAM & the Enterprise scheduler options.

Off course!!! use this script only for development, do some intensive testing on this domain and don't use this script in production or acceptance ( use the supported config.sh utility).

The second part of this blog we will create a cluster configuration with a WLST offline script.

Before we can start we need to have a FMW database repository.  You can use the RCU utility ( MDW_HOME/oracle_common/bin/rcu) to create one.

Enable the following options



Here you can also see the improvements in the 12c FMW domain creation like

  • ServerGroups, an easy way of assigning libraries,  applications and datasources to managed servers and clusters. It will auto-detect if a managed server is part of a cluster :-)
  • Service Table Datasource together with the getDatabaseDefaults() function, no need to change all the datasources. It will re-use the RCU configuration data.


Use this to start the creation of our domain.
MDW_HOME/oracle_common/common/bin/wlst.sh soa_domain_1213.py

Here we need to do some extra configuration like

  • Change a few datasources so they will use the Oracle XA driver

With this as output.



When you want to create a cluster configuration you can use the following script.