Selenium

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
35 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Selenium

Chandresh Turakhia
Dear all,

Not the most cleverest, But useful for rerunning demo- making clean start
etc. Retesting etc.

 http://dbunit.sourceforge.net/  Licence is GPL / LGPL. :(

DbUnit is a JUnit extension (also usable with Ant) targeted for
database-driven projects that, among other things, puts your database into a
known state between test runs. This is an excellent way to avoid the myriad
of problems that can occur when one test case corrupts the database and
causes subsequent tests to fail or exacerbate the damage

http://dbunit.sourceforge.net/howto.html , There is overall of features with
webtools. May be WebTools screens can run DBunit interanlly.

WebTools is definetly best condensed place to manage Ofbiz.


> This would allow a lot of clever asserts from the test tool? Without the
> need to make the tool dispatcher aware? Would this be an adequate
> approach?
> --

Did not understand you question actually :(.

BTW , my team is running volume test for additional features it has
developed. Any pointers to do it faster and more efficiently.


Chand


----- Original Message -----
From: "Andrew Sykes" <[hidden email]>
To: <[hidden email]>
Sent: Monday, January 29, 2007 3:01 AM
Subject: Re: Selenium


> Assuming an automated web browser type technology is the way to go for
> testing...
>
> What does everyone think of having an option to run a service
> synchronously from webtools?
>
> This would allow a lot of clever asserts from the test tool? Without the
> need to make the tool dispatcher aware? Would this be an adequate
> approach?
> --
> Kind Regards
> Andrew Sykes <[hidden email]>
> Sykes Development Ltd
> http://www.sykesdevelopment.com
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Selenium

byersa
In reply to this post by Andrew Sykes
I hate to dumb things down, but I have a basic question. Is it true that
web-based testing (I am thinking WebTools or Selenium) are not able to roll
back test by rolling back the transaction in the way that a JUnit test
could?

If that is true, is this an area where we might be able to do something
special for OFBiz to get around that problem?

-Al
Reply | Threaded
Open this post in threaded view
|

Re: Selenium

Tim Ruppert
Al, I'm assuming that you meant WebTest instead of webtools there, but nonetheless - we _could_ use something like DbUnit for this.  It could be a HUGE dataset to get going to put things back together, but it can totally be done and is perfect for this type of concern.

Cheers,
Tim
--
Tim Ruppert
HotWax Media

o:801.649.6594
f:801.649.6595


On Jan 29, 2007, at 5:18 AM, Al Byers wrote:

I hate to dumb things down, but I have a basic question. Is it true that
web-based testing (I am thinking WebTools or Selenium) are not able to roll
back test by rolling back the transaction in the way that a JUnit test
could?

If that is true, is this an area where we might be able to do something
special for OFBiz to get around that problem?

-Al


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Selenium

byersa
Thanks Tim, I did mean WebTest. I have been working with it lately.

I have found that it is useful to put "milestone" code in my main action
method that checks a passed in parameter (testLevel) to see if it is
supposed to be at the current level. If it is, then it records some data in
a map to be returned. That map is used to populate a form that is used in a
WebTest script to do verification.

It also checks to see if it is to exit at that level and, if so, it rolls
back the transaction that was started at the beginning.

In a sense, this is akin to putting "if(Debug.isInfo()) Debug... "
statements along the way. It is not pretty, but it allows me to test the
actual production code by putting a parameter, "testLevel", in the url. I
can even choose whether to keep the transactions by adding another
parameter, "returnVal", which would be either "error" or "success".

If this sort of approach has any merit, then I wonder if there would not be
value in building something into OFBiz to make it unnecessary to implant
your own transaction statements? Something like a custom ControlFilter that
would automatically rollback the transaction. That seems like it would be a
lot easier then crafting a DbUnit script to do the rollback.

And if that works, then why not have it save transactions objects and reuse
them across multiple requests so all the data can be rolled back?

-Al

On 1/29/07, Tim Ruppert <[hidden email]> wrote:

>
> Al, I'm assuming that you meant WebTest instead of webtools there, but
> nonetheless - we _could_ use something like DbUnit for this.  It could be a
> HUGE dataset to get going to put things back together, but it can totally be
> done and is perfect for this type of concern.
> Cheers,
> Tim
> --
> Tim Ruppert
> HotWax Media
> http://www.hotwaxmedia.com
>
> o:801.649.6594
> f:801.649.6595
>
>
> On Jan 29, 2007, at 5:18 AM, Al Byers wrote:
>
> I hate to dumb things down, but I have a basic question. Is it true that
> web-based testing (I am thinking WebTools or Selenium) are not able to
> roll
> back test by rolling back the transaction in the way that a JUnit test
> could?
>
> If that is true, is this an area where we might be able to do something
> special for OFBiz to get around that problem?
>
> -Al
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Selenium

David E Jones
In reply to this post by Andrew Sykes

I'd really prefer to do what has been proposed as a best practice and  
write tests using the same OFBiz framework tools that we use to write  
applications, like simple-methods, services, etc...

But yes, it is possible to call a service through a web request and  
there is one in the webtools wecapp that has been there for years.  
The trick is you have to set export="true" for all services called  
this way, which is another reason to do logic-level test (including  
service calls) in a more black-box way, especially if they are not  
for testing things that are intended to be available externally.

-David


On Jan 29, 2007, at 4:01 AM, Andrew Sykes wrote:

> Assuming an automated web browser type technology is the way to go for
> testing...
>
> What does everyone think of having an option to run a service
> synchronously from webtools?
>
> This would allow a lot of clever asserts from the test tool?  
> Without the
> need to make the tool dispatcher aware? Would this be an adequate
> approach?
> --
> Kind Regards
> Andrew Sykes <[hidden email]>
> Sykes Development Ltd
> http://www.sykesdevelopment.com
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Selenium

byersa
Could this be a matter of differing requirements? I am guessing that one
could think of testing as a means to insure that the core code is
functioning properly. I realize that I was thinking about what I would want
from a project management point of view.

In that case, I think my requirements would be:

1. Something that would let me jump around and assess the state of multiple
projects. That would imply that I do not want to use a command-line
interface. I don't want to have to log in to different systems.  I would
want to see the available tests and pick all or some of them.

2. If I want to check the state of a task, I want to be able to run a test
that is appropriate for that task whether it be an acceptance test on the
response to a request or an internal test on business logic functionality. I
would like the same command interface for all tests. Of course, WebTest does
not have such an interface, but it does not seem like it would be too
difficult to glean the available tests and descriptions from the ant script
files.

I see WebTest as a vehicle for doing the above. It is designed for web-based
tests, but it seems like with a little work it could also be a harness for
running JUnit tests. Perhaps a special event handler for running JUnit tests
and another for wrapping web requests with a transaction.

Let me try again at refining my wish list:

1. A prompting interface.
2. The ability to run all tests from that interface.

-Al

On 1/29/07, David E. Jones <[hidden email]> wrote:

>
>
> I'd really prefer to do what has been proposed as a best practice and
> write tests using the same OFBiz framework tools that we use to write
> applications, like simple-methods, services, etc...
>
> But yes, it is possible to call a service through a web request and
> there is one in the webtools wecapp that has been there for years.
> The trick is you have to set export="true" for all services called
> this way, which is another reason to do logic-level test (including
> service calls) in a more black-box way, especially if they are not
> for testing things that are intended to be available externally.
>
> -David
>
>
> On Jan 29, 2007, at 4:01 AM, Andrew Sykes wrote:
>
> > Assuming an automated web browser type technology is the way to go for
> > testing...
> >
> > What does everyone think of having an option to run a service
> > synchronously from webtools?
> >
> > This would allow a lot of clever asserts from the test tool?
> > Without the
> > need to make the tool dispatcher aware? Would this be an adequate
> > approach?
> > --
> > Kind Regards
> > Andrew Sykes <[hidden email]>
> > Sykes Development Ltd
> > http://www.sykesdevelopment.com
> >
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Selenium

Tim Ruppert

On Jan 29, 2007, at 10:58 PM, Al Byers wrote:

> Could this be a matter of differing requirements? I am guessing  
> that one
> could think of testing as a means to insure that the core code is
> functioning properly. I realize that I was thinking about what I  
> would want
> from a project management point of view.
>
> In that case, I think my requirements would be:
>
> 1. Something that would let me jump around and assess the state of  
> multiple
> projects. That would imply that I do not want to use a command-line
> interface. I don't want to have to log in to different systems.  I  
> would
> want to see the available tests and pick all or some of them.
>
> 2. If I want to check the state of a task, I want to be able to run  
> a test
> that is appropriate for that task whether it be an acceptance test  
> on the
> response to a request or an internal test on business logic  
> functionality. I
> would like the same command interface for all tests. Of course,  
> WebTest does
> not have such an interface, but it does not seem like it would be too
> difficult to glean the available tests and descriptions from the  
> ant script
> files.
>
It's way easy to do this in ant - I have a bunch of examples for this  
somewhere in my build files.  I can pull it together whenever you're  
ready Al.  It doesn't prompt you though (but it could still be VERY  
easy to control with arguments being passed in)

