Closedown
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
<Font name="Tahoma" size="15" style="0"/>
|
||||
</Property>
|
||||
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor" postCode="jTable1.getTableHeader().setReorderingAllowed(false);">
|
||||
<Connection code="new javax.swing.table.DefaultTableModel(
 new Object [][] {

 },
 new String [] {
 "Select", "Time", "Device Name", "Device Description", "Test Suite", "Test Name", "Test Peth", "Test Parameters", "Last Test Result", "Status", ""
 }
) {
 Class[] types = new Class [] {
 java.lang.Boolean.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, javax.swing.Icon.class
 };
 boolean[] canEdit = new boolean [] {
 true, false, false, false, false, false, false, false, false, false, false
 };

 public Class getColumnClass(int columnIndex) {
 return types [columnIndex];
 }

 public boolean isCellEditable(int rowIndex, int columnIndex) {
 return canEdit [columnIndex];
 }
}" type="code"/>
|
||||
<Connection code="new javax.swing.table.DefaultTableModel(
 new Object [][] {

 },
 new String [] {
 "Select", "Time", "Device Name", "Device Description", "Test Suite", "Test Name", "Test Peth", "Test Parameters", "Test Description", "Last Test Result", "Status", ""
 }
) {
 Class[] types = new Class [] {
 java.lang.Boolean.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, javax.swing.Icon.class
 };
 boolean[] canEdit = new boolean [] {
 true, false, false, false, false, false, false, false, false, false, false, false
 };

 public Class getColumnClass(int columnIndex) {
 return types [columnIndex];
 }

 public boolean isCellEditable(int rowIndex, int columnIndex) {
 return canEdit [columnIndex];
 }
}" type="code"/>
|
||||
</Property>
|
||||
<Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor">
|
||||
<TableColumnModel selectionModel="0"/>
|
||||
|
||||
@@ -118,9 +118,10 @@ public class TestingList extends Panel {
|
||||
TESTNAME (5),
|
||||
TESTPATH (6),
|
||||
TESTPARAMS (7),
|
||||
RESULT (8),
|
||||
STATUS (9),
|
||||
ICON (10);
|
||||
TESTDESCR (8),
|
||||
RESULT (9),
|
||||
STATUS (10),
|
||||
ICON (11);
|
||||
private int value;
|
||||
|
||||
private COL(int value) {
|
||||
@@ -254,14 +255,14 @@ public class TestingList extends Panel {
|
||||
|
||||
},
|
||||
new String [] {
|
||||
"Select", "Time", "Device Name", "Device Description", "Test Suite", "Test Name", "Test Peth", "Test Parameters", "Last Test Result", "Status", ""
|
||||
"Select", "Time", "Device Name", "Device Description", "Test Suite", "Test Name", "Test Peth", "Test Parameters", "Test Description", "Last Test Result", "Status", ""
|
||||
}
|
||||
) {
|
||||
Class[] types = new Class [] {
|
||||
java.lang.Boolean.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, javax.swing.Icon.class
|
||||
java.lang.Boolean.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, javax.swing.Icon.class
|
||||
};
|
||||
boolean[] canEdit = new boolean [] {
|
||||
true, false, false, false, false, false, false, false, false, false, false
|
||||
true, false, false, false, false, false, false, false, false, false, false, false
|
||||
};
|
||||
|
||||
public Class getColumnClass(int columnIndex) {
|
||||
@@ -415,7 +416,6 @@ public class TestingList extends Panel {
|
||||
break;
|
||||
case 2:
|
||||
openDetails();
|
||||
SwingUtils.showMessage(this, "jBu","bo");
|
||||
break;
|
||||
}
|
||||
} catch (Exception ex){
|
||||
@@ -489,19 +489,15 @@ public class TestingList extends Panel {
|
||||
}
|
||||
|
||||
//open details of the selected test in a new panel
|
||||
private void openDetails() throws ClassNotFoundException, InstantiationException, IllegalAccessException{
|
||||
String sDeviceName;
|
||||
String sTestName;
|
||||
String sTestCaseName;
|
||||
String sDeviceDescription;
|
||||
String sLastResult;
|
||||
String sResultTime;
|
||||
private void openDetails() throws Exception{
|
||||
String sDeviceName, sTestName, sTestCaseName, sDeviceDescription, sTestDescription, sLastResult, sResultTime;
|
||||
HashMap mParameters = new HashMap();
|
||||
//pick details from the clicked row
|
||||
int row = jTable1.getSelectedRow();
|
||||
sDeviceName = jTable1.getValueAt(row, COL.DEVICENAME.ordinal()).toString();
|
||||
sTestName = jTable1.getValueAt(row, COL.TESTNAME.ordinal()).toString();
|
||||
sTestCaseName = jTable1.getValueAt(row, COL.TESTSUITE.ordinal()).toString();
|
||||
sTestDescription = jTable1.getValueAt(row, COL.TESTDESCR.ordinal()).toString();
|
||||
sDeviceDescription = jTable1.getValueAt(row, COL.DEVICEDESCR.ordinal()).toString();
|
||||
sLastResult = jTable1.getValueAt(row, COL.RESULT.ordinal()).toString();
|
||||
sResultTime = jTable1.getValueAt(row, COL.TIME.ordinal()).toString();
|
||||
@@ -510,25 +506,18 @@ public class TestingList extends Panel {
|
||||
HashMap details = new HashMap();
|
||||
details.put("deviceName", sDeviceName);
|
||||
details.put("deviceDescription", sDeviceDescription);
|
||||
details.put("testDescription", sTestDescription);
|
||||
details.put("testSuite", sTestCaseName);
|
||||
details.put("testName", sTestName);
|
||||
details.put("testResult", sLastResult);
|
||||
details.put("time", sResultTime);
|
||||
details.put("parameters", mParameters);
|
||||
//open details panel
|
||||
JDialog dlg = new JDialog(getView(), true);
|
||||
//dlg.setLayout(new BorderLayout());
|
||||
|
||||
System.out.println("A");
|
||||
//TestingListDetails detailsPanel = new TestingListDetails();
|
||||
Class testingListDetailsClass = getController().getClassByName("TestingListDetails");
|
||||
System.out.println(testingListDetailsClass);
|
||||
//JPanel detailsPanel = (JPanel)testingListDetailsClass.newInstance();
|
||||
JDialog dlg = new JDialog(getView(), "Test Details - " + sTestName , true);
|
||||
//create a class to visualise the details panel
|
||||
Class testingListDetailsClass = getController().getClassByName("TestingListDetails");
|
||||
JPanel detailsPanel = (JPanel) testingListDetailsClass.getConstructor(new Class[]{HashMap.class}).newInstance(new Object[]{details});
|
||||
|
||||
System.out.println("C");
|
||||
|
||||
|
||||
|
||||
dlg.getContentPane().add(detailsPanel);
|
||||
//dlg.add(new TestingListDetails());
|
||||
dlg.pack();
|
||||
@@ -712,7 +701,12 @@ public class TestingList extends Panel {
|
||||
}
|
||||
|
||||
//append test info to table
|
||||
public void addToTable(String deviceName, String deviceDescription, String testSuite, String testName, String testParams) {
|
||||
private void addToTable(String deviceName,
|
||||
String deviceDescription,
|
||||
String testSuite,
|
||||
String testName,
|
||||
String testParams,
|
||||
String testDescription) {
|
||||
String sDate = "";
|
||||
if (testName.equals("") || deviceName.equals("")) {
|
||||
return;
|
||||
@@ -720,7 +714,7 @@ public class TestingList extends Panel {
|
||||
ImageIcon icon = null;// new ImageIcon(getClass().getResource("/icons/button_pause-16px.png"));
|
||||
DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
|
||||
String testPath = FilenameUtils.separatorsToSystem(TESTS_TESTS_DEFAULT_DIR + testSuite + "/" + testName + "/" + testName + ".py");
|
||||
model.addRow(new Object[]{false, sDate, deviceName, deviceDescription, testSuite, testName, testPath, testParams, "", "Pending", icon});
|
||||
model.addRow(new Object[]{false, sDate, deviceName, deviceDescription, testSuite, testName, testPath, testParams, testDescription, "", "Pending", icon});
|
||||
jTable1.setModel(model);
|
||||
updateStatus();
|
||||
}
|
||||
@@ -775,7 +769,8 @@ public class TestingList extends Panel {
|
||||
propDevice.getProperty("description"),
|
||||
propDevice.getProperty("tests"),
|
||||
propTest.getProperty("name"),
|
||||
propTest.getProperty("parameters"));
|
||||
propTest.getProperty("parameters"),
|
||||
propTest.getProperty("description"));
|
||||
iCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,21 +28,25 @@
|
||||
<EmptySpace min="-2" pref="383" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel6" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="246" max="-2" attributes="0"/>
|
||||
<Component id="jLabel8" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="362" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel3" min="-2" pref="528" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="109" max="32767" attributes="0"/>
|
||||
<Component id="txtTestDescription" min="-2" pref="673" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="jLabel1" max="32767" attributes="0"/>
|
||||
<Component id="jLabel2" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jLabel7" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel6" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="cmDefault" min="-2" pref="132" max="-2" attributes="0"/>
|
||||
@@ -51,16 +55,12 @@
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="cmCancel" min="-2" pref="98" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="txtTestName" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="txtDeviceName" max="32767" attributes="0"/>
|
||||
<Component id="txtDeviceDescription" max="32767" attributes="0"/>
|
||||
<Component id="txtTestSuite" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane1" pref="666" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="txtTestResult" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="txtTime" min="-2" pref="148" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane1" pref="673" max="32767" attributes="0"/>
|
||||
<Component id="txtTestSuite" max="32767" attributes="0"/>
|
||||
<Component id="txtTestName" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane2" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
@@ -74,8 +74,6 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel3" min="-2" pref="22" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtDeviceName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
@@ -97,14 +95,18 @@
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtTestResult" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtTime" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtTestDescription" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="8" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jScrollPane2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" pref="200" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" pref="212" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
@@ -138,14 +140,6 @@
|
||||
<Property name="text" type="java.lang.String" value="jTextField2"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel3">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="18" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Test details"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Test Case/Suite"/>
|
||||
@@ -171,11 +165,6 @@
|
||||
<Property name="text" type="java.lang.String" value="Last Test Result"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtTestResult">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="jTextField2"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
@@ -188,7 +177,7 @@
|
||||
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
|
||||
<Table columnCount="3" rowCount="0">
|
||||
<Column editable="false" title="Parameter" type="java.lang.Object"/>
|
||||
<Column editable="false" title="Value" type="java.lang.Object"/>
|
||||
<Column editable="true" title="Value" type="java.lang.Object"/>
|
||||
<Column editable="false" title="Description" type="java.lang.Object"/>
|
||||
</Table>
|
||||
</Property>
|
||||
@@ -251,9 +240,29 @@
|
||||
<AuxValue name="JavaCodeGenerator_InitCodePost" type="java.lang.String" value="this.cmCancel.setVisible(false);
this.cmOk.setVisible(false);
this.cmDefault.setVisible(false);
"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtTime">
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane2">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="txtTestResult">
|
||||
<Properties>
|
||||
<Property name="columns" type="int" value="20"/>
|
||||
<Property name="rows" type="int" value="5"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="jLabel8">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="jTextField1"/>
|
||||
<Property name="text" type="java.lang.String" value="Test Description"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtTestDescription">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="jTextField2"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
|
||||
@@ -41,20 +41,21 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
txtDeviceName = new javax.swing.JTextField();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
txtDeviceDescription = new javax.swing.JTextField();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
txtTestSuite = new javax.swing.JTextField();
|
||||
jLabel5 = new javax.swing.JLabel();
|
||||
txtTestName = new javax.swing.JTextField();
|
||||
jLabel6 = new javax.swing.JLabel();
|
||||
txtTestResult = new javax.swing.JTextField();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
jTableParams = new javax.swing.JTable();
|
||||
jLabel7 = new javax.swing.JLabel();
|
||||
cmCancel = new javax.swing.JButton();
|
||||
cmOk = new javax.swing.JButton();
|
||||
cmDefault = new javax.swing.JButton();
|
||||
txtTime = new javax.swing.JTextField();
|
||||
jScrollPane2 = new javax.swing.JScrollPane();
|
||||
txtTestResult = new javax.swing.JTextArea();
|
||||
jLabel8 = new javax.swing.JLabel();
|
||||
txtTestDescription = new javax.swing.JTextField();
|
||||
|
||||
jLabel1.setText("Device name");
|
||||
|
||||
@@ -64,9 +65,6 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
|
||||
txtDeviceDescription.setText("jTextField2");
|
||||
|
||||
jLabel3.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
|
||||
jLabel3.setText("Test details");
|
||||
|
||||
jLabel4.setText("Test Case/Suite");
|
||||
|
||||
txtTestSuite.setText("jTextField2");
|
||||
@@ -77,8 +75,6 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
|
||||
jLabel6.setText("Last Test Result");
|
||||
|
||||
txtTestResult.setText("jTextField2");
|
||||
|
||||
jTableParams.setModel(new javax.swing.table.DefaultTableModel(
|
||||
new Object [][] {
|
||||
|
||||
@@ -88,7 +84,7 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
}
|
||||
) {
|
||||
boolean[] canEdit = new boolean [] {
|
||||
false, false, false
|
||||
false, true, false
|
||||
};
|
||||
|
||||
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
||||
@@ -125,7 +121,13 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
this.cmOk.setVisible(false);
|
||||
this.cmDefault.setVisible(false);
|
||||
|
||||
txtTime.setText("jTextField1");
|
||||
txtTestResult.setColumns(20);
|
||||
txtTestResult.setRows(5);
|
||||
jScrollPane2.setViewportView(txtTestResult);
|
||||
|
||||
jLabel8.setText("Test Description");
|
||||
|
||||
txtTestDescription.setText("jTextField2");
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
@@ -141,18 +143,21 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
.addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGap(383, 383, 383))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGap(246, 246, 246))
|
||||
.addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGap(362, 362, 362))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 528, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(0, 109, Short.MAX_VALUE)
|
||||
.addComponent(txtTestDescription, javax.swing.GroupLayout.PREFERRED_SIZE, 673, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addComponent(jLabel7))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jLabel7)
|
||||
.addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(cmDefault, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
@@ -160,23 +165,18 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
.addComponent(cmOk, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(cmCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(txtTestName, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(txtDeviceName)
|
||||
.addComponent(txtDeviceDescription)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 673, Short.MAX_VALUE)
|
||||
.addComponent(txtTestSuite)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 666, Short.MAX_VALUE)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(txtTestResult)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(txtTime, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)))))
|
||||
.addComponent(txtTestName, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jScrollPane2))))
|
||||
.addContainerGap(21, Short.MAX_VALUE))))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(txtDeviceName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
@@ -194,13 +194,16 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
.addComponent(txtTestName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel6)
|
||||
.addComponent(txtTestResult, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jLabel8)
|
||||
.addComponent(txtTestDescription, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(8, 8, 8)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel6))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel7)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(cmOk, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
@@ -213,10 +216,10 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
private void fillComponents(HashMap hDetails) {
|
||||
this.txtDeviceName.setText(hDetails.get("deviceName").toString());
|
||||
this.txtDeviceDescription.setText(hDetails.get("deviceDescription").toString());
|
||||
this.txtTestDescription.setText(hDetails.get("testDescription").toString());
|
||||
this.txtTestSuite.setText(hDetails.get("testSuite").toString());
|
||||
this.txtTestName.setText(hDetails.get("testName").toString());
|
||||
this.txtTestResult.setText(hDetails.get("testResult").toString());
|
||||
this.txtTime.setText(hDetails.get("time").toString());
|
||||
this.txtTestResult.setText(hDetails.get("time").toString() + "\n" + hDetails.get("testResult").toString());
|
||||
//parameters table
|
||||
HashMap hParams = (HashMap) hDetails.get("parameters");
|
||||
String name="", value="", description="";
|
||||
@@ -246,18 +249,19 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
private javax.swing.JButton cmOk;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
private javax.swing.JLabel jLabel6;
|
||||
private javax.swing.JLabel jLabel7;
|
||||
private javax.swing.JLabel jLabel8;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JScrollPane jScrollPane2;
|
||||
private javax.swing.JTable jTableParams;
|
||||
private javax.swing.JTextField txtDeviceDescription;
|
||||
private javax.swing.JTextField txtDeviceName;
|
||||
private javax.swing.JTextField txtTestDescription;
|
||||
private javax.swing.JTextField txtTestName;
|
||||
private javax.swing.JTextField txtTestResult;
|
||||
private javax.swing.JTextArea txtTestResult;
|
||||
private javax.swing.JTextField txtTestSuite;
|
||||
private javax.swing.JTextField txtTime;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
name=Motor Test 1
|
||||
description=moves to CCW switch; then for M times moves N times to CW switch then CCW switch; between each M pauses for delay; log at CCW and CW
|
||||
filename=Motor Test 3.xml
|
||||
|
||||
#optional parameters. Description is compulsory. Syntax:
|
||||
#parameters=<parameter1Name>:<parameter1Value>:<Parameter 1 description>[;<parameter1Name>:<parameter1Value>:<Parameter 1 description>]
|
||||
parameters=repeatTimes:3:Repeat times
|
||||
|
||||
@@ -7,6 +7,16 @@ import traceback
|
||||
ret = 'Test failed'
|
||||
status = False
|
||||
#DEVICE = 'PO2DV-NCS-LS'
|
||||
#get parameters from the calling interface
|
||||
try:
|
||||
print "Running test with the following parameters:"
|
||||
print parameters
|
||||
loopTimes = parameters["repeatTimes"]
|
||||
except:
|
||||
print "Could not retrieve testing parameters: ", sys.exc_info()[0]
|
||||
ret = 'Could not retrieve testing parameters - ' + traceback.format_exc()
|
||||
success = False
|
||||
raise Exception('Could not retrieve testing parameters - ' + traceback.format_exc())
|
||||
|
||||
#TODO: Set the diplay names of positioners and detectors
|
||||
#scan = ManualScan(['idX', 'idInkr'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [-0.5, 0.0], [4.0, 3000.0], [3000, 20])
|
||||
|
||||
Reference in New Issue
Block a user