/**************************************************************** * Copyright (C) 2006 LAMS Foundation (http://lamsfoundation.org) * ============================================================= * License Information: http://lamsfoundation.org/licensing/lams/2.0/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2.0 * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * http://www.gnu.org/licenses/gpl.txt * **************************************************************** */ package org.lamsfoundation.testharness.learner; import java.util.concurrent.CountDownLatch; import org.apache.log4j.Logger; import org.lamsfoundation.testharness.AbstractTest; import org.lamsfoundation.testharness.Call.CallType; /** * @version * *
* View Source *
* * @author Fei Yang */ public class LearnerTest extends AbstractTest { private static final Logger log = Logger.getLogger(LearnerTest.class); protected String getLessonURL; protected String getLearningDesignURL; protected String joinLessonURL; protected String getFlashProgressDataURL; protected String lessonEntryURL; protected String[] filesToUpload; protected String subContextRoot; // usually "/learning/", this is set to figure out passon.swf url protected CountDownLatch allDoneSignal; /** * LearnerTest Constructor * */ public LearnerTest(String testName, CallType callType, String rmiRegistryName, String webServiceAddress, Integer minDelay, Integer maxDelay, String getLessonURL, String getLearningDesignURL, String joinLessonURL, String getFlashProgressDataURL, String lessonEntryURL, String[] filesToUpload) { super(testName,callType,rmiRegistryName,webServiceAddress, minDelay, maxDelay); this.getLessonURL = getLessonURL; this.getLearningDesignURL = getLearningDesignURL; this.joinLessonURL = joinLessonURL; this.getFlashProgressDataURL = getFlashProgressDataURL; this.lessonEntryURL = lessonEntryURL; this.subContextRoot = '/'+ getLessonURL.split("/")[1] + '/'; this.filesToUpload = filesToUpload; } @Override protected void startWEB(){ log.info(users.length+(users.length==1? " learner begins studying..." : " learners begin studying...")); allDoneSignal = new CountDownLatch(users.length); for(int i=0; i