ABLUnit ... the saga continues

Posted by cwright on 21-Sep-2016 13:46

So I have setup a TTY OpenEdge project. I have add ABLUnit to the project facet. 

./base/code/com/pro/utils/general.cls

using Progress.Lang.*.
routine-level on error undo, throw.
class com.pro.utils.general:

  method public static character getMessage( kInName as character ):
    return "Hello " + kInName.
  end method.
end class.

./base/tests/unit/pro/utils/general.cls

using Progress.Lang.*.
block-level on error undo, throw.
class unit.pro.utils.general:
  @Test.
  method public void test_getMessage_Cameron( ):
    define variable kMsg as character no-undo.
    kMsg = com.pro.utils.general:getMessage("Cameron").
    OpenEdge.Core.Assert:Equals("Hello Cameron", kMsg).
    return.
  end method.
end class.

This all happens from within PDSOE. I have configured the run as ... to use the "OpenEdge Runtime Environment" which is TTY. When I run as Progress ABLUnit Application, I get the following results:

<?xml version="1.0" ?>
<testsuites errors="1" failures="0" name="ABLUnit" tests="1">
<testsuite name="C:\workspace\TDD\tests\unit\pro\utils\general.cls" tests="1" time=".446">
<testcase name="test_getMessage_Cameron" status="Error" time="0">
<error>Invoke OpenEdge.ABLUnit.Reflection.ClassAnnotationInfo at line 163 (OpenEdge/ABLUnit/Reflection/ClassAnnotationInfo.r)
RunTestMethod OpenEdge.ABLUnit.Reflection.ClassAnnotationInfo at line 196 (OpenEdge/ABLUnit/Reflection/ClassAnnotationInfo.r)
RunSelectedTestMethod OpenEdge.ABLUnit.Reflection.ClassAnnotationInfo at line 126 (OpenEdge/ABLUnit/Reflection/ClassAnnotationInfo.r)
runTestClassMethod OpenEdge.ABLUnit.Runner.ABLRunner at line 1180 (OpenEdge/ABLUnit/Runner/ABLRunner.r)
runtests OpenEdge.ABLUnit.Runner.ABLRunner at line 1075 (OpenEdge/ABLUnit/Runner/ABLRunner.r)
runtests OpenEdge.ABLUnit.Runner.ABLRunner at line 1013 (OpenEdge/ABLUnit/Runner/ABLRunner.r)
runtests OpenEdge.ABLUnit.Runner.ABLRunner at line 1100 (OpenEdge/ABLUnit/Runner/ABLRunner.r)
runtests OpenEdge.ABLUnit.Runner.ABLRunner at line 1013 (OpenEdge/ABLUnit/Runner/ABLRunner.r)
RunTests OpenEdge.ABLUnit.Runner.ABLRunner at line 150 (OpenEdge/ABLUnit/Runner/ABLRunner.r)
ABLUnitCore.r at line 72 (ABLUnitCore.r)</error>
</testcase>
</testsuite>
</testsuites>

However, if I set the project to NOT be TTY, recompile and run, the tests execute as expected. My first thought is that I have to recompile all the ABLUnit/* code to use TTY but am unsure. Any help would be great.

All Replies

Posted by DivyaTheja on 22-Sep-2016 06:01

Hi Cameron,

Could you please try adding tests folder to PROPATH? For a TTY enabled project, tests folder is not being added to run configuration by default (This is a bug) in PDS OE. Adding tests folder to run configuration's PROPATH should work.

Hope this helps,

DivyaTheja

Posted by Ken McIntosh on 22-Sep-2016 07:23

Hi DivyaTheja,

I came to the same conclusion last night and have been searching for an existing defect before creating a new one.  This was indeed his problem.  When running in GUI the problem didn't happen so I'm assuming the directory was programmatically added to the PROPATH, however in TTY this didn't happen.

If there is already a defect logged can you please share the issue #?

Thanks,

Ken Mc

Posted by DivyaTheja on 22-Sep-2016 07:36

Hi Ken,

I can see that there is no defect logged yet.

-DivyaTheja

This thread is closed