> I see WebTest as a vehicle for doing the above. It is designed for  
> web-based
> tests, but it seems like with a little work it could also be a  
> harness for
> running JUnit tests. Perhaps a special event handler for running  
> JUnit tests
> and another for wrapping web requests with a transaction.
>
> Let me try again at refining my wish list:
>
> 1. A prompting interface.
> 2. The ability to run all tests from that interface.
>
> -Al
>
> On 1/29/07, David E. Jones <[hidden email]> wrote:
>>
>>
>> I'd really prefer to do what has been proposed as a best practice and
>> write tests using the same OFBiz framework tools that we use to write
>> applications, like simple-methods, services, etc...
>>
>> But yes, it is possible to call a service through a web request and
>> there is one in the webtools wecapp that has been there for years.
>> The trick is you have to set export="true" for all services called
>> this way, which is another reason to do logic-level test (including
>> service calls) in a more black-box way, especially if they are not
>> for testing things that are intended to be available externally.
>>
>> -David
>>
>>
>> On Jan 29, 2007, at 4:01 AM, Andrew Sykes wrote:
>>
>> > Assuming an automated web browser type technology is the way to  
>> go for
>> > testing...
>> >
>> > What does everyone think of having an option to run a service
>> > synchronously from webtools?
>> >
>> > This would allow a lot of clever asserts from the test tool?
>> > Without the
>> > need to make the tool dispatcher aware? Would this be an adequate
>> > approach?
>> > --
>> > Kind Regards
>> > Andrew Sykes <[hidden email]>
>> > Sykes Development Ltd
>> > http://www.sykesdevelopment.com
>> >
>>
>>
>>
>>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Selenium

Andrew Sykes
In reply to this post by Andrew Sykes
David,

I think we're talking about different things here, perhaps I should
detail the suggestion a bit more clearly...

The idea was to have a page that allowed you to run a service
synchronously much like the "schedule service", however, it would then
display the results tabularly in the browser. For each value pair
displayed, there would be a checkbox to allow you to save the value in
the session, then when you returned to run another service if the one of
the input params matched one of the previous saved values, it would
automatically populate the input box.

This would allow people relying predominantly on a browser based test
tool to run pretty fancy multi-service sequences.

I admit, it does sound a bit hacky, but I have a rough draft which I'm
using for some testing and it does make certain things a lot easier.

Can you give me your thoughts please?

- Andrew


On Mon, 2007-01-29 at 20:35 -0700, David E. Jones wrote:

