You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Paul Spencer <pa...@apache.org> on 2006/11/25 23:01:17 UTC

I am working on a Selenium test suite.

I have started writing a Selenium test suite.  I have the following goals:

1) Provide a regression test environment.
2) Further my understanding on how the JSF components work.
3) Provide a simplified set of examples.
4) Provide a platform for easily developing a test case for a bug.

Currently I have implemented only a few of the tags, like <h:panelGrid> 
and <t:panelNavigation2>, but I intend on adding many more.  The test 
include a jsp page that sets many of the attribute for each tag and a 
Selenuim script that verifies the resulting HTML and functionality.  I 
have tried to minimize the amount of java code need to implement each 
tag, this keeps the test cases very simple.  Although much of this 
replicates what is currently in Tomahawk Examples, it does not rely on 
stylesheets or dynamically generated components.

I have run the test on HostedQA [1] so the results are publicly 
available.  The test are run against IE 7 and Firefox.  Currently IE7 is 
failing parts of the test, I suspect the failure have to do with how the 
test are address elements in the dom.

At this point I have committed none of the tests, but I would like to 
commit them soon.
1) Where is the best place to add them? I suspect the best place add
    this is myfaces/tomahawk/snapshot.

2) What should the artifactId be?  Currently it is myfaces-snapshot-testing.

Paul Spencer

[1] https://myfaces.hostedqa.com/project/122/session/suite/list

Re: I am working on a Selenium test suite.

Posted by Paul Spencer <pa...@apache.org>.
Wendy Smoak wrote:
> On 11/25/06, Paul Spencer <pa...@apache.org> wrote:
> 
>> Not a problem adding the test to the examples. I would prefer to group
>> them in a subdirectory.  Any suggestions for a name of that
>> subdirectory?  testSuite?
> 
> There are two parts to this, right?  The tests, and the companion JSPs.
> 
> IMO, the tests, (the html pages with tables that are the Selenium
> tests,) should go under src/test/selenium.  That's how things are set
> up in pom.xml now, at least.
> 
Correct, I would not change that.

> I don't have a strong preference for where you put the JSPs (and they
> can always be moved around later if anyone objects to what you pick.)
> 
Fair enough.  I will create a testSuite and place the jsp file their.

> Thanks,

Paul Spencer

Re: I am working on a Selenium test suite.

Posted by Wendy Smoak <ws...@gmail.com>.
On 11/25/06, Paul Spencer <pa...@apache.org> wrote:

> Not a problem adding the test to the examples. I would prefer to group
> them in a subdirectory.  Any suggestions for a name of that
> subdirectory?  testSuite?

There are two parts to this, right?  The tests, and the companion JSPs.

IMO, the tests, (the html pages with tables that are the Selenium
tests,) should go under src/test/selenium.  That's how things are set
up in pom.xml now, at least.

I don't have a strong preference for where you put the JSPs (and they
can always be moved around later if anyone objects to what you pick.)

Thanks,
-- 
Wendy

Re: I am working on a Selenium test suite.

Posted by Paul Spencer <pa...@apache.org>.
Wendy,

See below.

Wendy Smoak wrote:
> On 11/25/06, Paul Spencer <pa...@apache.org> wrote:
> 
>> Whoops, I used "snapshot" instead of "sandbox".
> 
>> From that I would assume that these are tests for the Tomahawk Sandbox
> components, which I don't think is the case.
> 
>> While I was working on the test suite, I thought about having one test
>> suite for MyFaces and one for Tomahawk instead of one in Tomahawk that
>> includes MyFaces tests.  Wherever the test suite(s) end up, they should
>> be a Maven project, like Tomahawk's Simple Example.
>>
>> So, where should the test suite(s) be added and what should they be 
>> named?
> 
> I'm resistant to adding another webapp module, especially to Core
> which doesn't currently have any.  My preference is to add these pages
> and tests to the existing 'simple' app.  That said, I'm not the one
> doing the work. :)
> 

Not a problem adding the test to the examples. I would prefer to group 
them in a subdirectory.  Any suggestions for a name of that 
subdirectory?  testSuite?

