You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Sean Qiu <se...@gmail.com> on 2007/10/31 11:07:08 UTC

[buildtest] Add a task for BTI to create a new adaptor from a template

To add a task for BTI, we have to rewrite some scripts whose start are
similar.
So i think we can add a new task "create-adaptor" for BTI.I have create a
new jira for it [1].
we can use this task like:

  $>ant create-adaptor -Dadaptor=hello

This task can create a new adaptor directory in ${trunk}/adapotrs named
after "hello" from the command line.
It can supply default settings from template files, such as generating
summary, getting dependecy.
We can put adaptor-template.xml and parameters-template.xml in
${trunk}/script/template.
The task will replace the @SUITE@ at the template files to real suite name.

What's more, we can supply more template files for different kinds of test
suites.
BTI developer can make advantage of these template files.

Any thoughts? Additions? Comments?

[1] https://issues.apache.org/jira/browse/HARMONY-5053

-- 
Sean Qiu
China Software Development Lab, IBM

Re: [buildtest] Add a task for BTI to create a new adaptor from a template

Posted by Spark Shen <sm...@gmail.com>.
Hi

Similar effort from you and me, welcome. :-)

I wrote a scenario test to extract schema info.
from Openldap. And seems there are 2 bugs resides in ASN.1 framework.

1. When the response from server is extremely large - larger than
BerInputStream
buffer size, the buffer size relocation process will mistakenly calculate
new buffer size.

2. In method readContent, the if statement:

            if (in.read(buffer, offset, length) != length) {
                throw new ASN1Exception(Messages.getString("security.13C"));
//$NON-NLS-1$
            }
            offset += length;
is not enough to guarantee all the bytes are read into buffer. This can be
fixed using a while loop:

            int numread = 0, oldoffset = offset;
            while ((numread = in.read(buffer, offset, length)) > 0) {
                offset += numread;
                length -= numread;
                if(length == 0) {
                    break;
                }
            }
            length = offset - oldoffset;


I have reported the problems here.[1]

[1] https://issues.apache.org/jira/browse/HARMONY-5054

2007/11/1, Regis <xu...@gmail.com>:
>
>
> Recently I'm trying to integrate some  scenario tests for ldap
> provider to BTI, it would be very helpful and convenience to create new
> adaptor.
>
> Sean Qiu wrote:
> > To add a task for BTI, we have to rewrite some scripts whose start are
> > similar.
> > So i think we can add a new task "create-adaptor" for BTI.I have create
> a
> > new jira for it [1].
> > we can use this task like:
> >
> >   $>ant create-adaptor -Dadaptor=hello
> >
> > This task can create a new adaptor directory in ${trunk}/adapotrs named
> > after "hello" from the command line.
> > It can supply default settings from template files, such as generating
> > summary, getting dependecy.
> > We can put adaptor-template.xml and parameters-template.xml in
> > ${trunk}/script/template.
> > The task will replace the @SUITE@ at the template files to real suite
> name.
> >
> > What's more, we can supply more template files for different kinds of
> test
> > suites.
> > BTI developer can make advantage of these template files.
> >
> > Any thoughts? Additions? Comments?
> >
> > [1] https://issues.apache.org/jira/browse/HARMONY-5053
> >
>



-- 
Spark Shen
China Software Development Lab, IBM

Re: [buildtest] Add a task for BTI to create a new adaptor from a template

Posted by Regis <xu...@gmail.com>.
Recently I'm trying to integrate some  scenario tests for ldap
provider to BTI, it would be very helpful and convenience to create new 
adaptor.

Sean Qiu wrote:
> To add a task for BTI, we have to rewrite some scripts whose start are
> similar.
> So i think we can add a new task "create-adaptor" for BTI.I have create a
> new jira for it [1].
> we can use this task like:
> 
>   $>ant create-adaptor -Dadaptor=hello
> 
> This task can create a new adaptor directory in ${trunk}/adapotrs named
> after "hello" from the command line.
> It can supply default settings from template files, such as generating
> summary, getting dependecy.
> We can put adaptor-template.xml and parameters-template.xml in
> ${trunk}/script/template.
> The task will replace the @SUITE@ at the template files to real suite name.
> 
> What's more, we can supply more template files for different kinds of test
> suites.
> BTI developer can make advantage of these template files.
> 
> Any thoughts? Additions? Comments?
> 
> [1] https://issues.apache.org/jira/browse/HARMONY-5053
> 

Re: [buildtest] Add a task for BTI to create a new adaptor from a template

Posted by Spark Shen <sm...@gmail.com>.
See my comments inline.

2007/10/31, Sean Qiu <se...@gmail.com>:
>
> To add a task for BTI, we have to rewrite some scripts whose start are
> similar.
> So i think we can add a new task "create-adaptor" for BTI.


I think its a good  practice to remove duplication, and safe unnecessary
manual work.

I have create a
> new jira for it [1].
> we can use this task like:
>
>   $>ant create-adaptor -Dadaptor=hello
>
> This task can create a new adaptor directory in ${trunk}/adapotrs named
> after "hello" from the command line.
> It can supply default settings from template files, such as generating
> summary, getting dependecy.
> We can put adaptor-template.xml and parameters-template.xml in
> ${trunk}/script/template.
> The task will replace the @SUITE@ at the template files to real suite
> name.


Sounds a good idea. You can give a brief instruction on our wiki page.
Recently, I am writing scenario
test for ldap service provider. And I plan to integrate the test case into
BTI, your tool will be valuable to
me.

What's more, we can supply more template files for different kinds of test
> suites.
> BTI developer can make advantage of these template files.
>
> Any thoughts? Additions? Comments?
>
> [1] https://issues.apache.org/jira/browse/HARMONY-5053
>
> --
> Sean Qiu
> China Software Development Lab, IBM
>



-- 
Spark Shen
China Software Development Lab, IBM