You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
(21) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: fredrik <fre...@us...> - 2005-04-28 11:52:20
|
Update of /cvsroot/test-manager/main/tests/testmanager/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14936/tests/testmanager/tests Modified Files: TesterTest.java Log Message: Index: TesterTest.java =================================================================== RCS file: /cvsroot/test-manager/main/tests/testmanager/tests/TesterTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TesterTest.java 11 Apr 2005 01:09:59 -0000 1.2 --- TesterTest.java 28 Apr 2005 11:52:06 -0000 1.3 *************** *** 1,4 **** --- 1,5 ---- package testmanager.tests; + import testmanager.database.tables.Tester; import junit.framework.TestCase; |
From: fredrik <fre...@us...> - 2005-04-28 11:52:15
|
Update of /cvsroot/test-manager/main/tests/testmanager/database/queries In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14936/tests/testmanager/database/queries Removed Files: TestCaseListQueryTest.java Log Message: --- TestCaseListQueryTest.java DELETED --- |
From: fredrik <fre...@us...> - 2005-04-28 11:51:44
|
Update of /cvsroot/test-manager/main/src/testmanager/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14164/src/testmanager/gui Modified Files: MainWindow.java MainWindowLogHandler.java Added Files: AdminAccountDialog.java Log Message: Reorganizing servlets & adding bug tracking Index: MainWindowLogHandler.java =================================================================== RCS file: /cvsroot/test-manager/main/src/testmanager/gui/MainWindowLogHandler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MainWindowLogHandler.java 20 Apr 2005 00:50:07 -0000 1.2 --- MainWindowLogHandler.java 28 Apr 2005 11:51:04 -0000 1.3 *************** *** 2,5 **** --- 2,6 ---- import java.util.logging.Handler; + import java.util.logging.Level; import java.util.logging.LogRecord; *************** *** 30,34 **** */ public void publish(LogRecord record) { ! mainWindow.log(record.getMessage()); } --- 31,39 ---- */ public void publish(LogRecord record) { ! if (record.getLevel() == Level.SEVERE) { ! mainWindow.log("SEVERE " + record.getMessage()); ! } else { ! mainWindow.log(record.getMessage()); ! } } --- NEW FILE: AdminAccountDialog.java --- package testmanager.gui; import java.awt.Frame; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JPasswordField; import javax.swing.JTextField; /** * @author Fredrik Fornwall */ public class AdminAccountDialog extends JDialog { protected JTextField fullNameField = new JTextField(20); protected JTextField userNameField = new JTextField(20); protected JTextField mailField = new JTextField(20); protected JPasswordField passwordField = new JPasswordField(20); protected JButton okButton = new JButton("Ok"); protected JButton cancelButton = new JButton("Cancel"); protected JLabel userNameLabel = new JLabel("User Name:"); protected JLabel fullNameLabel = new JLabel("Full Name:"); protected JLabel passLabel = new JLabel("Pasword:"); protected JLabel mailLabel = new JLabel("Mail:"); public String getFullName() { return fullNameField.getText(); } public String getPass() { return new String(passwordField.getPassword()); } public String getUserName() { return userNameField.getText(); } public String getMail() { return mailField.getText(); } public boolean okPressed() { return pressed_OK; } private boolean pressed_OK = false; public AdminAccountDialog(Frame parent, String title) { super(parent, title, true); if (parent != null) { setLocationRelativeTo(parent); } } protected void dialogInit() { super.dialogInit(); ActionListener actionListener = new ActionListener() { public void actionPerformed(ActionEvent e) { // other actions close the dialog. pressed_OK = (e.getSource() == okButton); setVisible(false); } }; GridBagLayout gridbag = new GridBagLayout(); GridBagConstraints c = new GridBagConstraints(); c.insets.top = c.insets.bottom = c.insets.right = c.insets.left = 5; JPanel pane = new JPanel(gridbag); pane.setBorder(BorderFactory.createEmptyBorder(10, 20, 5, 20)); c.anchor = GridBagConstraints.EAST; if (gridbag == null) System.out.println("GRIDBAG IS NULL!"); if (fullNameLabel == null) System.out.println("FULLNAMELABEL IS NULL!"); if (c == null) System.out.println("C IS NULL"); gridbag.setConstraints(fullNameLabel, c); pane.add(fullNameLabel); gridbag.setConstraints(fullNameField, c); pane.add(fullNameField); c.gridy = 1; gridbag.setConstraints(passLabel, c); pane.add(passLabel); gridbag.setConstraints(passwordField, c); pane.add(passwordField); c.gridy = 2; c.gridwidth = GridBagConstraints.REMAINDER; c.anchor = GridBagConstraints.CENTER; JPanel panel = new JPanel(); okButton.addActionListener(actionListener); panel.add(okButton); cancelButton.addActionListener(actionListener); panel.add(cancelButton); gridbag.setConstraints(panel, c); pane.add(panel); getContentPane().add(pane); pack(); } } Index: MainWindow.java =================================================================== RCS file: /cvsroot/test-manager/main/src/testmanager/gui/MainWindow.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** MainWindow.java 24 Apr 2005 02:10:38 -0000 1.20 --- MainWindow.java 28 Apr 2005 11:51:04 -0000 1.21 *************** *** 34,213 **** public class MainWindow extends JFrame { ! /** ! * Try to set the system look and feel. ! */ ! static { ! try { ! UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); ! } catch (Exception e) { ! // If the system look and feel cannot be found, the default look ! // and feel will be used automatically. ! } ! } ! private JMenuBar menuBar = new JMenuBar(); ! private JTextArea logArea = new JTextArea(); ! private JTextField statusField = new JTextField("Starting"); ! private static MainWindow instance; ! private static SimpleDateFormat dateFormat = new SimpleDateFormat("y-MM-dd HH:mm:ss"); ! /** ! * Set the message show in the status label. ! * ! * @param statusText ! * The status text to display. ! */ ! public void setStatusLabel(final String statusText) { ! SwingUtilities.invokeLater(new Runnable() { ! public void run() { ! statusField.setText(statusText); ! } ! }); ! } ! /** ! * Add a log message to the main window. ! * ! * @param logMessage ! * The log message which will be writtin in the log area. ! */ ! public void log(final String logMessage) { ! // As JTextArea#append is thread-safe it could be called in this thread. ! // However, if we want the scroll pane to be updated to show the last ! // inserted line, this method must be called in the event dispatch ! // thread. ! SwingUtilities.invokeLater(new Runnable() { ! public void run() { ! instance.logArea.append(dateFormat.format(new Date()) + " " + logMessage + "\n"); ! } ! }); ! } ! /** ! * Show a confirmation dialog asking the user if he really wants to close down the application. ! * The intent is to prevent a user from accidentally closing the Open Test Manager server by ! * closing the main window. ! */ ! public static void confirmShutdown() { ! switch (Application.getInstance().getState()) { ! case Application.STATE_RUNNING: ! // Continue with asking the user if he wants to shut down ! break; ! case Application.STATE_ERROR: ! // Cannot shut down correctly, just exit the application ! System.exit(0); ! break; ! case Application.STATE_SHUTTING_DOWN: ! // We are already shutting down, ignore another request ! return; ! case Application.STATE_STARTING: ! // Don't interrupt while starting application, ignore request ! return; ! default: ! break; ! } ! int response = JOptionPane.showConfirmDialog(instance, new String[] { ! "Do you want to shut down the Open Test Manager server?", ! "No clients will be able to access the application." }, "Really shut down?", ! JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); ! if (response == JOptionPane.YES_OPTION) { ! // Shut down in a separate thread as it may take some time ! Thread shutDownThread = new Thread() { ! public void run() { ! Application.getInstance().shutDown(); ! } ! }; ! shutDownThread.start(); ! } ! } ! /** ! * Create a new main window. ! */ ! public MainWindow() { ! // Set the window title showing application name and version number ! super("Open Test Manager v" + Application.VERSION); ! setupMenu(); ! instance = this; ! getContentPane().setLayout(new GridBagLayout()); ! GridBagConstraints constraints = new GridBagConstraints(); ! constraints.fill = GridBagConstraints.BOTH; ! constraints.weightx = 1.0; ! logArea.setEditable(false); ! constraints.gridx = 0; ! constraints.gridy = 1; ! JPanel statusPanel = new JPanel(); ! statusPanel.setLayout(new BorderLayout()); ! statusPanel.setBorder(BorderFactory.createTitledBorder("Status")); ! statusPanel.add(statusField); ! statusField.setEditable(false); ! statusField.setText("Starting"); ! getContentPane().add(statusPanel, constraints); ! constraints.gridy = 0; ! constraints.gridx = 0; ! constraints.weighty = 1.0; ! constraints.weightx = 1.0; ! constraints.fill = GridBagConstraints.BOTH; ! JPanel logPanel = new JPanel(); ! logPanel.setLayout(new BorderLayout()); ! logArea.setLineWrap(true); ! logArea.setWrapStyleWord(true); ! logPanel.add(new JScrollPane(logArea)); ! logPanel.setBorder(BorderFactory.createTitledBorder("Log")); ! getContentPane().add(logPanel, constraints); ! addWindowListener(new WindowAdapter() { ! public void windowClosing(WindowEvent arg0) { ! confirmShutdown(); ! } ! }); ! } ! /** ! * Setup the menu for the main window. ! */ ! private void setupMenu() { ! JMenu menu = new JMenu("File"); ! menu.setMnemonic(KeyEvent.VK_F); ! menuBar.add(menu); ! JMenuItem menuItem = new JMenuItem("Exit"); ! menuItem.setMnemonic(KeyEvent.VK_X); ! menuItem.addActionListener(new ActionListener() { ! public void actionPerformed(ActionEvent event) { ! confirmShutdown(); ! } ! }); ! menu.add(menuItem); ! menu = new JMenu("Help"); ! menu.setMnemonic(KeyEvent.VK_H); ! menuItem = new JMenuItem("About Open Test Manager"); ! menuItem.setMnemonic(KeyEvent.VK_A); ! menuItem.addActionListener(new ActionListener() { ! public void actionPerformed(ActionEvent event) { ! JOptionPane.showMessageDialog(instance, ! "Open Test Manager - a test management tool\n\n" ! + "http://test-manager.sf.net/"); ! } ! }); ! menu.add(menuItem); ! menuBar.add(menu); ! setJMenuBar(menuBar); ! } } \ No newline at end of file --- 34,227 ---- public class MainWindow extends JFrame { ! /** ! * Try to set the system look and feel. ! */ ! static { ! try { ! UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); ! } catch (Exception e) { ! // If the system look and feel cannot be found, the default look ! // and feel will be used automatically. ! } ! } ! private JMenuBar menuBar = new JMenuBar(); ! private JTextArea logArea = new JTextArea(); ! private JTextField statusField = new JTextField("Starting"); ! private static MainWindow instance; ! private static SimpleDateFormat dateFormat = new SimpleDateFormat( ! "y-MM-dd HH:mm:ss"); ! /** ! * Set the message show in the status label. ! * ! * @param statusText ! * The status text to display. ! */ ! public void setStatusLabel(final String statusText) { ! SwingUtilities.invokeLater(new Runnable() { ! public void run() { ! statusField.setText(statusText); ! } ! }); ! } ! /** ! * Prompt the user for an initial admin password. ! * ! * @return The password entered by the user. ! */ ! public String getInitialAdminPassword() { ! AdminAccountDialog d = new AdminAccountDialog(this, "Enter admin account information"); ! d.setVisible(true); ! return d.getName(); ! } ! /** ! * Add a log message to the main window. ! * ! * @param logMessage ! * The log message which will be writtin in the log area. ! */ ! public void log(final String logMessage) { ! // As JTextArea#append is thread-safe it could be called in this thread. ! // However, if we want the scroll pane to be updated to show the last ! // inserted line, this method must be called in the event dispatch ! // thread. ! SwingUtilities.invokeLater(new Runnable() { ! public void run() { ! instance.logArea.append(dateFormat.format(new Date()) + " " ! + logMessage + "\n"); ! } ! }); ! } ! /** ! * Show a confirmation dialog asking the user if he really wants to close ! * down the application. The intent is to prevent a user from accidentally ! * closing the Open Test Manager server by closing the main window. ! */ ! public static void confirmShutdown() { ! switch (Application.getInstance().getState()) { ! case Application.STATE_RUNNING: ! // Continue with asking the user if he wants to shut down ! break; ! case Application.STATE_ERROR: ! // Cannot shut down correctly, just exit the application ! System.exit(0); ! break; ! case Application.STATE_SHUTTING_DOWN: ! // We are already shutting down, ignore another request ! return; ! case Application.STATE_STARTING: ! // Don't interrupt while starting application, ignore request ! return; ! default: ! break; ! } ! int response = JOptionPane.showConfirmDialog(instance, new String[] { ! "Do you want to shut down the Open Test Manager server?", ! "No clients will be able to access the application." }, ! "Really shut down?", JOptionPane.YES_NO_OPTION, ! JOptionPane.WARNING_MESSAGE); ! if (response == JOptionPane.YES_OPTION) { ! // Shut down in a separate thread as it may take some time ! Thread shutDownThread = new Thread() { ! public void run() { ! Application.getInstance().shutDown(); ! } ! }; ! shutDownThread.start(); ! } ! } ! /** ! * Create a new main window. ! */ ! public MainWindow() { ! // Set the window title showing application name and version number ! super("Open Test Manager " + Application.VERSION); ! setupMenu(); ! instance = this; ! getContentPane().setLayout(new GridBagLayout()); ! GridBagConstraints constraints = new GridBagConstraints(); ! constraints.fill = GridBagConstraints.BOTH; ! constraints.weightx = 1.0; ! logArea.setEditable(false); ! constraints.gridx = 0; ! constraints.gridy = 1; ! JPanel statusPanel = new JPanel(); ! statusPanel.setLayout(new BorderLayout()); ! statusPanel.setBorder(BorderFactory.createTitledBorder("Status")); ! statusPanel.add(statusField); ! statusField.setEditable(false); ! statusField.setText("Starting"); ! getContentPane().add(statusPanel, constraints); ! constraints.gridy = 0; ! constraints.gridx = 0; ! constraints.weighty = 1.0; ! constraints.weightx = 1.0; ! constraints.fill = GridBagConstraints.BOTH; ! JPanel logPanel = new JPanel(); ! logPanel.setLayout(new BorderLayout()); ! logArea.setLineWrap(true); ! logArea.setWrapStyleWord(true); ! logPanel.add(new JScrollPane(logArea)); ! logPanel.setBorder(BorderFactory.createTitledBorder("Log")); ! getContentPane().add(logPanel, constraints); ! addWindowListener(new WindowAdapter() { ! public void windowClosing(WindowEvent arg0) { ! confirmShutdown(); ! } ! }); ! } ! /** ! * Setup the menu for the main window. ! */ ! private void setupMenu() { ! JMenu menu = new JMenu("File"); ! menu.setMnemonic(KeyEvent.VK_F); ! menuBar.add(menu); ! JMenuItem menuItem = new JMenuItem("Exit"); ! menuItem.setMnemonic(KeyEvent.VK_X); ! menuItem.addActionListener(new ActionListener() { ! public void actionPerformed(ActionEvent event) { ! confirmShutdown(); ! } ! }); ! menu.add(menuItem); ! menu = new JMenu("Help"); ! menu.setMnemonic(KeyEvent.VK_H); ! menuItem = new JMenuItem("About Open Test Manager"); ! menuItem.setMnemonic(KeyEvent.VK_A); ! menuItem.addActionListener(new ActionListener() { ! public void actionPerformed(ActionEvent event) { ! JOptionPane.showMessageDialog(instance, ! "Open Test Manager - a test management tool\n\n" ! + "http://test-manager.sf.net/"); ! } ! }); ! menu.add(menuItem); ! menuBar.add(menu); ! ! setJMenuBar(menuBar); ! } } \ No newline at end of file |
Update of /cvsroot/test-manager/main/src/testmanager/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14164/src/testmanager/web Modified Files: LoginSession.java WebServer.java Utilities.java BaseServlet.java Added Files: NullServlet.java UserInterfaceServlet.java Log Message: Reorganizing servlets & adding bug tracking Index: BaseServlet.java =================================================================== RCS file: /cvsroot/test-manager/main/src/testmanager/web/BaseServlet.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** BaseServlet.java 24 Apr 2005 02:10:38 -0000 1.20 --- BaseServlet.java 28 Apr 2005 11:51:06 -0000 1.21 *************** *** 2,6 **** import java.io.IOException; - import java.io.PrintWriter; import java.sql.Connection; import java.sql.SQLException; --- 2,5 ---- *************** *** 14,165 **** import testmanager.database.Database; ! import testmanager.tests.Tester; import testmanager.web.servlets.LoginServlet; - import testmanager.web.servlets.MainPageServlet; - import testmanager.web.servlets.ScriptServlet; - import testmanager.web.servlets.TestCaseListServlet; - import testmanager.web.servlets.TesterListServlet; /** - * The abstract base class for all servlets in the application. - * - * All servlets must implement the printPage method. - * * @author Fredrik Fornwall */ public abstract class BaseServlet extends HttpServlet { ! /** ! * The title shown on the web page. ! */ ! public static final String title = "Open Test Manager"; ! ! /** ! * No xml conformance tag for IE since it chokes on it ! */ ! public static final String xmlConformanceTag = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; ! ! /** ! * At the beginning of each generated HTML web page. ! */ ! public static final String htmlBegin = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n" ! + "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">"; ! ! /** ! * At the end of each generated HTML web page. ! */ ! private static String htmlEnd = "</body>\n</html>\n"; ! ! /** ! * Subclasses wishing to handle posts directly should override this method. ! * ! * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, ! * javax.servlet.http.HttpServletResponse) ! */ ! public void doPost(HttpServletRequest request, HttpServletResponse response) ! throws IOException, ServletException { ! doGet(request, response); ! } ! ! /** ! * The servlet method for sending a page to the users browser. We implement this to give ! * functionality that all servlets that derive from this class will use automatically. ! */ ! public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ! ServletException { ! Tester user = getTester(request); ! ! if (user == null) { ! /* ! // AUTH_TEMP ! String auth = request.getHeader("Authorization"); ! if (auth == null) { ! // Not set by user, so require it ! response.setHeader("WWW-Authenticate", "BASIC realm=\"users\""); ! response.sendError(HttpServletResponse.SC_UNAUTHORIZED); ! return; ! } else { ! String userpassEncoded = auth.substring(6); ! // Decode it, using any base 64 decoder ! sun.misc.BASE64Decoder dec = new sun.misc.BASE64Decoder(); ! String userpassDecoded = new String(dec.decodeBuffer(userpassEncoded)); ! System.out.println("Got auth: " + userpassDecoded); ! } ! // END_AUTH_TEMP ! */ ! ! response.sendRedirect(LoginServlet.URL); ! return; ! } ! ! // Tell the browser not to cache pages as we generate new on each request ! response.setHeader("Cache-Control", "no-cache"); ! doLoggedInGet(user, request, response); ! } ! ! public void doLoggedInGet(Tester user, HttpServletRequest request, HttpServletResponse response) ! throws IOException, ServletException { ! ! // Check for old IE ! String userAgent = request.getHeader("User-Agent"); ! boolean oldIE = (userAgent.indexOf("MSIE 6") != -1 || userAgent.indexOf("MSIE 5") != -1); ! ! // Set the HTTP content-type field to that of ordinary HTML ! response.setContentType(oldIE ? "text/html" : "application/xhtml+xml"); ! ! PrintWriter out = response.getWriter(); ! if (!oldIE) ! out.println(xmlConformanceTag); ! out.println(htmlBegin); ! ! Connection connection; ! try { ! connection = Database.getConnection(); ! } catch (SQLException e) { ! out ! .println("<head><title>Database error</title></head><body><h2>Database error</h2><pre>" ! + e.getStackTrace() + "</pre></body></html>"); ! return; ! } ! ! try { ! // While servicing the user request, a database error could occur ! out.println("<head>\n" + "<title>" + title + "</title>\n" ! + "<link rel=\"stylesheet\" type=\"text/css\" href=\"./style.css\"/>\n" ! + "<script type=\"text/javascript\" src=\"" + ScriptServlet.URL ! + "\"></script>"); ! ! out ! .println("</head>\n<body onload=\"start();\">" ! + "<div class=\"top\"><h2>Open Test Manager</h2></div>\n" ! + "<div class=\"undertop\"><a accesskey=\"M\" href=\"" ! + response.encodeURL(MainPageServlet.URL) ! + "\">Main Page</a> <a accesskey=\"C\" href=\"" ! + response.encodeURL(TestCaseListServlet.URL) ! + "\">Test Cases</a> <a accesskey=\"T\" href=\"" ! + response.encodeURL(TesterListServlet.URL) ! + "\">Testers</a> " ! + "<a href='http://test-manager.sourceforge.net/?content=usersguide' accesskey='H' onclick='this.setAttribute(\"target\", \"_blank\");'>Help</a> " ! + "<a accesskey=\"L\" href=\"" ! + response.encodeURL(LoginServlet.URL + "?logout=true") ! + "\">Logout</a></div>" + "<div class=\"main\">"); ! printPage(out, user, response, request, connection); ! out.println("</div>\n" + htmlEnd); ! } catch (SQLException e) { ! Logger logger = getLogger(); ! logger.severe(e.getMessage()); ! e.printStackTrace(); ! request.getRequestDispatcher("./error").forward(request, response); ! } finally { ! try { ! connection.close(); ! } catch (SQLException e) { ! // TODO: Log ! } ! } ! ! } ! ! public Logger getLogger() { return (Logger) getServletContext().getAttribute("logger"); } --- 13,25 ---- import testmanager.database.Database; ! import testmanager.database.tables.Tester; import testmanager.web.servlets.LoginServlet; /** * @author Fredrik Fornwall */ public abstract class BaseServlet extends HttpServlet { ! protected Logger getLogger() { return (Logger) getServletContext().getAttribute("logger"); } *************** *** 171,199 **** * @return The tester associated with the session, or null if none exists. */ ! private static Tester getTester(HttpServletRequest request) { ! // Get the session associated with the request (null if one does not exist). HttpSession session = request.getSession(false); return (session == null) ? null : (Tester) session.getAttribute("tester"); } ! /** ! * Print the web page to the user. ! * ! * @param out ! * The printstream where to write the HTML. ! * @param user ! * The user accessing this page. This is only null at the login page, otherwise it is ! * checked before calling this method. ! * @param response ! * From the servlet API. ! * @param request ! * From the servlet API. ! * @param connection ! * The connection to the Open Test Manager database. Upon return of this method, this ! * connection will be closed in a finally block, so it is NOT the responsibility of ! * subclasses to close it. ! */ ! public abstract void printPage(PrintWriter out, Tester user, HttpServletResponse response, ! HttpServletRequest request, Connection connection) throws SQLException; ! } \ No newline at end of file --- 31,122 ---- * @return The tester associated with the session, or null if none exists. */ ! private static Tester getUser(HttpServletRequest request) { HttpSession session = request.getSession(false); return (session == null) ? null : (Tester) session.getAttribute("tester"); } + + public final void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, + ServletException { + Tester user = getUser(request); ! if (user == null) { ! /* ! * // AUTH_TEMP String auth = request.getHeader("Authorization"); if (auth == null) { // ! * Not set by user, so require it response.setHeader("WWW-Authenticate", "BASIC ! * realm='users'"); response.sendError(HttpServletResponse.SC_UNAUTHORIZED); return; } ! * else { String userpassEncoded = auth.substring(6); // Decode it, using any base 64 ! * decoder sun.misc.BASE64Decoder dec = new sun.misc.BASE64Decoder(); String ! * userpassDecoded = new String(dec.decodeBuffer(userpassEncoded)); ! * System.out.println("Got auth: " + userpassDecoded); } // END_AUTH_TEMP ! */ ! getLogger().info("Redirecting request from user not logged in"); ! response.sendRedirect(LoginServlet.URL); ! return; ! } ! ! Connection connection = null; ! try { ! connection = Database.getConnection(); ! } catch (SQLException e) { ! response.getWriter() ! .println("<head><title>Database error</title></head><body><h2>Database error - could not connect</h2><pre>" ! + e.getStackTrace() + "</pre></body></html>"); ! return; ! } ! try { ! doLoggedInGet(request, response, user, connection); ! } catch (Exception e) { ! e.printStackTrace(); ! } finally { ! try { ! connection.close(); ! } catch (SQLException e) { ! // TODO: Log ! } ! } ! ! } ! ! /** ! * Subclasses wishing to handle posts directly should override this method. ! * ! * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, ! * javax.servlet.http.HttpServletResponse) ! */ ! public final void doPost(HttpServletRequest request, HttpServletResponse response) ! throws IOException, ServletException { ! Tester user = getUser(request); ! if (user == null) { ! getLogger().info("Redirecting request from user not logged in"); ! response.sendRedirect(LoginServlet.URL); ! return; ! } ! ! Connection connection = null; ! try { ! connection = Database.getConnection(); ! } catch (SQLException e) { ! response.getWriter() ! .println("<head><title>Database error</title></head><body><h2>Database error - could not connect</h2><pre>" ! + e.getStackTrace() + "</pre></body></html>"); ! return; ! } ! try { ! doLoggedInPost(request, response, user, connection); ! } catch (Exception e) { ! e.printStackTrace(); ! } finally { ! try { ! connection.close(); ! } catch (SQLException e) { ! // TODO: Log ! } ! } ! } ! ! public abstract void doLoggedInGet(HttpServletRequest request, HttpServletResponse response, Tester user, Connection connection) throws IOException, ServletException, SQLException; ! ! public abstract void doLoggedInPost(HttpServletRequest request, HttpServletResponse response, Tester user, Connection connection) throws IOException, ServletException, SQLException; ! ! } Index: WebServer.java =================================================================== RCS file: /cvsroot/test-manager/main/src/testmanager/web/WebServer.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** WebServer.java 24 Apr 2005 02:10:38 -0000 1.21 --- WebServer.java 28 Apr 2005 11:51:06 -0000 1.22 *************** *** 10,14 **** --- 10,16 ---- import org.mortbay.jetty.servlet.ServletHttpContext; + import testmanager.web.servlets.ExportServlet; import testmanager.web.servlets.FileServlet; + import testmanager.web.servlets.ImportServlet; import testmanager.web.servlets.LoginServlet; import testmanager.web.servlets.MainPageServlet; *************** *** 26,29 **** --- 28,32 ---- import testmanager.web.servlets.TesterListServlet; import testmanager.web.servlets.TesterServlet; + import testmanager.web.servlets.UpdateBugLinkServlet; import testmanager.web.servlets.UpdateDescriptionServlet; *************** *** 102,123 **** context.setAttribute("logger", logger); ! context.addServlet(ScriptServlet.URL, ScriptServlet.class.getName()); context.addServlet(LoginServlet.URL, LoginServlet.class.getName()); - context.addServlet(RootServlet.URL, RootServlet.class.getName()); - context.addServlet(StyleServlet.URL, StyleServlet.class.getName()); - context.addServlet(TesterListServlet.URL, TesterListServlet.class.getName()); - context.addServlet(TestCaseListServlet.URL, TestCaseListServlet.class.getName()); context.addServlet(MainPageServlet.URL, MainPageServlet.class.getName()); - context.addServlet(NewTestCaseServlet.URL, NewTestCaseServlet.class.getName()); - context.addServlet(TesterServlet.URL, TesterServlet.class.getName()); - context.addServlet(TestCaseServlet.URL, TestCaseServlet.class.getName()); - context.addServlet(FileServlet.URL, FileServlet.class.getName()); context.addServlet(NewTestCaseAreaServlet.URL, NewTestCaseAreaServlet.class.getName()); context.addServlet(NewTesterServlet.URL, NewTesterServlet.class.getName()); ! context.addServlet(RemoveTestCaseServlet.URL, RemoveTestCaseServlet.class.getName()); ! context.addServlet(RemoveTesterServlet.URL, RemoveTesterServlet.class.getName()); context .addServlet(RemoveTestCaseAreaServlet.URL, RemoveTestCaseAreaServlet.class .getName()); context.addServlet(UpdateDescriptionServlet.URL, UpdateDescriptionServlet.class.getName()); --- 105,131 ---- context.setAttribute("logger", logger); ! context.addServlet(ExportServlet.URL, ExportServlet.class.getName()); ! context.addServlet(FileServlet.URL, FileServlet.class.getName()); ! context.addServlet(ImportServlet.URL, ImportServlet.class.getName()); context.addServlet(LoginServlet.URL, LoginServlet.class.getName()); context.addServlet(MainPageServlet.URL, MainPageServlet.class.getName()); context.addServlet(NewTestCaseAreaServlet.URL, NewTestCaseAreaServlet.class.getName()); + context.addServlet(NewTestCaseServlet.URL, NewTestCaseServlet.class.getName()); context.addServlet(NewTesterServlet.URL, NewTesterServlet.class.getName()); ! context.addServlet(NullServlet.URL, NullServlet.class.getName()); context .addServlet(RemoveTestCaseAreaServlet.URL, RemoveTestCaseAreaServlet.class .getName()); + context.addServlet(RemoveTestCaseServlet.URL, RemoveTestCaseServlet.class.getName()); + context.addServlet(RemoveTesterServlet.URL, RemoveTesterServlet.class.getName()); + context.addServlet(RootServlet.URL, RootServlet.class.getName()); + context.addServlet(ScriptServlet.URL, ScriptServlet.class.getName()); + context.addServlet(StyleServlet.URL, StyleServlet.class.getName()); + context.addServlet(TestCaseListServlet.URL, TestCaseListServlet.class.getName()); + context.addServlet(TestCaseServlet.URL, TestCaseServlet.class.getName()); + context.addServlet(TesterListServlet.URL, TesterListServlet.class.getName()); + context.addServlet(TesterServlet.URL, TesterServlet.class.getName()); + + context.addServlet(UpdateBugLinkServlet.URL, UpdateBugLinkServlet.class.getName()); context.addServlet(UpdateDescriptionServlet.URL, UpdateDescriptionServlet.class.getName()); Index: Utilities.java =================================================================== RCS file: /cvsroot/test-manager/main/src/testmanager/web/Utilities.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Utilities.java 21 Apr 2005 17:33:33 -0000 1.5 --- Utilities.java 28 Apr 2005 11:51:06 -0000 1.6 *************** *** 1,7 **** package testmanager.web; import java.util.Calendar; ! import testmanager.tests.TestCase; /** --- 1,10 ---- package testmanager.web; + import java.io.IOException; + import java.io.InputStream; + import java.io.OutputStream; import java.util.Calendar; ! import testmanager.database.tables.TestCase; /** *************** *** 169,174 **** * * @param name ! * The name of the year, month and day will be $(name)_year, ! * $(name)_month and $(name)_day. * @return A date picker in HTML. */ --- 172,177 ---- * * @param name ! * The name of the year, month and day will be $(name)_year, $(name)_month and ! * $(name)_day. * @return A date picker in HTML. */ *************** *** 181,186 **** * * @param name ! * The name of the year, month and day will be $(name)_year, ! * $(name)_month and $(name)_day. * @param initialYear * The year which will initially be selected. --- 184,189 ---- * * @param name ! * The name of the year, month and day will be $(name)_year, $(name)_month and ! * $(name)_day. * @param initialYear * The year which will initially be selected. *************** *** 191,195 **** * @return A date picker in HTML. */ ! public static String getDatePicker(String name, int initialYear, int initialMonth, int initialDay) { Calendar calendar = Calendar.getInstance(); int currentYear = calendar.get(Calendar.YEAR); --- 194,199 ---- * @return A date picker in HTML. */ ! public static String getDatePicker(String name, int initialYear, int initialMonth, ! int initialDay) { Calendar calendar = Calendar.getInstance(); int currentYear = calendar.get(Calendar.YEAR); *************** *** 226,230 **** String m = month < 10 ? "0" + month : "" + month; result.append("<option value='" + monthValue + "'"); ! if (month == initialMonth) { result.append(" selected='selected'"); } --- 230,234 ---- String m = month < 10 ? "0" + month : "" + month; result.append("<option value='" + monthValue + "'"); ! if (monthValue == initialMonth) { result.append(" selected='selected'"); } *************** *** 252,257 **** * * @param name ! * The value of the 'name' attribute of the returned select ! * element. * @param initial * The initial selected value of the select element. --- 256,260 ---- * * @param name ! * The value of the 'name' attribute of the returned select element. * @param initial * The initial selected value of the select element. *************** *** 261,265 **** StringBuffer result = new StringBuffer("<select name='" + name + "'>"); for (int i = 0; i < TestCase.statusNames.length; i++) { ! result.append("<option value='" + i + "'" + ((i == initial) ? " selected='selected'" : "") + ">" + TestCase.statusNames[i] + "</option>"); } --- 264,269 ---- StringBuffer result = new StringBuffer("<select name='" + name + "'>"); for (int i = 0; i < TestCase.statusNames.length; i++) { ! result.append("<option value='" + i + "'" ! + ((i == initial) ? " selected='selected'" : "") + ">" + TestCase.statusNames[i] + "</option>"); } *************** *** 267,269 **** --- 271,292 ---- return result.toString(); } + + + /** + * Copy the contents of an InputStream into an OutputStream. + * + * @param in + * The InputStream which is read from. + * @param out + * The OutputStream which is written to. + * @throws IOException + * If one occurrs while reading or writing. + */ + public static void copy(InputStream in, OutputStream out) throws IOException { + byte[] bytes = new byte[1024]; + int read; + while ((read = in.read(bytes)) != -1) { + out.write(bytes, 0, read); + } + } } --- NEW FILE: NullServlet.java --- package testmanager.web; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class NullServlet extends HttpServlet { public static final String URL = "/favicon.ico"; public final void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {} public final void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {} } Index: LoginSession.java =================================================================== RCS file: /cvsroot/test-manager/main/src/testmanager/web/LoginSession.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LoginSession.java 21 Apr 2005 17:33:33 -0000 1.1 --- LoginSession.java 28 Apr 2005 11:51:06 -0000 1.2 *************** *** 6,10 **** import javax.servlet.http.HttpSessionBindingListener; ! import testmanager.tests.Tester; /** --- 6,10 ---- import javax.servlet.http.HttpSessionBindingListener; ! import testmanager.database.tables.Tester; /** *************** *** 24,28 **** * The maximum inactive time of a user in seconds. */ ! public static final int MAX_INACTIVE_TIME = 15 * 60; /** --- 24,28 ---- * The maximum inactive time of a user in seconds. */ ! public static final int MAX_INACTIVE_TIME = 30 * 60; /** --- NEW FILE: UserInterfaceServlet.java --- package testmanager.web; import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.SQLException; import java.util.logging.Logger; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import testmanager.database.tables.Tester; import testmanager.web.servlets.LoginServlet; import testmanager.web.servlets.MainPageServlet; import testmanager.web.servlets.ScriptServlet; import testmanager.web.servlets.TestCaseListServlet; import testmanager.web.servlets.TesterListServlet; /** * The abstract base class for all servlets in the application. * * All servlets must implement the printPage method. * * @author Fredrik Fornwall */ public abstract class UserInterfaceServlet extends BaseServlet { /** * No xml conformance tag for IE since it chokes on it */ public static final String xmlConformanceTag = "<?xml version='1.0' encoding='UTF-8'?>\n"; /** * At the beginning of each generated HTML web page. */ public static final String htmlBegin = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>\n" + "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>"; /** * At the end of each generated HTML web page. */ private static String htmlEnd = "</body>\n</html>\n"; protected abstract String getTitle(); public void doLoggedInGet(HttpServletRequest request, HttpServletResponse response, Tester user, Connection connection) throws IOException, ServletException, SQLException { String userAgent = request.getHeader("User-Agent"); boolean oldIE = (userAgent.indexOf("MSIE 6") != -1 || userAgent.indexOf("MSIE 5") != -1); response.setContentType(oldIE ? "text/html" : "application/xhtml+xml"); PrintWriter out = response.getWriter(); if (!oldIE) { out.println(xmlConformanceTag); } out.println(htmlBegin); // While servicing the user request, a database error could occur out.println("<head>\n" + "<title>" + getTitle() + "</title>\n" + "<link rel='stylesheet' type='text/css' href='/style.css'/>\n" + "<script type='text/javascript' src='" + ScriptServlet.URL + "'></script>"); String localTitle = "Open Test Manager: " + getTitle(); out .println("</head>\n<body onload='start();'>" + "<div class='top'><h2>" + localTitle + "</h2></div>\n" + "<div class='undertop'><a accesskey='M' href='" + response.encodeURL(MainPageServlet.URL) + "'>Main Page</a> <a accesskey='C' href='" + response.encodeURL(TestCaseListServlet.URL) + "'>Test Cases</a> <a accesskey='T' href='" + response.encodeURL(TesterListServlet.URL) + "'>Testers</a> " + "<a href='http://test-manager.sourceforge.net/?content=usersguide' accesskey='H' onclick=\"this.setAttribute('target', '_blank');\">Help</a> " + "<a accesskey='L' href='" + response.encodeURL(LoginServlet.URL + "?logout=true") + "'>Logout</a></div>" + "<div class='main'>"); try { printPage(out, user, response, request, connection); } catch (Exception e) { out.println("<h1>Server error</h1>"); out.println("<p>The Open Test Manager server caught an exception:</p>"); out.println("<pre>"); e.printStackTrace(out); out.println("</pre><p><a href='" + response.encodeURL(MainPageServlet.URL) + "'>Return to the main page</a></p>"); Logger logger = getLogger(); logger.severe(e.getMessage()); } finally { out.println("</div>\n" + htmlEnd); } } /** * Print the web page to the user. * * @param out * The printstream where to write the HTML. * @param user * The user accessing this page. This is only null at the login page, otherwise it is * checked before calling this method. * @param response * From the servlet API. * @param request * From the servlet API. * @param connection * The connection to the Open Test Manager database. Upon return of this method, this * connection will be closed in a finally block, so it is NOT the responsibility of * subclasses to close it. */ public abstract void printPage(PrintWriter out, Tester user, HttpServletResponse response, HttpServletRequest request, Connection connection) throws SQLException; public void doLoggedInPost(HttpServletRequest request, HttpServletResponse response, Tester user, Connection connection) throws IOException, ServletException, SQLException { doLoggedInGet(request, response, user, connection); } } |
From: fredrik <fre...@us...> - 2005-04-28 11:51:16
|
Update of /cvsroot/test-manager/main/src/testmanager/database/jdbc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14164/src/testmanager/database/jdbc Added Files: Utilities.java Log Message: Reorganizing servlets & adding bug tracking --- NEW FILE: Utilities.java --- package testmanager.database.jdbc; import java.sql.Connection; import java.sql.Date; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Calendar; /** * @author Fredrik Fornwall */ public abstract class Utilities { /** * A general utility method for a query that only returns a single string. * * @param connection * The connection to the database. * @param query * The SQL query that is to result in a single string. * @return The string result of the query or null if the query had an empty result. * @throws SQLException * If one occurs while executing the Query. * @throws IllegalArgumentException * If the query results in more than one result. */ public static String stringQuery(Connection connection, String query) throws SQLException { ResultSet result = connection.createStatement().executeQuery(query); if (result.next()) { String returnValue = result.getString(1); if (result.next()) { // The result contains more than throw new IllegalArgumentException("In Database.stringQuery() the query \"" + query + "\" returned several rows"); } else { return returnValue; } } else { return null; } } /** * Create a java.sql.Date. TODO: Move from web utilities to database. * * @param year * The year of the date to create. * @param month * The month of the date to create. NOTE: January = 0 * @param day * The day of the month of the date to create. * * @return The java.sql.Date created from the above parameters. */ public static Date createSQLDate(int year, int month, int day) { Calendar cal = Calendar.getInstance(); cal.set(Calendar.YEAR, year); cal.set(Calendar.MONTH, month); cal.set(Calendar.DATE, day); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); return new Date(cal.getTime().getTime()); } } |
From: fredrik <fre...@us...> - 2005-04-28 11:51:16
|
Update of /cvsroot/test-manager/main/src/testmanager/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14164/src/testmanager/database Modified Files: Database.java Log Message: Reorganizing servlets & adding bug tracking Index: Database.java =================================================================== RCS file: /cvsroot/test-manager/main/src/testmanager/database/Database.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Database.java 21 Apr 2005 17:33:33 -0000 1.22 --- Database.java 28 Apr 2005 11:51:06 -0000 1.23 *************** *** 4,17 **** import java.sql.Connection; import java.sql.DriverManager; ! import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.logging.Logger; ! import testmanager.tests.Attachment; ! import testmanager.tests.History; ! import testmanager.tests.TestCase; ! import testmanager.tests.TestCaseArea; ! import testmanager.tests.Tester; /** --- 4,20 ---- import java.sql.Connection; import java.sql.DriverManager; ! import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Statement; import java.util.logging.Logger; ! import testmanager.database.tables.Attachment; ! import testmanager.database.tables.Bug; ! import testmanager.database.tables.BugLink; ! import testmanager.database.tables.History; ! import testmanager.database.tables.LoggedIn; ! import testmanager.database.tables.TestCase; ! import testmanager.database.tables.TestCaseArea; ! import testmanager.database.tables.Tester; /** *************** *** 26,30 **** /** * The name of the database created inside the derby database manager. This will also be the name of the ! * subdirectory that derby will create within the application directory. */ public static final String DATABASE_NAME = "database"; --- 29,33 ---- /** * The name of the database created inside the derby database manager. This will also be the name of the ! * subdirectory that derby will create within the application directory (thus the name "database"). */ public static final String DATABASE_NAME = "database"; *************** *** 47,77 **** */ ! /** ! * A utility method for a query that only returns a single string. ! * ! * @param connection ! * The connection to the database. ! * @param query ! * The SQL query that is to result in a single string. ! * @return The string result of the query or null if the query had an empty result. ! * @throws SQLException ! * If one occurs while executing the Query. ! * @throws IllegalArgumentException ! * If the query results in more than one result. ! */ ! public static String stringQuery(Connection connection, String query) throws SQLException { ! ResultSet result = connection.createStatement().executeQuery(query); ! if (result.next()) { ! String returnValue = result.getString(1); ! if (result.next()) { ! // The result contains more than ! throw new IllegalArgumentException("In Database.stringQuery() the query \"" + query ! + "\" returned several rows"); ! } else { ! return returnValue; ! } ! } else { ! return null; ! } } --- 50,57 ---- */ ! // TODO: Remove ! public void createAdminAccount(String adminPassword) throws SQLException { ! Connection connection = getConnection(); ! PreparedStatement statement = connection.prepareStatement("INSERT INTO Tester "); } *************** *** 119,188 **** Connection connection = null; ! if (newDirectory) { - try { connection = DriverManager.getConnection("jdbc:derby:" + DATABASE_NAME + ";create=true"); - Statement statement = connection.createStatement(); // Create the database tables ! logger.info("Adding initial test data to the database... "); ! statement.addBatch(TestCaseArea.createTableStatement); statement.addBatch(Attachment.createTableStatement); statement.addBatch(History.createTableStatement); ! statement.addBatch(Tester.createTableStatement); statement.addBatch(TestCase.createTableStatement); ! ! // Insert some dummy data for testing ! statement ! .addBatch("INSERT INTO Tester (UserName, Password, FullName, MailAddress) VALUES ('fredrik', 'mellon', 'Fredrik Fornwall', 'fre...@gm...')"); ! statement ! .addBatch("INSERT INTO Tester (UserName, Password, FullName, MailAddress) VALUES ('goran', 'mellon', 'Goran Soderman', 'gor...@ch...')"); ! statement ! .addBatch("INSERT INTO Tester (UserName, Password, FullName, MailAddress) VALUES ('faina', 'mellon', 'Faina Barknell', 'bar...@ho...')"); ! statement ! .addBatch("INSERT INTO Tester (UserName, Password, FullName, MailAddress) VALUES ('czeslaw', 'mellon', 'Czeslaw Kolodziejski', 'cz...@ch...')"); ! ! statement.addBatch("INSERT INTO TestCaseArea (Name, Description) VALUES ('Design', '...')"); ! statement.addBatch("INSERT INTO TestCaseArea (Name, Description) VALUES ('Data', '...')"); ! statement.addBatch("INSERT INTO TestCaseArea (Name, Description) VALUES ('Installation', '...')"); ! ! statement ! .addBatch("INSERT INTO TestCase (Title, AuthorId, ResponsibleID, AreaID, ExecutionDate, CreationDate, DueDate, Status, Type, Description) " ! + "VALUES ('Login', 2, 1, 2, CURRENT_DATE, CURRENT_DATE, '2008-03-23', 2, 1, 'How to reprodue: TODO')"); ! statement ! .addBatch("INSERT INTO TestCase (Title, AuthorId, ResponsibleID, AreaID, ExecutionDate, CreationDate, DueDate, Status, Type, Description) " ! + "VALUES ('Just Testing', 1, 2, 1, CURRENT_DATE, CURRENT_DATE, '2006-04-05', 1, 2, 'This is a description')"); ! statement ! .addBatch("INSERT INTO TestCase (Title, AuthorId, ResponsibleID, AreaID, ExecutionDate, CreationDate, DueDate, Status, Type, Description) " ! + "VALUES ('Adding a new user to the testers list', 1, 3, 1, CURRENT_DATE, CURRENT_DATE, '2006-04-15', 1, 2, 'This test case describes how to add a new user to the testers list.')"); ! statement ! .addBatch("INSERT INTO TestCase (Title, AuthorId, ResponsibleID, AreaID, ExecutionDate, CreationDate, DueDate, Status, Type, Description) " ! + "VALUES ('Print a project summary', 3, 3, 1, CURRENT_DATE, CURRENT_DATE, '2006-04-15', 1, 2, 'This test case describes how to print a summary of the project.')"); ! statement ! .addBatch("INSERT INTO TestCase (Title, AuthorId, ResponsibleID, AreaID, ExecutionDate, CreationDate, DueDate, Status, Type, Description) " ! + "VALUES ('Export to PDF', 3, 3, 1, CURRENT_DATE, CURRENT_DATE, '2005-09-23', 0, 2, 'Test that the overview can be exported to PDF.')"); ! ! // TODO: just testing with some data ! for (int i = 0; i < 100; i++) { ! statement ! .addBatch("INSERT INTO TestCase (Title, AuthorId, ResponsibleID, AreaID, ExecutionDate, CreationDate, DueDate, Status, Type, Description) " ! + "VALUES ('Sample TestCase " ! + i ! + "', 3, 3, 1, CURRENT_DATE, CURRENT_DATE, '2005-09-23', 0, 2, 'This is just a sample test case.')"); ! } ! ! statement ! .addBatch("INSERT INTO History (TestCaseID, ResponsibleID, CreationTimestamp, Description, Comment) " ! + "VALUES (1, 1, CURRENT_TIMESTAMP, 'Changed test status to fail\n', 'Application crashes at startup')"); ! statement ! .addBatch("INSERT INTO History (TestCaseID, ResponsibleID, CreationTimestamp, Description, Comment) " ! + "VALUES (1, 2, CURRENT_TIMESTAMP, 'Changed test status to pass\n', 'I fixed it yesterday, updating the status.')"); ! ! // TEMP: ! statement.addBatch("CREATE TABLE LoggedIn (TesterID INTEGER NOT NULL)"); ! statement.executeBatch(); } finally { if (connection != null && !connection.isClosed()) { --- 99,125 ---- Connection connection = null; ! if (newDirectory) { try { connection = DriverManager.getConnection("jdbc:derby:" + DATABASE_NAME + ";create=true"); // Create the database tables ! logger.info("Creating database tables..."); ! ! Statement statement = connection.createStatement(); statement.addBatch(Attachment.createTableStatement); + statement.addBatch(Bug.createTableStatement); + statement.addBatch(BugLink.createTableStatement); statement.addBatch(History.createTableStatement); ! statement.addBatch(LoggedIn.createTableStatement); statement.addBatch(TestCase.createTableStatement); ! statement.addBatch(TestCaseArea.createTableStatement); ! statement.addBatch(Tester.createTableStatement); statement.executeBatch(); + + BugLink.initialize(connection); + logger.info("Adding initial example data to the database..."); + addDummyData(connection); } finally { if (connection != null && !connection.isClosed()) { *************** *** 192,205 **** } ! // Clear all logged in try { connection = getConnection(); connection.createStatement().executeUpdate("DELETE FROM LoggedIn"); ! } catch (Exception e) { if (connection != null && !connection.isClosed()) try { connection.close(); } catch (SQLException ee) { ! // TODO } } --- 129,144 ---- } ! // Clear all logged in each time we start up the database try { connection = getConnection(); connection.createStatement().executeUpdate("DELETE FROM LoggedIn"); ! } catch (SQLException e) { ! throw new SQLException("Could not delete table LoggedIn in: " + e.getMessage()); ! } finally { if (connection != null && !connection.isClosed()) try { connection.close(); } catch (SQLException ee) { ! logger.severe("Could not close connection in Database#startUp()"); } } *************** *** 208,210 **** --- 147,167 ---- } + private static void addDummyData(Connection connection) throws SQLException { + // Insert dummy data + try { + Tester.addDummyData(connection); + } catch (Tester.AlreadyExistsException e) { + throw new SQLException("Tester already exists when inserting dummy data: " + e.getMessage()); + } + + TestCaseArea.addNew(connection, "Shutdown", "..."); + TestCaseArea.addNew(connection, "Startup", "..."); + TestCaseArea.addNew(connection, "Installation", "..."); + + TestCase.addDummyData(connection); + History.addDummyData(connection); + + Bug.addDummyData(connection); + BugLink.addDummyData(connection); + } } \ No newline at end of file |
From: fredrik <fre...@us...> - 2005-04-28 11:51:16
|
Update of /cvsroot/test-manager/main/src/testmanager/database/views In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14164/src/testmanager/database/views Added Files: TestCaseListView.java Log Message: Reorganizing servlets & adding bug tracking --- NEW FILE: TestCaseListView.java --- package testmanager.database.views; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; /** * @author Fredrik Fornwall */ public class TestCaseListView { private static final String query = "SELECT TestCase.ID, TestCase.title, TestCase.Type, TestCase.Status, TestCaseArea.Name, Tester.FullName, Tester.ID " + "FROM TestCase, TestCaseArea, Tester " + "WHERE TestCase.AreaID = TestCaseArea.ID AND TestCase.ResponsibleID = Tester.ID"; public static void call(Connection connection, RowHandler rowHandler) throws SQLException { ResultSet resultSet = connection.createStatement().executeQuery(query); if (!resultSet.next()) { rowHandler.noRows(); return; } rowHandler.start(); while (resultSet.next()) { rowHandler.handleTestCaseListRow(resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3), resultSet.getInt(4), resultSet.getString(5), resultSet.getString(6), resultSet .getInt(7)); } rowHandler.finish(); } public static interface RowHandler { /** * Called if the query returned no rows. In that case this is the only method called. */ public void noRows(); public void start(); /** * Will be called after each. */ public void finish(); public void handleTestCaseListRow(int testCaseID, String testCaseTitle, int testCaseType, int testCaseStatus, String testCaseAreaName, String responsibleTesterFullName, int responsibleTesterID); } } |
From: fredrik <fre...@us...> - 2005-04-28 11:51:15
|
Update of /cvsroot/test-manager/main/src/testmanager/database/tables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14164/src/testmanager/database/tables Added Files: Attachment.java TestCaseArea.java Bug.java BugLink.java package.html LoggedIn.java TestCase.java Tester.java History.java Log Message: Reorganizing servlets & adding bug tracking --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <body> Provides classes that models the problem domain. </body> </html> --- NEW FILE: LoggedIn.java --- package testmanager.database.tables; /** * @author Fredrik Fornwall */ public abstract class LoggedIn { public static final String createTableStatement = "CREATE TABLE LoggedIn (TesterID INTEGER NOT NULL)"; } --- NEW FILE: Bug.java --- package testmanager.database.tables; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; /** * @author Fredrik Fornwall */ public class Bug { public static void addDummyData(Connection connection) throws SQLException { addNew(connection, 41514, 1, STATUS_OPEN); addNew(connection, 33, 1, STATUS_OPEN); addNew(connection, 44, 1, STATUS_OPEN); } public static int getTestCaseID(Connection connection, int bugID) throws SQLException { ResultSet resultSet = connection.createStatement().executeQuery( "SELECT TestCaseID FROM Bug WHERE BugID = " + bugID); resultSet.next(); return resultSet.getInt(1); } public static final String createTableStatement = "CREATE TABLE Bug (" + "BugID INT NOT NULL, " + "TestCaseID INT NOT NULL, " + "BugStatus INT NOT NULL, " + "PRIMARY KEY (BugID, TestCaseID)" + ")"; public static interface RowHandler { public void noRows(); public void start(); public void finish(); public void handleRow(int bugID, int bugStatus); } public static void useRowHandler(Connection connection, int testCaseID, RowHandler rowHandler) throws SQLException { ResultSet resultSet = connection.createStatement().executeQuery( "SELECT BugID, BugStatus FROM Bug WHERE TestCaseID = " + testCaseID); if (!resultSet.next()) { rowHandler.noRows(); return; } rowHandler.start(); do { rowHandler.handleRow(resultSet.getInt(1), resultSet.getInt(2)); } while (resultSet.next()); rowHandler.finish(); } public static final int STATUS_OPEN = 1; public static final int STATUS_RESOLVED = 1 << 1; public static final int STATUS_VERIFIED_BY_TEST = 1 << 2; public static final String[] STATUS_MARKS = { "", "R", "V" }; public static void remove(Connection connection, int bugID, int testCaseID) throws SQLException { connection.createStatement().executeUpdate( "DELETE FROM Bug WHERE BugID = " + bugID + " AND TestCaseID = " + testCaseID); } public static void addNew(Connection connection, int bugID, int testCaseID, int bugStatus) throws SQLException { connection.createStatement().executeUpdate( "INSERT INTO Bug (BugID, TestCaseID, BugStatus) VALUES (" + bugID + ", " + testCaseID + ", " + bugStatus + ")"); } } --- NEW FILE: Tester.java --- package testmanager.database.tables; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import testmanager.database.Database; import testmanager.database.jdbc.Utilities; /** * A user of the test manager framework. * * @author Fredrik Fornwall */ public class Tester { public static void addDummyData(Connection connection) throws IllegalArgumentException, SQLException, AlreadyExistsException { addNew("admin", "mellon", "Joe Admin", "jo...@ad...", ROLE_ADMIN); addNew("fredrik", "mellon", "Fredrik Fornwall", "fre...@gm...", ROLE_TESTER); addNew("faina", "mellon", "Faina Barknell", "bar...@ho...", ROLE_TESTER); addNew("goran", "mellon", "Goran Soderman", "gor...@ch...", ROLE_TESTER); addNew("czeslaw", "mellon", "Czeslaw Kolodziejski", "cz...@ch...", ROLE_TESTER); } public static String getFullName(Connection connection, int testerID) throws SQLException { return Utilities.stringQuery(connection, "SELECT FullName FROM Tester WHERE ID = " + testerID); } public static class AlreadyExistsException extends Exception { } public boolean isLoggedIn() { try { Connection connection = Database.getConnection(); ResultSet result = connection.createStatement().executeQuery( "SELECT COUNT(*) FROM LoggedIn WHERE TesterID = " + getID()); result.next(); return (result.getInt(1) == 1); } catch (SQLException e) { e.printStackTrace(); //TODO: Handle return true; } } public void login() { try { Connection connection = Database.getConnection(); connection.createStatement().executeUpdate( "INSERT INTO LoggedIn VALUES (" + getID() + ")"); } catch (SQLException e) { e.printStackTrace(); } } public void logout() { try { Connection connection = Database.getConnection(); connection.createStatement().executeUpdate( "DELETE FROM LoggedIn WHERE TesterID = " + getID()); } catch (SQLException e) { e.printStackTrace(); } } public static final int MAX_FULLNAME_LENGTH = 40; public static final int MAX_MAILADDRESS_LENGTH = 30; public static final int MAX_PASSWORD_LENGTH = 15; public static final int MAX_USERNAME_LENGTH = 18; public static final int ROLE_ADMIN = 0; public static final int ROLE_TESTER = 1; public static final String[] roleNames = { "Administrator", "Tester" }; /** * The SQL statement to create the Tester database table. */ public static final String createTableStatement = "CREATE TABLE Tester (" + "ID INTEGER PRIMARY KEY NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), " + "Role INT NOT NULL, " + "UserName VARCHAR(" + MAX_USERNAME_LENGTH + ") UNIQUE NOT NULL, " + "Password VARCHAR(" + MAX_PASSWORD_LENGTH + ") NOT NULL, " + "FullName VARCHAR(" + MAX_FULLNAME_LENGTH + "), " + "MailAddress VARCHAR(" + MAX_MAILADDRESS_LENGTH + ") NOT NULL" + ")"; /** * Add a new Tester into the database and return the generated id from him. * * @param userName * The userName of the new tester. * @param password * The password of the new tester. * @param fullName * The full name of the new tester. * @param mailAddress * The mail address of the new tester. * * @return The generated ID of the inserted Tester. * @throws SQLException * If one occurs while adding the Tester to the database * @throws IllegalArgumentException * If any of the arguments are of the wrong size or format * @throws AlreadyExistsException * If a tester with the supplied username already exists. */ public static int addNew(String userName, String password, String fullName, String mailAddress, int role) throws SQLException, IllegalArgumentException, AlreadyExistsException { if (userName.length() < 4 || userName.length() > MAX_USERNAME_LENGTH) { throw new IllegalArgumentException( "User name must be between four and twelve characters long"); } else if (password.length() < 6 || password.length() > MAX_PASSWORD_LENGTH) { throw new IllegalArgumentException( "Password must be between six and fifteen characters long"); } else if (fullName.length() < 6 || fullName.length() > MAX_FULLNAME_LENGTH) { throw new IllegalArgumentException( "Full name must be between six and forty characters long"); } else if (mailAddress.length() < 6 || mailAddress.length() > MAX_MAILADDRESS_LENGTH) { throw new IllegalArgumentException( "Mail address must be between six and forty characters long"); } else if (!mailAddress .matches("^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$")) { throw new IllegalArgumentException("The supplied mail address \"" + mailAddress + "\" does not seem to be valid!"); } else if (role != ROLE_ADMIN && role != ROLE_TESTER) { throw new IllegalArgumentException("Invalid role: " + role); } Connection connection = Database.getConnection(); // Check that no user with the supplied user name already exists PreparedStatement statement = connection .prepareStatement("SELECT COUNT(*) FROM Tester WHERE UserName = ?"); statement.setString(1, userName); ResultSet countResult = statement.executeQuery(); countResult.next(); if (countResult.getInt(1) != 0) { throw new AlreadyExistsException(); } statement = connection .prepareStatement( "INSERT INTO Tester (UserName, Password, FullName, MailAddress, Role) VALUES (?, ?, ? , ?, ?)", Statement.RETURN_GENERATED_KEYS); statement.setString(1, userName); statement.setString(2, password); statement.setString(3, fullName); statement.setString(4, mailAddress); statement.setInt(5, role); statement.executeUpdate(); ResultSet generatedKeys = statement.getGeneratedKeys(); generatedKeys.next(); return generatedKeys.getInt(1); } /** * Get a tester by his id; * * @param id * The id of the wanted tester. * @return The tester with the specified id or null if none exists. */ public static Tester getById(int id) throws SQLException { Connection connection = Database.getConnection(); try { // We only assure that there is a user with this name PreparedStatement statement = connection .prepareStatement("SELECT * FROM Tester WHERE ID = ?"); statement.setInt(1, id); ResultSet result = statement.executeQuery(); if (result.next()) { return new Tester(result.getInt("ID"), result.getString("UserName"), result .getString("Password"), result.getString("FullName"), result .getString("MailAddress"), result.getInt("Role")); } else { return null; } } catch (SQLException e) { System.out.println("SQLException in getByUserName: " + e.getMessage()); } finally { connection.close(); } return null; } /** * Get a tester by name. * * @param userName * The user name of the wanted tester. * @return The tester with the specified name or null if no tester with the specified name * exists. */ public static Tester getByUserName(String userName) throws SQLException { Connection connection = Database.getConnection(); try { // We only assure that there is a user with this name PreparedStatement statement = connection .prepareStatement("SELECT * FROM Tester WHERE userName = ?"); statement.setString(1, userName); ResultSet result = statement.executeQuery(); if (result.next()) { return new Tester(result.getInt("id"), result.getString("userName"), result .getString("password"), result.getString("fullName"), result .getString("mailAddress"), result.getInt("role")); } else { return null; } } catch (SQLException e) { System.out.println("SQLException in getByUserName: " + e.getMessage()); } finally { connection.close(); } return null; } private String fullName; private int id; private String mailAddress; private String password; private String userName; private int role; private Tester() { } private Tester(int id, String userName, String password, String fullName, String mailAddress, int role) { this.id = id; this.userName = userName; this.password = password; this.fullName = fullName; this.mailAddress = mailAddress; this.role = role; } public String getFullName() { return fullName; } public int getID() { return id; } public String getMailAddress() throws SQLException { return mailAddress; } public String getPassword() throws SQLException { return password; } public String getUserName() { return userName; } public void setPassword(String password) { } /** * @return Returns the role. */ public int getRole() { return role; } } --- NEW FILE: BugLink.java --- package testmanager.database.tables; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; /** * @author Fredrik Fornwall */ public abstract class BugLink { public static void addDummyData(Connection connection) throws SQLException { changeTo(connection, "http://good.old.bugzilla/show_bug.cgi?id="); } public static final int MAX_LENGTH = 80; public static final String createTableStatement = "CREATE TABLE BugLink (Link VARCHAR(" + MAX_LENGTH + ") NOT NULL)"; public static void initialize(Connection connection) throws SQLException { connection.createStatement().execute("INSERT INTO BugLink VALUES ('')"); } public static String get(Connection connection) throws SQLException { ResultSet resultSet = connection.createStatement().executeQuery("SELECT * FROM BugLink"); resultSet.next(); return resultSet.getString(1); } public static void changeTo(Connection connection, String newLink) throws SQLException { PreparedStatement statement = connection.prepareStatement("UPDATE BugLink SET Link = ?"); statement.setString(1, newLink); statement.executeUpdate(); } } --- NEW FILE: Attachment.java --- package testmanager.database.tables; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; /** * File attachments to test cases. * * @author Fredrik Fornwall */ public class Attachment { public static void remove(Connection connection, int attachmentID) throws SQLException { connection.createStatement().executeUpdate( "DELETE FROM Attachment WHERE ID = " + attachmentID); } public static int getTestCaseID(Connection connection, int attachmentID) throws SQLException { ResultSet resultSet = connection.createStatement().executeQuery( "SELECT TestCaseID FROM Attachment WHERE ID = " + attachmentID); resultSet.next(); return resultSet.getInt(1); } public static String getName(Connection connection, int attachmentID) throws SQLException { ResultSet resultSet = connection.createStatement().executeQuery( "SELECT Name FROM Attachment WHERE ID = " + attachmentID); resultSet.next(); return resultSet.getString(1); } public static final String createTableStatement = "CREATE TABLE Attachment (" + "ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), " + "TestCaseID INTEGER NOT NULL, " + // ID of TestCase that this is // an attachment to "Name VARCHAR(60) NOT NULL, " + "Contents BLOB(32M) NOT NULL" + ")"; } --- NEW FILE: History.java --- package testmanager.database.tables; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; /** * A History item is connected to a TestCase. Each time a Tester changes something on a TestCase a * History item is created. * * @author Fredrik Fornwall */ public class History { public static void addDummyData(Connection connection) throws SQLException { /* addNew(connection, 1, 2, ) statement .addBatch("INSERT INTO History (TestCaseID, ResponsibleID, CreationTimestamp, Description, Comment) " + "VALUES (1, 1, CURRENT_TIMESTAMP, 'Changed test status to fail\n', 'Application crashes at startup')"); statement .addBatch("INSERT INTO History (TestCaseID, ResponsibleID, CreationTimestamp, Description, Comment) " + "VALUES (1, 2, CURRENT_TIMESTAMP, 'Changed test status to pass\n', 'I fixed it yesterday, updating the status.')"); */ } /** * Append a history item id. * * @param testCaseID * @param creatorID * @param description * @throws SQLException */ public static void addNew(Connection connection, int testCaseID, int creatorID, String description, String comment) throws SQLException { PreparedStatement statement = connection.prepareStatement("INSERT INTO History " + "(TestCaseID, CreationTimestamp, ResponsibleID, Description, Comment) VALUES " + "(?, CURRENT_TIMESTAMP, ?, ?, ?)"); statement.setInt(1, testCaseID); statement.setInt(2, creatorID); statement.setString(3, description); statement.setString(4, comment); statement.executeUpdate(); } public static final String createTableStatement = "Create TABLE History (" + "ID INT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), " // ID of the test case this history item is attached to + "TestCaseID INTEGER NOT NULL, " // ID of the responsible tester of this history item. + "ResponsibleID INTEGER NOT NULL, " // The time at which this history item was created + "CreationTimestamp TIMESTAMP NOT NULL, " // A description of what was made such as "Changed test status to // pass" + "Description LONG VARCHAR," // A commment entered by the user + "Comment LONG VARCHAR" + ")"; } --- NEW FILE: TestCase.java --- package testmanager.database.tables; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import testmanager.database.jdbc.Utilities; /** * A single test case. * * @author Fredrik Fornwall */ public class TestCase { public static final int MIN_TITLE_LENGTH = 6; public static final int MAX_TITLE_LENGTH = 60; public static void setNewDueDate(Connection connection, int testCaseID, int newYear, int newMonth, int newDay) throws SQLException { PreparedStatement statement = connection .prepareStatement("UPDATE TestCase SET DueDate = ? WHERE ID = ?"); statement.setDate(1, Utilities.createSQLDate(newYear, newMonth, newDay)); statement.setInt(2, testCaseID); statement.executeUpdate(); } public static String getSpecification(Connection connection, int testCaseID) throws SQLException { return Utilities.stringQuery(connection, "SELECT DESCRIPTION FROM TestCase WHERE ID = " + testCaseID); } public static void setNewSpecification(Connection connection, int testCaseID, String newSpecification) throws SQLException { PreparedStatement statement = connection .prepareStatement("UPDATE TestCase SET Description = ? WHERE ID = ?"); statement.setString(1, newSpecification); statement.setInt(2, testCaseID); statement.executeUpdate(); } public static void addDummyData(Connection connection) throws SQLException { addNew(connection, "Verify that the Acid2 page renders correctly", 1, 2, 1, "This test case tests that the browser HTML rendering capability is standards compliant.\n" + "Environment: Windows XP\n" + "Test Execution:\n" + "1. Open your browser.\n" + "2. Open the acid2 test\n" + "3. Compare rendering with reference image\n" + "Expected Result: The reference image and the actual rendering should match", 2006, 5, 12, TestCase.STATUS_PASS, TestCase.ACCEPTANCE_CRITERIA); addNew(connection, "Verify that applications launches correctly", 1, 2, 1, "Functionality tested: The ability to launch the program through java web start.\n" + "Environment: Any modern browser\n" + "Test Execution:\n" + "1. Open your browse\n" + "2. Go to http://test-manager.sf.net/\n" + "3. Click on the \"Launch\" \n" + "Expected Result: Java web start should launch normally and give a security warning", 2007, 5, 1, TestCase.STATUS_PASS, TestCase.ACCEPTANCE_CRITERIA); } public static final String createTableStatement = "CREATE TABLE TestCase (" + "ID INT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), " + "Title VARCHAR(" + MAX_TITLE_LENGTH + ") NOT NULL, " + "AuthorID INTEGER NOT NULL, " + "ResponsibleID INTEGER NOT NULL, " + "Type INTEGER NOT NULL, " + "Status INTEGER NOT NULL, " + "AreaID INTEGER NOT NULL, " + "CreationDate DATE NOT NULL, " + "ExecutionDate DATE NOT NULL, " + "DueDate DATE NOT NULL, " + "Description LONG VARCHAR" + ")"; /** * Add a new test case to the database. The parameters are checked * * @param connection * @param title * @param authorID * @param responsibleID * @param areaID * @param description * @param dueDate * @param status * @param typeID * @return The generated ID of the inserted Tester. * * @throws IllegalArgumentException * if any invalid arguments are given and checked before database calls. * @throws SQLException */ public static int addNew(Connection connection, String title, int authorID, int responsibleID, int areaID, String description, int dueDateYear, int dueDateMonth, int dueDateDay, int status, int typeID) throws SQLException { if (title.length() < MIN_TITLE_LENGTH || title.length() > MAX_TITLE_LENGTH) { throw new IllegalArgumentException( "Test case title must be between six and sixty characters long"); } PreparedStatement statement = connection.prepareStatement( "INSERT INTO TestCase (Title, AuthorId, ResponsibleID, AreaID, " + "ExecutionDate, CreationDate, DueDate, Status, Type, Description) " + "VALUES (?, ?, ?, ?, CURRENT_DATE, CURRENT_DATE, ?, ?, ?, ?)", Statement.RETURN_GENERATED_KEYS); int index = 1; statement.setString(index++, title); statement.setInt(index++, authorID); statement.setInt(index++, responsibleID); statement.setInt(index++, areaID); statement.setDate(index++, Utilities.createSQLDate(dueDateYear, dueDateMonth, dueDateDay)); statement.setInt(index++, status); statement.setInt(index++, typeID); statement.setString(index++, description); statement.executeUpdate(); ResultSet generatedKeys = statement.getGeneratedKeys(); generatedKeys.next(); return generatedKeys.getInt(1); } /** * A possible level. These test cases are run when Testing first receives a new build of an * application. They verify that further testing is possible. These must all pass for a build to * be considered TESTABLE. Less than 5% of your test cases should be smoke tests. You should * have at least a few standard tests that you run through every build to ensure it is testable. */ public static final int SMOKE_TEST = 0; /** * These test cases are run on every build that Testing certifies as testable (has passed the * smoke tests). They verify that core functionality works exactly as */ public static final int CRITICAL_PATH = 1; /** * These test cases need to be run at least once during the entire test cycle for this release. * These cases are run once, and do not need to be repeated. They verify the minimum * requirements for the application to be released. These test cases (plus the smoke test and * critical path cases) must all pass for a build to be */ public static final int ACCEPTANCE_CRITERIA = 2; /** * These are Test Cases that would be nice to execute, but may be omitted due to time * constraints. Typically, these test cases would have a low visibility of occurrence to users. * Roughly 0-30% of your test cases should be smoke tests; the more thoroughly */ public static final int SUGGESTED = 3; /** * Textual description of the different types that a TestCase can be. */ public static final String[] typeNames = { "Smoke Test", "Critical Path", "Acceptance Criteria", "Suggested" }; /** * This is never used to indicate a real status. This is for instance passed to indicate no * change. */ public static final int STATUS_NOT_USED = -1; public static final int STATUS_NOT_TESTED = 0; public static final int STATUS_FAIL = 1; public static final int STATUS_PASS = 2; public static final int STATUS_POSTPONED = 3; public static final String[] statusNames = { "Not Tested", "Fail", "Pass", "Postponed" }; } --- NEW FILE: TestCaseArea.java --- package testmanager.database.tables; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import testmanager.database.jdbc.Utilities; /** * Test case area to which a test case belongs. * * @author Fredrik Fornwall */ public class TestCaseArea { public static String getName(Connection connection, int testCaseAreaID) throws SQLException { return Utilities.stringQuery(connection, "SELECT Name FROM TestCaseArea WHERE ID = " + testCaseAreaID); } public static final int MAX_NAME_LENGTH = 40; public static final String createTableStatement = "CREATE TABLE TestCaseArea (" + "ID INTEGER PRIMARY KEY NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), " + "Name VARCHAR(" + MAX_NAME_LENGTH + ") UNIQUE NOT NULL, " + "Description LONG VARCHAR NOT NULL" + ")"; /** * Add a new test case area into the database. * * @param name * The name of the test case area to add. * @param description * The description of the test case area to add. * @return The ID of the newly inserted TestCaseArea. * @throws SQLException * If one occurs while inserting the area into the database. */ public static int addNew(Connection connection, String name, String description) throws SQLException { if (name.length() < 2 || name.length() > MAX_NAME_LENGTH) { throw new IllegalArgumentException( "Area name must be between two and forty characters long"); } PreparedStatement statement = connection .prepareStatement("SELECT COUNT(*) FROM TestCaseArea WHERE Name = ?"); statement.setString(1, name); ResultSet countResult = statement.executeQuery(); countResult.next(); if (countResult.getInt(1) > 0) { throw new IllegalArgumentException( "An area with the specified area name already exists"); } statement = connection.prepareStatement( "INSERT INTO TestCaseArea (Name, Description) VALUES (?, ?)", Statement.RETURN_GENERATED_KEYS); statement.setString(1, name); statement.setString(2, description); statement.executeUpdate(); ResultSet generatedKeys = statement.getGeneratedKeys(); generatedKeys.next(); return generatedKeys.getInt(1); } } |
Update of /cvsroot/test-manager/main/src/testmanager/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14164/src/testmanager/tests Removed Files: package.html Attachment.java TestCaseArea.java History.java Bug.java Tester.java TestCase.java Log Message: Reorganizing servlets & adding bug tracking --- package.html DELETED --- --- Bug.java DELETED --- --- Tester.java DELETED --- --- Attachment.java DELETED --- --- History.java DELETED --- --- TestCase.java DELETED --- --- TestCaseArea.java DELETED --- |
From: fredrik <fre...@us...> - 2005-04-28 11:51:14
|
Update of /cvsroot/test-manager/main/src/testmanager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14164/src/testmanager Modified Files: Application.java Log Message: Reorganizing servlets & adding bug tracking Index: Application.java =================================================================== RCS file: /cvsroot/test-manager/main/src/testmanager/Application.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Application.java 24 Apr 2005 02:10:35 -0000 1.5 --- Application.java 28 Apr 2005 11:51:05 -0000 1.6 *************** *** 2,5 **** --- 2,7 ---- import java.io.File; + import java.io.FilenameFilter; + import java.io.IOException; import java.util.logging.FileHandler; import java.util.logging.Logger; *************** *** 15,205 **** public class Application { ! private Logger logger; ! private int state = STATE_STARTING; ! /** ! * A version which is shown to the user at various places such as the main window title. Be ! * sure to update this field when a new version is released. ! */ ! public static final String VERSION = "0.2"; ! /** ! * A state where the application is starting up. Requests by the user to shut down the ! * application in this state should be ignored in order not to risk data damage. If all goes ! * well the application should enter the state STATE_RUNNING. If any problem is encountered, ! * it should go into STATE_ERROR. ! */ ! public static final int STATE_STARTING = 0; ! /** ! * A state where the application is running normally. If a fatal error occurs, the application ! * will be put into STATE_ERROR. If the user decides to shut down the application, it will be ! * put into STATE_SHUTTING_DOWN. ! */ ! public static final int STATE_RUNNING = 1; ! /** ! * A state where the application is shutting down as fast as possible. Further requests from ! * the user to shut down the application should be ignored in order not to risk damaging data. ! * If all goes well the application will be exited as by System.exit(0). If a fatal error ! * occurs it will be put into STATE_ERROR. ! */ ! public static final int STATE_SHUTTING_DOWN = 2; ! /** ! * A state where the application has encountered a fatal error. No proper shutdown can longer ! * be performed. The application should terminate upon request from the user. ! */ ! public static final int STATE_ERROR = 3; ! /** ! * The main() method of the application. The entry point to the whole program. ! * ! * @param args ! * The arguments supplied to the application, either through the command line or ! * or through the java web start (.jnlp) file. The only supported option at this ! * point is "-h" to indicate that the application should be running headless, ! * without any graphical user interface. ! */ ! public static void main(String[] args) { ! boolean headless = false; ! for (int i = 0; i < args.length; i++) { ! if (args[i].equals("-h")) { ! headless = true; ! } ! } ! instance = new Application(); ! instance.startUp(headless); ! } ! private static Application instance; ! private File applicationDirectory; ! public File getApplicationDirectory() { ! return applicationDirectory; ! } ! private void initializeApplicationDirectory() { ! applicationDirectory = new File(System.getProperty("user.home") + File.separator ! + "Open Test Manager"); ! if (applicationDirectory.exists()) { ! logger.info("Using existing application directory \"" + applicationDirectory.getPath() ! + "\""); ! } else { ! if (applicationDirectory.mkdir()) { ! logger.info("Application directory \"" + applicationDirectory.getAbsolutePath() ! + "\" created"); ! } else { ! logger.severe("Error: Could not create application directory \"" ! + applicationDirectory.getPath() + "\" - startup halted!"); ! applicationDirectory = null; ! } ! } ! } ! /** ! * Application is a Singleton, meaning that only one instance of the class will ever be ! * created. ! * ! * @return The Application singleton. ! */ ! public static Application getInstance() { ! return instance; ! } ! private MainWindow mainWindow; ! private Database database; ! private WebServer webServer; ! private FileHandler logFileHandler; ! /** ! * Startup the application. (1) Shows the main window. (2) Starts up the database. (3) Starts up ! * the web server. ! * ! * @param headLess ! * True if the application is to run headless (without any main window). ! */ ! public void startUp(boolean headLess) { ! logger = Logger.getLogger("Open Test Manager"); ! if (!headLess) { ! mainWindow = createWindow(); ! mainWindow.setDefaultCloseOperation(javax.swing.JFrame.DO_NOTHING_ON_CLOSE); ! mainWindow.pack(); ! mainWindow.setExtendedState(MainWindow.MAXIMIZED_BOTH); ! mainWindow.setVisible(true); ! logger.addHandler(new MainWindowLogHandler(mainWindow)); ! } ! initializeApplicationDirectory(); ! database = createDatabase(); ! webServer = createWebServer(); ! try { ! database.startUp(getApplicationDirectory(), logger); ! } catch (Exception e) { ! e.printStackTrace(); ! logger.severe("Error starting database server: \"" + e.getMessage() + "\" - aborting"); ! state = STATE_ERROR; ! return; ! } ! try { ! webServer.startUp(getApplicationDirectory(), logger, 5050); ! if (mainWindow != null) { ! mainWindow.setStatusLabel("Running at " + webServer.getServerURL()); ! } ! } catch (Exception e) { ! e.printStackTrace(); ! state = STATE_ERROR; ! logger.severe("Error starting web server: \"" + e.getMessage() + "\" - aborting!"); ! return; ! } ! logger.info("Setup done - application started!"); ! state = STATE_RUNNING; ! } ! /** ! * Shut down the application. ! */ ! public void shutDown() { ! state = STATE_SHUTTING_DOWN; ! try { ! webServer.shutDown(); ! database.shutDown(); ! System.exit(0); ! } catch (Exception e) { ! logger.severe("Error shutting down: " + e.getMessage()); ! e.printStackTrace(); ! } ! } ! protected MainWindow createWindow() { ! return new MainWindow(); ! } ! protected Database createDatabase() { ! return new Database(); ! } ! protected WebServer createWebServer() { ! return new WebServer(); ! } ! /** ! * @return Returns the current state of the application. ! */ ! public int getState() { ! return state; ! } } \ No newline at end of file --- 17,261 ---- public class Application { ! private Logger logger; ! private int state = STATE_STARTING; ! /** ! * A version which is shown to the user at various places such as the main ! * window title. Be sure to update this field when a new version is ! * released. ! */ ! public static final String VERSION = "0.3.1"; ! /** ! * A state where the application is starting up. Requests by the user to ! * shut down the application in this state should be ignored in order not to ! * risk data damage. If all goes well the application should enter the state ! * STATE_RUNNING. If any problem is encountered, it should go into ! * STATE_ERROR. ! */ ! public static final int STATE_STARTING = 0; ! /** ! * A state where the application is running normally. If a fatal error ! * occurs, the application will be put into STATE_ERROR. If the user decides ! * to shut down the application, it will be put into STATE_SHUTTING_DOWN. ! */ ! public static final int STATE_RUNNING = 1; ! /** ! * A state where the application is shutting down as fast as possible. ! * Further requests from the user to shut down the application should be ! * ignored in order not to risk damaging data. If all goes well the ! * application will be exited as by System.exit(0). If a fatal error occurs ! * it will be put into STATE_ERROR. ! */ ! public static final int STATE_SHUTTING_DOWN = 2; ! /** ! * A state where the application has encountered a fatal error. No proper ! * shutdown can longer be performed. The application should terminate upon ! * request from the user. ! */ ! public static final int STATE_ERROR = 3; ! /** ! * The main() method of the application. The entry point to the whole ! * program. ! * ! * @param args ! * The arguments supplied to the application, either through the ! * command line or or through the java web start (.jnlp) file. ! * The only supported option at this point is "-h" to indicate ! * that the application should be running headless, without any ! * graphical user interface. ! */ ! public static void main(String[] args) { ! boolean headless = false; ! for (int i = 0; i < args.length; i++) { ! if (args[i].equals("-h")) { ! headless = true; ! } ! } ! instance = new Application(); ! instance.startUp(headless); ! } ! private static Application instance; ! private File applicationDirectory; ! public File getApplicationDirectory() { ! return applicationDirectory; ! } ! /** ! * Helper method for deleting a directory and all files contained in the ! * directory. ! * ! * @param dir ! * The directory to be deleted. ! */ ! private static void deleteDir(File dir) { ! File[] contents = dir.listFiles(); ! for (int i = 0; i < contents.length; i++) { ! if (contents[i].isDirectory()) { ! deleteDir(contents[i]); ! } else if (contents[i].isFile()) { ! contents[i].delete(); ! } ! } ! dir.delete(); ! } ! /* ! * @return True if a new application directory has been created. ! */ ! private boolean initializeApplicationDirectory() { ! applicationDirectory = new File(System.getProperty("user.home") ! + File.separator + "Open Test Manager"); ! if (applicationDirectory.exists()) { ! if (applicationDirectory.listFiles(new FilenameFilter() { ! public boolean accept(File dir, String name) { ! return name.equals("version" + Application.VERSION); ! } ! }).length == 0) { ! deleteDir(applicationDirectory); ! } else { ! logger.info("Using existing application directory \"" ! + applicationDirectory.getPath() + "\""); ! return false; ! } ! } ! if (applicationDirectory.mkdir()) { ! logger.info("Application directory \"" ! + applicationDirectory.getAbsolutePath() + "\" created"); ! logger.info("Deleting old application directory as it is of an incompatible development version (this is " + Application.VERSION + ")"); ! try { ! new File(applicationDirectory.getAbsolutePath() + "/" + "version" + Application.VERSION).createNewFile(); ! } catch (IOException e) { ! logger.severe("Could not create version file: " + File.separatorChar + e.getMessage()); ! } ! return true; ! } else { ! logger.severe("Error: Could not create application directory \"" ! + applicationDirectory.getPath() + "\" - startup halted!"); ! applicationDirectory = null; ! } ! return false; ! } ! /** ! * Application is a Singleton, meaning that only one instance of the class ! * will ever be created. ! * ! * @return The Application singleton. ! */ ! public static Application getInstance() { ! return instance; ! } ! private MainWindow mainWindow; ! private Database database; ! private WebServer webServer; ! private FileHandler logFileHandler; ! /** ! * Startup the application. (1) Shows the main window. (2) Starts up the ! * database. (3) Starts up the web server. ! * ! * @param headLess ! * True if the application is to run headless (without any main ! * window). ! */ ! public void startUp(boolean headLess) { ! logger = Logger.getLogger("Open Test Manager"); ! if (!headLess) { ! mainWindow = createWindow(); ! mainWindow ! .setDefaultCloseOperation(javax.swing.JFrame.DO_NOTHING_ON_CLOSE); ! mainWindow.pack(); ! mainWindow.setExtendedState(MainWindow.MAXIMIZED_BOTH); ! mainWindow.setVisible(true); ! logger.addHandler(new MainWindowLogHandler(mainWindow)); ! } ! boolean newDirectory = initializeApplicationDirectory(); ! /* ! * String adminPassword; if (newDirectory) { adminPassword = ! * mainWindow.getInitialAdminPassword(); } ! */ ! database = createDatabase(); ! webServer = createWebServer(); ! try { ! database.startUp(getApplicationDirectory(), logger); ! } catch (Exception e) { ! e.printStackTrace(); ! logger.severe("Error starting database server: \"" + e.getMessage() ! + "\" - aborting"); ! state = STATE_ERROR; ! return; ! } ! try { ! webServer.startUp(getApplicationDirectory(), logger, 5050); ! if (mainWindow != null) { ! mainWindow.setStatusLabel("Running at " ! + webServer.getServerURL()); ! } ! } catch (Exception e) { ! e.printStackTrace(); ! state = STATE_ERROR; ! logger.severe("Error starting web server: \"" + e.getMessage() ! + "\" - aborting!"); ! return; ! } ! logger.info("Setup done - application started!"); ! state = STATE_RUNNING; ! } ! /** ! * Shut down the application. ! */ ! public void shutDown() { ! state = STATE_SHUTTING_DOWN; ! try { ! webServer.shutDown(); ! database.shutDown(); ! System.exit(0); ! } catch (Exception e) { ! logger.severe("Error shutting down: " + e.getMessage()); ! e.printStackTrace(); ! } ! } ! protected MainWindow createWindow() { ! return new MainWindow(); ! } ! protected Database createDatabase() { ! return new Database(); ! } ! ! protected WebServer createWebServer() { ! return new WebServer(); ! } ! ! /** ! * @return Returns the current state of the application. ! */ ! public int getState() { ! return state; ! } } \ No newline at end of file |
From: fredrik <fre...@us...> - 2005-04-28 11:51:14
|
Update of /cvsroot/test-manager/main/src/testmanager/database/queries In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14164/src/testmanager/database/queries Removed Files: TestCaseListQuery.java Query.java QuerySet.java QueryIterator.java Log Message: Reorganizing servlets & adding bug tracking --- Query.java DELETED --- --- QueryIterator.java DELETED --- --- TestCaseListQuery.java DELETED --- --- QuerySet.java DELETED --- |
From: fredrik <fre...@us...> - 2005-04-28 11:51:05
|
Update of /cvsroot/test-manager/main/src/testmanager/database/views In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14057/src/testmanager/database/views Log Message: Directory /cvsroot/test-manager/main/src/testmanager/database/views added to the repository |
From: fredrik <fre...@us...> - 2005-04-28 11:51:05
|
Update of /cvsroot/test-manager/main/src/testmanager/database/jdbc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14057/src/testmanager/database/jdbc Log Message: Directory /cvsroot/test-manager/main/src/testmanager/database/jdbc added to the repository |
From: fredrik <fre...@us...> - 2005-04-28 11:51:05
|
Update of /cvsroot/test-manager/main/src/testmanager/database/tables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14057/src/testmanager/database/tables Log Message: Directory /cvsroot/test-manager/main/src/testmanager/database/tables added to the repository |
From: fredrik <fre...@us...> - 2005-04-25 07:22:46
|
Update of /cvsroot/test-manager/main/tests/testmanager/database/queries In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1832/tests/testmanager/database/queries Added Files: TestCaseListQueryTest.java Log Message: --- NEW FILE: TestCaseListQueryTest.java --- package testmanager.database.queries; import java.sql.SQLException; /** * @author Fredrik Fornwall */ public class TestCaseListQueryTest { public void testQuery() throws SQLException { TestCaseListQuery query = TestCaseListQuery.query(null); } } |
From: fredrik <fre...@us...> - 2005-04-25 07:22:43
|
Update of /cvsroot/test-manager/main/src/testmanager/database/queries In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1832/src/testmanager/database/queries Added Files: TestCaseListQuery.java Query.java QueryIterator.java QuerySet.java Log Message: --- NEW FILE: Query.java --- package testmanager.database.queries; /** * @author Fredrik Fornwall */ public class Query { } --- NEW FILE: QueryIterator.java --- package testmanager.database.queries; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Iterator; /** * An iterator through a ResultSet from an SQL query. * * TestCaseListResult result = TestCase.query(); * while (result.hasNext()) { * * } * * @author Fredrik Fornwall */ public class QueryIterator implements Iterator { protected ResultSet resultSet; QueryIterator(ResultSet resultSet) { this.resultSet = resultSet; } /** * @see java.util.Iterator#hasNext() */ public boolean hasNext() { try { return !resultSet.isLast(); } catch (SQLException e) { //TODO: Handle return false; } } /** * @see java.util.Iterator#next() */ public Object next() { try { resultSet.next(); } catch (SQLException e) { } return this; } /** * @see java.util.Iterator#remove() */ public void remove() { // TODO Auto-generated method stub try { //XXX: Perhaps a fat interface not supporting removes? //throw new resultSet.deleteRow(); } catch (SQLException e) { //TODO: handle } } } --- NEW FILE: TestCaseListQuery.java --- package testmanager.database.queries; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Iterator; /** * @author Fredrik Fornwall */ public class TestCaseListQuery extends QueryIterator { private TestCaseListQuery(ResultSet resultSet) { super(resultSet); } private static class TheSet { public Iterator iterator() { return null; } }; public static TestCaseListQuery query(Connection connection) throws SQLException { Statement statement = connection.createStatement(); ResultSet resultSet = statement .executeQuery("SELECT TestCase.ID, TestCase.title, TestCase.Status, TestCaseArea.Name, Tester.FullName, Tester.ID, TestCase.Type " + "FROM TestCase, TestCaseArea, Tester " + "WHERE TestCase.AreaID = TestCaseArea.ID AND TestCase.ResponsibleID = Tester.ID"); return new TestCaseListQuery(resultSet); } public static void main(String[] args) throws SQLException { TestCaseListQuery query = TestCaseListQuery.query(null); while (query.hasNext()) { query.next(); } } public String getTestCaseTitle() throws SQLException { return resultSet.getString(2); } public int getTestCaseID() throws SQLException { return resultSet.getInt(1); } public int getTestCaseStatus() throws SQLException { return resultSet.getInt(3); } public String getTestCaseAreaName() throws SQLException { return resultSet.getString(4); } public String getResponsibleTestersFullName() throws SQLException { return resultSet.getString(5); } public int getResponsibleTestersID() throws SQLException { return resultSet.getInt(6); } public int getTestCaseType() throws SQLException { return resultSet.getInt(7); } } --- NEW FILE: QuerySet.java --- package testmanager.database.queries; /** * @author Fredrik Fornwall */ public class QuerySet { } |
From: fredrik <fre...@us...> - 2005-04-25 07:22:41
|
Update of /cvsroot/test-manager/main/src/testmanager/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1832/src/testmanager/tests Added Files: Bug.java Log Message: --- NEW FILE: Bug.java --- package testmanager.tests; /** * @author Fredrik Fornwall */ public class Bug { public static final String createTableStatement = "CREATE TABLE Bug (" + "ID INT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), " + "Title VARCHAR(60) NOT NULL, " + ""; } |
From: fredrik <fre...@us...> - 2005-04-25 07:22:41
|
Update of /cvsroot/test-manager/main/tests/testmanager/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1832/tests/testmanager/database Added Files: AllTests.java Log Message: --- NEW FILE: AllTests.java --- package testmanager.database; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * @author Fredrik Fornwall */ public class AllTests extends TestCase { public static Test suite() { TestSuite suite = new TestSuite(); return suite; } } |
From: fredrik <fre...@us...> - 2005-04-25 07:22:39
|
Update of /cvsroot/test-manager/main/src/testmanager/database/queries In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1768/src/testmanager/database/queries Log Message: Directory /cvsroot/test-manager/main/src/testmanager/database/queries added to the repository |
From: fredrik <fre...@us...> - 2005-04-25 07:22:39
|
Update of /cvsroot/test-manager/main/tests/testmanager/database/queries In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1768/tests/testmanager/database/queries Log Message: Directory /cvsroot/test-manager/main/tests/testmanager/database/queries added to the repository |
From: fredrik <fre...@us...> - 2005-04-24 15:46:42
|
Update of /cvsroot/test-manager/main In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4803 Modified Files: TESTING.txt Log Message: Test to see if syncmail works Index: TESTING.txt =================================================================== RCS file: /cvsroot/test-manager/main/TESTING.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TESTING.txt 16 Mar 2005 15:00:27 -0000 1.3 --- TESTING.txt 24 Apr 2005 15:46:33 -0000 1.4 *************** *** 4,6 **** This is a test. ! Bara testar / Faina \ No newline at end of file --- 4,8 ---- This is a test. ! Bara testar / Faina ! ! Just a test \ No newline at end of file |