[OFBiz] Dev - Entity Engine Unit Testing
Si Chen
schen at graciousstyle.com
Fri Apr 15 19:08:46 EDT 2005
Brett,
Andy and I went through some of this earlier this week. There is
already a file
base/config/test-containers.xml
which defines the unit testing classes. You can run all the classes in
this test container with a
$ java -jar ofbiz.jar -test
There's nothing in ant to do this yet, but it seems ok to me to be able
to run it just like that.
So the next step is to create a test suite class like
framework/service/src/org/ofbiz/service/test/ServiceEngineTests.java
and put it into the test-containers.xml.
Si
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
>
>
>
More information about the Dev
mailing list