com.liferay.jenkins.results.parser.testray.PlaywrightJUnitBatchBuildTestrayCaseResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.jenkins.results.parser
Show all versions of com.liferay.jenkins.results.parser
Liferay Jenkins Results Parser
/**
* SPDX-FileCopyrightText: (c) 2024 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
package com.liferay.jenkins.results.parser.testray;
import com.liferay.jenkins.results.parser.TopLevelBuild;
import com.liferay.jenkins.results.parser.test.clazz.PlaywrightJUnitTestClass;
import com.liferay.jenkins.results.parser.test.clazz.TestClass;
import com.liferay.jenkins.results.parser.test.clazz.group.AxisTestClassGroup;
import java.util.Collections;
import java.util.List;
/**
* @author Kenji Heigel
*/
public class PlaywrightJUnitBatchBuildTestrayCaseResult
extends JUnitBatchBuildTestrayCaseResult {
public PlaywrightJUnitBatchBuildTestrayCaseResult(
TestrayBuild testrayBuild, TopLevelBuild topLevelBuild,
AxisTestClassGroup axisTestClassGroup, TestClass testClass) {
super(testrayBuild, topLevelBuild, axisTestClassGroup, testClass);
_playwrightJUnitTestClass = (PlaywrightJUnitTestClass)testClass;
}
@Override
public String getName() {
if (_playwrightJUnitTestClass == null) {
return super.getName();
}
return _playwrightJUnitTestClass.getSpecFilePath();
}
@Override
public List getTestrayAttachments() {
List testrayAttachments =
super.getTestrayAttachments();
testrayAttachments.add(getPlaywrightReportTestrayAttachment());
testrayAttachments.removeAll(Collections.singleton(null));
return testrayAttachments;
}
protected TestrayAttachment getPlaywrightReportTestrayAttachment() {
return getTestrayAttachment(
getBuild(), "Playwright Report",
getAxisBuildURLPath() + "/playwright-report/index.html");
}
private final PlaywrightJUnitTestClass _playwrightJUnitTestClass;
}