Package net.sf.jdistunit.platform.agent

Examples of net.sf.jdistunit.platform.agent.JDistUnitAgent


     * @param threadTimeStep The time step between "parallel" thread starts.
     * @throws IOException If any homepage access error occured.
     */
    private void startHomePageTest(int requestCount, long timeOut, long threadTimeStep) throws IOException {
        // Create agent (which includes the test action).
        final JDistUnitAgent agent = new HomepageTestAgent();
        agent.setRequestCount(requestCount);
        agent.setTimeOut(timeOut);

        // Set the test actions to be not quite as parallel, instead
        // introducing a small pause. This is necessary because most web
        // servers will reject DOS-attack like access patterns.
        agent.setThreadTimeStep(threadTimeStep);

        // Deploy the agent to the test box.
        testBox.deployTestAgents(agent);

        // Wait for result (maximum: 1 minute).
View Full Code Here


    /**
     * @throws Exception If something failed.
     */
    public void testHomepageLoad() throws Exception {
        JDistUnitAgent agent = new HomepageTestAgent();
        agent.setRequestCount(2);
        agent.setTimeOut(30000L);
        agent.setThreadTimeStep(300L);

        testBox.deployTestAgents(agent);
        testBox.waitForResults(1);

        assertEquals(testBox.getTestServerCount(), testBox.getReturnedAgentCount());
View Full Code Here

TOP

Related Classes of net.sf.jdistunit.platform.agent.JDistUnitAgent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.