All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hp.octane.integrations.executor.converters.CucumberJVMConverter Maven / Gradle / Ivy

There is a newer version: 2.24.3.5
Show newest version
package com.hp.octane.integrations.executor.converters;

import com.hp.octane.integrations.executor.TestToRunData;
import com.hp.octane.integrations.executor.TestsToRunConverter;

import java.util.List;
import java.util.Map;


public class CucumberJVMConverter extends TestsToRunConverter {

    public static final String FEATURE_FILE_PATH = "featureFilePath";

    @Override
    protected String convertInternal(List data, String executionDirectory, Map globalParameters) {


        StringBuilder sb = new StringBuilder();
        String classJoiner = "";

        for (TestToRunData testData : data) {
            String featureFilePath = getFeatureFilePath(testData);
            if (featureFilePath != null && !featureFilePath.isEmpty()) {
                sb.append(classJoiner);
                sb.append("'");
                sb.append(featureFilePath);
                sb.append("'");
                classJoiner = " ";
            }

        }
        return sb.toString();

    }

    private String getFeatureFilePath(TestToRunData item) {
        return item.getParameter(FEATURE_FILE_PATH);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy