no message
This commit is contained in:
13
.idea/workspace.xml
generated
13
.idea/workspace.xml
generated
@@ -7,12 +7,17 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||||
<change afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Configuration/ConfigurationJson.java" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Group/Json/GroupJson.java" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Configuration/ConfigurationsJson.java" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Group/Json/GroupsJson.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Test/Json/TestJson.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Test/Json/TestsJson.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Configuration/Configuration.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Configuration/Configuration.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Configuration/ConfigurationJson.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Configuration/Json/ConfigurationJson.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Configuration/ConfigurationsJson.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Configuration/Json/ConfigurationsJson.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/TestingPackage/TestingPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/TestingPackage/TestingPackage.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/TestingPackage/TestingPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/TestingPackage/TestingPackage.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackageDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackageDBTable.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMConfiguration/DVMConfigurationDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMConfiguration/DVMConfigurationDBTable.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/AddTasksToDVMPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/AddTasksToDVMPackage.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SaveCurrentDVMConfiguration.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SaveCurrentDVMConfiguration.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSelectedDVMConfigurations.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSelectedDVMConfigurations.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSelectedDVMConfigurations.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSelectedDVMConfigurations.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import Common.Database.riDBObject;
|
|||||||
import Common.Global;
|
import Common.Global;
|
||||||
import Common.Utils.Utils;
|
import Common.Utils.Utils;
|
||||||
import TestingSystem.Common.Group.Group;
|
import TestingSystem.Common.Group.Group;
|
||||||
|
import TestingSystem.Common.Group.Json.GroupJson;
|
||||||
|
import TestingSystem.Common.Group.Json.GroupsJson;
|
||||||
|
import TestingSystem.Common.Test.Json.TestJson;
|
||||||
|
import TestingSystem.Common.Test.Json.TestsJson;
|
||||||
import TestingSystem.Common.Test.Test;
|
import TestingSystem.Common.Test.Test;
|
||||||
import com.sun.org.glassfish.gmbal.Description;
|
import com.sun.org.glassfish.gmbal.Description;
|
||||||
|
|
||||||
@@ -11,25 +15,11 @@ import java.util.LinkedHashMap;
|
|||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
public class Configuration extends riDBObject {
|
public class Configuration extends riDBObject {
|
||||||
//конфигурация = данные для пакета.
|
//конфигурация = данные для пакета.
|
||||||
|
|
||||||
//группы
|
//группы
|
||||||
//тесты
|
//тесты
|
||||||
//настройки тестируемого объекта
|
//настройки тестируемого объекта
|
||||||
//пакет = запуск конфигурация + тестируемый объект
|
//пакет = запуск конфигурация + тестируемый объект
|
||||||
//---
|
//---
|
||||||
@Description("DEFAULT ''")
|
|
||||||
public String packedGroupsIds = "";
|
|
||||||
@Description("DEFAULT ''")
|
|
||||||
public String packedTestsIds = "";
|
|
||||||
//---
|
|
||||||
@Description("DEFAULT ''")
|
|
||||||
public String packedGroupsNames = "";
|
|
||||||
//---
|
|
||||||
@Description("DEFAULT 0")
|
|
||||||
public int groupsCount = 0;
|
|
||||||
@Description("DEFAULT 0")
|
|
||||||
public int testsCount = 0;
|
|
||||||
//--
|
|
||||||
public int maxtime = 300;
|
public int maxtime = 300;
|
||||||
@Description("DEFAULT 0")
|
@Description("DEFAULT 0")
|
||||||
public int autoTesting = 0;
|
public int autoTesting = 0;
|
||||||
@@ -39,75 +29,87 @@ public class Configuration extends riDBObject {
|
|||||||
//--
|
//--
|
||||||
public String getFlags(){return "";}
|
public String getFlags(){return "";}
|
||||||
public Vector<String> getFlagsArray(){return new Vector<>();}
|
public Vector<String> getFlagsArray(){return new Vector<>();}
|
||||||
public Vector<String> getGroupsNamesArray(){
|
|
||||||
return Utils.unpack_s(packedGroupsNames,"\n");
|
|
||||||
}
|
|
||||||
//--
|
//--
|
||||||
|
@Description("DEFAULT ''")
|
||||||
|
public String packedGroupsJson = "";
|
||||||
|
@Description("DEFAULT ''")
|
||||||
|
public String packedTestsJson = "";
|
||||||
|
//----
|
||||||
|
//---данные для отображения. кешировать их где-то еще?
|
||||||
|
@Description("IGNORE")
|
||||||
|
public GroupsJson groupsJson = null;
|
||||||
|
@Description("IGNORE")
|
||||||
|
public Vector<String> groupsDescriptions = null;
|
||||||
|
@Description("IGNORE")
|
||||||
|
public TestsJson testsJson = null;
|
||||||
|
//--
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void SynchronizeFields(DBObject src) {
|
public void SynchronizeFields(DBObject src) {
|
||||||
super.SynchronizeFields(src);
|
super.SynchronizeFields(src);
|
||||||
Configuration c = (Configuration) src;
|
Configuration c = (Configuration) src;
|
||||||
//--
|
//--
|
||||||
packedGroupsIds = c.packedGroupsIds;
|
|
||||||
packedTestsIds = c.packedTestsIds;
|
|
||||||
//-
|
|
||||||
packedGroupsNames = c.packedGroupsNames;
|
|
||||||
//-
|
|
||||||
groupsCount = c.groupsCount;
|
|
||||||
testsCount = c.testsCount;
|
|
||||||
//-
|
|
||||||
maxtime = c.maxtime;
|
maxtime = c.maxtime;
|
||||||
autoTesting= c.autoTesting;
|
autoTesting= c.autoTesting;
|
||||||
|
//-
|
||||||
|
packedGroupsJson= c.packedGroupsJson;
|
||||||
|
packedTestsJson = c.packedTestsJson;
|
||||||
}
|
}
|
||||||
//-
|
//-
|
||||||
public void saveGroups(Vector<Group> new_groups) {
|
public void saveGroupsAsJson(Vector<Group> groups) {
|
||||||
Vector<String> res = new Vector<>();
|
packedGroupsJson = Utils.jsonToPrettyFormat(Utils.gson.toJson(new GroupsJson(groups)));
|
||||||
Vector<String> names = new Vector<>();
|
|
||||||
for (Group group : new_groups) {
|
|
||||||
res.add(String.valueOf(group.id));
|
|
||||||
names.add(group.description);
|
|
||||||
}
|
}
|
||||||
packedGroupsIds = String.join("\n", res);
|
void unpackGroupsAsJson() {
|
||||||
packedGroupsNames = String.join("\n", names);
|
if (groupsJson == null) {
|
||||||
groupsCount = new_groups.size();
|
if (packedGroupsJson.isEmpty())
|
||||||
|
groupsJson = new GroupsJson(); //просто пустой
|
||||||
|
else
|
||||||
|
groupsJson = Utils.gson.fromJson(packedGroupsJson, GroupsJson.class);
|
||||||
}
|
}
|
||||||
public void saveTests(Vector<Test> new_tests) {
|
|
||||||
Vector<String> res = new Vector<>();
|
|
||||||
for (Test test : new_tests)
|
|
||||||
res.add(String.valueOf(test.id));
|
|
||||||
packedTestsIds = String.join("\n", res);
|
|
||||||
testsCount = new_tests.size();
|
|
||||||
}
|
}
|
||||||
//--
|
public Vector<String> getGroupsDescriptions() {
|
||||||
|
if (groupsDescriptions==null) {
|
||||||
|
unpackGroupsAsJson();
|
||||||
|
groupsDescriptions = new Vector<>();
|
||||||
|
for (GroupJson groupJson : groupsJson.array)
|
||||||
|
groupsDescriptions.add(groupJson.description);
|
||||||
|
}
|
||||||
|
return groupsDescriptions;
|
||||||
|
}
|
||||||
public Vector<Group> getGroups() {
|
public Vector<Group> getGroups() {
|
||||||
|
//здесь обращение реже так что буферизовать список групп не надо, тем более может меняться.
|
||||||
|
unpackGroupsAsJson();
|
||||||
Vector<Group> res = new Vector<>();
|
Vector<Group> res = new Vector<>();
|
||||||
for (int o_id : Utils.unpackIntegers(packedGroupsIds, "\n"))
|
for (GroupJson groupJson: groupsJson.array){
|
||||||
if (Global.testingServer.db.groups.containsKey(o_id))
|
if (Global.testingServer.db.groups.containsKey(groupJson.id))
|
||||||
res.add(Global.testingServer.db.groups.get(o_id));
|
res.add(Global.testingServer.db.groups.get(groupJson.id));
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
//--------------------------------------------------------------------->>>
|
||||||
|
public void saveTestsAsJson(Vector<Test> tests) {
|
||||||
|
packedTestsJson = Utils.jsonToPrettyFormat(Utils.gson.toJson(new TestsJson(tests)));
|
||||||
|
}
|
||||||
|
void unpackTestsAsJson() {
|
||||||
|
if (testsJson == null) {
|
||||||
|
if (packedTestsJson.isEmpty())
|
||||||
|
testsJson = new TestsJson(); //просто пустой
|
||||||
|
else
|
||||||
|
testsJson = Utils.gson.fromJson(packedTestsJson, TestsJson.class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public int getTestsCount(){
|
||||||
|
unpackTestsAsJson();
|
||||||
|
return testsJson.array.size();
|
||||||
|
}
|
||||||
public Vector<Test> getTests() {
|
public Vector<Test> getTests() {
|
||||||
|
//здесь обращение реже так что буферизовать список групп не надо, тем более может меняться.
|
||||||
|
unpackTestsAsJson();
|
||||||
Vector<Test> res = new Vector<>();
|
Vector<Test> res = new Vector<>();
|
||||||
for (int o_id : Utils.unpackIntegers(packedTestsIds, "\n"))
|
for (TestJson testJson: testsJson.array){
|
||||||
if (Global.testingServer.db.tests.containsKey(o_id))
|
if (Global.testingServer.db.tests.containsKey(testJson.id))
|
||||||
res.add(Global.testingServer.db.tests.get(o_id));
|
res.add(Global.testingServer.db.tests.get(testJson.id));
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
public Vector<Test> getTests(Vector<Group> groups, LinkedHashMap<Integer, Vector<Test>> testByGroups) {
|
|
||||||
Vector<Test> res = new Vector<>();
|
|
||||||
for (int o_id : Utils.unpackIntegers(packedTestsIds, "\n"))
|
|
||||||
if (Global.testingServer.db.tests.containsKey(o_id))
|
|
||||||
res.add(Global.testingServer.db.tests.get(o_id));
|
|
||||||
//--
|
|
||||||
for (Group group: groups){
|
|
||||||
Vector<Test> groupTests = new Vector<>();
|
|
||||||
for (Test test:res){
|
|
||||||
if (test.group_id==group.id)
|
|
||||||
groupTests.add(test);
|
|
||||||
}
|
|
||||||
testByGroups.put(group.id, groupTests);
|
|
||||||
}
|
|
||||||
//--
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package TestingSystem.Common.Configuration;
|
package TestingSystem.Common.Configuration.Json;
|
||||||
|
import TestingSystem.Common.Configuration.Configuration;
|
||||||
import com.google.gson.annotations.Expose;
|
import com.google.gson.annotations.Expose;
|
||||||
public class ConfigurationJson {
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
public class ConfigurationJson implements Serializable {
|
||||||
@Expose
|
@Expose
|
||||||
public int id;
|
public int id;
|
||||||
@Expose
|
@Expose
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
package TestingSystem.Common.Configuration;
|
package TestingSystem.Common.Configuration.Json;
|
||||||
|
import TestingSystem.Common.Configuration.Configuration;
|
||||||
import com.google.gson.annotations.Expose;
|
import com.google.gson.annotations.Expose;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
public class ConfigurationsJson {
|
public class ConfigurationsJson implements Serializable {
|
||||||
@Expose
|
@Expose
|
||||||
public List<ConfigurationJson> array =new Vector<>();
|
public List<ConfigurationJson> array =new Vector<>();
|
||||||
public ConfigurationsJson(){
|
public ConfigurationsJson(){
|
||||||
16
src/TestingSystem/Common/Group/Json/GroupJson.java
Normal file
16
src/TestingSystem/Common/Group/Json/GroupJson.java
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
package TestingSystem.Common.Group.Json;
|
||||||
|
import TestingSystem.Common.Group.Group;
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
public class GroupJson implements Serializable {
|
||||||
|
@Expose
|
||||||
|
public int id;
|
||||||
|
@Expose
|
||||||
|
public String description;
|
||||||
|
public GroupJson(Group group){
|
||||||
|
id=group.id;
|
||||||
|
description= group.description;
|
||||||
|
}
|
||||||
|
public GroupJson(){}
|
||||||
|
}
|
||||||
19
src/TestingSystem/Common/Group/Json/GroupsJson.java
Normal file
19
src/TestingSystem/Common/Group/Json/GroupsJson.java
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package TestingSystem.Common.Group.Json;
|
||||||
|
import TestingSystem.Common.Group.Group;
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Vector;
|
||||||
|
public class GroupsJson implements Serializable {
|
||||||
|
@Expose
|
||||||
|
public List<GroupJson> array = new Vector<>();
|
||||||
|
public GroupsJson() {
|
||||||
|
}
|
||||||
|
//при создании пакета.
|
||||||
|
public GroupsJson(Vector<Group> groups) {
|
||||||
|
array = new Vector<>();
|
||||||
|
for (Group group : groups)
|
||||||
|
array.add(new GroupJson(group));
|
||||||
|
}
|
||||||
|
}
|
||||||
13
src/TestingSystem/Common/Test/Json/TestJson.java
Normal file
13
src/TestingSystem/Common/Test/Json/TestJson.java
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
package TestingSystem.Common.Test.Json;
|
||||||
|
import TestingSystem.Common.Test.Test;
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
public class TestJson implements Serializable {
|
||||||
|
@Expose
|
||||||
|
public int id;
|
||||||
|
public TestJson(Test test){
|
||||||
|
id=test.id;
|
||||||
|
}
|
||||||
|
public TestJson(){}
|
||||||
|
}
|
||||||
19
src/TestingSystem/Common/Test/Json/TestsJson.java
Normal file
19
src/TestingSystem/Common/Test/Json/TestsJson.java
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package TestingSystem.Common.Test.Json;
|
||||||
|
import TestingSystem.Common.Test.Test;
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Vector;
|
||||||
|
public class TestsJson implements Serializable {
|
||||||
|
@Expose
|
||||||
|
public List<TestJson> array = new Vector<>();
|
||||||
|
public TestsJson() {
|
||||||
|
}
|
||||||
|
//при создании пакета.
|
||||||
|
public TestsJson(Vector<Test> tests) {
|
||||||
|
array = new Vector<>();
|
||||||
|
for (Test test : tests)
|
||||||
|
array.add(new TestJson(test));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,8 +4,8 @@ import Common.Database.DBObject;
|
|||||||
import Common.Database.riDBObject;
|
import Common.Database.riDBObject;
|
||||||
import Common.Utils.Utils;
|
import Common.Utils.Utils;
|
||||||
import TestingSystem.Common.Configuration.Configuration;
|
import TestingSystem.Common.Configuration.Configuration;
|
||||||
import TestingSystem.Common.Configuration.ConfigurationJson;
|
import TestingSystem.Common.Configuration.Json.ConfigurationJson;
|
||||||
import TestingSystem.Common.Configuration.ConfigurationsJson;
|
import TestingSystem.Common.Configuration.Json.ConfigurationsJson;
|
||||||
import TestingSystem.Common.TasksPackageState;
|
import TestingSystem.Common.TasksPackageState;
|
||||||
import com.sun.org.glassfish.gmbal.Description;
|
import com.sun.org.glassfish.gmbal.Description;
|
||||||
|
|
||||||
@@ -29,12 +29,12 @@ public abstract class TestingPackage<J> extends riDBObject {
|
|||||||
//---данные для отображения.
|
//---данные для отображения.
|
||||||
@Description("DEFAULT ''")
|
@Description("DEFAULT ''")
|
||||||
public String packedConfigurationsJson = "";
|
public String packedConfigurationsJson = "";
|
||||||
|
public TasksPackageState state = TasksPackageState.Draft;
|
||||||
|
//--
|
||||||
@Description("IGNORE")
|
@Description("IGNORE")
|
||||||
public ConfigurationsJson configurationsJson = null;
|
public ConfigurationsJson configurationsJson = null;
|
||||||
@Description("IGNORE")
|
@Description("IGNORE")
|
||||||
public Vector<String> configurationsDescriptions = null;
|
public Vector<String> configurationsDescriptions = null;
|
||||||
//----
|
|
||||||
public TasksPackageState state = TasksPackageState.Draft;
|
|
||||||
//--
|
//--
|
||||||
@Override
|
@Override
|
||||||
public void SynchronizeFields(DBObject src) {
|
public void SynchronizeFields(DBObject src) {
|
||||||
@@ -66,8 +66,8 @@ public abstract class TestingPackage<J> extends riDBObject {
|
|||||||
public boolean isLoaded() {
|
public boolean isLoaded() {
|
||||||
return new File(getLocalWorkspace(), Constants.LOADED).exists();
|
return new File(getLocalWorkspace(), Constants.LOADED).exists();
|
||||||
}
|
}
|
||||||
//------------------------
|
//json где хранятся задачи----------------------------------
|
||||||
@Description("IGNORED")
|
@Description("IGNORE")
|
||||||
public J package_json = null;
|
public J package_json = null;
|
||||||
public abstract Class getJsonClass();
|
public abstract Class getJsonClass();
|
||||||
public abstract File getHomeDirectory();
|
public abstract File getHomeDirectory();
|
||||||
@@ -86,15 +86,13 @@ public abstract class TestingPackage<J> extends riDBObject {
|
|||||||
public void destructor() {
|
public void destructor() {
|
||||||
package_json = null;
|
package_json = null;
|
||||||
}
|
}
|
||||||
|
//----------------------------------------------------------
|
||||||
public void saveConfigurationsAsJson(Vector<? extends Configuration> configurations) {
|
public void saveConfigurationsAsJson(Vector<? extends Configuration> configurations) {
|
||||||
packedConfigurationsJson = Utils.gson.toJson(new ConfigurationsJson(configurations));
|
packedConfigurationsJson = Utils.jsonToPrettyFormat(Utils.gson.toJson(new ConfigurationsJson(configurations)));
|
||||||
System.out.println(Utils.Brackets(packedConfigurationsJson));
|
|
||||||
}
|
}
|
||||||
//пакеты нередактируемые поэтому метод сработает только один раз.
|
//пакеты нередактируемые поэтому метод сработает только один раз.
|
||||||
public void unpackConfigurationsAsJson() {
|
void unpackConfigurationsAsJson() {
|
||||||
if (configurationsJson == null) {
|
if (configurationsJson == null) {
|
||||||
System.out.println("package get Json");
|
|
||||||
if (packedConfigurationsJson.isEmpty())
|
if (packedConfigurationsJson.isEmpty())
|
||||||
configurationsJson = new ConfigurationsJson(); //просто пустой
|
configurationsJson = new ConfigurationsJson(); //просто пустой
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -71,9 +71,9 @@ public class DVMConfigurationDBTable extends iDBTable<DVMConfiguration> {
|
|||||||
case 4:
|
case 4:
|
||||||
return object.printAuto();
|
return object.printAuto();
|
||||||
case 5:
|
case 5:
|
||||||
return object.getGroupsNamesArray();
|
return object.getGroupsDescriptions();
|
||||||
case 6:
|
case 6:
|
||||||
return object.testsCount;
|
return object.getTestsCount();
|
||||||
//---
|
//---
|
||||||
case 7:
|
case 7:
|
||||||
return Utils.unpackStrings(object.flags, true);
|
return Utils.unpackStrings(object.flags, true);
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ public class SaveCurrentDVMConfiguration extends EditServerObject<TestingServer,
|
|||||||
@Override
|
@Override
|
||||||
protected void ServerAction() throws Exception {
|
protected void ServerAction() throws Exception {
|
||||||
//занесение информации об участвующих группах конфигурациях и тестах
|
//занесение информации об участвующих группах конфигурациях и тестах
|
||||||
target.saveGroups(groups);
|
target.saveGroupsAsJson(groups);
|
||||||
target.saveTests(tests);
|
target.saveTestsAsJson(tests);
|
||||||
//--
|
//--
|
||||||
super.ServerAction();
|
super.ServerAction();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,7 +142,16 @@ public class StartSelectedDVMConfigurations extends PublishServerObject<TestingS
|
|||||||
//----
|
//----
|
||||||
for (DVMConfiguration configuration: configurations) {
|
for (DVMConfiguration configuration: configurations) {
|
||||||
groups = configuration.getGroups();
|
groups = configuration.getGroups();
|
||||||
tests = configuration.getTests(groups, testByGroups);
|
tests = configuration.getTests();
|
||||||
|
//-
|
||||||
|
for (Group group: groups){
|
||||||
|
Vector<Test> groupTests = new Vector<>();
|
||||||
|
for (Test test: tests){
|
||||||
|
if (test.group_id==group.id)
|
||||||
|
groupTests.add(test);
|
||||||
|
}
|
||||||
|
testByGroups.put(group.id, groupTests);
|
||||||
|
}
|
||||||
//--
|
//--
|
||||||
for (Group group : groups) {
|
for (Group group : groups) {
|
||||||
Vector<Test> groupTests = testByGroups.get(group.id);
|
Vector<Test> groupTests = testByGroups.get(group.id);
|
||||||
|
|||||||
Reference in New Issue
Block a user