> I'd really prefer to do what has been proposed as a best practice and  
> write tests using the same OFBiz framework tools that we use to write  
> applications, like simple-methods, services, etc...
>
> But yes, it is possible to call a service through a web request and  
> there is one in the webtools wecapp that has been there for years.  
> The trick is you have to set export="true" for all services called  
> this way, which is another reason to do logic-level test (including  
> service calls) in a more black-box way, especially if they are not  
> for testing things that are intended to be available externally.
>
> -David
>
>
> On Jan 29, 2007, at 4:01 AM, Andrew Sykes wrote:
>
> > Assuming an automated web browser type technology is the way to go for
> > testing...
> >
> > What does everyone think of having an option to run a service
> > synchronously from webtools?
> >
> > This would allow a lot of clever asserts from the test tool?  
> > Without the
> > need to make the tool dispatcher aware? Would this be an adequate
> > approach?
> > --
> > Kind Regards
> > Andrew Sykes <[hidden email]>
> > Sykes Development Ltd
> > http://www.sykesdevelopment.com
> >
>
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

Reply | Threaded
Open this post in threaded view
|

Re: Selenium

David E Jones

Andrew,

Okay, I see where you're going with that. It sounds like a great idea  
and very do-able, and useful for many things other than just testing.

BTW, In general I do really like this approach of writing unit tests  
as services so we can take advantage of all of the flexibility and  
efficiency that we get for the main application code.

If you (or anybody!) wants to work on this, please do! I'll try to  
bring it up during the dev conference too as we're working on testing  
infrastructure if it hasn't been implemented by then.

-David


On Jan 30, 2007, at 6:37 AM, Andrew Sykes wrote:

> David,
>
> I think we're talking about different things here, perhaps I should
> detail the suggestion a bit more clearly...
>
> The idea was to have a page that allowed you to run a service
> synchronously much like the "schedule service", however, it would then
> display the results tabularly in the browser. For each value pair
> displayed, there would be a checkbox to allow you to save the value in
> the session, then when you returned to run another service if the  
> one of
> the input params matched one of the previous saved values, it would
> automatically populate the input box.
>
> This would allow people relying predominantly on a browser based test
> tool to run pretty fancy multi-service sequences.
>
> I admit, it does sound a bit hacky, but I have a rough draft which I'm
> using for some testing and it does make certain things a lot easier.
>
> Can you give me your thoughts please?
>
> - Andrew
>
>
> On Mon, 2007-01-29 at 20:35 -0700, David E. Jones wrote:
>> I'd really prefer to do what has been proposed as a best practice and
>> write tests using the same OFBiz framework tools that we use to write
>> applications, like simple-methods, services, etc...
>>
>> But yes, it is possible to call a service through a web request and
>> there is one in the webtools wecapp that has been there for years.
>> The trick is you have to set export="true" for all services called
>> this way, which is another reason to do logic-level test (including
>> service calls) in a more black-box way, especially if they are not
>> for testing things that are intended to be available externally.
>>
>> -David
>>
>>
>> On Jan 29, 2007, at 4:01 AM, Andrew Sykes wrote:
>>
>>> Assuming an automated web browser type technology is the way to  
>>> go for
>>> testing...
>>>
>>> What does everyone think of having an option to run a service
>>> synchronously from webtools?
>>>
>>> This would allow a lot of clever asserts from the test tool?
>>> Without the
>>> need to make the tool dispatcher aware? Would this be an adequate
>>> approach?
>>> --
>>> Kind Regards
>>> Andrew Sykes <[hidden email]>
>>> Sykes Development Ltd
>>> http://www.sykesdevelopment.com
>>>
>>
> --
> Kind Regards
> Andrew Sykes <[hidden email]>
> Sykes Development Ltd
> http://www.sykesdevelopment.com
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Selenium

Andrew Sykes
In reply to this post by Andrew Sykes
David,

I've added a patch to Jira for this...
https://issues.apache.org/jira/browse/OFBIZ-677

- Andrew


On Tue, 2007-01-30 at 13:31 -0700, David E. Jones wrote:

> Andrew,
>
> Okay, I see where you're going with that. It sounds like a great idea  
> and very do-able, and useful for many things other than just testing.
>
> BTW, In general I do really like this approach of writing unit tests  
> as services so we can take advantage of all of the flexibility and  
> efficiency that we get for the main application code.
>
> If you (or anybody!) wants to work on this, please do! I'll try to  
> bring it up during the dev conference too as we're working on testing  
> infrastructure if it hasn't been implemented by then.
>
> -David
>
>
> On Jan 30, 2007, at 6:37 AM, Andrew Sykes wrote:
>
> > David,
> >
> > I think we're talking about different things here, perhaps I should
> > detail the suggestion a bit more clearly...
> >
> > The idea was to have a page that allowed you to run a service
> > synchronously much like the "schedule service", however, it would then
> > display the results tabularly in the browser. For each value pair
> > displayed, there would be a checkbox to allow you to save the value in
> > the session, then when you returned to run another service if the  
> > one of
> > the input params matched one of the previous saved values, it would
> > automatically populate the input box.
> >
> > This would allow people relying predominantly on a browser based test
> > tool to run pretty fancy multi-service sequences.
> >
> > I admit, it does sound a bit hacky, but I have a rough draft which I'm
> > using for some testing and it does make certain things a lot easier.
> >
> > Can you give me your thoughts please?
> >
> > - Andrew
> >
> >
> > On Mon, 2007-01-29 at 20:35 -0700, David E. Jones wrote:
> >> I'd really prefer to do what has been proposed as a best practice and
> >> write tests using the same OFBiz framework tools that we use to write
> >> applications, like simple-methods, services, etc...
> >>
> >> But yes, it is possible to call a service through a web request and
> >> there is one in the webtools wecapp that has been there for years.
> >> The trick is you have to set export="true" for all services called
> >> this way, which is another reason to do logic-level test (including
> >> service calls) in a more black-box way, especially if they are not
> >> for testing things that are intended to be available externally.
> >>
> >> -David
> >>
> >>
> >> On Jan 29, 2007, at 4:01 AM, Andrew Sykes wrote:
> >>
> >>> Assuming an automated web browser type technology is the way to  
> >>> go for
> >>> testing...
> >>>
> >>> What does everyone think of having an option to run a service
> >>> synchronously from webtools?
> >>>
> >>> This would allow a lot of clever asserts from the test tool?
> >>> Without the
> >>> need to make the tool dispatcher aware? Would this be an adequate
> >>> approach?
> >>> --
> >>> Kind Regards
> >>> Andrew Sykes <[hidden email]>
> >>> Sykes Development Ltd
> >>> http://www.sykesdevelopment.com
> >>>
> >>
> > --
> > Kind Regards
> > Andrew Sykes <[hidden email]>
> > Sykes Development Ltd
> > http://www.sykesdevelopment.com
> >
>
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

