use of teammates.client.scripts.util.Stopwatch in project teammates by TEAMMATES.
the class InstructorCourseEnrollPageScalabilityTest method testEnrollAction.
private void testEnrollAction(int numStudents) throws IOException {
AppUrl enrollUrl = createUrl(Const.ActionURIs.INSTRUCTOR_COURSE_ENROLL_PAGE).withUserId(testData.instructors.get("CCEnrollScT.teammates.test").googleId).withCourseId(testData.courses.get("CCEnrollScT.CS2104").getId());
InstructorCourseEnrollPage enrollPage = loginAdminToPage(enrollUrl, InstructorCourseEnrollPage.class);
String enrollString = InstructorCourseEnrollPageDataGenerator.generateStudents(numStudents);
log.info("Testing with " + numStudents + " students...");
Stopwatch stopwatch = new Stopwatch();
stopwatch.start();
enrollPage.enroll(enrollString);
log.info("Time taken: " + stopwatch.getTimeElapsedInSeconds());
}
use of teammates.client.scripts.util.Stopwatch in project teammates by TEAMMATES.
the class InstructorFeedbackResultsPageScalabilityTest method loginToInstructorFeedbackResultsPage.
// Needs to log before returning.
@SuppressWarnings("PMD.UnnecessaryLocalBeforeReturn")
private InstructorFeedbackResultsPage loginToInstructorFeedbackResultsPage(String instructorName, String fsName) {
AppUrl resultsUrl = createUrl(Const.ActionURIs.INSTRUCTOR_FEEDBACK_RESULTS_PAGE).withUserId(testData.instructors.get(instructorName).googleId).withCourseId(testData.feedbackSessions.get(fsName).getCourseId()).withSessionName(testData.feedbackSessions.get(fsName).getFeedbackSessionName());
Stopwatch stopwatch = new Stopwatch();
stopwatch.start();
InstructorFeedbackResultsPage resultsPage = loginAdminToPage(resultsUrl, InstructorFeedbackResultsPage.class);
resultsPage.clickCollapseExpandButtonAndWaitForPanelsToExpand();
log.info("Time taken: " + stopwatch.getTimeElapsedInSeconds());
return resultsPage;
}
Aggregations