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 Stringprotected Stringprotected Stringprotected Stringprotected StringFields inherited from class com.sun.ts.lib.harness.EETest
err, iLogDelaySeconds, log, sTestCase -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNewCookies(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" hashtablevoidcleanup()followRedirect(WebUtil.Response response, int testNum) Helper method that is used in tests 1, 2, 3, 5 and 6.voidsetup(String[] args, Properties p) voidtest1()voidtest10()voidtest11()voidtest12()voidtest13()voidtest14()voidtest15()voidtest16()voidtest17()voidtest18()voidtest2()voidtest3()voidtest4()voidtest5()voidtest6()voidtest7()voidtest8()voidtest9()static WebUtil.ResponseuploadUsingHttpMethodPUT(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.
-