Skip to content

Instantly share code, notes, and snippets.

@ryoben
Created June 16, 2012 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryoben/2941489 to your computer and use it in GitHub Desktop.
Save ryoben/2941489 to your computer and use it in GitHub Desktop.
build.xml for OpenScript(Oracle Functional Testing) called by Jenkins
<?xml version="1.0" encoding="UTF-8"?>
<project name="opensctipTest" default="openScript" basedir=".">
<!-- OpenScript command line bat -->
<property name="runScript" location="D:\Oracle\oats\openScript\runScript.bat"/>
<!-- Copy OpenScript HTML report for HTML Publisher plugin -->
<property name="tmpDir" location=".\results\tmp"/>
<!-- Test Script name -->
<property name="scriptName1" location=".\test.jwg"/>
<target name="init">
<delete dir="${tmpDir}"/>
<mkdir dir="${tmpDir}"/>
<!-- OpenScript HTML result report's DirName is "Session[increment No]". Using build.number -->
<buildnumber/>
<property name="resultDir" value=".\results\Session${build.number}"/>
<echo message="${resultDir}"/>
</target>
<target name="openScript" depends="init">
<!-- Run -->
<exec executable="${runScript}">
<arg value="${scriptName1}"/>
</exec>
<!-- Overview.properties has result information of test. output this file since ver12.1.0.1.0 -->
<property file="${resultDir}\overview.properties"/>
<!-- for HTML Publisher plugin. run next step in Jenkins -->
<copy todir="${tmpDir}">
<fileset dir="${resultDir}"/>
</copy>
<!-- outcome property exist in overview.properties. set result : "Failed" or "Passed" -->
<fail message="Script result :${outcome}">
<condition>
<not>
<equals arg1="${outcome}" arg2="Passed"/>
</not>
</condition>
</fail>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment