changeset 168:af42c142855f

fixes of outputtexts, scripts and tests: - outputtexts (help texts) are updated - lot of sleeps added (or increased sleep time) in tests to make them more reliable (preventing random failitures) - added missing credential to CommandChannelSmokeTest and scripts (where local storage exception was needed before) - patterns/1.1.0/noAA/ClientPreferencesDialog/web_storage_connection_info2.png: added missing file - src/org/thermostat/qa/framework/Patterns.java: removed web_storage_connection_info3 from list because this pattern is not present for any version of thermostat - src/org/thermostat/qa/testsuites/GuiClientSmokeTest.java(testStartGUIWithStorageMenuHelpAboutTest): "clicking on close button" is used to close about dialog instead of "pressing enter" which had not worked
author Zdenek Zambersky <zzambers@redhat.com>
date Mon, 01 Dec 2014 16:23:03 +0100
parents 7baba5d67a16
children 19c8294a826f
files outputtexts/1.1.0/output_of_help_therm_shell.txt outputtexts/1.1.0/thermostat.txt outputtexts/1.1.0/thermostat_help.txt outputtexts/1.1.0/thermostat_help_vm-stat.txt outputtexts/head/output_of_help_therm_shell.txt outputtexts/head/thermostat.txt outputtexts/head/thermostat_help.txt outputtexts/head/thermostat_help_vm-stat.txt patterns/1.1.0/noAA/ClientPreferencesDialog/web_storage_connection_info2.png scripts/add_vm_db_commands2.txt scripts/list-vms_therm_shell2.txt scripts/remove_vm_db_commands.txt src/org/thermostat/qa/framework/Patterns.java src/org/thermostat/qa/testsuites/CommandChannelSmokeTest.java src/org/thermostat/qa/testsuites/DBCommandsHeapDumpTest.java src/org/thermostat/qa/testsuites/GuiClientSmokeTest.java src/org/thermostat/qa/testsuites/GuiClientWebStorageTest.java
diffstat 17 files changed, 77 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/outputtexts/1.1.0/output_of_help_therm_shell.txt	Fri Nov 21 10:50:09 2014 +0100
+++ b/outputtexts/1.1.0/output_of_help_therm_shell.txt	Mon Dec 01 16:23:03 2014 +0100
@@ -3,19 +3,25 @@
 list of commands:
 
  help                   show help for a given command or help overview
- clean-data             Drop all data related to all of the specified agents
+ agent-info             shows info for specified agent
+ clean-data             drop all data related to all of the specified agents
  connect                persistently connect to storage
  disconnect             disconnect from the currently used storage
  dump-heap              trigger a heap dump on the VM
  find-objects           finds objects in a heapdump
  find-root              finds the shortest path from an object to a GC root
+ gc                     perform Garbage Collection on the given vm
+ kill-vm                kill the specified vm
+ list-agents            lists all agents for the current host
  list-categories        lists all registered categories in Storage
  list-heap-dumps        list all heap dumps
  list-vms               lists all currently monitored VMs
  object-info            prints information about an object in a heap dump
  ping                   using the Command Channel, send a ping to a running agent
+ profile-vm             profile a target vm
  save-heap-dump-to-file saves a heap dump to a local file
  show-heap-histogram    show the heap histogram
+ storage-profile        profile how fast storage operations are
  validate               validates a thermostat plug-in XML file against the schema
  vm-info                shows basic information about a VM
  vm-stat                show various statistics about a VM
--- a/outputtexts/1.1.0/thermostat.txt	Fri Nov 21 10:50:09 2014 +0100
+++ b/outputtexts/1.1.0/thermostat.txt	Mon Dec 01 16:23:03 2014 +0100
@@ -1,20 +1,23 @@
 list of commands:
 
  help                   show help for a given command or help overview
- add-mongodb-user       adds a new mongodb user to the thermostat DB. It reads credentials from standard input.
+ add-mongodb-user       adds a new mongodb user to the thermostat DB, reading credentials from standard input
  agent                  starts and stops the thermostat agent
- clean-data             Drop all data related to all of the specified agents
+ agent-info             shows info for specified agent
+ clean-data             drop all data related to all of the specified agents
  dump-heap              trigger a heap dump on the VM
  find-objects           finds objects in a heapdump
  find-root              finds the shortest path from an object to a GC root
+ gc                     perform Garbage Collection on the given vm
  gui                    launches the GUI client
