Closedown
This commit is contained in:
@@ -44,6 +44,7 @@ import java.util.Properties;
|
||||
import java.util.logging.FileHandler;
|
||||
import java.util.logging.SimpleFormatter;
|
||||
import javax.swing.JFileChooser;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
|
||||
public class TestingList extends Panel {
|
||||
NetbeansPluginPanel testingList;
|
||||
@@ -94,7 +95,8 @@ public class TestingList extends Panel {
|
||||
public class NetbeansPluginPanel extends MonitoredPanel {
|
||||
|
||||
Logger logger = Logger.getLogger("TestsLog");
|
||||
|
||||
String TESTS_DEFAULT_DIR = FilenameUtils.separatorsToSystem("\\home\\script\\tests\\production");
|
||||
|
||||
private void initLogger(){
|
||||
try {
|
||||
FileHandler fh;
|
||||
@@ -103,10 +105,6 @@ public class TestingList extends Panel {
|
||||
logger.addHandler(fh);
|
||||
SimpleFormatter formatter = new SimpleFormatter();
|
||||
fh.setFormatter(formatter);
|
||||
|
||||
// the following statement is used to log any messages
|
||||
logger.info("My first log");
|
||||
|
||||
} catch (SecurityException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
@@ -155,15 +153,15 @@ public class TestingList extends Panel {
|
||||
switch(status){
|
||||
case "Success":
|
||||
iconSource = "/icons/button_ok-16px.png";
|
||||
logger.log(Level.INFO, "Test "+ testName + " result: " + res + "(" + status + ")");
|
||||
logger.log(Level.INFO, "Test "+ testName + " result: " + res + " (" + status + ")");
|
||||
break;
|
||||
case "Failed":
|
||||
iconSource = "/icons/button_close-16px.png";
|
||||
logger.log(Level.SEVERE, "Test "+ testName + " result: " + res + "(" + status + ")");
|
||||
logger.log(Level.SEVERE, "Test "+ testName + " result: " + res + " (" + status + ")");
|
||||
break;
|
||||
case "Running":
|
||||
iconSource = "/icons/button_play-16px.png";
|
||||
logger.log(Level.INFO, "Test "+ testName + " running... ");
|
||||
logger.log(Level.INFO, "Running Test "+ testName + " ... ");
|
||||
break;
|
||||
}
|
||||
ImageIcon icon = new ImageIcon(getClass().getResource(iconSource));
|
||||
@@ -376,7 +374,8 @@ public class TestingList extends Panel {
|
||||
Date date = new Date();
|
||||
return dateFormat.format(date);
|
||||
}
|
||||
|
||||
|
||||
//initial try, not needed any more
|
||||
public void loadTest() throws FileNotFoundException, IOException{
|
||||
Properties prop = new Properties();
|
||||
String fileName = new java.io.File( "." ).getCanonicalPath()+ "\\home\\script\\tests\\devices\\LS\\.config";
|
||||
@@ -391,7 +390,7 @@ public class TestingList extends Panel {
|
||||
|
||||
public void loadTests() throws FileNotFoundException, IOException{
|
||||
Properties prop = new Properties();
|
||||
String fileName = new java.io.File( "." ).getCanonicalPath()+ "\\home\\script\\tests\\production";
|
||||
String fileName = new java.io.File( "." ).getCanonicalPath()+ TESTS_DEFAULT_DIR;
|
||||
this.jTextField1.setText(fileName + "\n");
|
||||
File folder = new File(fileName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user