Changeset 664 in tmcsimulator for trunk/test
- Timestamp:
- 09/14/2022 03:31:54 PM (4 years ago)
- Location:
- trunk/test/tmcsim
- Files:
-
- 1 deleted
- 11 edited
-
cadsimulator/CADSimulatorConsoleDriver.java (modified) (1 diff)
-
cadsimulator/CADSimulatorGUITest.java (modified) (1 diff)
-
cadsimulator/SystemConsoleTest.java (modified) (2 diffs)
-
cadsimulator/SystemTest.java (modified) (3 diffs)
-
cadsimulator/VisibleSystemDemoDriver.java (deleted)
-
cadsimulator/viewer/CADConsoleViewerTest.java (modified) (1 diff)
-
cadsimulator/viewer/CADSimulatorViewModelTest.java (modified) (1 diff)
-
highwaymodel/ConsoleTrafficDriver.java (modified) (1 diff)
-
highwaymodel/runtraffic.bash (modified) (1 diff)
-
paramicslog/ParamicsLogFileHandlerTest.java (modified) (2 diffs)
-
paramicslog/ParamicsLogRMITestSkeleton.java (modified) (2 diffs)
-
simulationmanager/SimulationManagerSmokeTest.java (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/tmcsim/cadsimulator/CADSimulatorConsoleDriver.java
r658 r664 31 31 + "ParamicsProperties = pconfig.txt\n" 32 32 + "ATMSProperties = empty.txt\n" 33 + "MediaProperties = empty.txt\n"; 33 + "MediaProperties = empty.txt\n" 34 + "TrafficMgrProperties = config/traffic_model_config/traffic_model_config.properties\n" 35 + "ElapsedTimeFile = webapps/dynamicdata/sim_elapsedtime.json\n" 36 + "CADcommentsLog = webapps/dynamicdata/CADcomments.log\n"; 34 37 static final String paramicsData = "ParamicsCommHost = 192.168.251.45\n" 35 38 + "ParamicsCommPort = 4450\n" -
trunk/test/tmcsim/cadsimulator/CADSimulatorGUITest.java
r658 r664 78 78 try 79 79 { 80 app = new CADServer(System.getProperty("CONFIG_DIR") + System.getProperty("file.separator") + "cad_s imulator_config.properties");80 app = new CADServer(System.getProperty("CONFIG_DIR") + System.getProperty("file.separator") + "cad_server.properties"); 81 81 82 82 } catch (Exception e) -
trunk/test/tmcsim/cadsimulator/SystemConsoleTest.java
r658 r664 53 53 try 54 54 { 55 engine = new CADServer("config/cad_s imulator_console_config.properties");55 engine = new CADServer("config/cad_server_console.properties"); 56 56 } catch (Exception e) 57 57 { … … 74 74 try 75 75 { 76 simMgrApp = new SimulationManager("config/sim_manager _systest_config.properties");76 simMgrApp = new SimulationManager("config/sim_manager.properties"); 77 77 } catch (Exception ex) 78 78 { -
trunk/test/tmcsim/cadsimulator/SystemTest.java
r658 r664 19 19 /** 20 20 * System test (include CADSimulator) with emulated Paramics Modeler NO ATMS 21 * server captures GUI display using UISpec4J.21 * server. Captures GUI display using UISpec4J. 22 22 * 23 23 * @author jdalbey … … 54 54 try 55 55 { 56 engine = new CADServer("config/cad_s imulator_config.properties");56 engine = new CADServer("config/cad_server.properties"); 57 57 } catch (Exception e) 58 58 { … … 82 82 try 83 83 { 84 simMgrApp = new SimulationManager("config/sim_manager _systest_config.properties");84 simMgrApp = new SimulationManager("config/sim_manager.properties"); 85 85 } catch (Exception ex) 86 86 { -
trunk/test/tmcsim/cadsimulator/viewer/CADConsoleViewerTest.java
r657 r664 28 28 { 29 29 super.setUp(); 30 console = new CADConsoleViewer("config/cad_s imulator_config.properties");30 console = new CADConsoleViewer("config/cad_server.properties"); 31 31 cadmodel = new CADSimulatorState(); 32 32 cadmodel.addObserver(console); -
trunk/test/tmcsim/cadsimulator/viewer/CADSimulatorViewModelTest.java
r455 r664 30 30 { 31 31 super.setUp(); 32 viewer = new CADServerViewer("config/cad_s imulator_config.properties");32 viewer = new CADServerViewer("config/cad_server.properties"); 33 33 cadwindow = new Window(viewer); 34 34 model = new CADSimulatorState(); -
trunk/test/tmcsim/highwaymodel/ConsoleTrafficDriver.java
r457 r664 19 19 20 20 /** 21 * A console application to drive the ATMS Server .21 * A console application to drive the ATMS Server (is this really CPTMS now?). 22 22 * Use for test driving the Highway Model. 23 23 * -
trunk/test/tmcsim/highwaymodel/runtraffic.bash
r457 r664 1 1 #!/bin/bash 2 2 3 java -DATMSDRIVER_PROPERTIES=config/ console_driver_config.properties -jar deploy/ConsoleTrafficDriver.jar << EOF3 java -DATMSDRIVER_PROPERTIES=config/test_trafficdriver.properties -jar deploy/ConsoleTrafficDriver.jar << EOF 4 4 5 S 10 24.0 Y 5 5 A -
trunk/test/tmcsim/paramicslog/ParamicsLogFileHandlerTest.java
r422 r664 33 33 super.setUp(); 34 34 } 35 String propsfile = "config/ paramics_communicator_logging.properties";35 String propsfile = "config/logging_paramics_communicator.properties"; 36 36 37 37 /** … … 43 43 try 44 44 { 45 new CADServer("config/cad_s imulator_console_config.properties");45 new CADServer("config/cad_server_console.properties"); 46 46 } catch (Exception e) 47 47 { -
trunk/test/tmcsim/paramicslog/ParamicsLogRMITestSkeleton.java
r422 r664 34 34 super.setUp(); 35 35 } 36 String propsfile = "config/ paramics_communicator_logging.properties";36 String propsfile = "config/logging_paramics_communicator.properties"; 37 37 38 38 /** … … 44 44 try 45 45 { 46 CADServer engine = new CADServer("config/cad_s imulator_console_config.properties");46 CADServer engine = new CADServer("config/cad_server_console.properties"); 47 47 } catch (Exception e) 48 48 { -
trunk/test/tmcsim/simulationmanager/SimulationManagerSmokeTest.java
r658 r664 3 3 import java.awt.Component; 4 4 import java.io.File; 5 import java.util.Arrays; 5 6 import javax.swing.JButton; 6 7 import static junit.framework.Assert.assertEquals; … … 39 40 * Call constructors for both classes 40 41 */ 41 public void testBothGUIs() throws ScriptException, SimulationException 42 public void testBothGUIs() throws ScriptException, SimulationException, InterruptedException 42 43 { 43 44 System.out.println("Smoke Test Sim Mgr & CADSimulator"); 44 45 45 46 Window cadwindow = null; 46 System.setProperty("CAD_SIM_PROPERTIES", "config/cad_s imulator_smoketest_config.properties");47 System.setProperty("CAD_SIM_PROPERTIES", "config/cad_server.properties"); 47 48 if (System.getProperty("CAD_SIM_PROPERTIES") != null) 48 49 { … … 77 78 78 79 Window simMgrWindow = null; 79 System.setProperty("SIM_MGR_PROPERTIES", "config/sim_manager _smoketest_config.properties");80 System.setProperty("SIM_MGR_PROPERTIES", "config/sim_manager.properties"); 80 81 if (System.getProperty("SIM_MGR_PROPERTIES") != null) 81 82 { … … 118 119 // Click "Start" 119 120 win.getButton("Start").click(); 120 try 121 { 122 Thread.sleep(200); 123 } catch (Exception ex) 124 { 125 ex.printStackTrace(); 126 } 121 Thread.sleep(200); 127 122 assertEquals("Running", txtSimStatus.getText()); 128 123 129 //List all available buttons 130 Component[] buttons = win.getSwingComponents(JButton.class); 131 for (Component comp : buttons) 132 { 133 System.out.println(comp); 134 } 124 java.util.ArrayList<String> expectedButtons = new java.util.ArrayList<String>(Arrays.asList("Load Script","Start","Pause","Reset","Connect to Paramics", 125 "Load Network","Reschedule","Trigger","Delete","Add New Incident","Divert Traffic")); 126 // Check for appearance of buttons in the GUI 135 127 win.getButton("Load Script"); 136 win.getButton("Pause");137 win.getButton("Disconnect from Paramics");138 128 win.getButton("Reset"); 139 win.getButton("Load Network"); 129 win.getButton("Add New Incident"); 130 win.getButton("Reschedule"); 131 win.getButton("Trigger"); 132 win.getButton("Delete"); 133 //Find all available buttons - obsolete, replaced by stmts above 134 // Component[] buttons = win.getSwingComponents(JButton.class); 135 // java.util.List<Component> actualButtons = Arrays.asList(buttons); 136 // for (Component actualBtn: actualButtons) 137 // { 138 // if (actualBtn instanceof JButton) 139 // { 140 // String btnName = ((JButton) actualBtn).getText(); 141 // if (btnName.length()>0) 142 // { 143 // if (expectedButtons.contains(btnName)) 144 // { 145 // expectedButtons.remove(btnName); 146 // } 147 // else 148 // { 149 // fail("GUI has an unexpected button: "+btnName); 150 // } 151 // } 152 // } 153 // } 154 // if (expectedButtons.size() > 0) 155 // { 156 // fail("GUI is missing a button: "+expectedButtons); 157 // } 158 159 // Pause the simulation 160 win.getButton("Pause").click(); 161 Thread.sleep(200); 162 win.getButton("Resume"); // resume should appear when paused 140 163 // Quit 141 164 engine = null;
Note: See TracChangeset
for help on using the changeset viewer.
