SeasideTesting and WebTester w/ Selenium

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

SeasideTesting and WebTester w/ Selenium

Joel Turnbull-2

I'm a little confused about the state of the SeasideTesting package.

I started with this tutorial http://bit.ly/aEwrSb. Installing the latest package in Pharo, it was obvious that I either had the wrong package, or things had changed quite a bit since that was written. But, using a combination of that tutorial, and the example classes, I've been able to successfully use it, and like it, until I got into my components that utilize jQuery. I see in the tutorial that there are some methods like assertEventually: that were provided to handle jQuery calls. However quickly browsing through the classes in my SeasideTesting package, I seem to be missing jQuery examples, or methods that compare to assertEventually:

So last night I took a look at Selenium RC and WebTester, and was pretty impressed ( http://bit.ly/cr2vjK ). Seems like it can definitely handle my jQuery problem.

However before I consider switching, I wanted to get the opinions and recommendations of those on the list regarding these two options, as I've already done quite a bit of work in SeasideTesting, and I'm pretty sure that I'm just missing how to use it with jQuery. Also, do you foresee any problems with either of these testing frameworks if I need to scale up to Gemstone?

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SeasideTesting and WebTester w/ Selenium

Johan Brichau-2
Joel,

Did you install SeasideTesting using the Metacello configuration? Or did you load the SeasideTestingR29 package? This last one is the old version. I now recommend using the new version.

The SeasideTesting package for Pharo/Squeak is a 'port in progress' (this is work from David Shaffer who is now developing in VW). The simulated browser testing should work but the testing using the external browser (which will let you use the jQuery examples you refer to) has not been ported yet.

I am currently also using both SeasideTesting and WebTester for testing our Seaside application. The first one for 'raw' component testing and the second one for in-browser behaviour testing.
Given that SeasideTesting will rely on FFI for external browser testing and that WebTester uses sockets for that, my impression is that WebTester will have no problem to get to work in Gemstone. I am therefore pondering on how to proceed with the port of the external browser testing in SeasideTesting. I have the impression it makes more sense to combine SeasideTesting and WebTester for this.

On 24 Aug 2010, at 20:15, Joel Turnbull wrote:

>
> I'm a little confused about the state of the SeasideTesting package.
>
> I started with this tutorial http://bit.ly/aEwrSb. Installing the latest package in Pharo, it was obvious that I either had the wrong package, or things had changed quite a bit since that was written. But, using a combination of that tutorial, and the example classes, I've been able to successfully use it, and like it, until I got into my components that utilize jQuery. I see in the tutorial that there are some methods like assertEventually: that were provided to handle jQuery calls. However quickly browsing through the classes in my SeasideTesting package, I seem to be missing jQuery examples, or methods that compare to assertEventually:
>
> So last night I took a look at Selenium RC and WebTester, and was pretty impressed ( http://bit.ly/cr2vjK ). Seems like it can definitely handle my jQuery problem.
>
> However before I consider switching, I wanted to get the opinions and recommendations of those on the list regarding these two options, as I've already done quite a bit of work in SeasideTesting, and I'm pretty sure that I'm just missing how to use it with jQuery. Also, do you foresee any problems with either of these testing frameworks if I need to scale up to Gemstone?
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SeasideTesting and WebTester w/ Selenium

Bart Gauquie

 >Given that SeasideTesting will rely on FFI for external browser testing and that WebTester uses sockets for that, my impression is that WebTester will have >no problem to get to work in Gemstone. I am therefore pondering on how to proceed with the port of the external browser testing in SeasideTesting. I have >the impression it makes more sense to combine SeasideTesting and WebTester for this.

I've only tested WebTester on Pharo. Not on Gemstone yet. I've had to apply a hack in HttpSocket for WebTester because there is a bug in Selenium RC's internal webserver. Symptoms without the hack were timeout exceptions trying to connecting to the Selenium RC. If HttpSocket is available in Gemstone, it should work.

Let me know if you have any problems.

Kind Regards,

Bart

--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SeasideTesting and WebTester w/ Selenium

Bart Gauquie
Stop. I've just remembered. I've used traits in WebTester. That is not supported in Gemstone (yet?). So running webtester tests in Gemstone will not work for now.

Bart

On Wed, Aug 25, 2010 at 8:56 AM, Bart Gauquie <[hidden email]> wrote:

 >Given that SeasideTesting will rely on FFI for external browser testing and that WebTester uses sockets for that, my impression is that WebTester will have >no problem to get to work in Gemstone. I am therefore pondering on how to proceed with the port of the external browser testing in SeasideTesting. I have >the impression it makes more sense to combine SeasideTesting and WebTester for this.

I've only tested WebTester on Pharo. Not on Gemstone yet. I've had to apply a hack in HttpSocket for WebTester because there is a bug in Selenium RC's internal webserver. Symptoms without the hack were timeout exceptions trying to connecting to the Selenium RC. If HttpSocket is available in Gemstone, it should work.

Let me know if you have any problems.

Kind Regards,

Bart

--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill



--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SeasideTesting and WebTester w/ Selenium

cdavidshaffer
In reply to this post by Johan Brichau-2
 On 08/25/10 02:22, Johan Brichau wrote:
> I am currently also using both SeasideTesting and WebTester for testing our Seaside application. The first one for 'raw' component testing and the second one for in-browser behaviour testing.
> Given that SeasideTesting will rely on FFI for external browser testing and that WebTester uses sockets for that, my impression is that WebTester will have no problem to get to work in Gemstone. I am therefore pondering on how to proceed with the port of the external browser testing in SeasideTesting. I have the impression it makes more sense to combine SeasideTesting and WebTester for this.

SeasideTesting only needs a way to raise the browser on a URL.  After
that, all communication is done via HTTP.  So FFI is needed, but only if
that's how you open an external web browser from Squeak/Pharo.  How does
WebTester open the initial web browser window...if it doesn't need FFI
then I suggest using the same mechanism with the SeasideTesting port.

David

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SeasideTesting and WebTester w/ Selenium

Bart Gauquie
WebTester opens a browser by sending a http request to Selenium Remote Control (http://seleniumhq.org/projects/remote-control/). And then this remote control starts the browser. Selenium Remote Control is a java process you have to start before starting the selenium tests in Smalltalk.

On Wed, Aug 25, 2010 at 12:33 PM, C. David Shaffer <[hidden email]> wrote:
 On 08/25/10 02:22, Johan Brichau wrote:
> I am currently also using both SeasideTesting and WebTester for testing our Seaside application. The first one for 'raw' component testing and the second one for in-browser behaviour testing.
> Given that SeasideTesting will rely on FFI for external browser testing and that WebTester uses sockets for that, my impression is that WebTester will have no problem to get to work in Gemstone. I am therefore pondering on how to proceed with the port of the external browser testing in SeasideTesting. I have the impression it makes more sense to combine SeasideTesting and WebTester for this.

SeasideTesting only needs a way to raise the browser on a URL.  After
that, all communication is done via HTTP.  So FFI is needed, but only if
that's how you open an external web browser from Squeak/Pharo.  How does
WebTester open the initial web browser window...if it doesn't need FFI
then I suggest using the same mechanism with the SeasideTesting port.

David

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SeasideTesting and WebTester w/ Selenium

cdavidshaffer
In reply to this post by Joel Turnbull-2
 On 08/24/10 14:15, Joel Turnbull wrote:

>
> I'm a little confused about the state of the SeasideTesting package.
>
> I started with this tutorial http://bit.ly/aEwrSb. Installing the
> latest package in Pharo, it was obvious that I either had the wrong
> package, or things had changed quite a bit since that was written.
> But, using a combination of that tutorial, and the example classes,
> I've been able to successfully use it, and like it, until I got into
> my components that utilize jQuery. I see in the tutorial that there
> are some methods like assertEventually: that were provided to handle
> jQuery calls. However quickly browsing through the classes in my
> SeasideTesting package, I seem to be missing jQuery examples, or
> methods that compare to assertEventually:
>
> So last night I took a look at Selenium RC and WebTester, and was
> pretty impressed ( http://bit.ly/cr2vjK ). Seems like it can
> definitely handle my jQuery problem.
>
> However before I consider switching, I wanted to get the opinions and
> recommendations of those on the list regarding these two options, as
> I've already done quite a bit of work in SeasideTesting, and I'm
> pretty sure that I'm just missing how to use it with jQuery. Also, do
> you foresee any problems with either of these testing frameworks if I
> need to scale up to Gemstone

I highly recommend Selenium.  I don't know WebTester but if it is based
on Selenium it has some advantages over SeasideTesting's external
browser support (more than one maintainer being one of them).  I've been
using Selenium for functional testing for years and love it.  The only
reason that I added external browser support to SeasideTesting was to
test components (unit tests) with javascript interactions.  I found
using Selenium problematic in this case but WebTester may have solved that.

That being said, I'm not going to be switching to WebTester any time
soon :-)  Now that I have it basically working, I really love using
SeasideTesting from unit tests up through functional tests (although
there are still some cases where I use Selenium for functional tests).
It gives mean a core lingua franca for all levels of testing.  I've
built pretty substantial functional testing frameworks on top of it.

As Johan mentioned, it looks like external browser support isn't ready
in the Squeak/Pharo port.  I can't imagine this would take much work to
remedy.

David
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SeasideTesting and WebTester w/ Selenium

cdavidshaffer
In reply to this post by Bart Gauquie
 On 08/25/10 06:49, Bart Gauquie wrote:
> WebTester opens a browser by sending a http request to Selenium Remote
> Control (http://seleniumhq.org/projects/remote-control/). And then
> this remote control starts the browser. Selenium Remote Control is a
> java process you have to start before starting the selenium tests in
> Smalltalk.
>

I see.  I'm sure that makes sense for Selenium but for SeasideTesting
the best option is raising a browser window from Smalltalk (you could
ask the user to do it for you if you are really allergic to FFI).  This
is especially true on build servers where ST is running inside a VNC
session, for example.

David

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SeasideTesting and WebTester w/ Selenium

Joel Turnbull-2
Very helpful, thank you. It occurred to me last night as I was playing some more with WebTester that it isn't necessarily a mutually exclusive decision. Like Johan stated, each  can be utilized for different kinds of testing.


On Wed, Aug 25, 2010 at 7:16 AM, C. David Shaffer <[hidden email]> wrote:
 On 08/25/10 06:49, Bart Gauquie wrote:
> WebTester opens a browser by sending a http request to Selenium Remote
> Control (http://seleniumhq.org/projects/remote-control/). And then
> this remote control starts the browser. Selenium Remote Control is a
> java process you have to start before starting the selenium tests in
> Smalltalk.
>

I see.  I'm sure that makes sense for Selenium but for SeasideTesting
the best option is raising a browser window from Smalltalk (you could
ask the user to do it for you if you are really allergic to FFI).  This
is especially true on build servers where ST is running inside a VNC
session, for example.

David

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SeasideTesting and WebTester w/ Selenium

Joel Turnbull-2

I'm not sure if I'm doing this right.

How do I, with WebTester, test that <div class="foo"> is present? This is boggling me, and testing something like that seemed pretty obvious with SeasideTesting. I ended up doing this, but yikes...

    self assert: ( self webTester processCommand: 'isElementPresent' withParams: ( Array with: '//div[@class=''foo'']' )) = 'true'

Am I trying to do something that WebTester is not suited for?





On Wed, Aug 25, 2010 at 8:56 AM, Joel Turnbull <[hidden email]> wrote:
Very helpful, thank you. It occurred to me last night as I was playing some more with WebTester that it isn't necessarily a mutually exclusive decision. Like Johan stated, each  can be utilized for different kinds of testing.



On Wed, Aug 25, 2010 at 7:16 AM, C. David Shaffer <[hidden email]> wrote:
 On 08/25/10 06:49, Bart Gauquie wrote:
> WebTester opens a browser by sending a http request to Selenium Remote
> Control (http://seleniumhq.org/projects/remote-control/). And then
> this remote control starts the browser. Selenium Remote Control is a
> java process you have to start before starting the selenium tests in
> Smalltalk.
>

I see.  I'm sure that makes sense for Selenium but for SeasideTesting
the best option is raising a browser window from Smalltalk (you could
ask the user to do it for you if you are really allergic to FFI).  This
is especially true on build servers where ST is running inside a VNC
session, for example.

David

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SeasideTesting and WebTester w/ Selenium

Bart Gauquie
Joel,

WebTester is still in development. New features are added if needed.

I agree that the code you've written is yikes ...

What you've should be able to write is something like:

     self assert: (self divByXPath: '@class="foo"') isPresent

which will encapsulate the code you've provided. (analoguous to the other encapsulations).

If I find the time, I will add it ... or I welcome your try to add it ...

Kind Regards,

Bart


On Fri, Aug 27, 2010 at 6:33 AM, Joel Turnbull <[hidden email]> wrote:

I'm not sure if I'm doing this right.

How do I, with WebTester, test that <div class="foo"> is present? This is boggling me, and testing something like that seemed pretty obvious with SeasideTesting. I ended up doing this, but yikes...

    self assert: ( self webTester processCommand: 'isElementPresent' withParams: ( Array with: '//div[@class=''foo'']' )) = 'true'

Am I trying to do something that WebTester is not suited for?






On Wed, Aug 25, 2010 at 8:56 AM, Joel Turnbull <[hidden email]> wrote:
Very helpful, thank you. It occurred to me last night as I was playing some more with WebTester that it isn't necessarily a mutually exclusive decision. Like Johan stated, each  can be utilized for different kinds of testing.



On Wed, Aug 25, 2010 at 7:16 AM, C. David Shaffer <[hidden email]> wrote:
 On 08/25/10 06:49, Bart Gauquie wrote:
> WebTester opens a browser by sending a http request to Selenium Remote
> Control (http://seleniumhq.org/projects/remote-control/). And then
> this remote control starts the browser. Selenium Remote Control is a
> java process you have to start before starting the selenium tests in
> Smalltalk.
>

I see.  I'm sure that makes sense for Selenium but for SeasideTesting
the best option is raising a browser window from Smalltalk (you could
ask the user to do it for you if you are really allergic to FFI).  This
is especially true on build servers where ST is running inside a VNC
session, for example.

David

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SeasideTesting and WebTester w/ Selenium

Bart Gauquie
I found the time and uploaded a new version. Please give it a run.

I've also noticed that WebTester contains an awfull lot of duplicated code. Time to try out the reflective powers Smalltalk has I've learned in the meanwhile to fix this. :-)

Kind Regards,

Bart

On Fri, Aug 27, 2010 at 10:50 AM, Bart Gauquie <[hidden email]> wrote:
Joel,

WebTester is still in development. New features are added if needed.

I agree that the code you've written is yikes ...

What you've should be able to write is something like:

     self assert: (self divByXPath: '@class="foo"') isPresent

which will encapsulate the code you've provided. (analoguous to the other encapsulations).

If I find the time, I will add it ... or I welcome your try to add it ...

Kind Regards,

Bart


On Fri, Aug 27, 2010 at 6:33 AM, Joel Turnbull <[hidden email]> wrote:

I'm not sure if I'm doing this right.

How do I, with WebTester, test that <div class="foo"> is present? This is boggling me, and testing something like that seemed pretty obvious with SeasideTesting. I ended up doing this, but yikes...

    self assert: ( self webTester processCommand: 'isElementPresent' withParams: ( Array with: '//div[@class=''foo'']' )) = 'true'

Am I trying to do something that WebTester is not suited for?






On Wed, Aug 25, 2010 at 8:56 AM, Joel Turnbull <[hidden email]> wrote:
Very helpful, thank you. It occurred to me last night as I was playing some more with WebTester that it isn't necessarily a mutually exclusive decision. Like Johan stated, each  can be utilized for different kinds of testing.



On Wed, Aug 25, 2010 at 7:16 AM, C. David Shaffer <[hidden email]> wrote:
 On 08/25/10 06:49, Bart Gauquie wrote:
> WebTester opens a browser by sending a http request to Selenium Remote
> Control (http://seleniumhq.org/projects/remote-control/). And then
> this remote control starts the browser. Selenium Remote Control is a
> java process you have to start before starting the selenium tests in
> Smalltalk.
>

I see.  I'm sure that makes sense for Selenium but for SeasideTesting
the best option is raising a browser window from Smalltalk (you could
ask the user to do it for you if you are really allergic to FFI).  This
is especially true on build servers where ST is running inside a VNC
session, for example.

David

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill



--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SeasideTesting and WebTester w/ Selenium

Joel Turnbull-2
On Fri, Aug 27, 2010 at 6:55 AM, Bart Gauquie <[hidden email]> wrote:
I found the time and uploaded a new version. Please give it a run.

Ok, I understand now. I gave it a run and it's great, thanks!


I've also noticed that WebTester contains an awfull lot of duplicated code. Time to try out the reflective powers Smalltalk has I've learned in the meanwhile to fix this. :-)

Kind Regards,

Bart

On Fri, Aug 27, 2010 at 10:50 AM, Bart Gauquie <[hidden email]> wrote:
Joel,

WebTester is still in development. New features are added if needed.

I agree that the code you've written is yikes ...

What you've should be able to write is something like:

     self assert: (self divByXPath: '@class="foo"') isPresent

which will encapsulate the code you've provided. (analoguous to the other encapsulations).

If I find the time, I will add it ... or I welcome your try to add it ...

Kind Regards,

Bart


On Fri, Aug 27, 2010 at 6:33 AM, Joel Turnbull <[hidden email]> wrote:

I'm not sure if I'm doing this right.

How do I, with WebTester, test that <div class="foo"> is present? This is boggling me, and testing something like that seemed pretty obvious with SeasideTesting. I ended up doing this, but yikes...

    self assert: ( self webTester processCommand: 'isElementPresent' withParams: ( Array with: '//div[@class=''foo'']' )) = 'true'

Am I trying to do something that WebTester is not suited for?






On Wed, Aug 25, 2010 at 8:56 AM, Joel Turnbull <[hidden email]> wrote:
Very helpful, thank you. It occurred to me last night as I was playing some more with WebTester that it isn't necessarily a mutually exclusive decision. Like Johan stated, each  can be utilized for different kinds of testing.



On Wed, Aug 25, 2010 at 7:16 AM, C. David Shaffer <[hidden email]> wrote:
 On 08/25/10 06:49, Bart Gauquie wrote:
> WebTester opens a browser by sending a http request to Selenium Remote
> Control (http://seleniumhq.org/projects/remote-control/). And then
> this remote control starts the browser. Selenium Remote Control is a
> java process you have to start before starting the selenium tests in
> Smalltalk.
>

I see.  I'm sure that makes sense for Selenium but for SeasideTesting
the best option is raising a browser window from Smalltalk (you could
ask the user to do it for you if you are really allergic to FFI).  This
is especially true on build servers where ST is running inside a VNC
session, for example.

David

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill



--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SeasideTesting and WebTester w/ Selenium

Joel Turnbull-2

Bart,

It wasn't too long before I needed a span, so I had an idea and gave it a try.

I copied your new Div classes into generic Element classes. An element could be anything you are looking for with 'isElementPresent'. The test looks like:


testIsPresent
    self should: (self elementById: 'divId') isPresent.
    self should: (self elementById: 'spanId') isPresent.
    self shouldnt: (self elementById: 'someOtherId') isPresent.
   
    self should: (self elementByXPath: '//div[@class=''foo'']') isPresent.
    self should: (self elementByXPath: '//span[@class=''foo'']') isPresent.
    self shouldnt: (self elementByXPath: '//span[@class=''someOtherFooClass'']') isPresent.


Initially, it seems to be doing the trick.

Thanks,

Joel




On Fri, Aug 27, 2010 at 11:19 PM, Joel Turnbull <[hidden email]> wrote:
On Fri, Aug 27, 2010 at 6:55 AM, Bart Gauquie <[hidden email]> wrote:
I found the time and uploaded a new version. Please give it a run.

Ok, I understand now. I gave it a run and it's great, thanks!


I've also noticed that WebTester contains an awfull lot of duplicated code. Time to try out the reflective powers Smalltalk has I've learned in the meanwhile to fix this. :-)

Kind Regards,

Bart

On Fri, Aug 27, 2010 at 10:50 AM, Bart Gauquie <[hidden email]> wrote:
Joel,

WebTester is still in development. New features are added if needed.

I agree that the code you've written is yikes ...

What you've should be able to write is something like:

     self assert: (self divByXPath: '@class="foo"') isPresent

which will encapsulate the code you've provided. (analoguous to the other encapsulations).

If I find the time, I will add it ... or I welcome your try to add it ...

Kind Regards,

Bart


On Fri, Aug 27, 2010 at 6:33 AM, Joel Turnbull <[hidden email]> wrote:

I'm not sure if I'm doing this right.

How do I, with WebTester, test that <div class="foo"> is present? This is boggling me, and testing something like that seemed pretty obvious with SeasideTesting. I ended up doing this, but yikes...

    self assert: ( self webTester processCommand: 'isElementPresent' withParams: ( Array with: '//div[@class=''foo'']' )) = 'true'

Am I trying to do something that WebTester is not suited for?






On Wed, Aug 25, 2010 at 8:56 AM, Joel Turnbull <[hidden email]> wrote:
Very helpful, thank you. It occurred to me last night as I was playing some more with WebTester that it isn't necessarily a mutually exclusive decision. Like Johan stated, each  can be utilized for different kinds of testing.



On Wed, Aug 25, 2010 at 7:16 AM, C. David Shaffer <[hidden email]> wrote:
 On 08/25/10 06:49, Bart Gauquie wrote:
> WebTester opens a browser by sending a http request to Selenium Remote
> Control (http://seleniumhq.org/projects/remote-control/). And then
> this remote control starts the browser. Selenium Remote Control is a
> java process you have to start before starting the selenium tests in
> Smalltalk.
>

I see.  I'm sure that makes sense for Selenium but for SeasideTesting
the best option is raising a browser window from Smalltalk (you could
ask the user to do it for you if you are really allergic to FFI).  This
is especially true on build servers where ST is running inside a VNC
session, for example.

David

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill



--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SeasideTesting and WebTester w/ Selenium

Bart Gauquie
Kewl!. I gave you access to the repository. Can you share your code ? Thanks!

Bart

On Sat, Aug 28, 2010 at 6:02 AM, Joel Turnbull <[hidden email]> wrote:

Bart,

It wasn't too long before I needed a span, so I had an idea and gave it a try.

I copied your new Div classes into generic Element classes. An element could be anything you are looking for with 'isElementPresent'. The test looks like:


testIsPresent
    self should: (self elementById: 'divId') isPresent.
    self should: (self elementById: 'spanId') isPresent.
    self shouldnt: (self elementById: 'someOtherId') isPresent.
   
    self should: (self elementByXPath: '//div[@class=''foo'']') isPresent.
    self should: (self elementByXPath: '//span[@class=''foo'']') isPresent.
    self shouldnt: (self elementByXPath: '//span[@class=''someOtherFooClass'']') isPresent.


Initially, it seems to be doing the trick.

Thanks,

Joel





On Fri, Aug 27, 2010 at 11:19 PM, Joel Turnbull <[hidden email]> wrote:
On Fri, Aug 27, 2010 at 6:55 AM, Bart Gauquie <[hidden email]> wrote:
I found the time and uploaded a new version. Please give it a run.

Ok, I understand now. I gave it a run and it's great, thanks!


I've also noticed that WebTester contains an awfull lot of duplicated code. Time to try out the reflective powers Smalltalk has I've learned in the meanwhile to fix this. :-)

Kind Regards,

Bart

On Fri, Aug 27, 2010 at 10:50 AM, Bart Gauquie <[hidden email]> wrote:
Joel,

WebTester is still in development. New features are added if needed.

I agree that the code you've written is yikes ...

What you've should be able to write is something like:

     self assert: (self divByXPath: '@class="foo"') isPresent

which will encapsulate the code you've provided. (analoguous to the other encapsulations).

If I find the time, I will add it ... or I welcome your try to add it ...

Kind Regards,

Bart


On Fri, Aug 27, 2010 at 6:33 AM, Joel Turnbull <[hidden email]> wrote:

I'm not sure if I'm doing this right.

How do I, with WebTester, test that <div class="foo"> is present? This is boggling me, and testing something like that seemed pretty obvious with SeasideTesting. I ended up doing this, but yikes...

    self assert: ( self webTester processCommand: 'isElementPresent' withParams: ( Array with: '//div[@class=''foo'']' )) = 'true'

Am I trying to do something that WebTester is not suited for?






On Wed, Aug 25, 2010 at 8:56 AM, Joel Turnbull <[hidden email]> wrote:
Very helpful, thank you. It occurred to me last night as I was playing some more with WebTester that it isn't necessarily a mutually exclusive decision. Like Johan stated, each  can be utilized for different kinds of testing.



On Wed, Aug 25, 2010 at 7:16 AM, C. David Shaffer <[hidden email]> wrote:
 On 08/25/10 06:49, Bart Gauquie wrote:
> WebTester opens a browser by sending a http request to Selenium Remote
> Control (http://seleniumhq.org/projects/remote-control/). And then
> this remote control starts the browser. Selenium Remote Control is a
> java process you have to start before starting the selenium tests in
> Smalltalk.
>

I see.  I'm sure that makes sense for Selenium but for SeasideTesting
the best option is raising a browser window from Smalltalk (you could
ask the user to do it for you if you are really allergic to FFI).  This
is especially true on build servers where ST is running inside a VNC
session, for example.

David

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill



--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SeasideTesting and WebTester w/ Selenium

Joel Turnbull-2


On Sat, Aug 28, 2010 at 1:49 AM, Bart Gauquie <[hidden email]> wrote:

Kewl!. I gave you access to the repository. Can you share your code ? Thanks!

 
done!

Bart
 

On Sat, Aug 28, 2010 at 6:02 AM, Joel Turnbull <[hidden email]> wrote:

Bart,

It wasn't too long before I needed a span, so I had an idea and gave it a try.

I copied your new Div classes into generic Element classes. An element could be anything you are looking for with 'isElementPresent'. The test looks like:


testIsPresent
    self should: (self elementById: 'divId') isPresent.
    self should: (self elementById: 'spanId') isPresent.
    self shouldnt: (self elementById: 'someOtherId') isPresent.
   
    self should: (self elementByXPath: '//div[@class=''foo'']') isPresent.
    self should: (self elementByXPath: '//span[@class=''foo'']') isPresent.
    self shouldnt: (self elementByXPath: '//span[@class=''someOtherFooClass'']') isPresent.


Initially, it seems to be doing the trick.

Thanks,

Joel





On Fri, Aug 27, 2010 at 11:19 PM, Joel Turnbull <[hidden email]> wrote:
On Fri, Aug 27, 2010 at 6:55 AM, Bart Gauquie <[hidden email]> wrote:
I found the time and uploaded a new version. Please give it a run.

Ok, I understand now. I gave it a run and it's great, thanks!


I've also noticed that WebTester contains an awfull lot of duplicated code. Time to try out the reflective powers Smalltalk has I've learned in the meanwhile to fix this. :-)

Kind Regards,

Bart

On Fri, Aug 27, 2010 at 10:50 AM, Bart Gauquie <[hidden email]> wrote:
Joel,

WebTester is still in development. New features are added if needed.

I agree that the code you've written is yikes ...

What you've should be able to write is something like:

     self assert: (self divByXPath: '@class="foo"') isPresent

which will encapsulate the code you've provided. (analoguous to the other encapsulations).

If I find the time, I will add it ... or I welcome your try to add it ...

Kind Regards,

Bart


On Fri, Aug 27, 2010 at 6:33 AM, Joel Turnbull <[hidden email]> wrote:

I'm not sure if I'm doing this right.

How do I, with WebTester, test that <div class="foo"> is present? This is boggling me, and testing something like that seemed pretty obvious with SeasideTesting. I ended up doing this, but yikes...

    self assert: ( self webTester processCommand: 'isElementPresent' withParams: ( Array with: '//div[@class=''foo'']' )) = 'true'

Am I trying to do something that WebTester is not suited for?






On Wed, Aug 25, 2010 at 8:56 AM, Joel Turnbull <[hidden email]> wrote:
Very helpful, thank you. It occurred to me last night as I was playing some more with WebTester that it isn't necessarily a mutually exclusive decision. Like Johan stated, each  can be utilized for different kinds of testing.



On Wed, Aug 25, 2010 at 7:16 AM, C. David Shaffer <[hidden email]> wrote:
 On 08/25/10 06:49, Bart Gauquie wrote:
> WebTester opens a browser by sending a http request to Selenium Remote
> Control (http://seleniumhq.org/projects/remote-control/). And then
> this remote control starts the browser. Selenium Remote Control is a
> java process you have to start before starting the selenium tests in
> Smalltalk.
>

I see.  I'm sure that makes sense for Selenium but for SeasideTesting
the best option is raising a browser window from Smalltalk (you could
ask the user to do it for you if you are really allergic to FFI).  This
is especially true on build servers where ST is running inside a VNC
session, for example.

David

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill



--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside