diff options
author | jcampan@google.com <jcampan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-04 23:28:47 +0000 |
---|---|---|
committer | jcampan@google.com <jcampan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-04 23:28:47 +0000 |
commit | 4ae627586ecb6184c3b766fd5128709442b17360 (patch) | |
tree | 44726dd64ec639e8545b189c52f9bb6de1ecb818 | |
parent | 41c2cd46aecd34eb258ed92b242ee86c333f06a8 (diff) | |
download | chromium_src-4ae627586ecb6184c3b766fd5128709442b17360.zip chromium_src-4ae627586ecb6184c3b766fd5128709442b17360.tar.gz chromium_src-4ae627586ecb6184c3b766fd5128709442b17360.tar.bz2 |
Another attempt at this CL.
I had to revert because it was somehow causing regressions on the page cycler and start-up tests.
(I suspect because I did add an IPC message not at the end of the message list)
TBR=beng
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@351 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 19 | ||||
-rw-r--r-- | chrome/browser/automation/automation_provider.h | 3 | ||||
-rw-r--r-- | chrome/test/automated_ui_tests/automated_ui_tests.cc | 141 | ||||
-rw-r--r-- | chrome/test/automated_ui_tests/automated_ui_tests.h | 54 | ||||
-rw-r--r-- | chrome/test/automation/automation_messages_internal.h | 12 | ||||
-rw-r--r-- | chrome/test/automation/browser_proxy.cc | 21 | ||||
-rw-r--r-- | chrome/test/automation/browser_proxy.h | 5 | ||||
-rw-r--r-- | chrome/tools/automated_ui_test_tools/README.txt | 20 | ||||
-rw-r--r-- | chrome/tools/automated_ui_test_tools/possible_actions.txt | 4 |
9 files changed, 225 insertions, 54 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 2cd8377..5636302 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -698,6 +698,8 @@ void AutomationProvider::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(AutomationMsg_IsWindowActiveRequest, IsWindowActive) IPC_MESSAGE_HANDLER(AutomationMsg_ActivateWindow, ActivateWindow); IPC_MESSAGE_HANDLER(AutomationMsg_WindowHWNDRequest, GetWindowHWND) + IPC_MESSAGE_HANDLER(AutomationMsg_WindowExecuteCommandRequest, + ExecuteBrowserCommand) IPC_MESSAGE_HANDLER(AutomationMsg_WindowViewBoundsRequest, WindowGetViewBounds) IPC_MESSAGE_HANDLER(AutomationMsg_SetWindowVisibleRequest, SetWindowVisible) @@ -1091,6 +1093,23 @@ void AutomationProvider::GetWindowHWND(const IPC::Message& message, win32_handle)); } +void AutomationProvider::ExecuteBrowserCommand(const IPC::Message& message, + int handle, + int command) { + + bool success = false; + if (browser_tracker_->ContainsHandle(handle)) { + Browser* browser = browser_tracker_->GetResource(handle); + if (browser->SupportsCommand(command) && + browser->IsCommandEnabled(command)) { + browser->ExecuteCommand(command); + success = true; + } + } + Send(new AutomationMsg_WindowExecuteCommandResponse(message.routing_id(), + success)); +} + void AutomationProvider::WindowGetViewBounds(const IPC::Message& message, int handle, int view_id, diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index 249bc7e..85171d3 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -134,6 +134,9 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>, void GetLastActiveBrowserWindow(const IPC::Message& message); void GetActiveWindow(const IPC::Message& message); void GetWindowHWND(const IPC::Message& message, int handle); + void ExecuteBrowserCommand(const IPC::Message& message, + int handle, + int command); void WindowGetViewBounds(const IPC::Message& message, int handle, int view_id, diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc index 0129e81..ef73355 100644 --- a/chrome/test/automated_ui_tests/automated_ui_tests.cc +++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc @@ -59,6 +59,8 @@ const wchar_t* const kOutputFilePathSwitch = L"output"; const wchar_t* const kDebugModeSwitch = L"debug"; +const wchar_t* const kWaitSwitch = L"wait-after-action"; + const wchar_t* const kDefaultInputFilePath = L"C:\\automated_ui_tests.txt"; const wchar_t* const kDefaultOutputFilePath @@ -73,21 +75,43 @@ const int kTestDialogActionsToRun = 7; // This subset of commands is used to test dialog boxes, which aren't likely // to respond to most other commands. -std::string AutomatedUITest::test_dialog_possible_actions_[] = { +const std::string kTestDialogPossibleActions[] = { "PressTabKey", "PressEnterKey", "PressSpaceBar", "DownArrow" }; +// The list of dialogs that can be shown. +const std::string kDialogs[] = { + "About", + "Options", + "TaskManager", + "JavaScriptDebugger", + "JavaScriptConsole", + "ClearBrowsingData", + "Import", + "EditSearchEngines", + "ViewPasswords" +}; + AutomatedUITest::AutomatedUITest() : total_crashes_(0), - debug_logging_enabled_(false) { + debug_logging_enabled_(false), + post_action_delay_(0) { show_window_ = true; GetSystemTimeAsFileTime(&test_start_time_); CommandLine parsed_command_line; if (parsed_command_line.HasSwitch(kDebugModeSwitch)) debug_logging_enabled_ = true; + if (parsed_command_line.HasSwitch(kWaitSwitch)) { + std::wstring str = parsed_command_line.GetSwitchValue(kWaitSwitch); + if (str.empty()) { + post_action_delay_ = 1; + } else { + post_action_delay_ = static_cast<int>(StringToInt64(str)); + } + } } AutomatedUITest::~AutomatedUITest() {} @@ -283,14 +307,28 @@ bool AutomatedUITest::DoAction(const std::string & action) { did_complete_action = ShowHistory(); } else if (LowerCaseEqualsASCII(action, "downloads")) { did_complete_action = ShowDownloads(); - } else if (LowerCaseEqualsASCII(action, "importsettings")) { - did_complete_action = ImportSettings(); + } else if (LowerCaseEqualsASCII(action, "dialog")) { + did_complete_action = ExerciseDialog(); } else if (LowerCaseEqualsASCII(action, "viewpasswords")) { did_complete_action = ViewPasswords(); - } else if (LowerCaseEqualsASCII(action, "clearbrowserdata")) { - did_complete_action = ClearBrowserData(); + } else if (LowerCaseEqualsASCII(action, "about")) { + did_complete_action = About(); + } else if (LowerCaseEqualsASCII(action, "options")) { + did_complete_action = Options(); } else if (LowerCaseEqualsASCII(action, "taskmanager")) { did_complete_action = TaskManager(); + } else if (LowerCaseEqualsASCII(action, "clearbrowsingdata")) { + did_complete_action = ClearBrowserData(); + } else if (LowerCaseEqualsASCII(action, "javascriptdebugger")) { + did_complete_action = JavaScriptDebugger(); + } else if (LowerCaseEqualsASCII(action, "javascriptconsole")) { + did_complete_action = JavaScriptConsole(); + } else if (LowerCaseEqualsASCII(action, "import")) { + did_complete_action = ImportSettings(); + } else if (LowerCaseEqualsASCII(action, "editsearchengines")) { + did_complete_action = EditSearchEngines(); + } else if (LowerCaseEqualsASCII(action, "viewpasswords")) { + did_complete_action = ViewPasswords(); } else if (LowerCaseEqualsASCII(action, "goofftherecord")) { did_complete_action = GoOffTheRecord(); } else if (LowerCaseEqualsASCII(action, "pressescapekey")) { @@ -315,10 +353,14 @@ bool AutomatedUITest::DoAction(const std::string & action) { did_complete_action = UpArrow(); } else if (LowerCaseEqualsASCII(action, "downarrow")) { did_complete_action = DownArrow(); + } else if (LowerCaseEqualsASCII(action, "options")) { + did_complete_action = Options(); } else if (LowerCaseEqualsASCII(action, "testeditkeywords")) { did_complete_action = TestEditKeywords(); } else if (LowerCaseEqualsASCII(action, "testtaskmanager")) { did_complete_action = TestTaskManager(); + } else if (LowerCaseEqualsASCII(action, "testoptions")) { + did_complete_action = TestOptions(); } else if (LowerCaseEqualsASCII(action, "testviewpasswords")) { did_complete_action = TestViewPasswords(); } else if (LowerCaseEqualsASCII(action, "testclearbrowserdata")) { @@ -343,6 +385,9 @@ bool AutomatedUITest::DoAction(const std::string & action) { xml_writer_.AddAttribute("failed_to_complete", "yes"); xml_writer_.EndElement(); + if (post_action_delay_) + ::Sleep(1000 * post_action_delay_); + return did_complete_action; } @@ -391,7 +436,7 @@ bool AutomatedUITest::NewTab() { &is_timeout); // Apply accelerator and wait for a new tab to open, if either // fails, return false. Apply Accelerator takes care of logging its failure. - bool return_value = ApplyAccelerator(IDC_NEWTAB); + bool return_value = RunCommand(IDC_NEWTAB); if (!browser->WaitForTabCountToChange( old_tab_count, &new_tab_count, kWaitForActionMaxMsec)) { AddWarningAttribute("tab_count_failed_to_change"); @@ -401,11 +446,11 @@ bool AutomatedUITest::NewTab() { } bool AutomatedUITest::BackButton() { - return ApplyAccelerator(IDC_BACK); + return RunCommand(IDC_BACK); } bool AutomatedUITest::ForwardButton() { - return ApplyAccelerator(IDC_FORWARD); + return RunCommand(IDC_FORWARD); } bool AutomatedUITest::CloseActiveTab() { @@ -424,7 +469,7 @@ bool AutomatedUITest::CloseActiveTab() { // Avoid quitting the application by not closing the last window. if (tab_count > 1) { int new_tab_count; - return_value = browser->ApplyAccelerator(IDC_CLOSETAB); + return_value = browser->RunCommand(IDC_CLOSETAB); // Wait for the tab to close before we continue. if (!browser->WaitForTabCountToChange( tab_count, &new_tab_count, kWaitForActionMaxMsec)) { @@ -433,7 +478,7 @@ bool AutomatedUITest::CloseActiveTab() { } } else if (tab_count == 1 && browser_windows_count > 1) { int new_window_count; - return_value = browser->ApplyAccelerator(IDC_CLOSETAB); + return_value = browser->RunCommand(IDC_CLOSETAB); // Wait for the window to close before we continue. if (!automation()->WaitForWindowCountToChange( browser_windows_count, &new_window_count, kWaitForActionMaxMsec)) { @@ -472,59 +517,79 @@ bool AutomatedUITest::OpenAndActivateNewBrowserWindow() { } bool AutomatedUITest::ReloadPage() { - return ApplyAccelerator(IDC_RELOAD); + return RunCommand(IDC_RELOAD); } bool AutomatedUITest::StarPage() { - return ApplyAccelerator(IDC_STAR); + return RunCommand(IDC_STAR); } bool AutomatedUITest::FindInPage() { - return ApplyAccelerator(IDC_FIND); + return RunCommand(IDC_FIND); } bool AutomatedUITest::SelectNextTab() { - return ApplyAccelerator(IDC_SELECT_NEXT_TAB); + return RunCommand(IDC_SELECT_NEXT_TAB); } bool AutomatedUITest::SelectPreviousTab() { - return ApplyAccelerator(IDC_SELECT_PREV_TAB); + return RunCommand(IDC_SELECT_PREV_TAB); } bool AutomatedUITest::ZoomPlus() { - return ApplyAccelerator(IDC_ZOOM_PLUS); + return RunCommand(IDC_ZOOM_PLUS); } bool AutomatedUITest::ZoomMinus() { - return ApplyAccelerator(IDC_ZOOM_MINUS); + return RunCommand(IDC_ZOOM_MINUS); } bool AutomatedUITest::ShowHistory() { - return ApplyAccelerator(IDC_SHOW_HISTORY); + return RunCommand(IDC_SHOW_HISTORY); } bool AutomatedUITest::ShowDownloads() { - return ApplyAccelerator(IDC_SHOW_DOWNLOADS); + return RunCommand(IDC_SHOW_DOWNLOADS); } bool AutomatedUITest::ImportSettings() { - return ApplyAccelerator(IDC_IMPORT_SETTINGS); + return RunCommand(IDC_IMPORT_SETTINGS); +} + +bool AutomatedUITest::EditSearchEngines() { + return RunCommand(IDC_EDIT_SEARCH_ENGINES); } bool AutomatedUITest::ViewPasswords() { - return ApplyAccelerator(IDC_VIEW_PASSWORDS); + return RunCommand(IDC_VIEW_PASSWORDS); } bool AutomatedUITest::ClearBrowserData() { - return ApplyAccelerator(IDC_CLEAR_BROWSING_DATA); + return RunCommand(IDC_CLEAR_BROWSING_DATA); } bool AutomatedUITest::TaskManager() { - return ApplyAccelerator(IDC_TASKMANAGER); + return RunCommand(IDC_TASKMANAGER); +} + +bool AutomatedUITest::Options() { + return RunCommand(IDC_OPTIONS); +} + +bool AutomatedUITest::JavaScriptConsole() { + return RunCommand(IDC_SHOW_JS_CONSOLE); +} + +bool AutomatedUITest::JavaScriptDebugger() { + return RunCommand(IDC_DEBUGGER); +} + +bool AutomatedUITest::About() { + return RunCommand(IDC_ABOUT); } bool AutomatedUITest::GoOffTheRecord() { - return ApplyAccelerator(IDC_GOOFFTHERECORD); + return RunCommand(IDC_GOOFFTHERECORD); } bool AutomatedUITest::PressEscapeKey() { @@ -570,6 +635,11 @@ bool AutomatedUITest::TestTaskManager() { return TestDialog(kTestDialogActionsToRun); } +bool AutomatedUITest::TestOptions() { + DoAction("Options"); + return TestDialog(kTestDialogActionsToRun); +} + bool AutomatedUITest::TestViewPasswords() { DoAction("ViewPasswords"); return TestDialog(kTestDialogActionsToRun); @@ -585,13 +655,20 @@ bool AutomatedUITest::TestImportSettings() { return TestDialog(kTestDialogActionsToRun); } +bool AutomatedUITest::ExerciseDialog() { + int index = rand_util::RandInt(0, arraysize(kDialogs) - 1); + return DoAction(kDialogs[index]) && TestDialog(kTestDialogActionsToRun); +} + bool AutomatedUITest::TestDialog(int num_actions) { bool return_value = true; for (int i = 0; i < num_actions; i++) { - int action_index = rand_util::RandInt(0, kNumTestDialogActions - 1); + int action_index = rand_util::RandInt(i == 0 ? 1 : 0, + arraysize(kTestDialogPossibleActions) + - 1); return_value = return_value && - DoAction(test_dialog_possible_actions_[action_index]); + DoAction(kTestDialogPossibleActions[action_index]); if (DidCrash(false)) break; } @@ -711,23 +788,21 @@ WindowProxy* AutomatedUITest::GetAndActivateWindowForBrowser( return window; } -bool AutomatedUITest::ApplyAccelerator(int id) { +bool AutomatedUITest::RunCommand(int browser_command) { scoped_ptr<BrowserProxy> browser(automation()->GetLastActiveBrowserWindow()); if (browser.get() == NULL) { AddErrorAttribute("browser_window_not_found"); return false; } - if (!browser->ApplyAccelerator(id)) { - AddWarningAttribute("failure_applying_accelerator"); + if (!browser->RunCommand(browser_command)) { + AddWarningAttribute("failure_running_browser_command"); return false; } return true; } bool AutomatedUITest::SimulateKeyPressInActiveWindow(wchar_t key, int flags) { - scoped_ptr<BrowserProxy> browser(automation()->GetLastActiveBrowserWindow()); - scoped_ptr<WindowProxy> window( - GetAndActivateWindowForBrowser(browser.get())); + scoped_ptr<WindowProxy> window(automation()->GetActiveWindow()); if (window.get() == NULL) { AddErrorAttribute("active_window_not_found"); return false; diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.h b/chrome/test/automated_ui_tests/automated_ui_tests.h index 96475ee..9917b83 100644 --- a/chrome/test/automated_ui_tests/automated_ui_tests.h +++ b/chrome/test/automated_ui_tests/automated_ui_tests.h @@ -121,12 +121,13 @@ // will be overwritten with the normal results. This flag is used to // help debug the tests if they are crashing before they get a chance // to write their results to file. +// +// --wait-after-action : waits the specified amount of time (1s by default) +// after each action. Useful for debugging. +// #include "chrome/test/ui/ui_test.h" -// Size of the array of possible actions to use when testing a dialog. -const int kNumTestDialogActions = 4; - class AutomatedUITest : public UITest { protected: AutomatedUITest(); @@ -219,6 +220,16 @@ class AutomatedUITest : public UITest { // XML element: <ImportSettings/> bool ImportSettings(); + // Opens the Search Engines dialog. While it isn't modal, it takes focus from + // the current browser window, so most of the test can't continue until it is + // dismissed. + // XML element: <EditSearchEngines/> + bool EditSearchEngines(); + + // Opens one of the dialogs (chosen randomly) and exercises it. + // XML element: <Dialog/> + bool ExerciseDialog(); + // Opens the View Passwords dialog, this dialog is modal so a majority of // the test can't be completed until it is dismissed. // XML element: <ViewPasswords/> @@ -230,11 +241,34 @@ class AutomatedUITest : public UITest { bool ClearBrowserData(); // Opens the Task Manager dialog. While it isn't modal, it takes focus from - // the current browser window, so most of the test can't continue until is + // the current browser window, so most of the test can't continue until it is // dismissed. // XML element: <TaskManager/> bool TaskManager(); + // Opens the Options dialog. While it isn't modal, it takes focus from + // the current browser window, so most of the test can't continue until it is + // dismissed. + // XML element: <Options/> + bool Options(); + + // Opens the About dialog. This dialog is modal so a majority of the test + // can't be completed until it is dismissed. + // XML element: <About/> + bool About(); + + // Opens the JavaScriptDebugger window. While it isn't modal, it takes focus + // from the current browser window, so most of the test can't continue until + // it is dismissed. + // XML element: <JavaScriptDebugger/> + bool JavaScriptDebugger(); + + // Opens the JavaScriptConsole window. While it isn't modal, it takes focus + // from the current browser window, so most of the test can't continue until + // it is dismissed. + // XML element: <JavaScriptConsole/> + bool JavaScriptConsole(); + // Opens and focuses an OffTheRecord browser window. // XML element: <GoOffTheRecord/> bool GoOffTheRecord(); @@ -294,6 +328,10 @@ class AutomatedUITest : public UITest { // XML element: <TestTaskManager/> bool TestTaskManager(); + // Opens Options dialog and runs random actions on it. + // XML element: <TestOptions/> + bool TestOptions(); + // Opens View Passwords dialog and runs random actions on it. // XML element: <TestViewPasswords/> bool TestViewPasswords(); @@ -337,11 +375,12 @@ class AutomatedUITest : public UITest { // window to the top. WindowProxy* GetAndActivateWindowForBrowser(BrowserProxy* browser); - // Applies the accelerator with the given ID to the current active window. + // Runs the specified browser command in the current active browser. + // See browser_commands.cc for the list of commands. // Returns true if the call is successful. // Returns false if the active window is not a browser window or if the // message to apply the accelerator fails. - bool ApplyAccelerator(int id); + bool RunCommand(int browser_command); // Calls SimulateOSKeyPress on the active window. Simulates a key press at // the OS level. |key| is the key pressed and |flags| specifies which @@ -435,7 +474,8 @@ class AutomatedUITest : public UITest { // results. bool debug_logging_enabled_; - static std::string test_dialog_possible_actions_[kNumTestDialogActions]; + // A delay in second we wait for after each action. Useful for debugging. + int post_action_delay_; DISALLOW_EVIL_CONSTRUCTORS(AutomatedUITest); }; diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h index 64ee503..d9136bf 100644 --- a/chrome/test/automation/automation_messages_internal.h +++ b/chrome/test/automation/automation_messages_internal.h @@ -160,7 +160,7 @@ IPC_BEGIN_MESSAGES(Automation, 0) IPC_MESSAGE_ROUTED1(AutomationMsg_TabTitleRequest, int) IPC_MESSAGE_ROUTED2(AutomationMsg_TabTitleResponse, int, std::wstring) - // This message requests the the url of the tab with the given handle. + // This message requests the url of the tab with the given handle. // The response contains a success flag and the URL string. The URL will // be empty on failure, and it still may be empty on success. IPC_MESSAGE_ROUTED1(AutomationMsg_TabURLRequest, @@ -720,4 +720,14 @@ IPC_BEGIN_MESSAGES(Automation, 0) bool /* the requested autocomplete edit exists */, std::vector<AutocompleteMatchData> /* matches */) + // This message requests the execution of a browser command in the browser + // for which the handle is specified. + // The response contains a boolean, whether the command execution was + // successful. + IPC_MESSAGE_ROUTED2(AutomationMsg_WindowExecuteCommandRequest, + int /* automation handle */, + int /* browser command */) + IPC_MESSAGE_ROUTED1(AutomationMsg_WindowExecuteCommandResponse, + bool /* success flag */) + IPC_END_MESSAGES(Automation) diff --git a/chrome/test/automation/browser_proxy.cc b/chrome/test/automation/browser_proxy.cc index 81b8900..68e41ba 100644 --- a/chrome/test/automation/browser_proxy.cc +++ b/chrome/test/automation/browser_proxy.cc @@ -346,3 +346,24 @@ bool BrowserProxy::GetHWND(HWND* handle) const { return succeeded; } + +bool BrowserProxy::RunCommand(int browser_command) const { + if (!is_valid()) + return false; + + IPC::Message* response = NULL; + bool succeeded = sender_->SendAndWaitForResponse( + new AutomationMsg_WindowExecuteCommandRequest(0, handle_, browser_command), + &response, AutomationMsg_WindowExecuteCommandResponse::ID); + + scoped_ptr<IPC::Message> response_deleter(response); // Delete on return. + if (!succeeded) + return false; + + bool success = false; + if (AutomationMsg_WindowExecuteCommandResponse::Read(response, &success)) + return success; + + // We failed to deserialize the returned value. + return false; +} diff --git a/chrome/test/automation/browser_proxy.h b/chrome/test/automation/browser_proxy.h index 469b377..17d7385 100644 --- a/chrome/test/automation/browser_proxy.h +++ b/chrome/test/automation/browser_proxy.h @@ -157,6 +157,11 @@ class BrowserProxy : public AutomationResourceProxy { // reference build. bool GetHWND(HWND* handle) const; + // Run the specified command in the browser (see browser_commands.cc for the + // list of supported commands). Returns true if the command was successfully + // executed, false otherwise. + bool RunCommand(int browser_command) const; + private: DISALLOW_EVIL_CONSTRUCTORS(BrowserProxy); }; diff --git a/chrome/tools/automated_ui_test_tools/README.txt b/chrome/tools/automated_ui_test_tools/README.txt index 22ff797..e41d79c 100644 --- a/chrome/tools/automated_ui_test_tools/README.txt +++ b/chrome/tools/automated_ui_test_tools/README.txt @@ -1,18 +1,18 @@ -auto_ui_test_input_generator.py takes in a list of possible actions separated by new lines, -the number of commands per file, and the number of actions per command, and generate either -a single random file or a number of files containing all possible commands. This file is then +auto_ui_test_input_generator.py takes in a list of possible actions separated by new lines, +the number of commands per file, and the number of actions per command, and generate either +a single random file or a number of files containing all possible commands. This file is then used as input to automated_ui_tests.exe (see chrome/test/automated_ui_tests/automated_ui_tests.cc/h) -which will run the commands, reporting on the success or failure of each. +which will run the commands, reporting on the success or failure of each. -An example of typical use: +An example of typical use: -$ python auto_ui_test_input_generator.py --action-list-file="possible_actions.txt" --output="automated_ui_tests.txt" --commands-per-file 100 --actions-per-commands 5 +$ python auto_ui_test_input_generator.py --action-list-file="possible_actions.txt" --output="automated_ui_tests.txt" --commands-per-file 100 --actions-per-command 5 $ automated_ui_tests.exe --input="automated_ui_tests.txt" --output="automated_ui_test_report.txt" -This will generate a random sequence of 100 commands containing 5 actions each and write it, formatted in XML, -to automated_ui_tests.txt. Then automated_ui_tests.exe reads that file, runs the commands, and outputs an XML -file to automated_ui_test_report.txt. +This will generate a random sequence of 100 commands containing 5 actions each and write it, formatted in XML, +to automated_ui_tests.txt. Then automated_ui_tests.exe reads that file, runs the commands, and outputs an XML +file to automated_ui_test_report.txt. -In the future we can write a script to parse automated_ui_test_report for failures and warnings.
\ No newline at end of file +In the future we can write a script to parse automated_ui_test_report for failures and warnings. diff --git a/chrome/tools/automated_ui_test_tools/possible_actions.txt b/chrome/tools/automated_ui_test_tools/possible_actions.txt index 4e0345b..a7cf2ab 100644 --- a/chrome/tools/automated_ui_test_tools/possible_actions.txt +++ b/chrome/tools/automated_ui_test_tools/possible_actions.txt @@ -10,8 +10,6 @@ SelectNextTab SelectPrevTab ZoomPlus ZoomMinus -Sessions -Bookmarks History Downloads -Applications
\ No newline at end of file +Dialog |