Closedown

This commit is contained in:
boccioli_m
2015-06-10 10:52:29 +02:00
parent d5eea641b6
commit ded2b0c21e

View File

@@ -57,8 +57,8 @@ public class TestingList extends Panel {
Object ret = eval("ret");
boolean success = (boolean) eval("success");
Object deviceName = eval("DEVICE");
String sSuccess = (success == true) ? "Success" : "Failed";
if (ret != null) {
//SwingUtils.showMessage(getComponent(), "", ret.toString() + " - " + ret.getClass().getName());
iCurrentTestPos = testingList.showResult(deviceName.toString(), fileName, ret.toString(), sSuccess);
@@ -67,9 +67,20 @@ public class TestingList extends Panel {
{
testingList.executeTest(iCurrentTestPos+1);
}
}
}
} catch (Exception ex) {
// SwingUtils.showException(getComponent(), ex);
String ret = "Could not start test script";
String sSuccess = "Failed";
String[] deviceName = testingList.getTestinProgress();
iCurrentTestPos = testingList.showResult(deviceName[0], fileName, ret, sSuccess);
//start next test
if(iCurrentTestPos>0)
{
testingList.executeTest(iCurrentTestPos+1);
}
}
}
@@ -320,6 +331,21 @@ public class TestingList extends Panel {
}
return rowD;
}
//find the test currently in progress
public String[] getTestinProgress() {
int rowD = -1, colT = -1;
String[] dsTestProperties = null;
//search for device name in table
for (int row = 0; row <= jTable1.getRowCount() - 1; row++) {
if ("Running".equals(jTable1.getValueAt(row, COL_STATUS))) {
rowD = row;
dsTestProperties[0] = jTable1.getValueAt(row, COL_DEVICENAME).toString();
dsTestProperties[1] = jTable1.getValueAt(row, COL_TESTNAME).toString();
break;
}
}
return dsTestProperties;
}
//returns the status of the specified test name for specified device name
public String getResult(String deviceName, String testName){