You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Vikas Mayur <vi...@gmail.com> on 2007/12/01 15:42:11 UTC
Problem running Junit Test Cases
We have JUnit test cases for few components.
I tried to run the accounting test suite, but the test fails with following
error
>> Error in Service [createFinAccount]: You must be logged in to complete
the [Create a Financial Account] process.
This error is solved when I use
delegator = GenericDelegator.getGenericDelegator("default");
dispatcher = GenericDispatcher.getLocalDispatcher("accounting-dispatcher",
delegator);
instead of delegator name = test and and dispatcher name = test-dispatcher
Is there any configuration that need to be done to run these test suites.
--
Vikas Mayur
Re: Problem running Junit Test Cases
Posted by BJ Freeman <bj...@free-man.net>.
short answer
put a dispatcher in for what you are calling.
bu a test dispatcher will run services out of the test component.
Vikas Mayur sent the following on 12/2/2007 9:53 PM:
> Thanks BJ,
>
> I was aware of where dispatcher and delagator are defined, that was not my
> question.
> My question was why the test suite fails.
> Is there any modification that need to be done before running the test
> suites.
>
> -- Vikas
>
> On Dec 1, 2007 11:12 PM, BJ Freeman <bj...@free-man.net> wrote:
>
>> http://ofbiz.apache.org/docs/services.html
>> see Service Dispatcher
>>
>> The web.xml for each component calls out the local dispatcher and
>> delegator.
>> the local dispatcher is for the services that that component.
>>
>> The default delegator is define in the entityengine.xml.
>> the
>>
>> Vikas Mayur sent the following on 12/1/2007 6:42 AM:
>>> We have JUnit test cases for few components.
>>>
>>> I tried to run the accounting test suite, but the test fails with
>> following
>>> error
>>>>> Error in Service [createFinAccount]: You must be logged in to complete
>>> the [Create a Financial Account] process.
>>>
>>> This error is solved when I use
>>> delegator = GenericDelegator.getGenericDelegator("default");
>>> dispatcher = GenericDispatcher.getLocalDispatcher
>> ("accounting-dispatcher",
>>> delegator);
>>>
>>> instead of delegator name = test and and dispatcher name =
>> test-dispatcher
>>> Is there any configuration that need to be done to run these test
>> suites.
>>>
>>
>
>
Re: Problem running Junit Test Cases
Posted by Vikas Mayur <vi...@gmail.com>.
Thanks BJ,
I was aware of where dispatcher and delagator are defined, that was not my
question.
My question was why the test suite fails.
Is there any modification that need to be done before running the test
suites.
-- Vikas
On Dec 1, 2007 11:12 PM, BJ Freeman <bj...@free-man.net> wrote:
> http://ofbiz.apache.org/docs/services.html
> see Service Dispatcher
>
> The web.xml for each component calls out the local dispatcher and
> delegator.
> the local dispatcher is for the services that that component.
>
> The default delegator is define in the entityengine.xml.
> the
>
> Vikas Mayur sent the following on 12/1/2007 6:42 AM:
> > We have JUnit test cases for few components.
> >
> > I tried to run the accounting test suite, but the test fails with
> following
> > error
> >>> Error in Service [createFinAccount]: You must be logged in to complete
> > the [Create a Financial Account] process.
> >
> > This error is solved when I use
> > delegator = GenericDelegator.getGenericDelegator("default");
> > dispatcher = GenericDispatcher.getLocalDispatcher
> ("accounting-dispatcher",
> > delegator);
> >
> > instead of delegator name = test and and dispatcher name =
> test-dispatcher
> >
> > Is there any configuration that need to be done to run these test
> suites.
> >
> >
>
>
--
Vikas Mayur
Re: Problem running Junit Test Cases
Posted by BJ Freeman <bj...@free-man.net>.
http://ofbiz.apache.org/docs/services.html
see Service Dispatcher
The web.xml for each component calls out the local dispatcher and
delegator.
the local dispatcher is for the services that that component.
The default delegator is define in the entityengine.xml.
the
Vikas Mayur sent the following on 12/1/2007 6:42 AM:
> We have JUnit test cases for few components.
>
> I tried to run the accounting test suite, but the test fails with following
> error
>>> Error in Service [createFinAccount]: You must be logged in to complete
> the [Create a Financial Account] process.
>
> This error is solved when I use
> delegator = GenericDelegator.getGenericDelegator("default");
> dispatcher = GenericDispatcher.getLocalDispatcher("accounting-dispatcher",
> delegator);
>
> instead of delegator name = test and and dispatcher name = test-dispatcher
>
> Is there any configuration that need to be done to run these test suites.
>
>