Ticket #1328 (closed defect: fixed)

Opened 12 months ago

Last modified 10 months ago

Browser start and kill are really fragile

Reported by: Joonas Lehtinen Owned by: Marko Gronroos
Priority: blocker Milestone: Testing Tools 1.0
Component: Testing Tools Version:
Keywords: Cc:
Known Issue description:
Hours estimate: Deadline (dd.mm.yyyy):
Known Issue version (since): Known Issue title:
Hours done: Depends to:
Affects documentation: no
Known Issue workaround:
Affects release notes: yes Contract:

Description

Something should be done - current scripting solutions is fragile.

Change History

Changed 12 months ago by Jani Laakso

I got this working in a robust way using identical technigue couople months ago:

  • Java Process class was used
  • different to current implementation: I was using pstools's psexec to launch firefox
    • license for pstools is such that we cannot use it anymore, hence it was removed
  • taskkill was used
  • I could do regression testing in my vmware hosts for 12 hours straight without any issues

Experiment with following:

  • launch firefox using CMD /C (trust me, it can be different than executing firefox without "shell")
  • taskkill with /T (=kill child processes too, firefox has these)
  • NOTE: java.Process is not same as COMMAND or CMD.EXE, it has it's own quirks..

Perhaps even firefox new version uses different threading and using taskkill is not viable option anymore.

Changed 11 months ago by Joonas Lehtinen

  • milestone set to Testing Tools 1.0

Changed 11 months ago by Jani Laakso

  • owner changed from Jani Laakso to Marc Englund

If time, check embedded mozilla, and ticket #1356

Changed 11 months ago by Jani Laakso

  • status changed from new to closed
  • resolution set to fixed

Document this:

Create user.js to your default profile for every testing host: Profiles are located under directory

C:\Documents and Settings\user\Application Data\Mozilla\Firefox\Profiles\*

Create user.js to your profile directory, contents:

user_pref("dom.allow_scripts_to_close_windows", true);

user_pref("browser.tabs.warnOnClose", false);
user_pref("browser.tabs.warnOnCloseOther", false);
user_pref("browser.shell.checkDefaultBrowser", false);
user_pref("startup.homepage_welcome_url", "");
user_pref("startup.homepage_override_url", "");
user_pref("browser.startup.homepage", 0);
user_pref("browser.xul.error_pages.enabled", false);
user_pref("security.checkloaduri", false);
user_pref("security.warn_entering_secure.show_once", false);
user_pref("security.warn_entering_secure", false);
user_pref("security.warn_entering_weak", false);
user_pref("security.warn_entering_weak.show_once", false);
user_pref("security.warn_leaving_secure", false);
user_pref("security.warn_leaving_secure.show_once", false);
user_pref("security.warn_submit_insecure", false);
user_pref("security.warn_submit_insecure.show_once", false);
user_pref("security.warn_viewing_mixed", false);
user_pref("security.warn_viewing_mixed.show_once", false);
user_pref("update_notifications.enabled", false);


user_pref("browser.shell.checkDefaultBrowser", false);
//
// never restore previous sessions
//
user_pref("browser.startup.page", 0);
user_pref("browser.sessionstore.resume_from_crash", false);

Changed 11 months ago by Jani Laakso

Note, I tested this by running 3000 testscripts under three VMWare testing hosts.. It wors robustly

Changed 11 months ago by Jani Laakso

  • status changed from closed to reopened
  • resolution deleted

Changed 11 months ago by Jani Laakso

  • owner changed from Marc Englund to Marko Gronroos
  • status changed from reopened to new

Marko document this.

Changed 11 months ago by Jani Laakso

  • priority changed from undefined to blocker

Changed 10 months ago by Jani Laakso

  • status changed from new to closed
  • resolution set to fixed

Fixed in TT documentation.

Note: See TracTickets for help on using tickets.