- kill-vm                Attempts to kill the vm specified.
+ kill-vm                kill the specified vm
  list-agents            lists all agents for the current host
  list-categories        lists all registered categories in Storage
  list-heap-dumps        list all heap dumps
  list-vms               lists all currently monitored VMs
  object-info            prints information about an object in a heap dump
  ping                   using the Command Channel, send a ping to a running agent
+ profile-vm             profile a target vm
  save-heap-dump-to-file saves a heap dump to a local file
  service                starts and stops the thermostat storage and agent
  shell                  launches the Thermostat interactive shell
--- a/outputtexts/1.1.0/thermostat_help.txt	Fri Nov 21 10:50:09 2014 +0100
+++ b/outputtexts/1.1.0/thermostat_help.txt	Mon Dec 01 16:23:03 2014 +0100
@@ -1,20 +1,23 @@
 list of commands:
 
  help                   show help for a given command or help overview
- add-mongodb-user       adds a new mongodb user to the thermostat DB. It reads credentials from standard input.
+ add-mongodb-user       adds a new mongodb user to the thermostat DB, reading credentials from standard input
  agent                  starts and stops the thermostat agent
- clean-data             Drop all data related to all of the specified agents
+ agent-info             shows info for specified agent
+ clean-data             drop all data related to all of the specified agents
  dump-heap              trigger a heap dump on the VM
  find-objects           finds objects in a heapdump
  find-root              finds the shortest path from an object to a GC root
+ gc                     perform Garbage Collection on the given vm
  gui                    launches the GUI client
- kill-vm                Attempts to kill the vm specified.
+ kill-vm                kill the specified vm
  list-agents            lists all agents for the current host
  list-categories        lists all registered categories in Storage
  list-heap-dumps        list all heap dumps
  list-vms               lists all currently monitored VMs
  object-info            prints information about an object in a heap dump
  ping                   using the Command Channel, send a ping to a running agent
+ profile-vm             profile a target vm
  save-heap-dump-to-file saves a heap dump to a local file
  service                starts and stops the thermostat storage and agent
  shell                  launches the Thermostat interactive shell
--- a/outputtexts/1.1.0/thermostat_help_vm-stat.txt	Fri Nov 21 10:50:09 2014 +0100
+++ b/outputtexts/1.1.0/thermostat_help_vm-stat.txt	Mon Dec 01 16:23:03 2014 +0100
@@ -1,4 +1,5 @@
-usage: thermostat vm-stat -hostId <host> --vmId <vm> [-d <url>] [-l <level>]
+usage: thermostat vm-stat -hostId <host> --vmId <vm> [-c] [-s <time:timeunit>]
+                  [-d <url>] [-l <level>]
                   show various statistics about a VM
 
 thermostat vm-stat
@@ -10,4 +11,8 @@
                               values for <logLevel> in decreasing severity are:
                               SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
                               and OFF
+  -s,--since <since>          print data since [-s time:timeunits] ago or print
+                              all data [-s all]. Defaults to since 10 minutes
+                              ago [-s 10:minutes] and accepts positive times and
+                              days, hours, minutes, or seconds
   -v,--vmId <vmId>            the ID of the VM to monitor
--- a/outputtexts/head/output_of_help_therm_shell.txt	Fri Nov 21 10:50:09 2014 +0100
+++ b/outputtexts/head/output_of_help_therm_shell.txt	Mon Dec 01 16:23:03 2014 +0100
@@ -1,20 +1,27 @@
-Thermostat version 0.16.0
+Thermostat version 1.1.0
 Thermostat > help
 list of commands:
 
  help                   show help for a given command or help overview
- clean-data             Drop all data related to all of the specified agents
+ agent-info             shows info for specified agent
+ clean-data             drop all data related to all of the specified agents
  connect                persistently connect to storage
  disconnect             disconnect from the currently used storage
  dump-heap              trigger a heap dump on the VM
  find-objects           finds objects in a heapdump
  find-root              finds the shortest path from an object to a GC root
+ gc                     perform Garbage Collection on the given vm
+ kill-vm                kill the specified vm
+ list-agents            lists all agents for the current host
+ list-categories        lists all registered categories in Storage
  list-heap-dumps        list all heap dumps
  list-vms               lists all currently monitored VMs
  object-info            prints information about an object in a heap dump
  ping                   using the Command Channel, send a ping to a running agent
