You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Pierre Smits <pi...@gmail.com> on 2012/05/07 21:46:42 UTC

Re: tenant problem in framework can somebody (Adam) help?

Adam,

Pleaase elaborate on what the unit test(s) should achieve? Creating new
tenants and loading the tenant instantiation with demo data? Or?

Regards,

Pierre

2012/5/7 Adam Heath <do...@brainfood.com>

> On 05/07/2012 09:18 AM, Adam Heath wrote:
> > I'll fix it when I get to work.
> >
> > ps: there are really no test cases for tenants?
>
> ps: I have a plan for testing the tenant code.  Do not start it by
> just 'cloning' the existing entitymodels for the tenant.  That will
> take *way* to long.  Instead, create a completely brand new base
> delegator, that only has one or two entity definitions in it, then add
> tenants for that.
>

Re: tenant problem in framework can somebody (Adam) help?

Posted by Adam Heath <do...@brainfood.com>.
On 05/07/2012 03:40 PM, Pierre Smits wrote:
> Given that the tenants use the same codebase and only use a different
> delegator than main, you could say that performing unit tests as in a
> tenant delegator should get you the same results as doing them in the main
> delegator.
> 
> But, then there would always be an uncertainty that might itch...
> 
> Testing it al in a tenant environment could/would entail:
> 
>    1. create the tenant
>    2. load the demo data into the environment (db) of the tenant through
>    its delegator
>    3. trigger test suites and/or individual test in the environment of the
>    tent through its delegator
> 
> We can and could use current ant targets for items 1 and 2 mentioned above.
> But for item 3  a new ant target (in style of current testing targets in
> build.xml) should be created.

There's no reason to run *all* tests in a particular tenant.  That
would be useless extra work.  Only test what is nescessary to verify
that tenant code actually works.  Use code-coverage to help with this.

ps: You do realize who you are talking to?  Someone who isn't a newbie
with ofbiz.  The tone of your responses seem to lean in that direction.

Re: tenant problem in framework can somebody (Adam) help?

Posted by Pierre Smits <pi...@gmail.com>.
Adam,

Given that the tenants use the same codebase and only use a different
delegator than main, you could say that performing unit tests as in a
tenant delegator should get you the same results as doing them in the main
delegator.

But, then there would always be an uncertainty that might itch...

Testing it al in a tenant environment could/would entail:

   1. create the tenant
   2. load the demo data into the environment (db) of the tenant through
   its delegator
   3. trigger test suites and/or individual test in the environment of the
   tent through its delegator

We can and could use current ant targets for items 1 and 2 mentioned above.
But for item 3  a new ant target (in style of current testing targets in
build.xml) should be created.

Then we would be covered.

Regards,

Pierre


2012/5/7 Adam Heath <do...@brainfood.com>

> On 05/07/2012 02:46 PM, Pierre Smits wrote:
> > Adam,
> >
> > Pleaase elaborate on what the unit test(s) should achieve? Creating new
> > tenants and loading the tenant instantiation with demo data? Or?
>
> All of the above, anything, something.  There are no automated test
> cases *at all* for tenant anything.
>
> Every single one of the commits I just checked in recently had full
> tests cases run against it about 3 times.  I use git-svn, rebase -i, I
> reorder commits radically as I get a feature set working.  I'll run
> all test cases against a series of commits many times.  Takes about 7
> minutes per commit.  This is why I have tools/git-rebase-runner.sh
> checked in.
>

Re: tenant problem in framework can somebody (Adam) help?

Posted by Adam Heath <do...@brainfood.com>.
On 05/07/2012 02:46 PM, Pierre Smits wrote:
> Adam,
> 
> Pleaase elaborate on what the unit test(s) should achieve? Creating new
> tenants and loading the tenant instantiation with demo data? Or?

All of the above, anything, something.  There are no automated test
cases *at all* for tenant anything.

Every single one of the commits I just checked in recently had full
tests cases run against it about 3 times.  I use git-svn, rebase -i, I
reorder commits radically as I get a feature set working.  I'll run
all test cases against a series of commits many times.  Takes about 7
minutes per commit.  This is why I have tools/git-rebase-runner.sh
checked in.