You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Jakob Homan (JIRA)" <ji...@apache.org> on 2010/04/26 06:26:32 UTC

[jira] Created: (HADOOP-6725) Evaluate HtmlUnit for unit and regression testing webpages

Evaluate HtmlUnit for unit and regression testing webpages
----------------------------------------------------------

                 Key: HADOOP-6725
                 URL: https://issues.apache.org/jira/browse/HADOOP-6725
             Project: Hadoop Common
          Issue Type: Test
          Components: test
            Reporter: Jakob Homan
            Priority: Minor


HtmlUnit (http://htmlunit.sourceforge.net/) looks like it may be a good tool to help unit testing and evaluating our various webpages throughout the project.  Currently this is done only occasionally in the code (usually falls to being a manual test during release cycles), and when it is done, usually the code to parse the webpage, etc. is re-written each time.  The framework is Apache licensed, so including it won't be an issue.  If it's found to be useful, new JIRAs for HDFS and MR should be opened.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6725) Evaluate HtmlUnit for unit and regression testing webpages

Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861754#action_12861754 ] 

Steve Loughran commented on HADOOP-6725:
----------------------------------------

I am +1 for this and anything else which tests the webapps. HtmlUnit is the best in-java web app test framework I know of; I use it on my code. Right now we have some tests for a servlet or two, but nothing looks at the JSP/webapp content, so things like HADOOP-6461 aren't being picked up

# HtmlUnit is looking at moving to the ASF; support from the Hadoop team would be welcome
# JSF unit is separate, it's testing Java Server Faces. HtmlUnit will happily test JSP and pages with javascript in them
# For ease of testing, HTML elements need IDs. HADOOP-5388 covers this. The tags and the tests can go hand in hand. 
# I can help with setting up the test framework, try and get Marc Guillemot to review the design too.

I would really benefit from some HtmlUnit tests that could be run against a live cluster rather than just a miniDFS and miniMR cluster; the tests could be something standalone/redistributable that could be given the URL of a NN, DN, JT or TT and scan through all the expected pages. Having sequences to submit jobs and other actions then becomes further work.


> Evaluate HtmlUnit for unit and regression testing webpages
> ----------------------------------------------------------
>
>                 Key: HADOOP-6725
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6725
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: test
>            Reporter: Jakob Homan
>            Priority: Minor
>
> HtmlUnit (http://htmlunit.sourceforge.net/) looks like it may be a good tool to help unit testing and evaluating our various webpages throughout the project.  Currently this is done only occasionally in the code (usually falls to being a manual test during release cycles), and when it is done, usually the code to parse the webpage, etc. is re-written each time.  The framework is Apache licensed, so including it won't be an issue.  If it's found to be useful, new JIRAs for HDFS and MR should be opened.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6725) Evaluate HtmlUnit for unit and regression testing webpages

Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12872071#action_12872071 ] 

Konstantin Boudnik commented on HADOOP-6725:
--------------------------------------------

Apparently, it worth mentioning that HtmlUnit requires xalan2.7. And that dependency can't be resolved with Ivy 2.0 (see IVY-1026)

> Evaluate HtmlUnit for unit and regression testing webpages
> ----------------------------------------------------------
>
>                 Key: HADOOP-6725
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6725
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: test
>            Reporter: Jakob Homan
>            Priority: Minor
>
> HtmlUnit (http://htmlunit.sourceforge.net/) looks like it may be a good tool to help unit testing and evaluating our various webpages throughout the project.  Currently this is done only occasionally in the code (usually falls to being a manual test during release cycles), and when it is done, usually the code to parse the webpage, etc. is re-written each time.  The framework is Apache licensed, so including it won't be an issue.  If it's found to be useful, new JIRAs for HDFS and MR should be opened.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6725) Evaluate HtmlUnit for unit and regression testing webpages

Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862205#action_12862205 ] 

Steve Loughran commented on HADOOP-6725:
----------------------------------------

right now we have the situation in which pretty much none of the web UI is tested. API, yes, HTTP, no. There is a cute test that fetches some XML from a servlet and hands off the work to Xerces, but otherwise, nothing. This is unfortunate, as HADOOP-6461 shows -it is not clear that on SVN_TRUNK, the webapps are working.

downstream, some people may be checking the web. My own deployment code takes a list of pages and runs through them, which is how I know about HADOOP-6461. 

What I would like to see test-wise is
# Something to run through all the standard HTML, JSP pages, artwork, check for their presence.
# Maybe: grab dependencies (stylesheets &c)
# Fetch the logs

The more advanced stuff is to run through some real operations: 

# create files via the client API, check you you can browse them 
# submit a job on the command line, and track it via the web UI 

Security: 
# Make unauthenticated calls and expect rejection.
# Have something log <script> text, fetch it from the logs, check the angle-brackets get filtered
# Check cookies are marked httponly once that gets adopted.
# anything else we can think of.

> Evaluate HtmlUnit for unit and regression testing webpages
> ----------------------------------------------------------
>
>                 Key: HADOOP-6725
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6725
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: test
>            Reporter: Jakob Homan
>            Priority: Minor
>
> HtmlUnit (http://htmlunit.sourceforge.net/) looks like it may be a good tool to help unit testing and evaluating our various webpages throughout the project.  Currently this is done only occasionally in the code (usually falls to being a manual test during release cycles), and when it is done, usually the code to parse the webpage, etc. is re-written each time.  The framework is Apache licensed, so including it won't be an issue.  If it's found to be useful, new JIRAs for HDFS and MR should be opened.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6725) Evaluate HtmlUnit for unit and regression testing webpages

Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konstantin Boudnik updated HADOOP-6725:
---------------------------------------

    Attachment: HADOOP-6725.patch

To facilitate the evaluation. Please make sure that you are using Ivy at least  2.1.0-rc1

> Evaluate HtmlUnit for unit and regression testing webpages
> ----------------------------------------------------------
>
>                 Key: HADOOP-6725
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6725
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: test
>            Reporter: Jakob Homan
>            Priority: Minor
>         Attachments: HADOOP-6725.patch
>
>
> HtmlUnit (http://htmlunit.sourceforge.net/) looks like it may be a good tool to help unit testing and evaluating our various webpages throughout the project.  Currently this is done only occasionally in the code (usually falls to being a manual test during release cycles), and when it is done, usually the code to parse the webpage, etc. is re-written each time.  The framework is Apache licensed, so including it won't be an issue.  If it's found to be useful, new JIRAs for HDFS and MR should be opened.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6725) Evaluate HtmlUnit for unit and regression testing webpages

Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861856#action_12861856 ] 

Konstantin Boudnik commented on HADOOP-6725:
--------------------------------------------

As soon as HADOOP-6332 is in the trunk (I really hope to complete the forward port work before the end of May) we can start using Herriot framework to perform such tests.

> Evaluate HtmlUnit for unit and regression testing webpages
> ----------------------------------------------------------
>
>                 Key: HADOOP-6725
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6725
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: test
>            Reporter: Jakob Homan
>            Priority: Minor
>
> HtmlUnit (http://htmlunit.sourceforge.net/) looks like it may be a good tool to help unit testing and evaluating our various webpages throughout the project.  Currently this is done only occasionally in the code (usually falls to being a manual test during release cycles), and when it is done, usually the code to parse the webpage, etc. is re-written each time.  The framework is Apache licensed, so including it won't be an issue.  If it's found to be useful, new JIRAs for HDFS and MR should be opened.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6725) Evaluate HtmlUnit for unit and regression testing webpages

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861046#action_12861046 ] 

Jakob Homan commented on HADOOP-6725:
-------------------------------------

That works too.

> Evaluate HtmlUnit for unit and regression testing webpages
> ----------------------------------------------------------
>
>                 Key: HADOOP-6725
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6725
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: test
>            Reporter: Jakob Homan
>            Priority: Minor
>
> HtmlUnit (http://htmlunit.sourceforge.net/) looks like it may be a good tool to help unit testing and evaluating our various webpages throughout the project.  Currently this is done only occasionally in the code (usually falls to being a manual test during release cycles), and when it is done, usually the code to parse the webpage, etc. is re-written each time.  The framework is Apache licensed, so including it won't be an issue.  If it's found to be useful, new JIRAs for HDFS and MR should be opened.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6725) Evaluate HtmlUnit for unit and regression testing webpages

Posted by "Marc Guillemot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862156#action_12862156 ] 

Marc Guillemot commented on HADOOP-6725:
----------------------------------------

@Konstantin: this is not JSPUnit but JSFUnit. Do you use JSP or JSF?

What kind of failures did you have in the past that should not occur again when tested (for instance with HtmlUnit)?

> Evaluate HtmlUnit for unit and regression testing webpages
> ----------------------------------------------------------
>
>                 Key: HADOOP-6725
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6725
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: test
>            Reporter: Jakob Homan
>            Priority: Minor
>
> HtmlUnit (http://htmlunit.sourceforge.net/) looks like it may be a good tool to help unit testing and evaluating our various webpages throughout the project.  Currently this is done only occasionally in the code (usually falls to being a manual test during release cycles), and when it is done, usually the code to parse the webpage, etc. is re-written each time.  The framework is Apache licensed, so including it won't be an issue.  If it's found to be useful, new JIRAs for HDFS and MR should be opened.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6725) Evaluate HtmlUnit for unit and regression testing webpages

Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861040#action_12861040 ] 

Konstantin Boudnik commented on HADOOP-6725:
--------------------------------------------

Seems like what we need is [JSPUnit|http://www.jboss.org/jsfunit/] for our front-end UI is auto-generated by JSP. JSPUnit runs on top of HtmlUnit framework though.

> Evaluate HtmlUnit for unit and regression testing webpages
> ----------------------------------------------------------
>
>                 Key: HADOOP-6725
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6725
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: test
>            Reporter: Jakob Homan
>            Priority: Minor
>
> HtmlUnit (http://htmlunit.sourceforge.net/) looks like it may be a good tool to help unit testing and evaluating our various webpages throughout the project.  Currently this is done only occasionally in the code (usually falls to being a manual test during release cycles), and when it is done, usually the code to parse the webpage, etc. is re-written each time.  The framework is Apache licensed, so including it won't be an issue.  If it's found to be useful, new JIRAs for HDFS and MR should be opened.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6725) Evaluate HtmlUnit for unit and regression testing webpages

Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861857#action_12861857 ] 

Konstantin Boudnik commented on HADOOP-6725:
--------------------------------------------

I meant 'using HtmlUnit' framework.

> Evaluate HtmlUnit for unit and regression testing webpages
> ----------------------------------------------------------
>
>                 Key: HADOOP-6725
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6725
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: test
>            Reporter: Jakob Homan
>            Priority: Minor
>
> HtmlUnit (http://htmlunit.sourceforge.net/) looks like it may be a good tool to help unit testing and evaluating our various webpages throughout the project.  Currently this is done only occasionally in the code (usually falls to being a manual test during release cycles), and when it is done, usually the code to parse the webpage, etc. is re-written each time.  The framework is Apache licensed, so including it won't be an issue.  If it's found to be useful, new JIRAs for HDFS and MR should be opened.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.