String value = graph.getRelatedValue(stsVariable, TESTS.STSVariable_definition);
variables.put(name, value);
}
- return new ModelledSTSTest(testName, code, priority != null ? priority : -1, ignored != null ? ignored : false, new HashSet<>(Arrays.asList(actualDeps)), variables);
+ Resource parent = graph.getSingleObject(test, L0.PartOf);
+ String parentName;
+ String possibleURI = graph.getPossibleURI(parent);
+ if (possibleURI != null)
+ parentName = possibleURI;
+ else
+ parentName = graph.getRelatedValue2(parent, L0.HasName, Bindings.STRING);
+ return new ModelledSTSTest(testName, parentName, code, priority != null ? priority : -1, ignored != null ? ignored : false, new HashSet<>(Arrays.asList(actualDeps)), variables);
}
public static ModelledSTSSuite toModelledSuite(ReadGraph graph, Resource suite, List<ModelledSTSTest> children) throws DatabaseException {
TestsResource TESTS = TestsResource.getInstance(graph);
String suiteName = graph.getURI(suite);
String moduleNameFilter = graph.getPossibleRelatedValue2(suite, TESTS.STSSuite_moduleNameFilter, Bindings.STRING);
+ Integer priority = graph.getPossibleRelatedValue2(suite, TESTS.STSTest_executionPriority, Bindings.INTEGER);
Layer0 L0 = Layer0.getInstance(graph);
Collection<Resource> stsVariables = graph.sync(new ObjectsWithType(suite, L0.ConsistsOf, TESTS.STSVariable));
String value = graph.getRelatedValue(stsVariable, TESTS.STSVariable_definition);
variables.put(name, value);
}
- return new ModelledSTSSuite(suiteName, children, moduleNameFilter, variables);
+ return new ModelledSTSSuite(suiteName, children, moduleNameFilter, priority != null ? priority : -1, variables);
}
public static void setTestCoverage(ModelledSTSTest test, CommandSession session) {