Reply | Threaded
Open this post in threaded view
|

Re: Selenium

Andrew Sykes
In reply to this post by Andrew Sykes
David,

Is there any reason why we can't get the Selenium test runner mounted
and committed into /webtools?

I'm a bit unclear about what everyone is hoping for from the
integration. Are we looking to introduce a (OfBiz specific) technology
agnostic layer for the definition of test actions? Or do we want to make
a binding decision on the set of tools to use?

- Andrew

On Wed, 2007-01-31 at 17:25 +0000, Andrew Sykes wrote:

> David,
>
> I've added a patch to Jira for this...
> https://issues.apache.org/jira/browse/OFBIZ-677
>
> - Andrew
>
>
> On Tue, 2007-01-30 at 13:31 -0700, David E. Jones wrote:
> > Andrew,
> >
> > Okay, I see where you're going with that. It sounds like a great idea  
> > and very do-able, and useful for many things other than just testing.
> >
> > BTW, In general I do really like this approach of writing unit tests  
> > as services so we can take advantage of all of the flexibility and  
> > efficiency that we get for the main application code.
> >
> > If you (or anybody!) wants to work on this, please do! I'll try to  
> > bring it up during the dev conference too as we're working on testing  
> > infrastructure if it hasn't been implemented by then.
> >
> > -David
> >
> >
> > On Jan 30, 2007, at 6:37 AM, Andrew Sykes wrote:
> >
> > > David,
> > >
> > > I think we're talking about different things here, perhaps I should
> > > detail the suggestion a bit more clearly...
> > >
> > > The idea was to have a page that allowed you to run a service
> > > synchronously much like the "schedule service", however, it would then
> > > display the results tabularly in the browser. For each value pair
> > > displayed, there would be a checkbox to allow you to save the value in
> > > the session, then when you returned to run another service if the  
> > > one of
> > > the input params matched one of the previous saved values, it would
> > > automatically populate the input box.
> > >
> > > This would allow people relying predominantly on a browser based test
> > > tool to run pretty fancy multi-service sequences.
> > >
> > > I admit, it does sound a bit hacky, but I have a rough draft which I'm
> > > using for some testing and it does make certain things a lot easier.
> > >
> > > Can you give me your thoughts please?
> > >
> > > - Andrew
> > >
> > >
> > > On Mon, 2007-01-29 at 20:35 -0700, David E. Jones wrote:
> > >> I'd really prefer to do what has been proposed as a best practice and
> > >> write tests using the same OFBiz framework tools that we use to write
> > >> applications, like simple-methods, services, etc...
> > >>
> > >> But yes, it is possible to call a service through a web request and
> > >> there is one in the webtools wecapp that has been there for years.
> > >> The trick is you have to set export="true" for all services called
> > >> this way, which is another reason to do logic-level test (including
> > >> service calls) in a more black-box way, especially if they are not
> > >> for testing things that are intended to be available externally.
> > >>
> > >> -David
> > >>
> > >>
> > >> On Jan 29, 2007, at 4:01 AM, Andrew Sykes wrote:
> > >>
> > >>> Assuming an automated web browser type technology is the way to  
> > >>> go for
> > >>> testing...
> > >>>
> > >>> What does everyone think of having an option to run a service
> > >>> synchronously from webtools?
> > >>>
> > >>> This would allow a lot of clever asserts from the test tool?
> > >>> Without the
> > >>> need to make the tool dispatcher aware? Would this be an adequate
> > >>> approach?
> > >>> --
> > >>> Kind Regards
> > >>> Andrew Sykes <[hidden email]>
> > >>> Sykes Development Ltd
> > >>> http://www.sykesdevelopment.com
> > >>>
> > >>
> > > --
> > > Kind Regards
> > > Andrew Sykes <[hidden email]>
> > > Sykes Development Ltd
> > > http://www.sykesdevelopment.com
> > >
> >
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

Reply | Threaded
Open this post in threaded view
|

Re: Selenium

byersa
Andrew,

I poked around in your patch. I like the idea from the point of view that it
gives you a screen from which to select tests. Is your remote service
calling approach meant to be compatible with Selenium or is it to be used in
parallel?

-Al

On 1/31/07, Andrew Sykes <[hidden email]> wrote:

