from config import Config sys.path.extend(Config.ADDITIONAL_PYTHON_LIBRARY_PATHS) def server_root_dir(): return os.path.join(os.path.dirname(__file__), '../') web_servers = [] web_servers.append(TestWebserver(server_root_dir(), port=8001)) web_servers.append(TestWebserver(server_root_dir(), port=8002)) web_servers.append(TestWebserver(server_root_dir(), port=8003)) installers = [] if osutils.osIsWin(): launchers = [] launchers.append(launcher.IExploreWin32Launcher(automated=False)) launchers.append( launcher.FirefoxWin32Launcher('ffprofile-win', automated=False)) elif osutils.osIsNix(): if osutils.osIsMac(): launchers = [launcher.FirefoxMacLauncher('gears', automated=False)] else: #is linux launchers = [ launcher.FirefoxLinuxLauncher('gears', automated=False) ] testrunner = TestRunner(launchers, web_servers) testrunner.runTests(automated=False)
def main(): # Clean up output directory before doing anything else clean() test_url = 'http://localhost:8001/tester/gui.html' reporter = SuitesReport('TESTS-TestSuites.xml.tmpl') test_servers = [] installers = [] launchers = [] if ('bin-dbg' in sys.argv[1]): build_type = 'dbg' elif ('bin-opt' in sys.argv[1]): build_type = 'opt' else: build_type = '' # WinCE is a special case, because it is compiled # and run on different platforms. if len(sys.argv) > 2 and sys.argv[2] == 'wince': local_ip = WindowsNetworkHelper.GetLocalIp() launchers.append(browser_launchers.IExploreWinCeLauncher(local_ip)) installers.append(installer.WinCeInstaller(local_ip)) test_url = 'http://%s:8001/tester/gui.html' % local_ip elif sys.argv[1] == 'chromium': reporter = ChromiumReport() if len(sys.argv) > 2: installers.append( installer.ChromiumWin32Installer(mode=sys.argv[2])) launchers.append( browser_launchers.ChromiumWin32Launcher(mode=sys.argv[2])) else: installers.append(installer.ChromiumWin32Installer()) launchers.append(browser_launchers.ChromiumWin32Launcher()) elif osutils.osIsWin(): launchers.append(browser_launchers.IExploreWin32Launcher()) launchers.append( browser_launchers.Firefox3Win32Launcher('ff3profile-win')) launchers.append( browser_launchers.Firefox35Win32Launcher('ff31profile-win')) launchers.append(browser_launchers.ChromeWin32Launcher()) installers.append(installer.ChromeWin32Installer()) if osutils.osIsVista(): installers.append(installer.WinVistaInstaller()) else: installers.append(installer.WinXpInstaller()) elif osutils.osIsNix(): if osutils.osIsMac(): launchers.append( browser_launchers.Firefox3MacLauncher('gears-ff3')) launchers.append( browser_launchers.Firefox35MacLauncher('gears-ff35')) installers.append(installer.Firefox3MacInstaller('gears-ff3')) installers.append(installer.Firefox35MacInstaller('gears-ff35')) launchers.append(browser_launchers.SafariMacLauncher()) installers.append(installer.SafariMacInstaller(build_type)) else: launchers.append( browser_launchers.Firefox3LinuxLauncher('gears-ff3')) installers.append(installer.Firefox3LinuxInstaller('gears-ff3')) # Adding second and third webservers for cross domain tests. test_servers.append(TestWebserver(serverRootDir(), port=8001)) test_servers.append(TestWebserver(serverRootDir(), port=8002)) test_servers.append(TestWebserver(serverRootDir(), port=8003)) gears_binaries = sys.argv[1] testrunner = TestRunner(launchers, test_servers, test_url) bootstrap = Bootstrap(gears_binaries, installers, testrunner, reporter) bootstrap.invoke()
import osutils from config import Config sys.path.extend(Config.ADDITIONAL_PYTHON_LIBRARY_PATHS) def server_root_dir(): return os.path.join(os.path.dirname(__file__), '../') web_servers = [] web_servers.append(TestWebserver(server_root_dir(), port=8001)) web_servers.append(TestWebserver(server_root_dir(), port=8002)) web_servers.append(TestWebserver(server_root_dir(), port=8003)) installers = [] if osutils.osIsWin(): launchers = [] launchers.append(launcher.IExploreWin32Launcher(automated=False)) launchers.append(launcher.FirefoxWin32Launcher('ffprofile-win', automated=False)) elif osutils.osIsNix(): if osutils.osIsMac(): launchers = [launcher.FirefoxMacLauncher('gears', automated=False)] else: #is linux launchers = [launcher.FirefoxLinuxLauncher('gears', automated=False)] testrunner = TestRunner(launchers, web_servers) testrunner.runTests(automated=False)
def main(): # Clean up output directory before doing anything else clean() test_url = 'http://localhost:8001/tester/gui.html' reporter = SuitesReport('TESTS-TestSuites.xml.tmpl') test_servers = [] installers = [] launchers = [] if ('bin-dbg' in sys.argv[1]): build_type = 'dbg' elif ('bin-opt' in sys.argv[1]): build_type = 'opt' else: build_type = '' # WinCE is a special case, because it is compiled # and run on different platforms. if len(sys.argv) > 2 and sys.argv[2] == 'wince': local_ip = WindowsNetworkHelper.GetLocalIp() launchers.append(browser_launchers.IExploreWinCeLauncher(local_ip)) installers.append(installer.WinCeInstaller(local_ip)) test_url = 'http://%s:8001/tester/gui.html' % local_ip elif sys.argv[1] == 'chromium': reporter = ChromiumReport() if len(sys.argv) > 2: installers.append(installer.ChromiumWin32Installer(mode=sys.argv[2])) launchers.append( browser_launchers.ChromiumWin32Launcher(mode=sys.argv[2])) else: installers.append(installer.ChromiumWin32Installer()) launchers.append(browser_launchers.ChromiumWin32Launcher()) elif osutils.osIsWin(): launchers.append(browser_launchers.IExploreWin32Launcher()) launchers.append(browser_launchers.Firefox3Win32Launcher('ff3profile-win')) launchers.append(browser_launchers.Firefox35Win32Launcher( 'ff31profile-win')) launchers.append(browser_launchers.ChromeWin32Launcher()) installers.append(installer.ChromeWin32Installer()) if osutils.osIsVista(): installers.append(installer.WinVistaInstaller()) else: installers.append(installer.WinXpInstaller()) elif osutils.osIsNix(): if osutils.osIsMac(): launchers.append(browser_launchers.Firefox3MacLauncher('gears-ff3')) launchers.append(browser_launchers.Firefox35MacLauncher('gears-ff35')) installers.append(installer.Firefox3MacInstaller('gears-ff3')) installers.append(installer.Firefox35MacInstaller('gears-ff35')) launchers.append(browser_launchers.SafariMacLauncher()) installers.append(installer.SafariMacInstaller(build_type)) else: launchers.append(browser_launchers.Firefox3LinuxLauncher('gears-ff3')) installers.append(installer.Firefox3LinuxInstaller('gears-ff3')) # Adding second and third webservers for cross domain tests. test_servers.append(TestWebserver(serverRootDir(), port=8001)) test_servers.append(TestWebserver(serverRootDir(), port=8002)) test_servers.append(TestWebserver(serverRootDir(), port=8003)) gears_binaries = sys.argv[1] testrunner = TestRunner(launchers, test_servers, test_url) bootstrap = Bootstrap(gears_binaries, installers, testrunner, reporter) bootstrap.invoke()