io.github.ericdriggs.reportcard.xml.junit.JunitParserUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of reportcard-model Show documentation
Show all versions of reportcard-model Show documentation
test report metrics and trend analysis reporting :: reportcard-model
package io.github.ericdriggs.reportcard.xml.junit;
import lombok.SneakyThrows;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class JunitParserUtil {
private JunitParserUtil() {
//call statically
}
public static Testsuites parseTestSuites(String xmlTestSuites) {
if (xmlTestSuites.contains(" testsuiteList = new ArrayList<>();
// testsuiteList.add(xmlToTestSuite(xmlTestSuite));
// Testsuites testsuites = new Testsuites();
// testsuites.setTestsuite(testsuiteList);
// return testsuites;
// }
@SneakyThrows(JAXBException.class)
protected static Testsuite xmlToTestSuite(String xmlString) {
if (xmlString.contains("
© 2015 - 2024 Weber Informatics LLC | Privacy Policy