>
> David,
>
> Is there any reason why we can't get the Selenium test runner mounted
> and committed into /webtools?
>
> I'm a bit unclear about what everyone is hoping for from the
> integration. Are we looking to introduce a (OfBiz specific) technology
> agnostic layer for the definition of test actions? Or do we want to make
> a binding decision on the set of tools to use?
>
> - Andrew
>
> On Wed, 2007-01-31 at 17:25 +0000, Andrew Sykes wrote:
> > David,
> >
> > I've added a patch to Jira for this...
> > https://issues.apache.org/jira/browse/OFBIZ-677
> >
> > - Andrew
> >
> >
> > On Tue, 2007-01-30 at 13:31 -0700, David E. Jones wrote:
> > > Andrew,
> > >
> > > Okay, I see where you're going with that. It sounds like a great idea
> > > and very do-able, and useful for many things other than just testing.
> > >
> > > BTW, In general I do really like this approach of writing unit tests
> > > as services so we can take advantage of all of the flexibility and
> > > efficiency that we get for the main application code.
> > >
> > > If you (or anybody!) wants to work on this, please do! I'll try to
> > > bring it up during the dev conference too as we're working on testing
> > > infrastructure if it hasn't been implemented by then.
> > >
> > > -David
> > >
> > >
> > > On Jan 30, 2007, at 6:37 AM, Andrew Sykes wrote:
> > >
> > > > David,
> > > >
> > > > I think we're talking about different things here, perhaps I should
> > > > detail the suggestion a bit more clearly...
> > > >
> > > > The idea was to have a page that allowed you to run a service
> > > > synchronously much like the "schedule service", however, it would
> then
> > > > display the results tabularly in the browser. For each value pair
> > > > displayed, there would be a checkbox to allow you to save the value
> in
> > > > the session, then when you returned to run another service if the
> > > > one of
> > > > the input params matched one of the previous saved values, it would
> > > > automatically populate the input box.
> > > >
> > > > This would allow people relying predominantly on a browser based
> test
> > > > tool to run pretty fancy multi-service sequences.
> > > >
> > > > I admit, it does sound a bit hacky, but I have a rough draft which
> I'm
> > > > using for some testing and it does make certain things a lot easier.
> > > >
> > > > Can you give me your thoughts please?
> > > >
> > > > - Andrew
> > > >
> > > >
> > > > On Mon, 2007-01-29 at 20:35 -0700, David E. Jones wrote:
> > > >> I'd really prefer to do what has been proposed as a best practice
> and
> > > >> write tests using the same OFBiz framework tools that we use to
> write
> > > >> applications, like simple-methods, services, etc...
> > > >>
> > > >> But yes, it is possible to call a service through a web request and
> > > >> there is one in the webtools wecapp that has been there for years.
> > > >> The trick is you have to set export="true" for all services called
> > > >> this way, which is another reason to do logic-level test (including
> > > >> service calls) in a more black-box way, especially if they are not
> > > >> for testing things that are intended to be available externally.
> > > >>
> > > >> -David
> > > >>
> > > >>
> > > >> On Jan 29, 2007, at 4:01 AM, Andrew Sykes wrote:
> > > >>
> > > >>> Assuming an automated web browser type technology is the way to
> > > >>> go for
> > > >>> testing...
> > > >>>
> > > >>> What does everyone think of having an option to run a service
> > > >>> synchronously from webtools?
> > > >>>
> > > >>> This would allow a lot of clever asserts from the test tool?
> > > >>> Without the
> > > >>> need to make the tool dispatcher aware? Would this be an adequate
> > > >>> approach?
> > > >>> --
> > > >>> Kind Regards
> > > >>> Andrew Sykes <[hidden email]>
> > > >>> Sykes Development Ltd
> > > >>> http://www.sykesdevelopment.com
> > > >>>
> > > >>
> > > > --
> > > > Kind Regards
> > > > Andrew Sykes <[hidden email]>
> > > > Sykes Development Ltd
> > > > http://www.sykesdevelopment.com
> > > >
> > >
> --
> Kind Regards
> Andrew Sykes <[hidden email]>
> Sykes Development Ltd
> http://www.sykesdevelopment.com
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Selenium

Andrew Sykes
In reply to this post by Andrew Sykes
Al,

The idea is to allow any web automation tool a way to easily run a
service or sequence of services.

This seems to have two main usages for testing.
1/ Direct Testing:
run a service against the seed data and check the results.

2/ Indirect Testing:
If you already have a suite of tests wired up as services, you could use
the RunService patch as a way to automate the running of these from the
browser and check the success or fail status. This would involve
creating a script to run each of the services. Obviously as the
structure of the automation for running the services would be pretty
uniform (I imagine), you could easily auto-generate the Selenium script
to control the test services.

Obviously there's a lot that could be done to improve that patch,
especially for case 1 above, like more flexibility in renaming the
attributes before you save them to the session, or perhaps a dropdown of
available values already saved to the session. Anyway there's enough
there to get some use out of it for now.

I guess the next step is to get the Selenium test runner integrated. -
I'll do this tomorrow.

Let me know what you think of all this...

- Andrew




On Wed, 2007-01-31 at 14:35 -0700, Al Byers wrote:

