Java Doc for Configuration.java in  » Testing » webtest » com » canoo » webtest » engine » 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 » webtest » com.canoo.webtest.engine 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.canoo.webtest.engine.Configuration

Configuration
public class Configuration extends Task (Code)
Captures configuration information.


author:
   unknown
author:
   Marc Guillemot
author:
   Paul King



Field Summary
final public static  StringDEFAULT_HOST
    
final public static  intDEFAULT_PORT
    
final protected static  intDEFAULT_TIMEOUT
    
final public static  intPORT_HTTP
    
final public static  intPORT_HTTPS
    
final public static  StringPROTOCOL_FILE
    
final public static  StringPROTOCOL_HTTP
    
final public static  StringPROTOCOL_HTTPS
    

Constructor Summary
public  Configuration()
    
public  Configuration(WebtestTask testSpec)
    

Method Summary
public  voidaddHeader(Header header)
    
public  voidaddOption(Option option)
    
protected  FilecomputeSubFolder(File _resultDir)
    
protected  voidconfigurePageCreator(WebClient webClient)
    
static  voidconfigureProxy(WebClient webClient, DefaultCredentialsProvider credentialProvider)
    
public  WebClientcreateWebClient()
    
public  voidexecute()
    
public  StringgetAutoRefresh()
    
public  StringgetBasePath()
    
public  StringgetDefaultPropertyType()
    
public  StringgetErrorProperty()
    
public  StringgetExternalProperty(String name)
    
public  StringgetFailureProperty()
    
public  ListgetHeaderList()
    
public  StringgetHost()
    
public  ListgetOptionList()
    
public  MapgetParameterDictionary()
    
public  intgetPort()
    
public  StringgetProtocol()
    
public  StringgetResultFile()
    
protected  intgetResultFolderIndex(File _resultDir)
    
 FilegetResultpath()
     This is the configured general result dir.
public  StringgetSavePrefix()
    
public  FilegetSummaryFile()
    
public  intgetTimeout()
    
public  StringgetUrlForPage(String page)
     Completes a URL based on configuration values by expanding where needed from a base URL (protocol and optionally host:port).
public  StringgetUserAgent()
    
public  FilegetWebTestResultDir()
     Gets the directory where all artifacts of this specific test should be saved.
public  voidinit()
    
public  booleanisEasyAjax()
    
public  booleanisHaltOnError()
    
public  booleanisHaltOnFailure()
    
public  booleanisSaveResponse()
    
public  booleanisShowHtmlParserOutput()
    
public  booleanisSummary()
    
 voidprepareResultDir(File resultDir)
    
public  voidsetAutoRefresh(String str)
    
public  voidsetBasepath(String newBasePath)
     Defines the constant base path used to construct request URLs, e.g.
public  voidsetContext(Context context)
     Defines the context.
public  voidsetDefaultPropertyType(String type)
    
public  voidsetEasyAjax(boolean b)
     Indicates if WebTest should wait for completion of background js tasks after each step.
public  voidsetErrorProperty(String errorProperty)
    
public  voidsetFailureProperty(String failureProperty)
    
public  voidsetHaltonerror(boolean haltOnError)
    
public  voidsetHaltonfailure(boolean haltOnFailure)
    
public  voidsetHost(String newHost)
    
public  voidsetPort(int newPort)
    
public  voidsetPropertyHandler(IPropertyHandler propertyHandler)
    
public  voidsetProtocol(String newProtocol)
    
public  voidsetResultFolderIndex(int index)
     Sets the index of the result folder.
public  voidsetResultfile(String resultFile)
    
public  voidsetResultpath(File newResultPath)
    
public  voidsetSavePrefix(String savePrefix)
    
public  voidsetSaveresponse(boolean newSaveResponse)
    
public  voidsetShowhtmlparseroutput(boolean showParserOutput)
    
public  voidsetSummary(boolean newSummary)
    
public  voidsetTimeout(int timeout)
    
protected  voidsetupWebClient()
    
static  WebClientsetupWebClient(BrowserVersion browserVersion)
    

Field Detail
DEFAULT_HOST
final public static String DEFAULT_HOST(Code)



DEFAULT_PORT
final public static int DEFAULT_PORT(Code)



DEFAULT_TIMEOUT
final protected static int DEFAULT_TIMEOUT(Code)
The number of seconds before http connections timeout: (default= )



PORT_HTTP
final public static int PORT_HTTP(Code)



PORT_HTTPS
final public static int PORT_HTTPS(Code)



PROTOCOL_FILE
final public static String PROTOCOL_FILE(Code)



PROTOCOL_HTTP
final public static String PROTOCOL_HTTP(Code)



PROTOCOL_HTTPS
final public static String PROTOCOL_HTTPS(Code)




Constructor Detail
Configuration
public Configuration()(Code)
Configuration constructor used by instance creation as nested element in ant.




Configuration
public Configuration(WebtestTask testSpec)(Code)
Configuration constructor used to generate a default configuration when the user omit it.





Method Detail
addHeader
public void addHeader(Header header)(Code)

Parameters:
  header -



addOption
public void addOption(Option option)(Code)

Parameters:
  option -



computeSubFolder
protected File computeSubFolder(File _resultDir)(Code)
Compute the name of the subfolder for this test
Parameters:
  _resultDir - the "main" result dir the name of the subfolder



configurePageCreator
protected void configurePageCreator(WebClient webClient)(Code)
Configures WebTest's custom page creator able to create PDFPage (as long as this is not integrated directly into HtmlUnit)



