Example usage for com.amazonaws.services.devicefarm.model Run getCounters

List of usage examples for com.amazonaws.services.devicefarm.model Run getCounters

Introduction

In this page you can find the example usage for com.amazonaws.services.devicefarm.model Run getCounters.

Prototype


public Counters getCounters() 

Source Link

Document

The run's result counters.

Usage

From source file:org.jenkinsci.plugins.awsdevicefarm.AWSDeviceFarmTestResult.java

License:Open Source License

public AWSDeviceFarmTestResult(AbstractBuild<?, ?> build, Run run) {
    this.build = build;

    if (run != null) {
        this.id = AWSDeviceFarmUtils.getRunIdFromArn(run.getArn());
        this.status = run.getStatus();
        this.result = ExecutionResult.fromValue(run.getResult());
        this.passCount = run.getCounters().getPassed();
        this.warnCount = run.getCounters().getWarned();
        this.failCount = run.getCounters().getFailed();
        this.totalCount = run.getCounters().getTotal();
        this.errorCount = run.getCounters().getErrored();
        this.skipCount = run.getCounters().getSkipped();

        //this.duration =

        try {/*from  w  w w  .  jav  a 2 s  .  c  o  m*/
            this.stopCount = run.getCounters().getStopped();
        } catch (NullPointerException e) {
            // Ignore this until the stopped bug is fixed.
        }

        this.url = AWSDeviceFarmUtils.getRunUrlFromArn(run.getArn());
    }
}