[OFBiz] Dev - Running JXUnit

David E. Jones jonesde at ofbiz.org
Sun Jul 3 14:35:37 EDT 2005


Li, Brett,

Below is a short write-up I sent to a couple of others who are  
working on OFBiz and interested in moving the test infrastructure  
forward. As you will see when reading it, there are some specifics  
but it is fairly high level and meant to be somewhat flexible in  
terms of which tools are used to test what.

================================
A few months ago I added some features to the simple-methods to make  
it easier to write tests with them, take a look at the "assert"  
operation (may have to look at the schema definition for now). This  
is good for general data and logic level testing, especially easy for  
entity and service engine related stuff. For example: run a service  
an assert that certain results are returned and that certain data is  
in the database, very concise structure for that.

For UI level testing the best right now seems to be TestMaker (should  
be an open source version available) which is based on Python/Jython.  
It has some tools to help build the test scripts written in Python.  
What we would eventually like to do is build a test runner around the  
current JUnit test runner that can also run service engine services  
as tests (using simple-methods or Java to write them), and also to  
run these python scripts using Jython to interpret them in-VM and run  
tests against the web client.

That would give a pretty complete testing infrastructure... For now  
you can use all of these tools (simple-methods through services,  
TestMaker Jython scripts, and low-level JUnit code), there just isn't  
an easy way to run a single command that will hit the entire suite of  
tests.

There was a good article by Frank Cohen of PushToTest (the makers of  
TestMaker) in Software Development Magazine (www.sdmagazine.com)  
called "Steaming Clean Java" in July of 2004 that has some nice  
information to get started. There may be more recent resources on the  
TestMaker site too, though I haven't looked at it for a while.
================================

-David


On Jul 3, 2005, at 9:23 AM, Brett Palmer wrote:

> Li,
>
> I wrote most of the JXUnit stuff.  We use it a lot at our company, but
> I don't know how many in the community use it.  If you have questions
> in getting it working please post your questions to the group, and I
> will respond to them.
>
> BTW, there have been discussions in the group to move away from the
> JXUnit code base and create a standard ofbiz test framework.  The
> ofbiz test framework would use the "Simple Methods" components.  Test
> would be written in XML similar to JXUnit but would not be dependent
> on the JXUnit project.  I plan to start helping with this new test
> framework in the "near" future.
>
> Thoughts?
>
>
> Brett
>
>
> On 7/2/05, Li, Yan <elliot.li at gmail.com> wrote:
>
>> Hello everyone,
>>
>> Since we are an XP team, the test automation is critical to us. :)
>>
>> I've been examining the automatic test framework included in
>> "framework/tests". Seems long time no updates, since r4533.
>>
>> I checked the batch file jxtest.bat (in "framework/tests/bin") and  
>> found the
>> environment variables settings there are still old 3.0 style (such as
>> c:/dev\ofbiz/ofbiz.30/ofbiz/components/tests/lib). I'm trying to  
>> clean up
>> the batch script and make it work.
>>
>>
>> Best regards,
>> ___________________________
>> Li, Yan
>> elliot.li at gmail.com
>>
>>
>> _______________________________________________
>> 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