Package ch.powerunit.report

Examples of ch.powerunit.report.Testsuite


    tss.setName(setName);
    tss.setTests(0);
    tss.setTime(0l);
    results.put(setName, tss);

    Testsuite ts = new Testsuite();
    result.put(setName, ts);
    ts.setName(setName.replace('$', '.'));
    ts.setDisabled(0);
    ts.setErrors(0);
    ts.setFailures(0);
    ts.setTests(0);
    ts.setTime(0l);
    resultcase.put(setName, new HashMap<>());

  }
View Full Code Here


  @Override
  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

  public void notifySuccess(TestContext<T> context) {
    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

  public void notifyFailure(TestContext<T> context, Throwable cause) {
    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());
View Full Code Here

  public void notifySkipped(TestContext<T> context) {
    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

  public void notifyError(TestContext<T> context, Throwable cause) {
    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());
View Full Code Here

  }

  @Override
  public void notifyParameterStart(String setName, String parameterName) {
    Testsuites tss = results.get(setName);
    Testsuite ts = new Testsuite();
    result.put(setName + parameterName, ts);
    ts.setName(setName + "[" + parameterName + "]");
    ts.setDisabled(0);
    ts.setErrors(0);
    ts.setFailures(0);
    ts.setTests(0);
    ts.setTime(0l);
    resultcase.put(setName + parameterName, new HashMap<>());
    tss.getTestsuite().add(ts);
  }
View Full Code Here

  }

  @Override
  public void notifyParameterEnd(String setName, String parameterName) {
    Testsuites tss = results.get(setName);
    Testsuite ts = result.get(setName + parameterName);
    tss.setDisabled(tss.getDisabled() + ts.getDisabled());
    tss.setErrors(tss.getErrors() + ts.getErrors());
    tss.setFailures(tss.getFailures() + ts.getFailures());
    tss.setTests(tss.getTests() + ts.getTests());
    tss.setTime(tss.getTime() + ts.getTime());
  }
View Full Code Here

        tss.setName(setName);
        tss.setTests(0);
        tss.setTime(0L);
        results.put(setName, tss);

        Testsuite ts = new Testsuite();
        result.put(setName, ts);
        ts.setName(setName.replace('$', '.'));
        ts.setDisabled(0);
        ts.setErrors(0);
        ts.setFailures(0);
        ts.setTests(0);
        ts.setTime(0L);
        resultcase.put(setName, new HashMap<>());

    }
View Full Code Here

    @Override
    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

TOP

Related Classes of ch.powerunit.report.Testsuite

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.