configureProxy
static void configureProxy(WebClient webClient, DefaultCredentialsProvider credentialProvider)(Code)
Configures the proxy settings from the system properties



createWebClient
public WebClient createWebClient()(Code)
Configures the webclient used for the test



execute
public void execute() throws BuildException(Code)



getAutoRefresh
public String getAutoRefresh()(Code)
Returns true if the client should automatically follow page refresh requests.




getBasePath
public String getBasePath()(Code)



getDefaultPropertyType
public String getDefaultPropertyType()(Code)



getErrorProperty
public String getErrorProperty()(Code)



getExternalProperty
public String getExternalProperty(String name)(Code)



getFailureProperty
public String getFailureProperty()(Code)



getHeaderList
public List getHeaderList()(Code)



getHost
public String getHost()(Code)



getOptionList
public List getOptionList()(Code)



getParameterDictionary
public Map getParameterDictionary()(Code)



getPort
public int getPort()(Code)



getProtocol
public String getProtocol()(Code)



getResultFile
public String getResultFile()(Code)



getResultFolderIndex
protected int getResultFolderIndex(File _resultDir)(Code)
Get the index to use as prefix for the dedicated result folder of this test
Parameters:
  _resultDir - the base result directory the index



getResultpath
File getResultpath()(Code)
This is the configured general result dir. This value should not be used directly as results will be placed in a sub folder of it in the future the configured result path



getSavePrefix
public String getSavePrefix()(Code)



getSummaryFile
public File getSummaryFile()(Code)
Gets the file where the summary should be written.

null if no resultfile was specified




getTimeout
public int getTimeout()(Code)
Gets the timeout in seconds the timeout (default value is Configuration.DEFAULT_TIMEOUT).



getUrlForPage
public String getUrlForPage(String page)(Code)
Completes a URL based on configuration values by expanding where needed from a base URL (protocol and optionally host:port). If the provided page is complete (already with protocol), it is returned as is.


Parameters:
  page - the maybe relative target URL the assembled URL




getUserAgent
public String getUserAgent()(Code)
Gets the User-Agent header to be sent.

null if none has been configured




getWebTestResultDir
public File getWebTestResultDir()(Code)
Gets the directory where all artifacts of this specific test should be saved. This is currently the same than Configuration.getResultpath() but this may change in the future. the folder



init
public void init()(Code)
Get's called from Ant once the project and target references have been set but before the properties are configured



isEasyAjax
public boolean isEasyAjax()(Code)



isHaltOnError
public boolean isHaltOnError()(Code)



isHaltOnFailure
public boolean isHaltOnFailure()(Code)



isSaveResponse
public boolean isSaveResponse()(Code)



isShowHtmlParserOutput
public boolean isShowHtmlParserOutput()(Code)



isSummary
public boolean isSummary()(Code)



prepareResultDir
void prepareResultDir(File resultDir)(Code)



setAutoRefresh
public void setAutoRefresh(String str)(Code)
Determines if the client should automatically follow page refresh requests.


Parameters:
  str - the new refresh value




setBasepath
public void setBasepath(String newBasePath)(Code)
Defines the constant base path used to construct request URLs, e.g. "shop" can be considered a basepath in "http://www.myhost.com/shop/productlist" and "http://www.myhost.com/shop/checkout".


Parameters:
  newBasePath - the new value




setContext
public void setContext(Context context)(Code)
Defines the context. This is called to set the context on the task before Configuration.execute() is called
Parameters:
  context - the context



setDefaultPropertyType
public void setDefaultPropertyType(String type)(Code)



setEasyAjax
public void setEasyAjax(boolean b)(Code)
Indicates if WebTest should wait for completion of background js tasks after each step. This should become true per default once HtmlUnit has the necessary functionality to control this which is not yet the case with HtmlUnit 1.14. This feature is intentionally undocumented.
Parameters:
  b - the new value



setErrorProperty
public void setErrorProperty(String errorProperty)(Code)



setFailureProperty
public void setFailureProperty(String failureProperty)(Code)



setHaltonerror
public void setHaltonerror(boolean haltOnError)(Code)



setHaltonfailure
public void setHaltonfailure(boolean haltOnFailure)(Code)



setHost
public void setHost(String newHost)(Code)



setPort
public void setPort(int newPort)(Code)



setPropertyHandler
public void setPropertyHandler(IPropertyHandler propertyHandler)(Code)



setProtocol
public void setProtocol(String newProtocol)(Code)



setResultFolderIndex
public void setResultFolderIndex(int index)(Code)
Sets the index of the result folder. Normally this shouldn't be set from outside but the new experimental feature "WebTest parallel" currently needs it.
Parameters:
  index - the index



setResultfile
public void setResultfile(String resultFile)(Code)



setResultpath
public void setResultpath(File newResultPath)(Code)



setSavePrefix
public void setSavePrefix(String savePrefix)(Code)



setSaveresponse
public void setSaveresponse(boolean newSaveResponse)(Code)



setShowhtmlparseroutput
public void setShowhtmlparseroutput(boolean showParserOutput)(Code)



setSummary
public void setSummary(boolean newSummary)(Code)



setTimeout
public void setTimeout(int timeout)(Code)
Sets the timeout
Parameters:
  timeout - the new value (in seconds), set 0 for no timeout



setupWebClient
protected void setupWebClient()(Code)



setupWebClient
static WebClient setupWebClient(BrowserVersion browserVersion)(Code)



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