tech.grasshopper.pdf.pojo.cucumber.Step Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cucumber-pdf-report Show documentation
Show all versions of cucumber-pdf-report Show documentation
Generates Cucumber execution report in PDF format
package tech.grasshopper.pdf.pojo.cucumber;
import java.time.Duration;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import lombok.Builder;
import lombok.Builder.Default;
import lombok.Data;
@Data
@Builder
public class Step {
private String name;
private String keyword;
@Default
private List rows = new ArrayList<>();
private String docString;
@Default
private List before = new ArrayList<>();
@Default
private List after = new ArrayList<>();
@Default
private List output = new ArrayList<>();
@Default
private List media = new ArrayList<>();
private Status status;
private String errorMessage;
private String location;
private LocalDateTime startTime;
private LocalDateTime endTime;
public Duration getDuration() {
return Duration.between(startTime, endTime);
}
public List getBeforeAfterHooks() {
List hooks = new ArrayList<>();
hooks.addAll(before);
hooks.addAll(after);
return hooks;
}
}