Search in sources :

Example 1 with Stopwatch

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());
}
Also used : InstructorCourseEnrollPage(teammates.test.pageobjects.InstructorCourseEnrollPage) AppUrl(teammates.common.util.AppUrl) Stopwatch(teammates.client.scripts.util.Stopwatch)

Example 2 with Stopwatch

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;
}
Also used : AppUrl(teammates.common.util.AppUrl) Stopwatch(teammates.client.scripts.util.Stopwatch) InstructorFeedbackResultsPage(teammates.test.pageobjects.InstructorFeedbackResultsPage)

Aggregations

Stopwatch (teammates.client.scripts.util.Stopwatch)2 AppUrl (teammates.common.util.AppUrl)2 InstructorCourseEnrollPage (teammates.test.pageobjects.InstructorCourseEnrollPage)1 InstructorFeedbackResultsPage (teammates.test.pageobjects.InstructorFeedbackResultsPage)1