RUN ABL unit using ANT with DB connection

Posted by ankitagrawal1234 on 12-Mar-2019 11:52

Hi Folks,

I am trying to run ABL test suit by using ANT script. I need DB connection while running this test suit build is not working with DB connection.

Here is my build.xml:

<target name="abldef">
<typedef name="ablunit" classname="com.progress.openedge.ant.ablunit.ABLUnitTask"
classpath="dist/ant-ablunit.jar" />
</target>


<target name="ablunittests" depends="abldef" if="isWindows">
<mkdir dir="${basedir}/tmpdir"/>
<ablunit dlc="${env.DLC}" environment="tty"
printsummary="true" haltonerror="no" haltonfailure="no" tempdir="${basedir}/tmpdir">
<propath>
<pathelement refid="lybridge-build-propath"/>
<pathelement path="${pso}"/>
<pathelement refid="server-build-propath"/>
<pathelement location="${basedir}/Test" />
<pathelement location="${basedir}/Test/npui" />
</propath>

<dbinfo name="testDb.db" host="localhost" />

<test name="${basedir}/Test/Testsuite.cls" todir="${basedir}" outfile="result-Testsuite" format="xml" />
</ablunit>
</target>

I also tried by using PCTConnection statement but it is also not working.

<target name="abldef">
<typedef name="ablunit" classname="com.progress.openedge.ant.ablunit.ABLUnitTask"
classpath="dist/ant-ablunit.jar" />

<PCTRUN procedure="TestConnect.p" dlvHome="${env.DLC}">

<PCTConnection dbname="${Basedir}/build/testDB" singleUser="true" />

</PCTRUN>

</target>


<target name="ablunittests" depends="abldef" if="isWindows">
<mkdir dir="${basedir}/tmpdir"/>
<ablunit dlc="${env.DLC}" environment="tty"
printsummary="true" haltonerror="no" haltonfailure="no" tempdir="${basedir}/tmpdir">
<propath>
<pathelement refid="lybridge-build-propath"/>
<pathelement path="${pso}"/>
<pathelement refid="server-build-propath"/>
<pathelement location="${basedir}/Test" />
<pathelement location="${basedir}/Test/npui" />
</propath>

<test name="${basedir}/Test/Testsuite.cls" todir="${basedir}" outfile="result-Testsuite" format="xml" />

</ablunit>
</target>

Please suggest.

Thanks in Advance.

Regards,

Ankit

All Replies

Posted by Ramadevi Dhavala on 30-May-2019 12:52

Hi Ankit,

Which version of OpenEdge are you using?

Can you please give a try by specifying the port for database connection?

eg:

<dbinfo name="testDb.db" host="localhost"  port="8587" />

Thanks,

Ramadevi

This thread is closed