io.qameta.allure.entity.TestResult Maven / Gradle / Ivy
/*
* Copyright 2019 Qameta Software OÜ
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.qameta.allure.entity;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import static java.util.Comparator.comparing;
import static java.util.Comparator.naturalOrder;
import static java.util.Comparator.nullsFirst;
/**
* @author charlie (Dmitry Baev).
*/
@Data
@Accessors(chain = true)
@SuppressWarnings("PMD.TooManyFields")
public class TestResult implements Serializable, Nameable, Parameterizable, Statusable, Timeable {
private static final long serialVersionUID = 1L;
protected String uid;
protected String name;
protected String fullName;
protected String historyId;
protected String testId;
protected Time time = new Time();
protected String description;
protected String descriptionHtml;
protected Status status;
protected String statusMessage;
protected String statusTrace;
protected boolean flaky;
protected boolean newFailed;
protected boolean newBroken;
protected boolean newPassed;
protected int retriesCount;
protected boolean retriesStatusChange;
// Execution
protected List beforeStages = new ArrayList<>();
protected StageResult testStage;
protected List afterStages = new ArrayList<>();
// Meta
protected List