Package ch.powerunit.report

Examples of ch.powerunit.report.Testcase


  public void notifyStart(TestContext<T> context) {
    String setName = context.getSetName()
        + (context.getParameterName() == null ? "" : context
            .getParameterName());
    Testsuite ts = result.get(setName);
    Testcase tc = new Testcase();
    tc.setName(context.getLocalTestName()
        + (context.getParameterName() == null ? "" : ("["
            + context.getParameterName() + "]")));
    tc.setClassname(context.getTestSuiteObject().getClass()
        .getCanonicalName());
    resultcase.get(setName).put(context.getFullTestName(), tc);
    ts.getTestcase().add(tc);
    tc.setTime(System.currentTimeMillis());

  }
View Full Code Here


    String setName = context.getSetName()
        + (context.getParameterName() == null ? "" : context
            .getParameterName());
    long end = System.currentTimeMillis();
    Testsuite ts = result.get(setName);
    Testcase tc = resultcase.get(setName).get(context.getFullTestName());
    tc.setTime((end - tc.getTime()) / 1000);
    ts.setTime(ts.getTime() + tc.getTime());
    ts.setTests(ts.getTests() + 1);
  }
View Full Code Here

    String setName = context.getSetName()
        + (context.getParameterName() == null ? "" : context
            .getParameterName());
    long end = System.currentTimeMillis();
    Testsuite ts = result.get(setName);
    Testcase tc = resultcase.get(setName).get(context.getFullTestName());
    tc.setTime((end - tc.getTime()) / 1000);
    ts.setTime(ts.getTime() + tc.getTime());
    error = true;
    ts.setFailures(ts.getFailures() + 1);

    Failure f = new Failure();
    tc.getFailure().add(f);
    f.setType(cause.getClass().getCanonicalName());
    f.setMessage(cause.getMessage());
    StringBuffer stack = new StringBuffer(cause.getMessage()).append('\n');
    for (StackTraceElement ste : cause.getStackTrace()) {
      stack.append(ste.toString()).append('\n');
View Full Code Here

    String setName = context.getSetName()
        + (context.getParameterName() == null ? "" : context
            .getParameterName());
    long end = System.currentTimeMillis();
    Testsuite ts = result.get(setName);
    Testcase tc = resultcase.get(setName).get(context.getFullTestName());
    tc.setTime((end - tc.getTime()) / 1000);
    ts.setTime(ts.getTime() + tc.getTime());
    ts.setDisabled(ts.getDisabled() + 1);

    tc.setSkipped("Skipped");
  }
View Full Code Here

    String setName = context.getSetName()
        + (context.getParameterName() == null ? "" : context
            .getParameterName());
    long end = System.currentTimeMillis();
    Testsuite ts = result.get(setName);
    Testcase tc = resultcase.get(setName).get(context.getFullTestName());
    tc.setTime((end - tc.getTime()) / 1000);
    ts.setTime(ts.getTime() + tc.getTime());
    error = true;
    ts.setErrors(ts.getErrors() + 1);

    Error e = new Error();
    tc.getError().add(e);
    e.setType(cause.getClass().getCanonicalName());
    e.setMessage(cause.getMessage());
    StringBuffer stack = new StringBuffer(cause.getMessage()).append('\n');
    for (StackTraceElement ste : cause.getStackTrace()) {
      stack.append(ste.toString()).append('\n');
View Full Code Here

    public void notifyStart(TestContext<T> context) {
        String setName = context.getSetName()
                + (context.getParameterName() == null ? "" : context
                        .getParameterName());
        Testsuite ts = result.get(setName);
        Testcase tc = new Testcase();
        tc.setName(context.getLocalTestName()
                + (context.getParameterName() == null ? "" : "["
                        + context.getParameterName() + "]"));
        tc.setClassname(context.getTestSuiteObject().getClass()
                .getCanonicalName());
        resultcase.get(setName).put(context.getFullTestName(), tc);
        ts.getTestcase().add(tc);
        tc.setTime(System.currentTimeMillis());
        printf("Start of test %1$s%n", context.getFullTestName());
    }
View Full Code Here

        String setName = context.getSetName()
                + (context.getParameterName() == null ? "" : context
                        .getParameterName());
        long end = System.currentTimeMillis();
        Testsuite ts = result.get(setName);
        Testcase tc = resultcase.get(setName).get(context.getFullTestName());
        tc.setTime((end - tc.getTime()) / 1000);
        ts.setTime(ts.getTime() + tc.getTime());
        ts.setTests(ts.getTests() + 1);
        printf("Success of test %1$s%n", context.getFullTestName());
        resumedSucess.append("\t").append(context.getLocalTestName())
                .append(" of ").append(context.getSetName()).append("\n");
    }
View Full Code Here

        String setName = context.getSetName()
                + (context.getParameterName() == null ? "" : context
                        .getParameterName());
        long end = System.currentTimeMillis();
        Testsuite ts = result.get(setName);
        Testcase tc = resultcase.get(setName).get(context.getFullTestName());
        tc.setTime((end - tc.getTime()) / 1000);
        ts.setTime(ts.getTime() + tc.getTime());
        error = true;
        ts.setFailures(ts.getFailures() + 1);

        Failure f = new Failure();
        tc.getFailure().add(f);
        f.setType(cause.getClass().getCanonicalName());
        f.setMessage(cause.getMessage());
        StringBuilder stack = new StringBuilder(cause.getMessage())
                .append('\n');
        for (StackTraceElement ste : cause.getStackTrace()) {
View Full Code Here

        String setName = context.getSetName()
                + (context.getParameterName() == null ? "" : context
                        .getParameterName());
        long end = System.currentTimeMillis();
        Testsuite ts = result.get(setName);
        Testcase tc = resultcase.get(setName).get(context.getFullTestName());
        tc.setTime((end - tc.getTime()) / 1000);
        ts.setTime(ts.getTime() + tc.getTime());
        ts.setDisabled(ts.getDisabled() + 1);

        tc.setSkipped("Skipped");
        printf("Skip of test %1$s%n", context.getFullTestName());
        resumedSkipped.append("\t").append(context.getLocalTestName())
                .append(" of ").append(context.getSetName()).append("\n");
    }
View Full Code Here

        String setName = context.getSetName()
                + (context.getParameterName() == null ? "" : context
                        .getParameterName());
        long end = System.currentTimeMillis();
        Testsuite ts = result.get(setName);
        Testcase tc = resultcase.get(setName).get(context.getFullTestName());
        tc.setTime((end - tc.getTime()) / 1000);
        ts.setTime(ts.getTime() + tc.getTime());
        error = true;
        ts.setErrors(ts.getErrors() + 1);

        Error e = new Error();
        tc.getError().add(e);
        e.setType(cause.getClass().getCanonicalName());
        e.setMessage(cause.getMessage());
        StringBuilder stack = new StringBuilder(cause.getMessage())
                .append('\n');
        for (StackTraceElement ste : cause.getStackTrace()) {
View Full Code Here

TOP

Related Classes of ch.powerunit.report.Testcase

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.