X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.tests.modelled%2Fsrc%2Forg%2Fsimantics%2Ftests%2Fmodelled%2Futils%2FSTSSuiteTestCollector.java;h=56d43aec9ad47db272aea9905636ee30e9b20355;hp=8917d16462425ddf65e93b20636d19dcaa766a78;hb=597687a4e41e9892a4b40e0de05183d930e6cc32;hpb=1ec0193a5a5b8f368b03adb24acd762838ddf8ea diff --git a/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/utils/STSSuiteTestCollector.java b/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/utils/STSSuiteTestCollector.java index 8917d1646..56d43aec9 100644 --- a/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/utils/STSSuiteTestCollector.java +++ b/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/utils/STSSuiteTestCollector.java @@ -95,13 +95,21 @@ public class STSSuiteTestCollector { 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 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 stsVariables = graph.sync(new ObjectsWithType(suite, L0.ConsistsOf, TESTS.STSVariable)); @@ -111,7 +119,7 @@ public class STSSuiteTestCollector { 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) {