Skip to main content

Source code file content

Revision: 114

» Project Revision History

» Checkout URL

soatestingutilities / ConsolidatedTestEnv / basic-service-test.xml

Size: 30466 bytes, 1 line
<?xml version="1.0" encoding="US-ASCII" ?>
<project name="soa.testing.snippets" default="help" basedir=".">

  <!--property name="windows.browser.location" value="C:\Program Files (x86)\Mozilla Firefox\firefox.exe"/-->
  <!--property name="windows.browser.location" value="C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"/-->
  <property file="master.properties"/>
  <!--property file="env.properties"/-->
  <property environment="env"/>
  
  <condition property="soa.home" value="${env.SOA_HOME}">
    <not>
      <isset property="soa.home"/>
    </not>
  </condition>
  <condition property="mds.integration.home" value="${env.MDS_INTEGRATION_HOME}">
    <!-- Ex: /scratch/software/mw_local/olediour/FMWTOOLS_DROP7.APPS_GENERIC_090530.1629.D07B07A/mw_home/jdeveloper -->
    <not>
      <isset property="mds.integration.home"/>
    </not>
  </condition>
  <condition property="mw.home" value="${env.MW_HOME}">
    <not>
      <isset property="mw.home"/>
    </not>
  </condition>
  <condition property="jdev.home" value="${env.JDEV_HOME}">
    <not>
      <isset property="jdev.home"/>
    </not>
  </condition>
  <condition property="soa.install" value="${env.SOA_INSTALL}">
    <not>
      <isset property="soa.install"/>
    </not>
  </condition>

  <!--property name="java.protocol.handler.pkgs" value="oracle.mds.net.protocol"/-->
  
  <property name="serverURL" value="http://${proxy.name}:${soa.port.number}"/>
  <property name="user" value="${admin.user}"/>
  <property name="password" value="${admin.password}"/>

  <property name="oracle.home" value="${mds.integration.home}"/>
  
  <property name="top.dir" value="${basedir}/.."/>

  <!--property name="test.output.type" value="plain"/-->
  <property name="test.output.type" value="xml"/>

  <property file="build.properties"/>
  <path id="library.test.util">
    <pathelement location="lib/junit-4.5.jar"/>
    <pathelement location="lib/xmlunit-1.3.jar"/>
    <pathelement location="lib/dom4j-1.6.1.jar"/>
    <pathelement location="lib/jsyntaxpane-0.9.5-b29.jar"/>
    <pathelement location="../ConsolidatedTestEnv/deploy/ConsolidatedTestEnv.jar"/>
  </path>
  <path id="library.Oracle.XML.Parser.v2">
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.xdk_11.1.0/xmlparserv2.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.xdk_11.1.0/xml.jar"/>
  </path>
  <path id="library.SOA.Runtime">
    <pathelement location="${oracle.home}/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar"/>
    <pathelement location="${oracle.home}/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.fabriccommon_11.1.1/fabric-common.jar"/>
  </path>
  <path id="library.BPM.Workflow">
    <pathelement location="${oracle.home}/soa/modules/oracle.soa.workflow_11.1.1/bpm-services.jar"/>
    <pathelement location="${oracle.home}/soa/modules/oracle.soa.fabric_11.1.1/bpm-infra.jar"/>
    <!--pathelement location="${oracle.home}/integration/lib/orabpel.jar"/-->
    <!--pathelement location="${oracle.home}/lib/xml.jar"/>
    <pathelement location="${oracle.home}/lib/xmlparserv2.jar"/-->
  </path>
  <path id="library.WebLogic.10.3.Remote-Client">
    <pathelement location="${jdev.home}/wlserver_10.3/server/lib/weblogic.jar"/>
  </path>
  <path id="library.Oracle.JAX-WS.Client">
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.webservices_11.1.1/wsclient.jar"/>
  </path>
  <path id="library.Java.EE.1.5">
    <pathelement location="${jdev.home}/modules/javax.activation_1.1.0.0_1-1.jar"/>
    <pathelement location="${jdev.home}/modules/javax.ejb_3.0.1.jar"/>
    <pathelement location="${jdev.home}/modules/javax.jms_1.1.1.jar"/>
    <pathelement location="${jdev.home}/modules/javax.transaction_1.0.0.0_1-1.jar"/>
    <pathelement location="${jdev.home}/modules/javax.mail_1.1.0.0_1-4-1.jar"/>
    <pathelement location="${jdev.home}/modules/javax.servlet_1.0.0.0_2-5.jar"/>
    <pathelement location="${jdev.home}/modules/javax.jsp_1.2.0.0_2-1.jar"/>
    <pathelement location="${jdev.home}/modules/javax.xml.rpc_1.2.1.jar"/>
    <!--pathelement location="${jdev.home}/modules/com.oracle.ws.http_client_1.3.0.0.jar"/-->
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.webservices_11.1.1/wsclient.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.webservices_11.1.1/wsserver.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.webservices_11.1.1/wssecurity.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.webservices_11.1.1/orasaaj.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.webservices_11.1.1/orawsrm.jar"/>
    <pathelement location="${oracle.home}/webservices/lib/orawsrel.jar"/>
    <pathelement location="${jdev.home}/modules/javax.management.j2ee_1.0.jar"/>
    <pathelement location="${jdev.home}/modules/com.bea.core.weblogic.saaj_1.6.0.0.jar"/>
    <pathelement location="${oracle.home}/webservices/lib/xsdlib.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.webservices_11.1.1/wsif.jar"/>
    <pathelement location="${jdev.home}/modules/javax.xml.stream_1.0.0.0.jar"/>
    <pathelement location="${oracle.home}/webservices/lib/oc4j-schemas.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.odl_11.1.1/ojdl.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.odl_11.1.1/ojdl2.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_wss.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_xmlsec.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_core.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_cert.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_saml.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_saml2.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/org.jaxen_1.1.1.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.iau_11.1.1/fmw_audit.jar"/>
    <pathelement location="${jdev.home}/modules/javax.management.remote_1.0.1.3.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.jmx_11.1.1/jmxframework.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.jmx_11.1.1/jmxspi.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.dms_11.1.1/dms.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.fabriccommon_11.1.1/fabric-common.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.nlsrtl_11.1.0/orai18n.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/org.apache.commons.digester_1.8.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/org.springframework_2.5.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.javatools_11.1.1/javamodel-rt.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.javatools_11.1.1/javatools-nodeps.jar"/>
    <pathelement location="${jdev.home}/modules/org.eclipse.persistence_1.1.0.0_2-1.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/commonj.sdo_2.1.0.jar"/>
    <pathelement location="${jdev.home}/modules/javax.mail_1.4.jar"/>
  </path>
  <path id="library.JAX-RPC.Client">
    <pathelement location="${oracle.home}/webservices/lib/jaxrpc-api-10.1.3.jar"/>
    <pathelement location="${oracle.home}/webservices/lib/wsclient-10.1.3.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.webservices_11.1.1/wsserver.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.webservices_11.1.1/wssecurity.jar"/>
    <pathelement location="${oracle.home}/webservices/lib/wsdl.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.webservices_11.1.1/orasaaj.jar"/>
    <pathelement location="${jdev.home}/modules/com.bea.core.weblogic.saaj_1.6.0.0.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.webservices_11.1.1/orawsdl.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.webservices_11.1.1/orawsrm.jar"/>
    <pathelement location="${oracle.home}/webservices/lib/orawsrel.jar"/>
    <pathelement location="${jdev.home}/modules/javax.xml.registry_1.0.0.0_1-0.jar"/>
    <pathelement location="${oracle.home}/webservices/lib/orajaxr.jar"/>
    <pathelement location="${oracle.home}/webservices/lib/xsdlib.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.webservices_11.1.1/mdds.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.webservices_11.1.1/wsif.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.fabriccommon_11.1.1/fabric-common.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/org.jaxen_1.1.1.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.pki_11.1.1/oraclepki.jar"/>
    <pathelement location="${oracle.home}/webservices/lib/ojpse.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_core.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_cert.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_xmlsec.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_wss.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_saml.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_saml2.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.ldap_11.1.1/ojmisc.jar"/>
    <!--pathelement location="${jdev.home}/modules/com.oracle.ws.http_client_1.3.0.0.jar"/-->
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.xdb_11.1.0.jar"/>
    <pathelement location="${jdev.home}/modules/javax.management.j2ee_1.0.jar"/>
    <pathelement location="${jdev.home}/modules/javax.management_1.2.1.jar"/>
    <pathelement location="${jdev.home}/modules/javax.xml.stream_1.0.0.0.jar"/>
    <pathelement location="${jdev.home}/modules/glassfish.jaxb_1.0.0.0_2-1-12.jar"/>
    <pathelement location="${jdev.home}/modules/glassfish.jaxb.xjc_1.0.0.0_2-1-12.jar"/>
    <pathelement location="${oracle.home}/webservices/lib/oc4j-schemas.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.odl_11.1.1/ojdl.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.odl_11.1.1/ojdl2.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.iau_11.1.1/fmw_audit.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.jmx_11.1.1/jmxframework.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.jmx_11.1.1/jmxspi.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.dms_11.1.1/dms.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.nlsrtl_11.1.0/orai18n.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/org.apache.commons.digester_1.8.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/org.springframework_2.5.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.wsm.common_11.1.1/wsm-policy-core.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.wsm.common_11.1.1/wsm-pmlib.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.wsm.agent.common_11.1.1/wsm-pap.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.wsm.agent.common_11.1.1/wsm-agent.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.wsm.common_11.1.1/wsm-secpol.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.javatools_11.1.1/javamodel-rt.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.javatools_11.1.1/javatools-nodeps.jar"/>
    <pathelement location="${jdev.home}/modules/javax.mail_1.4.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.xdk_11.1.0/xmlparserv2.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.webservices_11.1.1/lwdom.jar"/>
    <pathelement location="${jdev.home}/modules/com.bea.core.woodstox_1.0.0.0_4-0-5.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.jps_11.1.1/jps-api.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.jps_11.1.1/jps-common.jar"/>
  </path>
  <path id="library.BC4J.Security">
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.ldap_11.1.1/ldapjclnt11.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.jps_11.1.1/jps-api.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.jps_11.1.1/jps-common.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.jps_11.1.1/jps-ee.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.jps_11.1.1/jps-internal.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.jps_11.1.1/jps-unsupported-api.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.jps_11.1.1/jps-manifest.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.jps_11.1.1/jacc-spi.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.pki_11.1.1/oraclepki.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_core.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_cert.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_xmlsec.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.osdt_11.1.1/osdt_ws_sx.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.iau_11.1.1/fmw_audit.jar"/>
    <pathelement location="${jdev.home}/modules/javax.security.jacc_1.0.0.0_1-1.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.idm_11.1.1/identitystore.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.adf.share_11.1.1/adf-share-support.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.adf.share.ca_11.1.1/adf-share-ca.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.adf.share.ca_11.1.1/adf-share-base.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.adf.security_11.1.1/adf-share-security.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.xdk_11.1.0/xmlparserv2.jar"/>
    <pathelement location="${jdev.home}/modules/javax.activation_1.1.0.0_1-1.jar"/>
  </path>
  <path id="library.SOA.Workflow">
    <pathelement location="${oracle.home}/soa/modules/oracle.soa.workflow_11.1.1/bpm-services.jar"/>
    <pathelement location="${oracle.home}/soa/modules/oracle.soa.bpel_11.1.1/orabpel-common.jar"/>
    <pathelement location="${oracle.home}/soa/modules/oracle.soa.bpel_11.1.1/orabpel.jar"/>
    <pathelement location="${oracle.home}/soa/modules/oracle.soa.fabric_11.1.1/bpm-infra.jar"/>
    <pathelement location="${oracle.home}/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar"/>
  </path>
  <path id="library.Wsclient_extended.jar">
    <pathelement location="${jdev.home}/oracle_common/webservices/wsclient_extended.jar"/>
  </path>
  <path id="classpath">
    <pathelement location="./classes"/>
    <!--pathelement location="${jdev.home}/oracle_common/modules/oracle.xdk_11.1.0/xmlparserv2.jar"/>
    <pathelement location="${jdev.home}/oracle_common/modules/oracle.xdk_11.1.0/xml.jar"/-->
    <path refid="library.test.util"/>
    <path refid="library.Oracle.XML.Parser.v2"/>
    <path refid="library.SOA.Runtime"/>
    <path refid="library.BPM.Workflow"/>
    <path refid="library.WebLogic.10.3.Remote-Client"/>
    <path refid="library.Oracle.JAX-WS.Client"/>
    <path refid="library.Java.EE.1.5"/>
    <path refid="library.test.util"/>
    <path refid="library.JAX-RPC.Client"/>
    <path refid="library.BC4J.Security"/>
    <path refid="library.SOA.Workflow"/>
    <path refid="library.Wsclient_extended.jar"/>
  </path>

  <taskdef name="resolve.classpath" 
           classname="testing.util.ClasspathTask" 
           classpathref="classpath"/>

  <target name="all" 
          depends="init, deploy.composite, unit.test, report, undeploy.composite" 
          description="Does all the stuff.">
    <echo message="Done!"/>
  </target>
  
  <target name="init">
    <echo message="Several variables are required for the deployment steps."/>
    <echo message="Java Runtime Environment version: ${java.version}"/>
    <echo message="Java Home: ${java.home}"/>
    <!--echo message="Classpath: ${java.class.path}"/-->

    <fail message="oracle.home is not set.">
      <condition>
        <not><isset property="oracle.home"/></not>
      </condition>
    </fail>

    <fail message="serverURL is not set!">
      <condition>
        <not><isset property="serverURL"/></not>
      </condition>
    </fail>
    <fail message="user is not set!">
      <condition>
        <not><isset property="user"/></not>
      </condition>
    </fail>
    <fail message="password is not set!">
      <condition>
        <not><isset property="password"/></not>
      </condition>
    </fail>
    <echo message="...required variables are set, moving on."/>
    <!--mkdir dir="${output.dir}"/-->
    <!-- Checking classpath -->
    <resolve.classpath verbose="false" 
                       haltonfailure="yes" 
                       failureproperty="classpath.fails">
      <path refid="classpath"/>                       
    </resolve.classpath>                       
  </target>
  
  <!-- Reusable variables, for the different test patterns -->
  <property name="ASYNC.ONE.WAY"  value="unittests.patterns.services.AsynchronousOneWayUnitTest"/>
  <property name="SYNCHRONOUS"    value="unittests.patterns.services.SynchronousServiceUnitTest"/>
  <property name="ASYNC.TWO.WAYS" value="unittests.patterns.services.AsynchronousTwoWayUnitTest"/>
  
  <!--
   !  Main targets
   +-->
  <target name="package.composite" unless="composite.jar.exists">
    <echo message="Packaging Composite SOACompositeForInstallationTests"/>
    <ant antfile="${soa.home}/bin/ant-sca-package.xml" dir="${soa.home}/bin" inheritall="false">
      <property name="oracle.home" value="${oracle.home}"/>
      <property name="scac.application.home" value="${top.dir}"/>
      <property name="compositeDir" value="${top.dir}/SOACompositeForInstallationTests"/>
      <property name="compositeName" value="SOACompositeForInstallationTests"/>
      <property name="revision" value="1.0"/>
    </ant>
  </target>

  <target name="deploy.composite" depends="init">
    <property name="composite.sar.file" value="../SOACompositeForInstallationTests/deploy/sca_SOACompositeForInstallationTests_rev1.0.jar"/>
    <available property="composite.jar.exists" type="file" file="${composite.sar.file}"/>
    <antcall target="package.composite"/>
    <echo>
      ==========================
       Step One
       Deploying Composite SOACompositeForInstallationTests
      ==========================
    </echo>
    <ant antfile="${soa.home}/bin/ant-sca-deploy.xml" target="deploy">
      <property name="sarLocation" value="${composite.sar.file}"/>
      <property name="overwrite" value="true"/>
    </ant>
  </target>
        
  <target name="undeploy.composite" depends="init">
    <echo>
      ==========================
       Step One bis
       Undeploying Composite SOACompositeForInstallationTests
      ==========================
    </echo>
    <ant antfile="${soa.home}/bin/ant-sca-deploy.xml" inheritall="false" target="undeploy">
      <property name="serverURL" value="${serverURL}"/>
      <property name="user" value="${user}"/>
      <property name="password" value="${password}"/>
      <property name="compositeName" value="SOACompositeForInstallationTests"/>
      <property name="revision" value="1.0"/>
    </ant>
  </target>
  
  <target name="unit.test" 
          depends="init, unit.test.async.1.way, unit.test.synchronous, unit.test.asynchronous.2.ways, unit.test.asynchronous.2.ways.with.timeout, report"
          description="Unit tests on the deployed services."/>
    
  <target name="unit.test.async.1.way">
    <echo>
    ====================================
    Testing Asynchronous One Way Service
    proxy.name=${proxy.name}
    soa.port.number=${soa.port.number}
    ====================================
    outputfile: asynchronous
    </echo>
    <junit printsummary="yes" fork="yes" showoutput="yes" failureproperty="asynchronous.1.fail">      
      <classpath refid="classpath"/>
      <formatter type="xml"/>
      <sysproperty key="verbose" value="${verbose}"/>
      <!--sysproperty key="oracle.security.jps.config" value="../security/config/jps-config.xml"/-->
      <sysproperty key="properties.file.name" value="generic-service-test-async-one-way.properties"/>
      <sysproperty key="display.traffic.gui" value="yes"/>
      <test name="${ASYNC.ONE.WAY}" haltonfailure="no" outfile="asynchronous"/>
    </junit>    
    <antcall target="in.case.asynchronous.1.fails"/>
  </target>

  <target name="in.case.asynchronous.1.fails" if="asynchronous.1.fail">
    <!--exec dir="." executable="cat">
      <arg line="asynchronous.txt"/>
    </exec-->
    <echo>
      -- Check out asynchronous.xml
    </echo>
    <!--fail message="ASynchronous Test stopped the process"/-->
  </target>

  <target name="unit.test.synchronous">
    <echo>
    ====================================
    Testing Synchronous Service
    ====================================
    outputfile: synchronous
    </echo>
    <junit printsummary="yes" fork="yes" showoutput="yes" failureproperty="synchronous.fail">      
      <classpath refid="classpath"/>
      <formatter type="xml"/>
      <sysproperty key="verbose" value="${verbose}"/>
      <sysproperty key="properties.file.name" value="generic-service-test-synchronous.properties"/>
      <sysproperty key="display.traffic.gui" value="yes"/>
      <test name="${SYNCHRONOUS}" haltonfailure="no" outfile="synchronous"/>
    </junit>    
    <antcall target="in.case.synchronous.fails"/>
  </target>

  <target name="in.case.synchronous.fails" if="synchronous.fail">
    <!--exec dir="." executable="cat">
      <arg line="synchronous.txt"/>
    </exec-->
    <echo>
      -- Check out synchronous.xml
    </echo>
    <!--fail message="Synchronous Test stopped the process"/-->
  </target>

  <target name="unit.test.asynchronous.2.ways">
    <echo>
    =====================================
    Testing ASynchronous Two Ways Service
    =====================================
    outputfile: asynchronous.2
    </echo>
    <junit printsummary="yes" fork="yes" showoutput="yes" failureproperty="asynchronous.2.fail">      
      <classpath refid="classpath"/>
      <formatter type="xml"/>
      <sysproperty key="verbose" value="${verbose}"/>
      <sysproperty key="properties.file.name" value="generic-service-test-async-two-way.properties"/>
      <sysproperty key="display.traffic.gui" value="yes"/>
      <test name="${ASYNC.TWO.WAYS}" haltonfailure="no" outfile="asynchronous.2"/>
    </junit>    
    <antcall target="in.case.asynchronous.2.fails"/>
  </target>

  <target name="in.case.asynchronous.2.fails" if="asynchronous.2.fail">
    <!--exec dir="." executable="cat">
      <arg line="asynchronous.2.txt"/>
    </exec-->
    <echo>
      -- Check out asynchronous.2.xml
    </echo>
    <!--fail message="ASynchronous Two Ways Test stopped the process"/-->
  </target>

  <target name="unit.test.asynchronous.2.ways.with.timeout">
    <echo>
    =====================================
    Testing ASynchronous Two Ways Service
    With timeout
    =====================================
    outputfile: asynchronous.2.to
    </echo>
    <junit printsummary="yes" fork="yes" showoutput="yes" failureproperty="asynchronous.2.to.fail">      
      <classpath refid="classpath"/>
      <formatter type="xml"/>
      <!--sysproperty key="verbose" value="${verbose}"/-->
      <sysproperty key="verbose" value="${verbose}"/>
      <sysproperty key="properties.file.name" value="generic-service-test-async-two-way.with-timeout.properties"/>
      <test name="${ASYNC.TWO.WAYS}" haltonfailure="no" outfile="asynchronous.2.to"/>
    </junit>    
    <antcall target="in.case.asynchronous.2.to.fails"/>
  </target>

  <target name="in.case.asynchronous.2.to.fails" if="asynchronous.2.to.fail">
    <!--exec dir="." executable="cat">
      <arg line="asynchronous.2.to.txt"/>
    </exec-->
    <!--fail message="ASynchronous Two Ways (timeout) Test stopped the process"/-->
    <echo message="ASynchronous Two Ways (timeout) Test failed!"/>
  </target>

  <target name="test.discoverer" depends="init">
    <echo>
    ====================================
    Test Discoverer
    ====================================
    outputfile: test.discoverer.txt
    verbose=${verbose}
    </echo>  
    <junit printsummary="yes" fork="yes" showoutput="yes" failureproperty="test.discoverer.fail">      
      <classpath refid="classpath"/>
      <formatter type="plain"/>
      <sysproperty key="verbose" value="${verbose}"/>
      <sysproperty key="project.directory" value="."/>
      <!--test name="unittests.discovery.DiscovererSample" haltonfailure="no" outfile="test.discoverer"/-->
      <sysproperty key="test.definition.file.name" value="test.suite.definition.hwf.properties"/>
      <test name="unittests.discovery.TestDiscoverer" haltonfailure="no" outfile="test.discoverer"/>
      <!--test name="unittests.discovery.HWFTestDiscoverer" haltonfailure="no" outfile="test.discoverer"/-->
    </junit>    
    <antcall target="in.case.discoverer.fails"/>
  </target>
  <target name="in.case.discoverer.fails" if="test.discoverer.fail">
    <echo>
      -- Check out test.discoverer.txt
    </echo>
    <!--exec dir="." executable="./dump">
      <arg line="test.discoverer.txt"/>
    </exec-->
    <fail message="Test Discoverer stopped the process"/>
  </target>

  <target name="report" depends="init">
    <java classpathref="classpath" classname="report.Aggregator" fork="yes">
      <arg value="final-report.xml"/>
      <arg value="synchronous.xml"/>
      <arg value="asynchronous.xml"/>
      <arg value="asynchronous.2.xml"/>
      <arg value="asynchronous.2.to.xml"/>
    </java>
    <!-- Now transform -->
    <java classpathref="classpath" classname="oracle.xml.parser.v2.oraxsl" fork="yes">
      <arg value="./final-report.xml"/>
      <arg value="report2html.xsl"/>
      <arg value="testreport.html"/>
    </java>    
    <java classpathref="classpath" classname="oracle.xml.parser.v2.oraxsl" fork="yes">
      <arg value="./final-report.xml"/>
      <arg value="report2text.xsl"/>
      <arg value="testreport.txt"/>
    </java>    
    <!-- Then display -->
    <echo message="Displaying testreport.html..."/>
    <exec dir="." executable="htmlview" osfamily="unix" spawn="yes">
      <arg value="testreport.html"/>
    </exec>
    <!--exec dir="." executable="${windows.browser.location}" osfamily="windows" spawn="yes">
      <arg value="testreport.html"/>
    </exec-->
    <exec dir="." executable="cmd" osfamily="windows" spawn="yes">
      <arg value="/k"/>
      <arg value="start"/>
      <arg value="testreport.html"/>
    </exec>
    <!--exec dir="." executable="cat">
      <arg value="testreport.txt"/>
    </exec-->
  </target>
  
  <target name="help">
    <echo encoding="UTF-8">
      Try this: 
        ant -f basic-service-test.xml usage.help
        ant -f basic-service-test.xml -projecthelp -verbose
    </echo>
  </target>

  <target name="usage.help" description="Details of the components used for the various tests">
    <echo encoding="UTF-8">
    All deploy tasks are depending on the package tasks. If a composite to deploy is not packaged yet, it will be
    packaged automatically (ie you don't have to run the package task explicitely).
    
    Asynchronous Services Testing
    =============================
    package.composite, deploy.composite, undeploy.composite are necessary for Asynchronous Service testing.
    Corresponding tests are 
    - unit.test.async.1.way (asynschronous one way)
    - unit.test.asynchronous.2.ways (asynchronous two ways)
    - unit.test.asynchronous.2.ways.with.timeout (asynchronous two ways with timeout)
    
    Synchronous Service Testing
    ===========================
    package.composite, deploy.composite, undeploy.composite are necessary for Synchronous Service testing.
    Corresponding test is unit.test.synchronous
    
    Test Discovery and Assembly
    ===========================
    This is an example of dynamically generated JUnit Test Suite.
    This one assembles to UnitTests related to a HumanWorkflow.
    The composite to deploy is part of the SOATestInstaller project. A task assigned to 'weblogic'
    must be available for the tests to complete sucessfully.
    Target is test.discoverer.
    
    Parallel Task Sample
    ====================
    Target is parallel.tasks.
    It is provided as a sample.
    
    All the tests
    =============
    Target is all. It deploys, runs, reports, and undeploys.
        
    For details, use ant -f basic-service-test.xml -verbose -projecthelp
    </echo>
  </target>
  
  <target name="parallel.tasks">
    <echo message="1. Start worker"/>
    <java classpathref="classpath" classname="testing.util.http.SampleMain">
      <arg line="-verbose on"/>
      <arg line="-port 3456"/>
      <arg line="-nbloop 100"/>
    </java>
    <echo message="2. Wait... (Simulate parallel work)"/>
    <java classpathref="classpath" fork="yes" classname="testing.util.http.WasteTime">
      <arg line="-wait 15000"/>
    </java>
    <echo message="3. Kill them all"/>
    <java classpathref="classpath" fork="yes" classname="testing.util.http.Terminator">
      <arg line="-port 3456"/>
      <arg line="-verbose off"/>
    </java>
    <echo message="4. Done"/>
  </target>
  
</project>
 
 
Close
loading
Please Confirm
Close