+ profile-vm             profile a target vm
  save-heap-dump-to-file saves a heap dump to a local file
  show-heap-histogram    show the heap histogram
+ storage-profile        profile how fast storage operations are
  validate               validates a thermostat plug-in XML file against the schema
  vm-info                shows basic information about a VM
  vm-stat                show various statistics about a VM
--- a/outputtexts/head/thermostat.txt	Fri Nov 21 10:50:09 2014 +0100
+++ b/outputtexts/head/thermostat.txt	Mon Dec 01 16:23:03 2014 +0100
@@ -1,20 +1,23 @@
 list of commands:
 
  help                   show help for a given command or help overview
- add-mongodb-user       adds a new mongodb user to the thermostat DB. It reads credentials from standard input.
+ add-mongodb-user       adds a new mongodb user to the thermostat DB, reading credentials from standard input
  agent                  starts and stops the thermostat agent
- clean-data             Drop all data related to all of the specified agents
+ agent-info             shows info for specified agent
+ clean-data             drop all data related to all of the specified agents
  dump-heap              trigger a heap dump on the VM
  find-objects           finds objects in a heapdump
  find-root              finds the shortest path from an object to a GC root
+ gc                     perform Garbage Collection on the given vm
  gui                    launches the GUI client
- kill-vm                Attempts to kill the vm specified.
+ kill-vm                kill the specified vm
  list-agents            lists all agents for the current host
  list-categories        lists all registered categories in Storage
  list-heap-dumps        list all heap dumps
  list-vms               lists all currently monitored VMs
  object-info            prints information about an object in a heap dump
  ping                   using the Command Channel, send a ping to a running agent
+ profile-vm             profile a target vm
  save-heap-dump-to-file saves a heap dump to a local file
  service                starts and stops the thermostat storage and agent
  shell                  launches the Thermostat interactive shell
--- a/outputtexts/head/thermostat_help.txt	Fri Nov 21 10:50:09 2014 +0100
+++ b/outputtexts/head/thermostat_help.txt	Mon Dec 01 16:23:03 2014 +0100
@@ -1,20 +1,23 @@
 list of commands:
 
  help                   show help for a given command or help overview
- add-mongodb-user       adds a new mongodb user to the thermostat DB. It reads credentials from standard input.
+ add-mongodb-user       adds a new mongodb user to the thermostat DB, reading credentials from standard input
  agent                  starts and stops the thermostat agent
- clean-data             Drop all data related to all of the specified agents
+ agent-info             shows info for specified agent
+ clean-data             drop all data related to all of the specified agents
  dump-heap              trigger a heap dump on the VM
  find-objects           finds objects in a heapdump
  find-root              finds the shortest path from an object to a GC root
+ gc                     perform Garbage Collection on the given vm
  gui                    launches the GUI client
- kill-vm                Attempts to kill the vm specified.
+ kill-vm                kill the specified vm
  list-agents            lists all agents for the current host
  list-categories        lists all registered categories in Storage
  list-heap-dumps        list all heap dumps
  list-vms               lists all currently monitored VMs
  object-info            prints information about an object in a heap dump
  ping                   using the Command Channel, send a ping to a running agent
+ profile-vm             profile a target vm
  save-heap-dump-to-file saves a heap dump to a local file
  service                starts and stops the thermostat storage and agent
  shell                  launches the Thermostat interactive shell
--- a/outputtexts/head/thermostat_help_vm-stat.txt	Fri Nov 21 10:50:09 2014 +0100
+++ b/outputtexts/head/thermostat_help_vm-stat.txt	Mon Dec 01 16:23:03 2014 +0100
@@ -1,4 +1,5 @@
-usage: thermostat vm-stat -hostId <host> --vmId <vm> [-d <url>] [-l <level>]
+usage: thermostat vm-stat -hostId <host> --vmId <vm> [-c] [-s <time:timeunit>]
+                  [-d <url>] [-l <level>]
                   show various statistics about a VM
 
 thermostat vm-stat
@@ -10,4 +11,8 @@
                               values for <logLevel> in decreasing severity are:
                               SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
                               and OFF
+  -s,--since <since>          print data since [-s time:timeunits] ago or print
+                              all data [-s all]. Defaults to since 10 minutes
+                              ago [-s 10:minutes] and accepts positive times and
+                              days, hours, minutes, or seconds
   -v,--vmId <vmId>            the ID of the VM to monitor
