OEUnit - Unit Testing Framework 1.1-beta

Download: OEUnit-1.1-Beta.zip
Size: 250.24 KB
md5_file hash: b375eac341ea29c3ba8ac8d82ee4274a
First released: Sat, 2009-03-28 01:11
Last updated: Sat, 2009-03-28 01:09

Updated to work with OpenEdge 10.2A

OEUnit is a unit testing framework for Object Oriented ABL (OOABL). OEUnit is intended to help write and run repeatable unit tests. OEUnit is similar to JUnit and other xUnit-based unit testing frameworks.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Cameron - I'd like to discuss OEUnit with you

Any chance you'd be willing to discuss your work on OEUnit, specifically extending the current functionality?

Thanks,

Rom

romeATissolDOTcom


Failed to create instance

Trying to run my first test and get the following error messages:
Failed to create instance of '...\mytest.cls'
or
Failed to compile '...\mytest.cls'

File compiles without any errors and creates .r file in the directory. I am using using OE 10.2A

What could be the problem?


I had the same problem

I had the same problem using SimpleTest from the documentation.

The reason fot this was that the test class itself was not in the propath but in a subdirectory test/unittests. After I changed

CLASS SimpleTest:

to

CLASS test.unittests.SimpleTest:

it worked


Solved

Its very odd but running the following code made OEUnit work:

COMPILE VALUE("C:\workspace\MyProject\FirstTest.cls") SAVE = FALSE.
DEFINE VARIABLE test AS Progress.Lang.Object NO-UNDO.
test = DYNAMIC-NEW (COMPILER:CLASS-TYPE) ().


In which file did you put

In which file did you put this code snippet? In the target class file? If so, where in the CLASS declaration did you put this snippet? I assume at the top, after the CLASS keyword...

Thanks.


Try to run my first test with OEUnit

Hi,

I have installed OEUnit 1.1 like recommended in the installation guide. Now I try to run the IntegerTest found in this document and I get the following error in the ResultsTextView. This error occurs eventhough there is no Assert in the test...

"Inherited temp-table and its protected temp-table do not match.(12767)(12767)"

Any idea?


...ok... I tried again this

...ok... I tried again this morning and surprise! The unit test works fine now... Two possibilities(I am not sure about which of those 2 fixed the bug):

1- Restart the session before writing your first test;
2- Reboot your computer, especially it is keeping running for many days...

a+

Mé...


RE: ...ok... I tried again this

Hi,

I haven't been able to replicate this error - but I'm glad that you eventually got it working.
As you suggested, restarting the OpenEdge runtime session would probably fix this problem. Could be caused by static classes remaining in memory.

Also, please feel free to post any other feedback about the framework - as I haven't really heard from anyone on OE Hive thus far.
I wasn't sure whether anyone was actually using it or not...

Regards,
Cameron


OEUnit can not get started

Hello,

After installing the OEunit framework i tried tu run the following class.Nothing happens. Can you let me know what the problem could be?

ROUTINE-LEVEL ON ERROR UNDO, THROW.

using OEUnit.Assertion.Assert.

CLASS src.com.yonder.yts.api.MyFirstTest :

/*A test method that passes*/
@Test.
method public void FirstTest():
assert:ISTrue(true).
end method.

END CLASS.


RE: OEUnit can not get started

Hi Preduta,

You have to run the class as a test (not the same as simply running a class). Have you looked at the documentation that is included with the zip file? (OEUnit-1.1-Beta.zip)
You can find it in the \doc folder in the zip. Open the index.html.

In particular, look at the sections on Installation and Running a Test.
If this still doesn't help then I need to get a little more information from you...

What version of OpenEdge are you running? And on which platform?
Are you running the test from OpenEdge Architect? If so, then installation is a little more complicated... but it is all explained in the documentation.

Hope that helps
Cameron