> Andrew,
>
> I poked around in your patch. I like the idea from the point of view that it
> gives you a screen from which to select tests. Is your remote service
> calling approach meant to be compatible with Selenium or is it to be used in
> parallel?
>
> -Al
>
> On 1/31/07, Andrew Sykes <[hidden email]> wrote:
> >
> > David,
> >
> > Is there any reason why we can't get the Selenium test runner mounted
> > and committed into /webtools?
> >
> > I'm a bit unclear about what everyone is hoping for from the
> > integration. Are we looking to introduce a (OfBiz specific) technology
> > agnostic layer for the definition of test actions? Or do we want to make
> > a binding decision on the set of tools to use?
> >
> > - Andrew
> >
> > On Wed, 2007-01-31 at 17:25 +0000, Andrew Sykes wrote:
> > > David,
> > >
> > > I've added a patch to Jira for this...
> > > https://issues.apache.org/jira/browse/OFBIZ-677
> > >
> > > - Andrew
> > >
> > >
> > > On Tue, 2007-01-30 at 13:31 -0700, David E. Jones wrote:
> > > > Andrew,
> > > >
> > > > Okay, I see where you're going with that. It sounds like a great idea
> > > > and very do-able, and useful for many things other than just testing.
> > > >
> > > > BTW, In general I do really like this approach of writing unit tests
> > > > as services so we can take advantage of all of the flexibility and
> > > > efficiency that we get for the main application code.
> > > >
> > > > If you (or anybody!) wants to work on this, please do! I'll try to
> > > > bring it up during the dev conference too as we're working on testing
> > > > infrastructure if it hasn't been implemented by then.
> > > >
> > > > -David
> > > >
> > > >
> > > > On Jan 30, 2007, at 6:37 AM, Andrew Sykes wrote:
> > > >
> > > > > David,
> > > > >
> > > > > I think we're talking about different things here, perhaps I should
> > > > > detail the suggestion a bit more clearly...
> > > > >
> > > > > The idea was to have a page that allowed you to run a service
> > > > > synchronously much like the "schedule service", however, it would
> > then
> > > > > display the results tabularly in the browser. For each value pair
> > > > > displayed, there would be a checkbox to allow you to save the value
> > in
> > > > > the session, then when you returned to run another service if the
> > > > > one of
> > > > > the input params matched one of the previous saved values, it would
> > > > > automatically populate the input box.
> > > > >
> > > > > This would allow people relying predominantly on a browser based
> > test
> > > > > tool to run pretty fancy multi-service sequences.
> > > > >
> > > > > I admit, it does sound a bit hacky, but I have a rough draft which
> > I'm
> > > > > using for some testing and it does make certain things a lot easier.
> > > > >
> > > > > Can you give me your thoughts please?
> > > > >
> > > > > - Andrew
> > > > >
> > > > >
> > > > > On Mon, 2007-01-29 at 20:35 -0700, David E. Jones wrote:
> > > > >> I'd really prefer to do what has been proposed as a best practice
> > and
> > > > >> write tests using the same OFBiz framework tools that we use to
> > write
> > > > >> applications, like simple-methods, services, etc...
> > > > >>
> > > > >> But yes, it is possible to call a service through a web request and
> > > > >> there is one in the webtools wecapp that has been there for years.
> > > > >> The trick is you have to set export="true" for all services called
> > > > >> this way, which is another reason to do logic-level test (including
> > > > >> service calls) in a more black-box way, especially if they are not
> > > > >> for testing things that are intended to be available externally.
> > > > >>
> > > > >> -David
> > > > >>
> > > > >>
> > > > >> On Jan 29, 2007, at 4:01 AM, Andrew Sykes wrote:
> > > > >>
> > > > >>> Assuming an automated web browser type technology is the way to
> > > > >>> go for
> > > > >>> testing...
> > > > >>>
> > > > >>> What does everyone think of having an option to run a service
> > > > >>> synchronously from webtools?
> > > > >>>
> > > > >>> This would allow a lot of clever asserts from the test tool?
> > > > >>> Without the
> > > > >>> need to make the tool dispatcher aware? Would this be an adequate
> > > > >>> approach?
> > > > >>> --
> > > > >>> Kind Regards
> > > > >>> Andrew Sykes <[hidden email]>
> > > > >>> Sykes Development Ltd
> > > > >>> http://www.sykesdevelopment.com
> > > > >>>
> > > > >>
> > > > > --
> > > > > Kind Regards
> > > > > Andrew Sykes <[hidden email]>
> > > > > Sykes Development Ltd
> > > > > http://www.sykesdevelopment.com
> > > > >
> > > >
> > --
> > Kind Regards
> > Andrew Sykes <[hidden email]>
> > Sykes Development Ltd
> > http://www.sykesdevelopment.com
> >
> >
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

Reply | Threaded
Open this post in threaded view
|

Re: Selenium

Rahul Chaudhari
In reply to this post by Andrew Sykes
Hi,

Can you please tell me how to handle RAD .net controls in Selenium using perl?
While recording these controls are not getting recorded. Please suggest the way out.

Thanks

-Rahul




Andrew Sykes wrote
Chand,

I have been thinking along the same lines.

I think this would be well worth considering as it would document how to
do a lot of the clever things that the seed/demo data already does for
you.

One problem with this is that for a production deployment, being forced
to use Selenium to install seed data would be about as popular a combo
as flatulence and space suits!

So the question is, can anyone think of a clever way to offer both
options without doubling up i.e. maintaining two sets of seed/demo data?

Or, could the demo data be migrated to Selenium leaving only the seed
data to be loaded directly?

Any thoughts?

- Andrew



