Wednesday, December 3, 2008

Testing with Oracle BPEL - part 2

The writing of BPEL tests is done in JDeveloper, in a window which is similar to the BPEL process design. The tests are not coded with BPEL language and are not a standard as BPEL.

The testing language
The test design can be done by the designer or directly by writing XML tags, which is not really convenient, but there are some testing functionnalities not supported by the designer. That's why I will explain the main tags and attributes and their functions right now.

XMLtags & attributs Function/ Description
<BPELTest> Document root
<initiate @operation> Specify the behaviour of the test process instanciationreferencing a WSDL operation
<include> Include some other test (like a baseline)
<inboundMessage> Specify the incoming message
<emulate> Specify the activity is emulatedNotice : The <initiate> is always emulated
<activityDriver @activity> Do an action on an BPEL activity
<assertXML @variable,@part,@method> Assert the content of a XML variableaccording the method used (identical, similar)
<assertActivityExecuted @activity> Assert the number an activity is executed
<assertValue @var,@part,@method> Assert the content of a value variable (regexp, exactmatching)
<triggerOnMessage @onMessageName> Allow to emulate an incoming message on onMessageactivity (pick or onMessage)
<triggerOnAlarm @onAlarmName> Allow to emulate and trigger onAlarm activity

The above list is not complete, but it contains the main tags you will deal with.

Here is the hierachy in these tags :

If you want to have a overview of all the tags, you can consult the XML schema of the BPEL test language ($BPEL_HOME/bpel/system/xmllib/InstanceDriver.xsd)

With all this stuff, we'll able to do :
  • assert tests
    • XML variables asserts
    • values variables asserts
    • execution number asserts
  • emulation tests
    • incoming messages
    • invoke/receive/reply emulations (synchronous and asynchronous)
    • fault messages
    • on alarm triggers
Okay, next time, we'll do our first BPEL test.

1 comment:

sap upgrade testing said...

I find your post useful because this is about testing with Oracle BPEL. I have interest in testing rather than development. I understand the given concept in one time because I already have knowledge about it and other reason is you explained it very well.