>> BTW: Running the test on HostedQA is taking a while, any ideas why?
> 
> They run in a virtual server, so it takes a while to set up.  If
> you're going to be running them repeatedly, I think there's a way to
> start the virtual server once so it will be there.  Send a note to the
> support address if you have any questions, Patrick [Lightbody] will be
> happy to help.
> 
> I'd suggest running the tests locally with the Selenium TestRunner
> while you're working out the details.  Then we can schedule Continuum
> to run them at HostedQA periodically.
> 

I do run them locally.

Paul Spencer

Re: I am working on a Selenium test suite.

Posted by Wendy Smoak <ws...@gmail.com>.
On 11/25/06, Paul Spencer <pa...@apache.org> wrote:

> Whoops, I used "snapshot" instead of "sandbox".

>From that I would assume that these are tests for the Tomahawk Sandbox
components, which I don't think is the case.

> While I was working on the test suite, I thought about having one test
> suite for MyFaces and one for Tomahawk instead of one in Tomahawk that
> includes MyFaces tests.  Wherever the test suite(s) end up, they should
> be a Maven project, like Tomahawk's Simple Example.
>
> So, where should the test suite(s) be added and what should they be named?

I'm resistant to adding another webapp module, especially to Core
which doesn't currently have any.  My preference is to add these pages
and tests to the existing 'simple' app.  That said, I'm not the one
doing the work. :)

> BTW: Running the test on HostedQA is taking a while, any ideas why?

They run in a virtual server, so it takes a while to set up.  If
you're going to be running them repeatedly, I think there's a way to
start the virtual server once so it will be there.  Send a note to the
support address if you have any questions, Patrick [Lightbody] will be
happy to help.

I'd suggest running the tests locally with the Selenium TestRunner
while you're working out the details.  Then we can schedule Continuum
to run them at HostedQA periodically.

-- 
Wendy

Re: I am working on a Selenium test suite.

Posted by Paul Spencer <pa...@apache.org>.
Wendy,
Whoops, I used "snapshot" instead of "sandbox".

While I was working on the test suite, I thought about having one test 
suite for MyFaces and one for Tomahawk instead of one in Tomahawk that 
includes MyFaces tests.  Wherever the test suite(s) end up, they should 
be a Maven project, like Tomahawk's Simple Example.

So, where should the test suite(s) be added and what should they be named?

BTW: Running the test on HostedQA is taking a while, any ideas why?

Paul Spencer

Wendy Smoak wrote:
> On 11/25/06, Paul Spencer <pa...@apache.org> wrote:
> 
>> At this point I have committed none of the tests, but I would like to
>> commit them soon.
>> 1) Where is the best place to add them? I suspect the best place add
>>     this is myfaces/tomahawk/snapshot.
>>
>> 2) What should the artifactId be?  Currently it is 
>> myfaces-snapshot-testing.
> 
> First, thanks for taking this on!
> 
> Why not add these tests to one of the existing apps?
> 
> The word 'snapshot' has a special meaning in Maven, that doesn't seem
> to apply here-- if it does have to be separate, this would be another
> "example" app that we could ship, both to demonstrate how to use the
> components and encourage this sort of testing.
> 
> -- 
> Wendy
> 


Re: I am working on a Selenium test suite.

Posted by Wendy Smoak <ws...@gmail.com>.
On 11/25/06, Paul Spencer <pa...@apache.org> wrote:

> At this point I have committed none of the tests, but I would like to
> commit them soon.
> 1) Where is the best place to add them? I suspect the best place add
>     this is myfaces/tomahawk/snapshot.
>
> 2) What should the artifactId be?  Currently it is myfaces-snapshot-testing.

First, thanks for taking this on!

Why not add these tests to one of the existing apps?

The word 'snapshot' has a special meaning in Maven, that doesn't seem
to apply here-- if it does have to be separate, this would be another
"example" app that we could ship, both to demonstrate how to use the
components and encourage this sort of testing.

--
Wendy

Re: AW: I am working on a Selenium test suite.