On Mon, 2007-01-29 at 01:38 -0800, Chandresh Turakhia wrote:
> Tim , Peter :
>
> Can I share unrealized use of Selenium for the team.
>
> (1) works as "great DEMO platform".
>
> Typically new user downlown the ofbiz runs it. works.
>
> Then he tries to findle around the system - create user etc. run a sample ecommerce transaction. He tries to figure out various features of ofbiz.
>
> Instead of Selenium can be used to "RE-RUN" standard demos on his box. If Selenium scripts are parameterized or he can fiddle with the "Re run " variables; he can see for himself different "Use Cases" of ofbiz for himself.  Seed data population can be "Seleniumized"
>
> Gives him confidence.
>
> (2) User Load Testings.
>
> Did some work on Mircrosoft Test platform for commercial erp. I am sure Seleim can also do similiar work.
>
> Logical steps were
>
> for 10 times in loop
> {
>   a.. Create user
>   b.. Save it password gererated in file with name based on userid.
>   c.. Create Purchase Order.
>   d.. Add 10 items ( configurable based on conf files )
>   e.. Save Generated PurchaseOrderID in file.
> }
>   a.. Wait 10 minutes.
>   b.. Login as different standard executive userid
>   c.. get "Generated PurchaseOrderIDs" from file
> for each "Generated PurchaseOrderID"
> {
>   a..     Randomly authorize or reject it
> }
>
>
>
>
>   ----- Original Message -----
>   From: Tim Ruppert
>   To: dev@ofbiz.apache.org
>   Sent: Friday, January 26, 2007 1:54 PM
>   Subject: Re: Selenium
>
>
>   Peter, there is interest for sure.
>
>
>   Cheers,
>   Tim
>
>   --
>   Tim Ruppert
>   HotWax Media
>   http://www.hotwaxmedia.com
>
>
>   o:801.649.6594
>   f:801.649.6595
>
>
>
>
>   On Jan 26, 2007, at 2:42 PM, Peter Goron wrote:
>
>
>     Hi Andrew,
>
>
>     We use Selenium since six month to check there is no regression of the
>     business logic of a project based on OFBiz (Neogia[1]) and we are very
>     satisfied of this tool. Tests are easy to write and modify by hands, and
>     they can be played in all browsers with javascript support.
>     Selenium-IDE helps us a lot to write initial test but we often need to
>     tweak xpath expressions to be less sensible to html layout change.
>
>
>     The most difficult part is to write tests that are independent and
>     repeatable (particularly with cross-process tests like order and
>     shipment).
>
>
>     On the technical side, Selenium test runner has been embedded in a
>     webapp into testtool component [2] and is accessible from webtools
>     component (Functional Test Suites link [3]). Tests are stored in each
>     component's webapps as html files [4].
>     We have two kinds of test suites :
>     - component's test suite : run all tests of a given component
>     - all-in-one test suite : run all tests
>     We run the latest one before each release.
>
>
>     I can submit a new version of this work under Apache License on JIRA if
>     there is an interest.
>
>
>     Peter
>
>
>     [1] - http://www.neogia.org/
>     [2] -
>     http://labs.libre-entreprise.org/plugins/scmcvs/cvsweb.php/ofbizNeogia/framework/testtools/webapp/?cvsroot=neogia
>     [3] - https://demo.neogia.org/webtools/control/main (demo site may be
>     broken)
>     [4] -
>     http://labs.libre-entreprise.org/plugins/scmcvs/cvsweb.php/ofbizNeogia/neogia/accounting/webapp/accounting/tests/?cvsroot=neogia
>
>
>     Le jeudi 25 janvier 2007 à 21:46 +0000, Andrew Sykes a écrit :
>       Hey!
>
>
>       My thread has been hijacked! ;-)
>
>
>       Can someone say something about, er what was it again, oh yes, Selenium.
>
>
>       - Andrew
>
>
>
>
>       On Thu, 2007-01-25 at 14:15 -0700, David E. Jones wrote:
>         Isn't it actually "dev-unsubscribe@ofbiz.apache.org"?
>
>
>         Sorry to all about this, there has been some confusion related to the  
>         recent mailing list migration, including the fact that the email  
>         addresses on the mailing list pages (like http://mail- 
>         archives.apache.org/mod_mbox/ofbiz-dev/) are incorrect and we are  
>         still waiting for the ASF infra team to take care of this. This is  
>         also happening partially because most of the OFBiz PMC members are  
>         really slammed with contracts and other concerns right now (which is  
>         really weird because January is usually slow...).
>
>
>         -David
>
>
>
>
>         On Jan 25, 2007, at 12:57 PM, Jacques Le Roux wrote:
>
>
>           Mmm, was ofbiz-dev-unsubscribe@ofbiz.apache.org of course
>
>
>           Jacques
>
>
>
>
>           ----- Original Message -----
>           From: "Jacques Le Roux" <jacques.le.roux@les7arts.com>
>           To: <madtechie3000@yahoo.co.uk>
>           Cc: <dev@ofbiz.apache.org>
>           Sent: Thursday, January 25, 2007 6:52 PM
>           Subject: Re: Selenium
>
>
>
>
>             Please send a blank mesage with title unsubscribe (optionnal) to  
>             ofbiz-user-unsubscribe@ofbiz.apache.org
>
>
>             Jacques
>
>
>             ----- Original Message -----
>             From: "PhantomsHorridC" <madtechie3000@yahoo.co.uk>
>             To: <dev@ofbiz.apache.org>; <andrew@sykesdevelopment.com>
>             Sent: Thursday, January 25, 2007 5:19 PM
>             Subject: Re: Selenium
>
>
>
>
>               REMOVE ME FROM THIS LIST
>
>
>
>
>
--
Kind Regards
Andrew Sykes <andrew@sykesdevelopment.com>
Sykes Development Ltd
http://www.sykesdevelopment.com
Reply | Threaded
Open this post in threaded view
|

Re: Selenium

Jacques Le Roux
Administrator
Please use rather user ML for such questions, see why here :
http://docs.ofbiz.org/display/OFBADMIN/Mailing+Lists#MailingLists-DeveloperList:dev@...

Thanks

Jacques

From: "Rahul Chaudhari" <[hidden email]>

