Package betsy.bpmn.reporting

Source Code of betsy.bpmn.reporting.BPMNCsvReport

package betsy.bpmn.reporting;

import betsy.common.analytics.model.CsvReport;
import betsy.common.analytics.model.Engine;
import betsy.common.analytics.model.Group;
import betsy.common.analytics.model.Test;
import groovy.util.FileNameFinder;

public class BPMNCsvReport extends CsvReport {

    @Override
    public String getRelativePath(final Group group, final Engine engine, final Test test) {
        try {
            String basedir = "test/reports/html/" + engine.getName() + "/" + group.getName();
            String pattern = "*_" + test.getFullName() + ".html";
            String path = new FileNameFinder().getFileNames(basedir, pattern).get(0);
            String parentPath = getFile().getParent().toAbsolutePath().toString();

            return path.substring(parentPath.length() + 1);
        } catch (Exception e) {
            return "#";
        }
    }

}
TOP

Related Classes of betsy.bpmn.reporting.BPMNCsvReport

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.