Class secformClient
java.lang.Object
com.sun.ts.lib.harness.EETest
com.sun.ts.tests.common.jspservletsec.secformClient
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sun.ts.lib.harness.EETest
EETest.Fault, EETest.SetupException
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected String
protected String
protected String
protected String
Fields inherited from class com.sun.ts.lib.harness.EETest
err, iLogDelaySeconds, log, sTestCase
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNewCookies
(Hashtable oldCookies, Hashtable newCookies) Helper method that is used to update cookies This helper method retrieves cookies from "newCookies" hashtable and updates it to "oldCookies" hashtablevoid
cleanup()
followRedirect
(WebUtil.Response response, int testNum) Helper method that is used in tests 1, 2, 3, 5 and 6.void
setup
(String[] args, Properties p) void
test1()
void
test10()
void
test11()
void
test12()
void
test13()
void
test14()
void
test15()
void
test16()
void
test17()
void
test18()
void
test2()
void
test3()
void
test4()
void
test5()
void
test6()
void
test7()
void
test8()
void
test9()
static WebUtil.Response
uploadUsingHttpMethodPUT
(String method, InetAddress addr, int port, String req, byte[] postData, Hashtable cookieList, String username, String password) Uploads data from a byteArray to an URL.Methods inherited from class com.sun.ts.lib.harness.EETest
getPropsReady, getTestPropsFromArgs, initializeProperties, logErr, logErr, logMsg, logTrace, logTrace, run, run, run, run, runAllTestCases, setTestStatus
-
Field Details
-
pageBase
-
pageSec
-
pageGuest
-
pageRoleReverse
-
pageUnprotected
-
-
Constructor Details
-
secformClient
public secformClient()
-
-
Method Details
-
setup
- Throws:
Exception
-
test1
- Throws:
Exception
-
test2
- Throws:
Exception
-
test3
- Throws:
Exception
-
test4
- Throws:
Exception
-
test5
- Throws:
Exception
-
test6
- Throws:
Exception
-
test7
public void test7() -
test8
- Throws:
Exception
-
test9
- Throws:
Exception
-
test10
- Throws:
Exception
-
test11
- Throws:
Exception
-
test12
- Throws:
Exception
-
test13
- Throws:
Exception
-
test14
- Throws:
Exception
-
test15
- Throws:
Exception
-
test16
- Throws:
Exception
-
test17
- Throws:
Exception
-
test18
- Throws:
Exception
-
uploadUsingHttpMethodPUT
public static WebUtil.Response uploadUsingHttpMethodPUT(String method, InetAddress addr, int port, String req, byte[] postData, Hashtable cookieList, String username, String password) throws IOException Uploads data from a byteArray to an URL. A WebUtil.Response object is returned with the response information.- Parameters:
method
- http method "PUT"addr
- Address of web serverport
- Port of web serverreq
- The file to request (e.g. /jsp_dep_secContextRoot/jspSec.jsp)postData
- is a byteArray which contains the data to be postedcookieList
- A list of cookies to send when requesting the page. null if no cookie list is to be sent.username
- The username for authentication, null if no authentication required.password
- The password for authentication, null if no authentication required.- Returns:
- WebUtil.Response object containing response information
- Throws:
IOException
- Thrown if request could not be made
-
cleanup
- Throws:
Exception
-
followRedirect
Helper method that is used in tests 1, 2, 3, 5 and 6. Performs the following actions: 1. Checks whether the response.statusToken==302 or 301 if(response.statusToken==302) || (response.statusToken==301) send request to redirected URL 2. Returns Response object- Parameters:
response
- The initial page responsetestNum
- The test number for correct display of error messages.- Throws:
Exception
-
addNewCookies
Helper method that is used to update cookies This helper method retrieves cookies from "newCookies" hashtable and updates it to "oldCookies" hashtable- Parameters:
oldCookies
- Hashtable containing original cookiesnewCookies
- Hashtable containing new cookies error messages.
-