>
> Hi,
>
> Can you please tell me how to handle RAD .net controls in Selenium using
> perl?
> While recording these controls are not getting recorded. Please suggest the
> way out.
>
> Thanks
>
> -Rahul
>
>
>
>
>
> Andrew Sykes wrote:
>>
>> Chand,
>>
>> I have been thinking along the same lines.
>>
>> I think this would be well worth considering as it would document how to
>> do a lot of the clever things that the seed/demo data already does for
>> you.
>>
>> One problem with this is that for a production deployment, being forced
>> to use Selenium to install seed data would be about as popular a combo
>> as flatulence and space suits!
>>
>> So the question is, can anyone think of a clever way to offer both
>> options without doubling up i.e. maintaining two sets of seed/demo data?
>>
>> Or, could the demo data be migrated to Selenium leaving only the seed
>> data to be loaded directly?
>>
>> Any thoughts?
>>
>> - Andrew
>>
>>
>>
>> On Mon, 2007-01-29 at 01:38 -0800, Chandresh Turakhia wrote:
>>> Tim , Peter :
>>>
>>> Can I share unrealized use of Selenium for the team.
>>>
>>> (1) works as "great DEMO platform".
>>>
>>> Typically new user downlown the ofbiz runs it. works.
>>>
>>> Then he tries to findle around the system - create user etc. run a sample
>>> ecommerce transaction. He tries to figure out various features of ofbiz.
>>>
>>> Instead of Selenium can be used to "RE-RUN" standard demos on his box. If
>>> Selenium scripts are parameterized or he can fiddle with the "Re run "
>>> variables; he can see for himself different "Use Cases" of ofbiz for
>>> himself.  Seed data population can be "Seleniumized"
>>>
>>> Gives him confidence.
>>>
>>> (2) User Load Testings.
>>>
>>> Did some work on Mircrosoft Test platform for commercial erp. I am sure
>>> Seleim can also do similiar work.
>>>
>>> Logical steps were
>>>
>>> for 10 times in loop
>>> {
>>>   a.. Create user
>>>   b.. Save it password gererated in file with name based on userid.
>>>   c.. Create Purchase Order.
>>>   d.. Add 10 items ( configurable based on conf files )
>>>   e.. Save Generated PurchaseOrderID in file.
>>> }
>>>   a.. Wait 10 minutes.
>>>   b.. Login as different standard executive userid
>>>   c.. get "Generated PurchaseOrderIDs" from file
>>> for each "Generated PurchaseOrderID"
>>> {
>>>   a..     Randomly authorize or reject it
>>> }
>>>
>>>
>>>
>>>
>>>   ----- Original Message -----
>>>   From: Tim Ruppert
>>>   To: [hidden email]
>>>   Sent: Friday, January 26, 2007 1:54 PM
>>>   Subject: Re: Selenium
>>>
>>>
>>>   Peter, there is interest for sure.
>>>
>>>
>>>   Cheers,
>>>   Tim
>>>
>>>   --
>>>   Tim Ruppert
>>>   HotWax Media
>>>   http://www.hotwaxmedia.com
>>>
>>>
>>>   o:801.649.6594
>>>   f:801.649.6595
>>>
>>>
>>>
>>>
>>>   On Jan 26, 2007, at 2:42 PM, Peter Goron wrote:
>>>
>>>
>>>     Hi Andrew,
>>>
>>>
>>>     We use Selenium since six month to check there is no regression of
>>> the
>>>     business logic of a project based on OFBiz (Neogia[1]) and we are
>>> very
>>>     satisfied of this tool. Tests are easy to write and modify by hands,
>>> and
>>>     they can be played in all browsers with javascript support.
>>>     Selenium-IDE helps us a lot to write initial test but we often need
>>> to
>>>     tweak xpath expressions to be less sensible to html layout change.
>>>
>>>
>>>     The most difficult part is to write tests that are independent and
>>>     repeatable (particularly with cross-process tests like order and
>>>     shipment).
>>>
>>>
>>>     On the technical side, Selenium test runner has been embedded in a
>>>     webapp into testtool component [2] and is accessible from webtools
>>>     component (Functional Test Suites link [3]). Tests are stored in each
>>>     component's webapps as html files [4].
>>>     We have two kinds of test suites :
>>>     - component's test suite : run all tests of a given component
>>>     - all-in-one test suite : run all tests
>>>     We run the latest one before each release.
>>>
>>>
>>>     I can submit a new version of this work under Apache License on JIRA
>>> if
>>>     there is an interest.
>>>
>>>
>>>     Peter
>>>
>>>
>>>     [1] - http://www.neogia.org/
>>>     [2] -
>>>
>>> http://labs.libre-entreprise.org/plugins/scmcvs/cvsweb.php/ofbizNeogia/framework/testtools/webapp/?cvsroot=neogia
>>>     [3] - https://demo.neogia.org/webtools/control/main (demo site may be
>>>     broken)
>>>     [4] -
>>>
>>> http://labs.libre-entreprise.org/plugins/scmcvs/cvsweb.php/ofbizNeogia/neogia/accounting/webapp/accounting/tests/?cvsroot=neogia
>>>
>>>
>>>     Le jeudi 25 janvier 2007 à 21:46 +0000, Andrew Sykes a écrit :
>>>       Hey!
>>>
>>>
>>>       My thread has been hijacked! ;-)
>>>
>>>
>>>       Can someone say something about, er what was it again, oh yes,
>>> Selenium.
>>>
>>>
>>>       - Andrew
>>>
>>>
>>>
>>>
>>>       On Thu, 2007-01-25 at 14:15 -0700, David E. Jones wrote:
>>>         Isn't it actually "[hidden email]"?
>>>
>>>
>>>         Sorry to all about this, there has been some confusion related to
>>> the
>>>         recent mailing list migration, including the fact that the email
>>>         addresses on the mailing list pages (like http://mail-
>>>         archives.apache.org/mod_mbox/ofbiz-dev/) are incorrect and we are
>>>         still waiting for the ASF infra team to take care of this. This
>>> is
>>>         also happening partially because most of the OFBiz PMC members
>>> are
>>>         really slammed with contracts and other concerns right now (which
>>> is
>>>         really weird because January is usually slow...).
>>>
>>>
>>>         -David
>>>
>>>
>>>
>>>
>>>         On Jan 25, 2007, at 12:57 PM, Jacques Le Roux wrote:
>>>
>>>
>>>           Mmm, was [hidden email] of course
>>>
>>>
>>>           Jacques
>>>
>>>
>>>
>>>
>>>           ----- Original Message -----
>>>           From: "Jacques Le Roux" <[hidden email]>
>>>           To: <[hidden email]>
>>>           Cc: <[hidden email]>
>>>           Sent: Thursday, January 25, 2007 6:52 PM
>>>           Subject: Re: Selenium
>>>
>>>
>>>
>>>
>>>             Please send a blank mesage with title unsubscribe (optionnal)
>>> to
>>>             [hidden email]
>>>
>>>
>>>             Jacques
>>>
>>>
>>>             ----- Original Message -----
>>>             From: "PhantomsHorridC" <[hidden email]>
>>>             To: <[hidden email]>; <[hidden email]>
>>>             Sent: Thursday, January 25, 2007 5:19 PM
>>>             Subject: Re: Selenium
>>>
>>>
>>>
>>>
>>>               REMOVE ME FROM THIS LIST
>>>
>>>
>>>
>>>
>>>
>> --
>> Kind Regards
>> Andrew Sykes <[hidden email]>
>> Sykes Development Ltd
>> http://www.sykesdevelopment.com
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Selenium-tp8635367p20108179.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>
>

12