Binary file patterns/1.1.0/noAA/ClientPreferencesDialog/web_storage_connection_info2.png has changed
--- a/scripts/add_vm_db_commands2.txt	Fri Nov 21 10:50:09 2014 +0100
+++ b/scripts/add_vm_db_commands2.txt	Mon Dec 01 16:23:03 2014 +0100
@@ -1,4 +1,5 @@
 use thermostat
+db.auth("mongodevuser", "mongodevpassword")
 db
 db["host-info"].insert({ "agentId" : "non-existing-agent-no1", "hostname" : "artif.added.host0.name" })
 db["vm-info"].insert({ "agentId" : "non-existing-agent-no1", "environmentAsArray" : [ { "key" : "HOSTNAME", "value" : "artif.added.host0.name" } ], "startTimeStamp" : NumberLong("1234567891011"),  "stopTimeStamp" : NumberLong("-9223372036854775808"), "vmId" : "12345", "vmPid" : NumberInt("12345") })
--- a/scripts/list-vms_therm_shell2.txt	Fri Nov 21 10:50:09 2014 +0100
+++ b/scripts/list-vms_therm_shell2.txt	Mon Dec 01 16:23:03 2014 +0100
@@ -1,5 +1,5 @@
 list-vms
-
-
+mongodevuser
+mongodevpassword
 exit
 
--- a/scripts/remove_vm_db_commands.txt	Fri Nov 21 10:50:09 2014 +0100
+++ b/scripts/remove_vm_db_commands.txt	Mon Dec 01 16:23:03 2014 +0100
@@ -1,4 +1,5 @@
 use thermostat
+db.auth("mongodevuser", "mongodevpassword")
 db["vm-info"].remove({ "agentId" : "non-existing-agent-no1" })
 db["vm-info"].find()
 db["host-info"].remove({ "agentId" : "non-existing-agent-no1" })
--- a/src/org/thermostat/qa/framework/Patterns.java	Fri Nov 21 10:50:09 2014 +0100
+++ b/src/org/thermostat/qa/framework/Patterns.java	Mon Dec 01 16:23:03 2014 +0100
@@ -117,7 +117,7 @@
         public static final String BAD_LOGIN_USER_NAME = "ClientPreferencesDialog/bad_login_user_name";
         public static final String SAVE_ENTITLEMENTS_CHECKED = "ClientPreferencesDialog/save_entitlements_checked";
         public static final String PASSWORD_EDIT_AND_LABEL = "ClientPreferencesDialog/password_edit_and_label";
-        public static final String[] WEB_STORAGE_CONNECTION_INFO = { "ClientPreferencesDialog/web_storage_connection_info", "ClientPreferencesDialog/web_storage_connection_info2","ClientPreferencesDialog/web_storage_connection_info3" };
+        public static final String[] WEB_STORAGE_CONNECTION_INFO = { "ClientPreferencesDialog/web_storage_connection_info", "ClientPreferencesDialog/web_storage_connection_info2" };
         
     }
 
--- a/src/org/thermostat/qa/testsuites/CommandChannelSmokeTest.java	Fri Nov 21 10:50:09 2014 +0100
+++ b/src/org/thermostat/qa/testsuites/CommandChannelSmokeTest.java	Mon Dec 01 16:23:03 2014 +0100
@@ -206,7 +206,7 @@
         }
 
         //thermostat ping host_id with empty login and password
-        List<String> out1 = thermostatPingHost(hostId, "", "");
+        List<String> out1 = thermostatPingHost(hostId, "mongodevuser", "mongodevpassword");
         
         //stop agent
         stopAllThermostatAgents();
@@ -214,7 +214,7 @@
         sleep(ONE_SEC);
         
         //thermostat ping host_id
-        List<String> out2 = thermostatPingHost(hostId, "", "");
+        List<String> out2 = thermostatPingHost(hostId, "mongodevuser", "mongodevpassword");
         
         //stop the storage
         stopStorage();
--- a/src/org/thermostat/qa/testsuites/DBCommandsHeapDumpTest.java	Fri Nov 21 10:50:09 2014 +0100
+++ b/src/org/thermostat/qa/testsuites/DBCommandsHeapDumpTest.java	Mon Dec 01 16:23:03 2014 +0100
@@ -74,7 +74,7 @@
         new AgentThread().start();
         logInfo("runAgentThread", "Thermostat Agent started");
         
-        sleep(2*ONE_SEC);
+        sleep(5*ONE_SEC);
 
         //list-vms, find a running vm, dump a heap
         try
