[OFBiz] Dev - Entity Engine Unit Testing

A. Zeneski jaz at ofbiz.org
Sat Apr 16 17:37:58 EDT 2005


Brett,

Si is correct. We currently have a container setup to run the JUnit 
tests. So, this starts up OFBiz just like normal, will start JOTM, 
Shark, etc so we can even write tests which test workflow behavior.

I just added a target in the build.xml file to run the tests:

ant run-tests

Also, I added today a placeholder file in SVN to hold the test methods. 
I added two examples which will need to be re-coded once we add 2-3 
test tables and write some code to populate some test data.

-Andy

On Apr 15, 2005, at 5:45 PM, Brett Palmer wrote:

> Andy and Si,
>
> Sounds like a very worthwhile project.  One thing that I think the
> project will need is a simple component loader to load all the entity
> engine components and other libraries.  I originally wrote the
> org.ofbiz.jxtest.JXComponentLoader that loads everything except the
> web comtainer (tomcat or jetty).  At my company we use the JXComponent
> in all of our JUnit tests and commandline utilities.  It is kind of a
> hack though and it has always been my intention to refactor it to fix
> some of its problems.  The primary problem is it doesn't correctly
> load all the dependent jar files into the classpath as it should.
> This means we often have to create a script to manually add the jar
> files to the classpath, but even with those problems we couldn't work
> without it.  I think the entity engine suite will need a similar
> component to facilitate running tests from Ant, the command line, and
> utility scripts.
>
> Thoughts anyone?
>
>
> Brett
>
>
>
> On 4/15/05, A. Zeneski <jaz at ofbiz.org> wrote:
>> Brett,
>>
>> Yes, we are looking to create a standard JUnit test suite for the
>> entity engine. One of the main purposes for this is we have been
>> invited to join the MySQL Pro Network. In order to be accepted we have
>> to provide a test suite and prove that the application works with this
>> specific version of MySQL.
>>
>> I think this will prove to be very valuable to the project in the long
>> term. We will be listed as an official application under the MySQL
>> Network.
>>
>> We are requesting the community to help build out this suite. The
>> requirements are that we need to provide tests for all features of
>> MySQL in which OFBiz utilizes. This can be accomplished by creating a
>> standard Entity Engine test suite.
>>
>> My suggestion is that we take a look at the test suite for MySQL or 
>> the
>> PostgreSQL JDBC driver and create similar tests using the EE.
>>
>> I have asked Si to take the lead on this to try to get some community
>> involvement. This is not a very complicated task and will be very
>> useful to the project in the long run. As Si mentioned it is also a
>> fantastic way to get more intimate with the entity engine.
>>
>> -Andy
>>
>> On Apr 15, 2005, at 5:25 AM, Brett Palmer wrote:
>>
>>> Si,
>>>
>>> Helping with the ofbiz test framework is another item on my TODO 
>>> list.
>>>  What were your ideas on unit testing the entity engine?  In previous
>>> discussions we have suggested creating tools to help users and
>>> developers test their entity definitions on more of an application
>>> level and not to unit test the entity engine itself.  Is this what 
>>> you
>>> are suggesting?
>>>
>>> Brett
>>>
>>> On 4/13/05, Si Chen <schen at graciousstyle.com> wrote:
>>>> Hi everyone.
>>>>
>>>> Today I created a new JIRA task
>>>> http://jira.undersunconsulting.com/browse/OFBIZ-200
>>>> for creating a test suite for the OFBiz entity engine.
>>>>
>>>> Would anyone on this list be able to help create this test suite?  
>>>> It
>>>> is
>>>> not terribly difficult to create and would be a great opportunity to
>>>> learn about how to use the entity engine works.
>>>>
>>>> I will definitely try to help out as much as I can if you decide to
>>>> work
>>>> on this.  Please just drop a reply to this email on either list and
>>>> let
>>>> me know.
>>>>
>>>> Si
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> Dev at lists.ofbiz.org
>>>> http://lists.ofbiz.org/mailman/listinfo/dev
>>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> Dev at lists.ofbiz.org
>>> http://lists.ofbiz.org/mailman/listinfo/dev
>>
>>
>>
>> _______________________________________________
>> Dev mailing list
>> Dev at lists.ofbiz.org
>> http://lists.ofbiz.org/mailman/listinfo/dev
>>
>>
>>
>
> _______________________________________________
> Dev mailing list
> Dev at lists.ofbiz.org
> http://lists.ofbiz.org/mailman/listinfo/dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2355 bytes
Desc: not available
Url : http://lists.ofbiz.org/pipermail/dev/attachments/20050416/ada855c3/smime.bin


More information about the Dev mailing list