Package de.qytera.qtaf.xray.importer
Class XrayImporter
java.lang.Object
de.qytera.qtaf.xray.importer.XrayImporter
Class that imports Test definitions from Xray API and saves them locally.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringaddFeatureDefinition(String featureName, String testDefinition) Add a feature definition to the content of a feature file.static StringaddGroupTagToFeatureDefinition(String featureName, String featureDefinition) Add a group tag to feature file content.static StringaddScenarioDefinition(String scenarioName, String testDefinition) Add a scenario definition to the content of a feature file.static StringAdd a tag to feature file content.static StringAdd a tag with a value to feature file content.static voidcreateFeatureFileFromSingleTest(XrayTestDto testDto, String filePath) Create a feature file from a single test.static voidcreateFeatureFileFromTestSet(String testSetId, XrayTestDtoCollection collection, String filePath) Create a feature file from a test set.static StringGet the content of a feature file corresponding to the test.static StringgetFeatureFileContentFromTestSet(String testSetId, XrayTestDtoCollection testDtoCollection, boolean newDriver) Get the content of a feature file corresponding to the collection of tests.
-
Method Details
-
createFeatureFileFromSingleTest
public static void createFeatureFileFromSingleTest(XrayTestDto testDto, String filePath) throws IOException Create a feature file from a single test.- Parameters:
testDto- the testfilePath- the feature file path- Throws:
IOException- if the feature file cannot be created
-
createFeatureFileFromTestSet
public static void createFeatureFileFromTestSet(String testSetId, XrayTestDtoCollection collection, String filePath) throws IOException Create a feature file from a test set.- Parameters:
testSetId- the test set IDcollection- the test collectionfilePath- the feature file path- Throws:
IOException- if the feature file cannot be created
-
getFeatureFileContentFromTestSet
public static String getFeatureFileContentFromTestSet(String testSetId, XrayTestDtoCollection testDtoCollection, boolean newDriver) Get the content of a feature file corresponding to the collection of tests.- Parameters:
testSetId- the test set IDtestDtoCollection- the test collectionnewDriver- the feature file path- Returns:
- the content
-
getFeatureFileContentFromSingleTest
Get the content of a feature file corresponding to the test.- Parameters:
testDto- the test- Returns:
- the content
-
addScenarioDefinition
Add a scenario definition to the content of a feature file.- Parameters:
scenarioName- the scenario nametestDefinition- the test definition- Returns:
- the content
-
addFeatureDefinition
Add a feature definition to the content of a feature file.- Parameters:
featureName- the feature nametestDefinition- the feature definition- Returns:
- the content
-
addTag
Add a tag to feature file content.- Parameters:
key- the tag keygherkin- the gherkin element- Returns:
- the tagged content
-
addTag
Add a tag with a value to feature file content.- Parameters:
key- the tag keyvalue- the tag valuegherkin- the gherkin element- Returns:
- the tagged content
-
addGroupTagToFeatureDefinition
Add a group tag to feature file content.- Parameters:
featureName- the feature namefeatureDefinition- the feature definition- Returns:
- the group content
-