Java Doc for HttpUnitOptions.java in  » Testing » HttpUnit » com » meterware » httpunit » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » HttpUnit » com.meterware.httpunit 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.meterware.httpunit.HttpUnitOptions

HttpUnitOptions
abstract public class HttpUnitOptions (Code)
A collection of global options to control HttpUnit's behavior.
author:
   Russell Gold
author:
   Dave Glowacki
author:
   Benoit Xhenseval


Field Summary
final public static  StringDEFAULT_SCRIPT_ENGINE_FACTORY
    


Method Summary
public static  voidaddHtmlErrorListener(HTMLParserListener el)
     Add an Html error listener.
public static  voidclearScriptErrorMessages()
     Clears the accumulated script error messages.
public static  booleangetAutoRedirect()
     Returns true if HttpUnit should automatically follow page redirect requests (status 3xx).
public static  booleangetAutoRefresh()
     Returns true if HttpUnit should automatically follow page refresh requests.
public static  StringgetDefaultCharacterSet()
     Returns the character set to be used for pages which do not specify one.
public static  StringgetDefaultContentType()
     Returns the content type to be used for pages which do not specify one.
public static  booleangetExceptionsThrownOnErrorStatus()
     Returns true if WebClient.getResponse throws exceptions when detected an error status.
public static  booleangetExceptionsThrownOnScriptError()
     Returns true if script errors cause exceptions to be thrown.
public static  VectorgetHtmlErrorListeners()
    
public static  booleangetImagesTreatedAsAltText()
     Returns true if images are treated as text, using their alt attributes.
public static  booleangetMatchesIgnoreCase()
     If true, text matches in methods such as HTMLSegment.getLinkWith are case insensitive.
public static  booleangetParameterValuesValidated()
     Returns true if form parameter settings are checked.
public static  booleangetParserWarningsEnabled()
     Returns true if parser warnings are enabled.
public static  intgetRedirectDelay()
     Returns the delay, in milliseconds, before a redirect request is issues.
public static  StringgetScriptEngineClassName()
    
public static  String[]getScriptErrorMessages()
     Returns the accumulated script error messages encountered.
public static  ScriptingEngineFactorygetScriptingEngine()
    
public static  booleanisAcceptCookies()
     Returns true if HttpUnit is accepting and saving cookies.
public static  booleanisAcceptGzip()
     Returns true if any WebClient created will accept GZIP encoding of responses.
public static  booleanisCheckContentLength()
     Returns true if HttpUnit will throw an exception when a message is only partially received.
public static  booleanisLoggingHttpHeaders()
     Returns true if HTTP headers are to be dumped to system output.
public static  booleanisPostIncludesCharset()
     Returns true if POST requests should include the character set in the content-type header.
public static  booleanisScriptingEnabled()
    
public static  voidremoveHtmlErrorListener(HTMLParserListener el)
     Remove an Html error listener.
public static  voidreset()
     Resets all options to their default values.
public static  voidresetDefaultCharacterSet()
     Resets the default character set to the HTTP default encoding.
public static  voidresetDefaultContentType()
     Resets the default content type to plain text.
public static  voidsetAcceptCookies(boolean acceptCookies)
     Specifies whether HttpUnit should accept and send cookies.
public static  voidsetAcceptGzip(boolean acceptGzip)
     Specifies whether a WebClient will be initialized to accept GZIP encoded responses.
public static  voidsetAutoRedirect(boolean autoRedirect)
     Determines whether HttpUnit should automatically follow page redirect requests (status 3xx).
public static  voidsetAutoRefresh(boolean autoRefresh)
     Specifies whether HttpUnit should automatically follow page refresh requests. By default, this is false, so that programs can verify the redirect page presented to users before the browser switches to the new page.
public static  voidsetCheckContentLength(boolean checkContentLength)
     Specifies whether HttpUnit should throw an exception when the content length of a message does not match its actual received length.
public static  voidsetDefaultCharacterSet(String characterSet)
     Sets the default character set for pages which do not specify one and for requests created without HTML sources.
public static  voidsetDefaultContentType(String contentType)
     Sets the default content type for pages which do not specify one.
public static  voidsetExceptionsThrownOnErrorStatus(boolean enabled)
     If true, WebClient.getResponse throws an exception when it receives an error status.
public static  voidsetExceptionsThrownOnScriptError(boolean throwExceptions)
     Determines whether script errors result in exceptions or warning messages.
public static  voidsetImagesTreatedAsAltText(boolean asText)
     If true, tells HttpUnit to treat images with alt attributes as though they were the text value of that attribute in all searches and displays.
public static  voidsetLoggingHttpHeaders(boolean enabled)
     If true, tells HttpUnit to log HTTP headers to system output.
public static  voidsetMatchesIgnoreCase(boolean ignoreCase)
     If true, text matches in methods such as HTMLSegment.getLinkWith are case insensitive.
public static  voidsetParameterValuesValidated(boolean validated)
     If true, tells HttpUnit to throw an exception on any attempt to set a form parameter to a value which could not be set via the browser.
public static  voidsetParserWarningsEnabled(boolean enabled)
     If true, tells the parser to display warning messages.
public static  voidsetPostIncludesCharset(boolean postIncludesCharset)
     Determines whether a normal POST request will include the character set in the content-type header.
public static  voidsetRedirectDelay(int delayInMilliseconds)
     Sets the delay, in milliseconds, before a redirect request is issued.
public static  voidsetScriptEngineClassName(String scriptEngineClassName)
    
public static  voidsetScriptingEnabled(boolean scriptingEnabled)
    

Field Detail
DEFAULT_SCRIPT_ENGINE_FACTORY
final public static String DEFAULT_SCRIPT_ENGINE_FACTORY(Code)





Method Detail
addHtmlErrorListener
public static void addHtmlErrorListener(HTMLParserListener el)(Code)
Add an Html error listener.



clearScriptErrorMessages
public static void clearScriptErrorMessages()(Code)
Clears the accumulated script error messages.



getAutoRedirect
public static boolean getAutoRedirect()(Code)
Returns true if HttpUnit should automatically follow page redirect requests (status 3xx). By default, this is true.



getAutoRefresh
public static boolean getAutoRefresh()(Code)
Returns true if HttpUnit should automatically follow page refresh requests. By default, this is false, so that programs can verify the redirect page presented to users before the browser switches to the new page.



getDefaultCharacterSet
public static String getDefaultCharacterSet()(Code)
Returns the character set to be used for pages which do not specify one.



getDefaultContentType
public static String getDefaultContentType()(Code)
Returns the content type to be used for pages which do not specify one.



getExceptionsThrownOnErrorStatus
public static boolean getExceptionsThrownOnErrorStatus()(Code)
Returns true if WebClient.getResponse throws exceptions when detected an error status.



getExceptionsThrownOnScriptError
public static boolean getExceptionsThrownOnScriptError()(Code)
Returns true if script errors cause exceptions to be thrown.



getHtmlErrorListeners
public static Vector getHtmlErrorListeners()(Code)
Get the list of Html Error Listeners



getImagesTreatedAsAltText
public static boolean getImagesTreatedAsAltText()(Code)
Returns true if images are treated as text, using their alt attributes.



getMatchesIgnoreCase
public static boolean getMatchesIgnoreCase()(Code)
If true, text matches in methods such as HTMLSegment.getLinkWith are case insensitive. The default is true (matches ignore case).



getParameterValuesValidated
public static boolean getParameterValuesValidated()(Code)
Returns true if form parameter settings are checked.



getParserWarningsEnabled
public static boolean getParserWarningsEnabled()(Code)
Returns true if parser warnings are enabled.



getRedirectDelay
public static int getRedirectDelay()(Code)
Returns the delay, in milliseconds, before a redirect request is issues.



getScriptEngineClassName
public static String getScriptEngineClassName()(Code)



getScriptErrorMessages
public static String[] getScriptErrorMessages()(Code)
Returns the accumulated script error messages encountered. Error messages are accumulated only if 'throwExceptionsOnError' is disabled.



getScriptingEngine
public static ScriptingEngineFactory getScriptingEngine()(Code)



isAcceptCookies
public static boolean isAcceptCookies()(Code)
Returns true if HttpUnit is accepting and saving cookies. The default is to accept them.



isAcceptGzip
public static boolean isAcceptGzip()(Code)
Returns true if any WebClient created will accept GZIP encoding of responses. The default is to accept GZIP encoding.



isCheckContentLength
public static boolean isCheckContentLength()(Code)
Returns true if HttpUnit will throw an exception when a message is only partially received. The default is to avoid such checks.



isLoggingHttpHeaders
public static boolean isLoggingHttpHeaders()(Code)
Returns true if HTTP headers are to be dumped to system output.



isPostIncludesCharset
public static boolean isPostIncludesCharset()(Code)
Returns true if POST requests should include the character set in the content-type header.



