Closedown
This commit is contained in:
@@ -86,6 +86,9 @@ public class TestingList extends Panel {
|
||||
private final int COL_CHECK = 0;
|
||||
private final int COL_TIME = 1;
|
||||
private final int COL_DEVICENAME = 2;
|
||||
private final int COL_DEVICEDESCR = 3;
|
||||
private final int COL_TESTSUITE = 4;
|
||||
private final int COL_TESTNAME = 5;
|
||||
private final int COL_RESULT = 6;
|
||||
private final int COL_STATUS = 7;
|
||||
private final int COL_ICON = 8;
|
||||
@@ -263,6 +266,8 @@ public class TestingList extends Panel {
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void jButtonRunActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRunActionPerformed
|
||||
this.executeTests();
|
||||
/*
|
||||
try {
|
||||
boolean var1 = true;
|
||||
int var2 = 2;// (Integer)spinner.getValue();
|
||||
@@ -282,6 +287,7 @@ public class TestingList extends Panel {
|
||||
} catch (Exception ex) {
|
||||
SwingUtils.showException(this, ex);
|
||||
}
|
||||
*/
|
||||
}//GEN-LAST:event_jButtonRunActionPerformed
|
||||
|
||||
private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
|
||||
@@ -296,7 +302,7 @@ public class TestingList extends Panel {
|
||||
String sStatus, iconSource;
|
||||
boolean bSelected;
|
||||
for (int row = 0; row <= jTable1.getRowCount() - 1; row++) {
|
||||
bSelected = (boolean) jTable1.getValueAt(row, 0);
|
||||
bSelected = (boolean) jTable1.getValueAt(row, COL_CHECK);
|
||||
if (bSelected) {
|
||||
sStatus = "Pending";
|
||||
iconSource = "/icons/button_pause-16px.png";
|
||||
@@ -357,6 +363,30 @@ public class TestingList extends Panel {
|
||||
private javax.swing.JTextArea jTextField1;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
//execute the selected tests in the list
|
||||
public void executeTests(){
|
||||
boolean bSelected = false;
|
||||
String sDeviceName;
|
||||
String sTestName;
|
||||
HashMap args = new HashMap();
|
||||
//scan through the table and execute the selected tests
|
||||
for (int row = 0; row <= jTable1.getRowCount() - 1; row++) {
|
||||
bSelected = (boolean) jTable1.getValueAt(row, COL_CHECK);
|
||||
if (bSelected) {
|
||||
sDeviceName = jTable1.getValueAt(row, COL_DEVICENAME).toString();
|
||||
sTestName = jTable1.getValueAt(row, COL_TESTNAME).toString();
|
||||
showResult(sDeviceName, sTestName, "Test running", "Running");
|
||||
//launch the test
|
||||
try{
|
||||
args.put("DEVICE", sDeviceName);
|
||||
run(sTestName, args);
|
||||
} catch (Exception ex) {
|
||||
SwingUtils.showMessage(this, "", ex.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//table management
|
||||
public void buildTable() {
|
||||
String sDate = getNow();
|
||||
|
||||
Reference in New Issue
Block a user