Startup
This commit is contained in:
465
plugins/TestingListDetails - Copy.java
Normal file
465
plugins/TestingListDetails - Copy.java
Normal file
@@ -0,0 +1,465 @@
|
||||
/*
|
||||
* Copyright (c) 2015 Paul Scherrer Institute. All rights reserved.
|
||||
*/
|
||||
|
||||
import ch.psi.utils.swing.SwingUtils;
|
||||
import java.awt.Desktop;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.HashMap;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.event.HyperlinkEvent;
|
||||
import javax.swing.event.HyperlinkListener;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author boccioli_m
|
||||
*/
|
||||
public class TestingListDetails extends javax.swing.JPanel {
|
||||
|
||||
/**
|
||||
* Creates new form TestingListDetails
|
||||
*/
|
||||
public TestingListDetails() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
public TestingListDetails(HashMap hDetails) {
|
||||
initComponents();
|
||||
fillComponents(hDetails);
|
||||
}
|
||||
|
||||
public static String TESTS_CONFIG_FILENAME = ".config";
|
||||
public static Path TESTS_TESTS_DEFAULT_DIR = Paths.get(".", "home", "script", "tests", "tests");
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
txtDeviceName = new javax.swing.JTextField();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
txtDeviceDescription = new javax.swing.JTextField();
|
||||
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();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
jTableParams = new javax.swing.JTable();
|
||||
jLabel7 = new javax.swing.JLabel();
|
||||
jScrollPane2 = new javax.swing.JScrollPane();
|
||||
txtTestResult = new javax.swing.JTextArea();
|
||||
jLabel8 = new javax.swing.JLabel();
|
||||
jScrollPane3 = new javax.swing.JScrollPane();
|
||||
txtTestDescription = new javax.swing.JTextArea();
|
||||
jScrollPane4 = new javax.swing.JScrollPane();
|
||||
jEditorPaneHelp = new javax.swing.JEditorPane();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
jButtonCancel = new javax.swing.JButton();
|
||||
jButtonOk = new javax.swing.JButton();
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jLabel1.setText("Device name");
|
||||
|
||||
txtDeviceName.setEditable(false);
|
||||
txtDeviceName.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
txtDeviceName.setText("jTextField1");
|
||||
|
||||
jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jLabel2.setText("Device Description");
|
||||
|
||||
txtDeviceDescription.setEditable(false);
|
||||
txtDeviceDescription.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
txtDeviceDescription.setText("jTextField2");
|
||||
|
||||
jLabel4.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jLabel4.setText("Test Case/Suite");
|
||||
|
||||
txtTestSuite.setEditable(false);
|
||||
txtTestSuite.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
txtTestSuite.setText("jTextField2");
|
||||
|
||||
jLabel5.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jLabel5.setText("Test Name");
|
||||
|
||||
txtTestName.setEditable(false);
|
||||
txtTestName.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
txtTestName.setText("jTextField2");
|
||||
|
||||
jLabel6.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jLabel6.setText("Last Test Result");
|
||||
|
||||
jTableParams.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jTableParams.setModel(new javax.swing.table.DefaultTableModel(
|
||||
new Object [][] {
|
||||
|
||||
},
|
||||
new String [] {
|
||||
"Parameter", "Value", "Description"
|
||||
}
|
||||
) {
|
||||
boolean[] canEdit = new boolean [] {
|
||||
false, true, false
|
||||
};
|
||||
|
||||
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
||||
return canEdit [columnIndex];
|
||||
}
|
||||
});
|
||||
jTableParams.setDragEnabled(true);
|
||||
jTableParams.setRowHeight(20);
|
||||
jScrollPane1.setViewportView(jTableParams);
|
||||
if (jTableParams.getColumnModel().getColumnCount() > 0) {
|
||||
jTableParams.getColumnModel().getColumn(0).setMinWidth(150);
|
||||
jTableParams.getColumnModel().getColumn(0).setPreferredWidth(150);
|
||||
jTableParams.getColumnModel().getColumn(0).setMaxWidth(150);
|
||||
jTableParams.getColumnModel().getColumn(1).setPreferredWidth(80);
|
||||
jTableParams.getColumnModel().getColumn(1).setMaxWidth(100);
|
||||
}
|
||||
|
||||
jLabel7.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jLabel7.setText("Test Parameters");
|
||||
|
||||
jScrollPane2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
|
||||
txtTestResult.setEditable(false);
|
||||
txtTestResult.setColumns(20);
|
||||
txtTestResult.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
txtTestResult.setLineWrap(true);
|
||||
txtTestResult.setRows(5);
|
||||
jScrollPane2.setViewportView(txtTestResult);
|
||||
|
||||
jLabel8.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jLabel8.setText("Test Description");
|
||||
|
||||
jScrollPane3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
|
||||
txtTestDescription.setEditable(false);
|
||||
txtTestDescription.setColumns(20);
|
||||
txtTestDescription.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
txtTestDescription.setLineWrap(true);
|
||||
txtTestDescription.setRows(5);
|
||||
jScrollPane3.setViewportView(txtTestDescription);
|
||||
|
||||
jEditorPaneHelp.setContentType("text/html"); // NOI18N
|
||||
jEditorPaneHelp.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jEditorPaneHelp.setDropMode(javax.swing.DropMode.INSERT);
|
||||
jScrollPane4.setViewportView(jEditorPaneHelp);
|
||||
|
||||
jButtonCancel.setText("Cancel");
|
||||
|
||||
jButtonOk.setText("Ok");
|
||||
jButtonOk.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButtonOkActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
jPanel1Layout.setHorizontalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jButtonOk, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jButtonCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
);
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jButtonCancel)
|
||||
.addComponent(jButtonOk))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel4)
|
||||
.addComponent(jLabel5)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(jLabel7)
|
||||
.addComponent(jLabel6)
|
||||
.addComponent(jLabel8))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(txtDeviceName)
|
||||
.addComponent(txtDeviceDescription)
|
||||
.addComponent(txtTestSuite)
|
||||
.addComponent(txtTestName)
|
||||
.addComponent(jScrollPane3)
|
||||
.addComponent(jScrollPane2)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 513, Short.MAX_VALUE)))
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 317, Short.MAX_VALUE)
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.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))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(txtDeviceDescription, 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(jLabel4)
|
||||
.addComponent(txtTestSuite, 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(jLabel5)
|
||||
.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.LEADING)
|
||||
.addComponent(jLabel8)
|
||||
.addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel6))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabel7)
|
||||
.addGap(0, 192, Short.MAX_VALUE))
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jScrollPane4)
|
||||
.addContainerGap())))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void fillComponents(HashMap hDetails) {
|
||||
//add values to each text box
|
||||
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("time").toString() + "\n" + hDetails.get("testResult").toString());
|
||||
//help text
|
||||
showHelp(String.valueOf(hDetails.get("testPath")), String.valueOf(hDetails.get("testHelp")));
|
||||
//parameters table
|
||||
HashMap hParams = (HashMap) hDetails.get("parameters");
|
||||
String name="", value="", description="";
|
||||
DefaultTableModel model = (DefaultTableModel) jTableParams.getModel();
|
||||
|
||||
for(Object entry : hParams.keySet()){
|
||||
Object param = entry;
|
||||
if(param instanceof String){
|
||||
name = (String) param;
|
||||
HashMap attributes = (HashMap) hParams.get(param);
|
||||
value = (String) attributes.get("value");
|
||||
description = (String) attributes.get("description");
|
||||
model.addRow(new Object[]{name, value, description});
|
||||
}
|
||||
jTableParams.setModel(model);
|
||||
}
|
||||
}
|
||||
|
||||
//load and show help
|
||||
private void showHelp(String sTestPath, String sHelpText){
|
||||
this.jEditorPaneHelp.addHyperlinkListener(new HyperlinkListener() {
|
||||
@Override
|
||||
public void hyperlinkUpdate(HyperlinkEvent hle) {
|
||||
if (HyperlinkEvent.EventType.ACTIVATED.equals(hle.getEventType())) {
|
||||
System.out.println(hle.getURL());
|
||||
Desktop desktop = Desktop.getDesktop();
|
||||
try {
|
||||
desktop.browse(hle.getURL().toURI());
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
this.jEditorPaneHelp.setEditable(false);
|
||||
//if there is no input, exit
|
||||
if(sTestPath == "" && sHelpText == ""){
|
||||
return;
|
||||
}
|
||||
File fTest = new File(sTestPath);
|
||||
String sParentPath = fTest.getParent().toString();
|
||||
File fHelp = new File(FilenameUtils.separatorsToSystem(sParentPath + "/help.html"));
|
||||
|
||||
if(fHelp.isFile()){//if local help file existis:
|
||||
try {
|
||||
this.jEditorPaneHelp.setPage(fHelp.toURI().toURL());
|
||||
} catch (IOException ex) {
|
||||
this.jEditorPaneHelp.setText(String.valueOf(ex));
|
||||
}
|
||||
} else { //help.html file is present. see if a plain text has been given from .config file
|
||||
if(sHelpText.isEmpty() || sHelpText == "null"){
|
||||
this.jEditorPaneHelp.setText("[No help available]");
|
||||
//this.jEditorPaneHelp.setVisible(false);
|
||||
}else {
|
||||
this.jEditorPaneHelp.setText(sHelpText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a map with optional parameters to be passed to the testing script.
|
||||
* The map is like this: parameters \_ name | \_ value | \_ description \_
|
||||
* name | \_ value | \_ description ... the name 'name' is the mapping key.
|
||||
* 'value' and 'description' are constant mapping keys of a nested map.
|
||||
*
|
||||
* @param parametersString string containing the parameters. Syntax:
|
||||
* name:value:description[;name:value:description;...]
|
||||
*/
|
||||
private HashMap buildParametersMap(String parametersString) {
|
||||
HashMap mParameters = new HashMap(); // contains name and attributes
|
||||
HashMap mParameterAttributes = new HashMap(); //contians value and description
|
||||
String[] dsParameterAttributes = null;
|
||||
String[] dsParameters = parametersString.split(";");
|
||||
for (String sParameter : dsParameters) {
|
||||
dsParameterAttributes = sParameter.split(":");
|
||||
if (dsParameterAttributes.length > 2) {
|
||||
mParameterAttributes = new HashMap();
|
||||
mParameterAttributes.put("value", (Object) dsParameterAttributes[1]);
|
||||
mParameterAttributes.put("description", dsParameterAttributes[2]);
|
||||
//add parameter name and attributes (value + description)
|
||||
mParameters.put(dsParameterAttributes[0], mParameterAttributes);
|
||||
}
|
||||
}
|
||||
return mParameters;
|
||||
}
|
||||
|
||||
private HashMap getParametersFromTable(){
|
||||
HashMap mParameters = new HashMap(); // contains name and attributes
|
||||
HashMap mParameterAttributes = new HashMap(); //contians value and description
|
||||
for(int row=0 ; row<jTableParams.getRowCount() ; row++){
|
||||
String sParam = jTableParams.getValueAt(row, 0).toString();
|
||||
String sVal = jTableParams.getValueAt(row, 1).toString();
|
||||
String sDescr = jTableParams.getValueAt(row, 2).toString();
|
||||
mParameterAttributes = new HashMap();
|
||||
mParameterAttributes.put("value", (Object) sVal);
|
||||
mParameterAttributes.put("description", sDescr);
|
||||
//add parameter name and attributes (value + description)
|
||||
mParameters.put(sParam, mParameterAttributes);
|
||||
}
|
||||
return mParameters;
|
||||
}
|
||||
|
||||
public boolean updateTestConfig(Path testDir,
|
||||
String sTestName,
|
||||
String sTestSuite,
|
||||
HashMap hmTestParams){
|
||||
//generate test config file from template
|
||||
boolean success = false;
|
||||
try {
|
||||
Path path = Paths.get(testDir + FilenameUtils.separatorsToSystem("/"+TESTS_CONFIG_FILENAME));
|
||||
File configFile = path.toFile();
|
||||
//Loop among the test parameters and generate variable assignement syntax for python
|
||||
String sTestParameters = "";
|
||||
String name="", value="", description="";
|
||||
for(Object entry : hmTestParams.keySet()){
|
||||
Object param = entry;
|
||||
if(param instanceof String){
|
||||
name = (String) param;
|
||||
HashMap attributes = (HashMap) hmTestParams.get(param);
|
||||
value = (String) attributes.get("value");
|
||||
description = (String) attributes.get("description");
|
||||
//build the python code for getting the test parameter
|
||||
sTestParameters = sTestParameters + name + ":" + value + ":" + description + ";" ;
|
||||
}
|
||||
}
|
||||
FileOutputStream out = new FileOutputStream(path.toFile());
|
||||
FileInputStream in = new FileInputStream(path.toFile());
|
||||
Properties props = new Properties();
|
||||
props.load(in);
|
||||
in.close();
|
||||
props.setProperty("parameters", "sTestParameters");
|
||||
props.store(out, null);
|
||||
out.close();
|
||||
|
||||
success = true;
|
||||
} catch (FileNotFoundException ex) {
|
||||
SwingUtils.showMessage(this, "generateTestConfig()", "Cannot find file: " + ex.toString());
|
||||
Logger.getLogger(NewTest.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (IOException ex) {
|
||||
SwingUtils.showMessage(this, "generateTestConfig()", "Problem with file aaccess: " + ex.toString());
|
||||
Logger.getLogger(NewTest.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkActionPerformed
|
||||
// TODO add your handling code here:
|
||||
Path testPath = Paths.get(TESTS_TESTS_DEFAULT_DIR.toString(), this.txtTestSuite.getText(), this.txtTestName.getText());
|
||||
updateTestConfig(testPath, this.txtTestName.getText(), this.txtTestSuite.getText(),getParametersFromTable());
|
||||
}//GEN-LAST:event_jButtonOkActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton jButtonCancel;
|
||||
private javax.swing.JButton jButtonOk;
|
||||
private javax.swing.JEditorPane jEditorPaneHelp;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
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.JPanel jPanel1;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JScrollPane jScrollPane2;
|
||||
private javax.swing.JScrollPane jScrollPane3;
|
||||
private javax.swing.JScrollPane jScrollPane4;
|
||||
private javax.swing.JTable jTableParams;
|
||||
private javax.swing.JTextField txtDeviceDescription;
|
||||
private javax.swing.JTextField txtDeviceName;
|
||||
private javax.swing.JTextArea txtTestDescription;
|
||||
private javax.swing.JTextField txtTestName;
|
||||
private javax.swing.JTextArea txtTestResult;
|
||||
private javax.swing.JTextField txtTestSuite;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
Reference in New Issue
Block a user