isScriptingEnabled
public static boolean isScriptingEnabled()(Code)



removeHtmlErrorListener
public static void removeHtmlErrorListener(HTMLParserListener el)(Code)
Remove an Html error listener.



reset
public static void reset()(Code)
Resets all options to their default values.



resetDefaultCharacterSet
public static void resetDefaultCharacterSet()(Code)
Resets the default character set to the HTTP default encoding.



resetDefaultContentType
public static void resetDefaultContentType()(Code)
Resets the default content type to plain text.



setAcceptCookies
public static void setAcceptCookies(boolean acceptCookies)(Code)
Specifies whether HttpUnit should accept and send cookies.



setAcceptGzip
public static void setAcceptGzip(boolean acceptGzip)(Code)
Specifies whether a WebClient will be initialized to accept GZIP encoded responses. The default is true.



setAutoRedirect
public static void setAutoRedirect(boolean autoRedirect)(Code)
Determines whether HttpUnit should automatically follow page redirect requests (status 3xx). By default, this is true in order to simulate normal browser operation.



setAutoRefresh
public static void setAutoRefresh(boolean autoRefresh)(Code)
Specifies whether HttpUnit should automatically follow page refresh requests. By default, this is false, so that programs can verify the redirect page presented to users before the browser switches to the new page. Setting this to true can cause an infinite loop on pages that refresh themselves.



setCheckContentLength
public static void setCheckContentLength(boolean checkContentLength)(Code)
Specifies whether HttpUnit should throw an exception when the content length of a message does not match its actual received length. Defaults to false.



setDefaultCharacterSet
public static void setDefaultCharacterSet(String characterSet)(Code)
Sets the default character set for pages which do not specify one and for requests created without HTML sources. By default, HttpUnit uses the HTTP default encoding, iso-8859-1.



setDefaultContentType
public static void setDefaultContentType(String contentType)(Code)
Sets the default content type for pages which do not specify one.



setExceptionsThrownOnErrorStatus
public static void setExceptionsThrownOnErrorStatus(boolean enabled)(Code)
If true, WebClient.getResponse throws an exception when it receives an error status. Defaults to true.



setExceptionsThrownOnScriptError
public static void setExceptionsThrownOnScriptError(boolean throwExceptions)(Code)
Determines whether script errors result in exceptions or warning messages.



setImagesTreatedAsAltText
public static void setImagesTreatedAsAltText(boolean asText)(Code)
If true, tells HttpUnit to treat images with alt attributes as though they were the text value of that attribute in all searches and displays. The default is false (image text is generally ignored).



setLoggingHttpHeaders
public static void setLoggingHttpHeaders(boolean enabled)(Code)
If true, tells HttpUnit to log HTTP headers to system output. The default is false.



setMatchesIgnoreCase
public static void setMatchesIgnoreCase(boolean ignoreCase)(Code)
If true, text matches in methods such as HTMLSegment.getLinkWith are case insensitive. The default is true (matches ignore case).



setParameterValuesValidated
public static void setParameterValuesValidated(boolean validated)(Code)
If true, tells HttpUnit to throw an exception on any attempt to set a form parameter to a value which could not be set via the browser. The default is true (parameters are validated).
Note: this only applies to a WebRequest created after this setting is changed. A request created with this option disabled will not only not be checked for correctness, its parameter submission order will not be guaranteed, and changing parameters will not trigger Javascript onChange / onClick events.



setParserWarningsEnabled
public static void setParserWarningsEnabled(boolean enabled)(Code)
If true, tells the parser to display warning messages. The default is false (warnings are not shown).



setPostIncludesCharset
public static void setPostIncludesCharset(boolean postIncludesCharset)(Code)
Determines whether a normal POST request will include the character set in the content-type header. The default is to include it; however, some older servlet engines (most notably Tomcat 3.1) get confused when they see it.



setRedirectDelay
public static void setRedirectDelay(int delayInMilliseconds)(Code)
Sets the delay, in milliseconds, before a redirect request is issued. This may be necessary if the server under some cases where the server performs asynchronous processing which must be completed before the new request can be handled properly, and is taking advantage of slower processing by most user agents. It almost always indicates an error in the server design, and therefore the default delay is zero.



setScriptEngineClassName
public static void setScriptEngineClassName(String scriptEngineClassName)(Code)



setScriptingEnabled
public static void setScriptingEnabled(boolean scriptingEnabled)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.