Oracle SOA Suite 11g R1 : Unit-testing the Composite Application - Automated unit testing (part 1) - Creating the unit test

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

Introducing the built-in testing framework

Oracle SOA Suite 11g provides a testing framework that allows you to:

  • Define tests, assertions, and emulations using JDeveloper
  • Run these tests either from the EM console or on the command line using ANT
  • Review the test results from the EM console or as a JUnit report

There are three parts to a test case:

  1. An Initiation of a composite defines the service and operation invoked along with the test data.
  2. Emulation defines the message or fault returned from a reference or component invoked through a synchronous response or a callback without executing the component or referenced service.
  3. An Assertion compares the message or part of the message over an SCA wire against the expected data.

A single test includes definitions of the initiation, emulations, and assertions. The test suite is defined in the composite project and is deployed along with the composite to the server, so it can be initiated from the EM console.

Tutorial: Automated unit testing

The best way to learn how to build and execute a unit test is to try an example.

Modify POProcessing to add a unit test, which sets the inbound message, the simulation message, and two assertions. The inbound message is a valid order with a valid credit card and order total between 1000 and 5000. This triggers the approveLargeOrder process but not the human task.

The simulated message is the message returned from the credit validation service as a VALID response.

The first assertion is on the data being passed to the WriteFile service, checking that the value of status = 'approved', which is the expected value for this input data.

The second assertion is on the data being passed to FulfillmentProcess, checking that the customer ID is 9999—since the customer ID is actually 1111, this test will always fail. This last assertion shows what happens when the data being checked is not the expected value.

Creating the unit test

Use JDeveloper to create a unit test for POProcessing.

  1. Open the POProcessing project in JDeveloper. In the Application navigator expand the SOA Content folder and right-click on the test suites folder.
  2. Select Create Test Suite.
    Creating the unit test
  3. Name the test suite logicTest.
    Creating the unit test
  4. Click on OK.
  5. Name the test TestDelivery.
    Creating the unit test
  6. Click on OK.

Notice that the composite view changes slightly to show you are in Unit Test creation mode now. The swim lanes on the left and right are yellow. You can return to the normal composite editor by selecting the Return to SOA composite diagram button at the top of the window.

  •  SQL Server 2012 : Using SQLdiag Configuration Manager (part 4) - Adding Your Own Custom Collectors,Saving and Using a SQLdiag Configuration
  •  SQL Server 2012 : Using SQLdiag Configuration Manager (part 3) - Feature-Specific Custom Diagnostics, Capturing Extended Events
  •  SQL Server 2012 : Using SQLdiag Configuration Manager (part 2) - Backing Up Diagnostic Data Already Available, Analysis Services Custom Collectors
  •  SQL Server 2012 : Using SQLdiag Configuration Manager (part 1) - Configuring SQLdiag Data Collection Using Diag Manager
  •  SQL Server 2012 : Native File Streaming - Storing and Retrieving FILESTREAM Data
  •  SQL Server 2012 : Native File Streaming - Creating a FILESTREAM-Enabled Database
  •  SQL Server 2012 : Native File Streaming - Enabling FILESTREAM
  •  SQL Server 2012 : Native File Streaming - Traditional BLOB Strategies, Introducing FILESTREAM
  •  SQL Server 2012 : Consolidating Data Capture with SQLdiag - Getting Friendly with SQLdiag (part 2) - Using SQLdiag as a Service
  •  SQL Server 2012 : Consolidating Data Capture with SQLdiag - Getting Friendly with SQLdiag (part 1) - Using SQLdiag as a Command-line Application
    Top 10
    Free Mobile And Desktop Apps For Accessing Restricted Websites
    MASERATI QUATTROPORTE; DIESEL : Lure of Italian limos
    TOYOTA CAMRY 2; 2.5 : Camry now more comely
    KIA SORENTO 2.2CRDi : Fuel-sipping slugger
    How To Setup, Password Protect & Encrypt Wireless Internet Connection
    Emulate And Run iPad Apps On Windows, Mac OS X & Linux With iPadian
    Backup & Restore Game Progress From Any Game With SaveGameProgress
    Generate A Facebook Timeline Cover Using A Free App
    New App for Women ‘Remix’ Offers Fashion Advice & Style Tips
    SG50 Ferrari F12berlinetta : Prancing Horse for Lion City's 50th
    - Messages forwarded by Outlook rule go nowhere
    - Create and Deploy Windows 7 Image
    - How do I check to see if my exchange 2003 is an open relay? (not using a open relay tester tool online, but on the console)
    - Creating and using an unencrypted cookie in ASP.NET
    - Directories
    - Poor Performance on Sharepoint 2010 Server
    - SBS 2008 ~ The e-mail alias already exists...
    - Public to Private IP - DNS Changes
    - Send Email from Winform application
    - How to create a .mdb file from ms sql server database.......
    programming4us programming4us