--- a/src/org/thermostat/qa/testsuites/GuiClientSmokeTest.java	Fri Nov 21 10:50:09 2014 +0100
+++ b/src/org/thermostat/qa/testsuites/GuiClientSmokeTest.java	Mon Dec 01 16:23:03 2014 +0100
@@ -235,6 +235,8 @@
         robot.pressRightKey();
         robot.pressLeftKey();
         robot.pressRightKey();
+        sleepIfRealScreen(ONE_SEC);
+        
         prepareScreenshot(robot, "testStartGUIWithStorageMenuEditTest1");
 
         checkForPattern(robot, Patterns.MainWindowMenuEdit.CLIENT_PREFERENCES, "edit/client preferences");
@@ -254,6 +256,8 @@
         robot.pressRightKey();
         robot.pressLeftKey();
         robot.pressRightKey();
+        sleepIfRealScreen(ONE_SEC);
+        
         prepareScreenshot(robot, "testStartGUIWithStorageMenuEditTest1");
 
         checkForPattern(robot, Patterns.MainWindowMenuEdit.CLIENT_PREFERENCES, "edit/client preferences");
@@ -280,6 +284,8 @@
         enterMainMenu(robot);
         robot.pressRightKey();
         robot.pressRightKey();
+        sleepIfRealScreen(ONE_SEC);
+        
         prepareScreenshot(robot, "testStartGUIWithStorageMenuViewTest1");
 
         checkForPattern(robot, Patterns.MainWindowMenuView.VIEW_ALL_AGENTS, "view/all agents");
@@ -306,6 +312,8 @@
         {
             robot.pressRightKey();
         }
+        sleepIfRealScreen(ONE_SEC);
+        
         prepareScreenshot(robot, "testStartGUIWithStorageMenuHelpTest1");
 
         checkForPattern(robot, Patterns.MainWindowMenuHelp.ABOUTS, "help/about");
@@ -334,10 +342,11 @@
         }
         robot.pressDownKey();
         robot.pressEnterKey();
-
+        sleepIfRealScreen(ONE_SEC);
+        
         prepareScreenshot(robot, "testStartGUIWithStorageMenuHelpAboutTest1");
 
-        checkForPattern(robot, Patterns.AboutDialog.CLOSE_BUTTON, "about dialog/close button");
+        Rectangle rect = checkForPattern(robot, Patterns.AboutDialog.CLOSE_BUTTON, "about dialog/close button");
         checkForPattern(robot, Patterns.AboutDialog.THERMOSTAT_LOGO, "about dialog/Thermostat logo");
         checkForPattern(robot, Patterns.AboutDialog.THERMOSTAT_TITLE, "about dialog/Thermostat title");
         checkForPattern(robot, Patterns.AboutDialog.UPPER_TEXT, "about dialog/upper text");
@@ -346,7 +355,9 @@
         robot.saveScreenshot("testStartGUIWithStorageMenuHelpAboutTest2");
 
         // leave the About dialog
-        robot.pressEnterKey();
+        robot.clickToRectangle(rect);
+        
+        sleepIfRealScreen(ONE_SEC);
         stopThermostatAndStorage(robot);
     }
 
@@ -450,12 +461,14 @@
         robot.pressRightKey();
         robot.pressDownKey();
         robot.pressEnterKey();
+        sleepIfRealScreen(ONE_SEC);
 
         prepareScreenshot(robot, "testAllAgentsDialogTest1");
         
         // we need to click on "Close" button that does not have focus :-/
         Rectangle rect = findPattern(robot, Patterns.AllAgentsDialog.CLOSE_BUTTON, "all agents dialog/close button");
         robot.clickToRectangle(rect);
+        sleepIfRealScreen(ONE_SEC);
         stopThermostatAndStorage(robot);
 
         Assert.assertNotNull(rect, "Close button can't be found!");
--- a/src/org/thermostat/qa/testsuites/GuiClientWebStorageTest.java	Fri Nov 21 10:50:09 2014 +0100
+++ b/src/org/thermostat/qa/testsuites/GuiClientWebStorageTest.java	Mon Dec 01 16:23:03 2014 +0100
@@ -806,6 +806,7 @@
         robot.pressRightKey();
         robot.pressDownKey();
         robot.pressEnterKey();
+        sleepIfRealScreen(ONE_SEC);
 
         prepareScreenshot(robot, "testEditClientPreferencesWSTest1");