Build is showing successful in failure of one test case.. wh

Posted by shilpi.agarwal3373 on 13-May-2016 05:13

Hi team,

Can you please tell me, What changes should be done in ANT script(running ABL Unit test case) to see the Build Failed. In every case, I am getting Build Successful even failure of one test case which is written in ABL Unit. ANt Script is -.

<target name="ablunit" depends="init,taskdef,compile" description="run unit tests">
<mkdir dir="results"/>
<ablunit dlc="${DLC_HOME}" environment="gui" printsummary="true" haltonerror="no" haltonfailure="no" tempdir="c:\shilpi\POC\ablunit">
<batchtest todir="results">
<fileset dir="tests" includes="**/*.p" >
</fileset>
</batchtest>

<dbinfo name="c:\rishi\test\data\autodb.db" port="4500"/>
<propath>
<pathelement path="c:\shilpi\POC\ablunit\tests" />
<pathelement location="${DLC_HOME}\gui\ablunit.pl" />
<pathelement location="${DLC_HOME}\gui\OpenEdge.Core.pl" />
</propath>

</ablunit>
<echo message="Run Test cases" />
</target>

output is-

Buildfile: C:\shilpi\POC\ablunit\build.xml
init:
taskdef:
prepare:
[echo] Directory created
clean:
[echo] clean done
compile:
[PCTCompile] PCTCompile - Progress Code Compiler
[PCTCompile] 11 file(s) compiled
[echo] Build process
ablunit:
[ablunit] Running C:\shilpi\POC\ablunit\tests\testDelcust.p
[ablunit] Tests run: 0, Success: 0, Errors: 0, Failures: 0, Time elapsed: 0.001 sec
[echo] Run Test cases
BUILD SUCCESSFUL
Total time: 10 seconds

When I run the test case(testDelcust.p) through Progress ABL Unit Application, i am finding one failure. But when I run this testcase through ANT script, Build comes out successful..

Is there need to change in ANT script? What changes should be done?

Please suggest.

All Replies

Posted by Phani Sajja on 13-May-2016 05:19

Hi,

From the description you posted, 0 is the number of tests run. It indicates that it does not find any tests in this file.

[ablunit] Tests run: 0, Success: 0, Errors: 0, Failures: 0, Time elapsed: 0.001

Please share the testfile 'C:\shilpi\POC\ablunit\tests\testDelcust.p'

--

Regards,

Phani S.

Posted by shilpi.agarwal3373 on 13-May-2016 05:33

ok.

[View:/cfs-file/__key/communityserver-discussions-components-files/19/testDelcust.p:320:240]..

[View:/cfs-file/__key/communityserver-discussions-components-files/19/testcasedel.p:320:240]

here testDelcust.p -- testcase written in ABL Unit

testcasedel.p is simple .p which is called inside the test case.

Please suggest.

This thread is closed