Posted by Paul Spencer <pa...@apache.org>.
Andreas,
Please refer to the file HowToAddATest.html [1].

Paul Spencer

[1]http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/HowToAddATest.html?view=markup


Andreas Berger wrote:
> I'm currently working on the XML files for automaticly generation of the
> components and tags (JSF 1.2). Additionally I'm developing some enhancements
> for the generator. Maybe It's a good idea to generate also testcases from
> the XML's. I dont know the format, but if you got an example I can have a
> look at what's possible.
> 
> Cheers Andreas
> 
> -----Ursprüngliche Nachricht-----
> Von: Paul Spencer [mailto:paulsp@apache.org] 
> Gesendet: Samstag, 25. November 2006 23:01
> An: MyFaces Development
> Betreff: I am working on a Selenium test suite.
> 
> I have started writing a Selenium test suite.  I have the following goals:
> 
> 1) Provide a regression test environment.
> 2) Further my understanding on how the JSF components work.
> 3) Provide a simplified set of examples.
> 4) Provide a platform for easily developing a test case for a bug.
> 
> Currently I have implemented only a few of the tags, like <h:panelGrid> and
> <t:panelNavigation2>, but I intend on adding many more.  The test include a
> jsp page that sets many of the attribute for each tag and a Selenuim script
> that verifies the resulting HTML and functionality.  I have tried to
> minimize the amount of java code need to implement each tag, this keeps the
> test cases very simple.  Although much of this replicates what is currently
> in Tomahawk Examples, it does not rely on stylesheets or dynamically
> generated components.
> 
> I have run the test on HostedQA [1] so the results are publicly available.
> The test are run against IE 7 and Firefox.  Currently IE7 is failing parts
> of the test, I suspect the failure have to do with how the test are address
> elements in the dom.
> 
> At this point I have committed none of the tests, but I would like to commit
> them soon.
> 1) Where is the best place to add them? I suspect the best place add
>     this is myfaces/tomahawk/snapshot.
> 
> 2) What should the artifactId be?  Currently it is myfaces-snapshot-testing.
> 
> Paul Spencer
> 
> [1] https://myfaces.hostedqa.com/project/122/session/suite/list
> 
> 


AW: I am working on a Selenium test suite.

Posted by Andreas Berger <an...@googlemail.com>.
I'm currently working on the XML files for automaticly generation of the
components and tags (JSF 1.2). Additionally I'm developing some enhancements
for the generator. Maybe It's a good idea to generate also testcases from
the XML's. I dont know the format, but if you got an example I can have a
look at what's possible.

Cheers Andreas

-----Ursprüngliche Nachricht-----
Von: Paul Spencer [mailto:paulsp@apache.org] 
Gesendet: Samstag, 25. November 2006 23:01
An: MyFaces Development
Betreff: I am working on a Selenium test suite.

I have started writing a Selenium test suite.  I have the following goals:

1) Provide a regression test environment.
2) Further my understanding on how the JSF components work.
3) Provide a simplified set of examples.
4) Provide a platform for easily developing a test case for a bug.

Currently I have implemented only a few of the tags, like <h:panelGrid> and
<t:panelNavigation2>, but I intend on adding many more.  The test include a
jsp page that sets many of the attribute for each tag and a Selenuim script
that verifies the resulting HTML and functionality.  I have tried to
minimize the amount of java code need to implement each tag, this keeps the
test cases very simple.  Although much of this replicates what is currently
in Tomahawk Examples, it does not rely on stylesheets or dynamically
generated components.

I have run the test on HostedQA [1] so the results are publicly available.
The test are run against IE 7 and Firefox.  Currently IE7 is failing parts
of the test, I suspect the failure have to do with how the test are address
elements in the dom.

At this point I have committed none of the tests, but I would like to commit
them soon.
1) Where is the best place to add them? I suspect the best place add
    this is myfaces/tomahawk/snapshot.

2) What should the artifactId be?  Currently it is myfaces-snapshot-testing.

Paul Spencer

[1] https://myfaces.hostedqa.com/project/122/session/suite/list