441 lines
8.1 KiB
Java
441 lines
8.1 KiB
Java
|
|
|
|
/**
|
|
* @author boccioli_m
|
|
* @version 1.0
|
|
* @created 30-Jun-2015 10:18:25
|
|
*/
|
|
public class NetbeansPluginPanel extends MonitoredPanel {
|
|
|
|
/**
|
|
* @author boccioli_m
|
|
* @version 1.0
|
|
* @created 30-Jun-2015 10:18:25
|
|
*/
|
|
public class RunTest implements Runnable {
|
|
|
|
private HashMap<String,Object> args;
|
|
private HashMap<String,HashMap> hTests;
|
|
private HashMap mParameters;
|
|
private String sDeviceName;
|
|
private String sTestPath;
|
|
|
|
public RunTest(){
|
|
|
|
}
|
|
|
|
public void finalize() throws Throwable {
|
|
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param sTestPath
|
|
* @param args
|
|
*/
|
|
public RunTest(String sTestPath, HashMap<String,Object> args){
|
|
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param sTestPath
|
|
*/
|
|
public RunTest(String sTestPath){
|
|
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param args
|
|
*/
|
|
public RunTest(HashMap<String,HashMap> args){
|
|
|
|
}
|
|
|
|
public void run(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
* <editor-fold defaultstate="collapsed" desc="Witget Variables declaration">
|
|
* Variables declaration - do not modify//GEN-BEGIN:variables
|
|
*/
|
|
private javax.swing.JButton jButton1;
|
|
private javax.swing.JButton jButton2;
|
|
private javax.swing.JButton jButtonMoveDown;
|
|
private javax.swing.JButton jButtonMoveUp;
|
|
private javax.swing.JButton jButtonOpenLog;
|
|
private javax.swing.JButton jButtonRun;
|
|
private javax.swing.JCheckBox jCheckBox1;
|
|
private javax.swing.JPanel jPanel1;
|
|
private javax.swing.JPanel jPanel2;
|
|
private javax.swing.JScrollPane jScrollPane2;
|
|
private javax.swing.JTable jTable1;
|
|
Logger logger = Logger.getLogger("TestsLog");
|
|
/**
|
|
* these paths are converted to unix or win path according to host OS
|
|
*/
|
|
private final String TESTS_DEVICES_DEFAULT_DIR = new java.io.File(".").getCanonicalPath()
|
|
+ FilenameUtils.separatorsToSystem("/home/script/tests/devices/");
|
|
private final String TESTS_LOG_DEFAULT_DIR = new java.io.File(".").getCanonicalPath()
|
|
+ FilenameUtils.separatorsToSystem("/home/script/tests/log/TestsLog" + getnow() + ".txt");
|
|
private final String TESTS_TESTS_DEFAULT_DIR = new java.io.File(".").getCanonicalPath()
|
|
+ FilenameUtils.separatorsToSystem("/home/script/tests/tests/");
|
|
|
|
|
|
|
|
public void finalize() throws Throwable {
|
|
super.finalize();
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @exception IOException IOException
|
|
*/
|
|
public NetbeansPluginPanel()
|
|
throws IOException{
|
|
|
|
}
|
|
|
|
/**
|
|
* append test info to table
|
|
*
|
|
* @param deviceName
|
|
* @param deviceDescription
|
|
* @param testSuite
|
|
* @param testName
|
|
* @param testParams
|
|
* @param testDescription
|
|
* @param testHelp
|
|
*/
|
|
private void addToTable(String deviceName, String deviceDescription, String testSuite, String testName, String testParams, String testDescription, String testHelp){
|
|
|
|
}
|
|
|
|
/**
|
|
* 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
|
|
*/
|
|
private HashMap buildParametersMap(String parametersString){
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* table management
|
|
*/
|
|
private void buildTable(){
|
|
|
|
}
|
|
|
|
/**
|
|
* start all the tests in the rowsToExecute
|
|
*
|
|
* @param rowsToExecute
|
|
*/
|
|
private int executeParallelTestsGroup(int[] rowsToExecute){
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
* execute the selected tests in the list, starting from the position
|
|
*
|
|
* @param position
|
|
*/
|
|
public void executeTest(int position){
|
|
|
|
}
|
|
|
|
/**
|
|
* execute the selected tests in the list, starting from the position
|
|
*
|
|
* @param position
|
|
*/
|
|
public void executeTest_Old(int position){
|
|
|
|
}
|
|
|
|
/**
|
|
* @return formatted time
|
|
*/
|
|
public String getNow(){
|
|
return "";
|
|
}
|
|
|
|
/**
|
|
* @return time with sortable format
|
|
*/
|
|
public String getnow(){
|
|
return "";
|
|
}
|
|
|
|
/**
|
|
* returns the status of the specified test name for specified device name
|
|
*
|
|
* @param deviceName
|
|
* @param testName
|
|
*/
|
|
public String getResult(String deviceName, String testName){
|
|
return "";
|
|
}
|
|
|
|
/**
|
|
* find the test currently in progress
|
|
* @return properties of the test in progress
|
|
*/
|
|
public String[] getTestInProgress(){
|
|
return "";
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param column
|
|
*/
|
|
private void hideColumn(COL column){
|
|
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
private void initComponents(){
|
|
|
|
}
|
|
|
|
private void initLogger(){
|
|
|
|
}
|
|
|
|
/**
|
|
* @return status of run button. True = tests launching sequence is running
|
|
*/
|
|
public boolean isTestRunAllowed(){
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* GEN-LAST:event_jButtonMoveUpActionPerformed
|
|
*
|
|
* @param evt
|
|
*/
|
|
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt){
|
|
|
|
}
|
|
|
|
/**
|
|
* GEN-LAST:event_jButton1ActionPerformed
|
|
*
|
|
* @param evt
|
|
*/
|
|
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt){
|
|
|
|
}
|
|
|
|
/**
|
|
* GEN-LAST:event_jTable1KeyReleased
|
|
*
|
|
* @param evt
|
|
*/
|
|
private void jButtonMoveDownActionPerformed(java.awt.event.ActionEvent evt){
|
|
|
|
}
|
|
|
|
/**
|
|
* GEN-LAST:event_jButtonMoveDownActionPerformed
|
|
*
|
|
* @param evt
|
|
*/
|
|
private void jButtonMoveUpActionPerformed(java.awt.event.ActionEvent evt){
|
|
|
|
}
|
|
|
|
/**
|
|
* oopen the log file using one of th default OS text reades
|
|
*
|
|
* @param evt
|
|
*/
|
|
private void jButtonOpenLogActionPerformed(java.awt.event.ActionEvent evt){
|
|
|
|
}
|
|
|
|
/**
|
|
* </editor-fold>//GEN-END:initComponents
|
|
*
|
|
* @param evt
|
|
*/
|
|
private void jButtonRunActionPerformed(java.awt.event.ActionEvent evt){
|
|
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param evt
|
|
*/
|
|
private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt){
|
|
|
|
}
|
|
|
|
/**
|
|
* GEN-LAST:event_jButtonOpenLogActionPerformed
|
|
*
|
|
* @param evt
|
|
*/
|
|
private void jTable1KeyReleased(java.awt.event.KeyEvent evt){
|
|
|
|
}
|
|
|
|
/**
|
|
* GEN-LAST:event_jCheckBox1ActionPerformed
|
|
*
|
|
* @param evt
|
|
*/
|
|
private void jTable1MouseClicked(java.awt.event.MouseEvent evt){
|
|
|
|
}
|
|
|
|
public int jump(){
|
|
return 0;
|
|
}
|
|
|
|
private void loadSettings(){
|
|
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param file
|
|
*/
|
|
private void loadSettings(File file){
|
|
|
|
}
|
|
|
|
/**
|
|
* scan tests directory, scan devices directory, search for their test cases and
|
|
* scan for tests.
|
|
* @exception FileNotFoundException,IOException
|
|
*/
|
|
public void loadTests()
|
|
throws FileNotFoundException,IOException{
|
|
|
|
}
|
|
|
|
/**
|
|
* move selection down in table
|
|
*/
|
|
private void moveDown(){
|
|
|
|
}
|
|
|
|
/**
|
|
* move selection up in table
|
|
*/
|
|
private void moveUp(){
|
|
|
|
}
|
|
|
|
/**
|
|
* open details of the selected test in a new panel
|
|
* @exception Exception
|
|
*/
|
|
private void openDetails()
|
|
throws Exception{
|
|
|
|
}
|
|
|
|
/**
|
|
* returns the amount of tests currently in Pending state
|
|
*/
|
|
public int pendingTestsCount(){
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
* returns the amount of tests currently in Pending state
|
|
*/
|
|
public int runningTestsCount(){
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
* delete this
|
|
*
|
|
* @param sDeviceName
|
|
* @param sTestPath
|
|
* @param mParameters
|
|
*/
|
|
private void runTest(String sDeviceName, String sTestPath, HashMap mParameters){
|
|
|
|
}
|
|
|
|
private void saveSettings(){
|
|
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param file
|
|
*/
|
|
private void saveSettings(File file){
|
|
|
|
}
|
|
|
|
public void selectFile(){
|
|
|
|
}
|
|
|
|
private void setButtonToStart(){
|
|
|
|
}
|
|
|
|
/**
|
|
* GEN-LAST:event_jButtonRunActionPerformed
|
|
*/
|
|
private void setButtonToStop(){
|
|
|
|
}
|
|
|
|
private void setToStopped(){
|
|
|
|
}
|
|
|
|
/**
|
|
* show test result in table
|
|
* @return
|
|
*
|
|
* @param deviceName
|
|
* @param testName
|
|
* @param res
|
|
* @param status
|
|
*/
|
|
public int showResult(String deviceName, String testName, String res, String status){
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
* returns the amount of tests currently in Pending state
|
|
*/
|
|
public int successTestsCount(){
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
* returns the amount of tests currently in "status" state
|
|
*
|
|
* @param status
|
|
*/
|
|
private int testsStatusCount(TestStatus status){
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
* visualise test status (columns status and icon)
|
|
*/
|
|
public void updateStatus(){
|
|
|
|
}
|
|
|
|
} |