Posts

Showing posts with the label speeding

Speeding up UI Browser tests with Robot Framework

Speeding up UI Browser tests with Robot Framework My current AWS demo project is a Cat Voting Booth.  It uses SocketIO/WebSockets, so in addition to server-side unit tests Ive built a number of browser-level tests, using Robot Framework. One feature people dont realize is that Robot can actually be quite speedy. Opening and closing a browser window is very slow, on the order of 1-2 seconds. Depending on the application, this can be done once, saving 1-2 seconds for *every* test!  For my Very Important Cat Voting Booth, this is the case. Heres the magic bit: *** Settings *** Resource          resource.robot Test Setup        Reset Votes Suite Setup       Open Browser To Voting Page Suite Teardown    Close All Browsers *** Test Cases *** Valid Page     Votes Not Available Register Up Vote     Vote Up     Element Text Should Be    vote-count-up    1   ...

Speeding the Startup of Some CD Burner Programs

Image
Speeding the Startup of Some CD Burner Programs If you use program other than the native WindowsXP CD Burner software, you might be able to increase the speed that it loads. Go to Control Panel / Administrative Tools / Services Double-click on IMAPI CD-Burning COM Service For the Startup Type, select Disabled Click on the OK button and then close the Services window If you dont You should notice download file now

speeding up tests with Postgres

speeding up tests with Postgres Dear Lazyweb, Im developing a site using Django and Postgres. How can I get my tests to run a lot faster? Answer: tell Postgres to use a tablespace in RAM. Selects, updates, and inserts will run at fast RAM speed vs slow disk speed. Caveat: this doesnt work for writes. Postgres is designed to keep data reliable at all times. Any INSERT/UPDATE/DELETE gets written to a "write-ahead log" (WAL), so that if the database crashed itll restore the data.  Since this is on a disk no matter what the tablespace, the above trick doesnt work without defeating the WAL. Answer2: use UNLOGGED tables, TBD. Reference: Unlogged table performance in postgresql 9.1: (2011) " unlogged tables have shown an increase of output by 13~17%"; includes performance-oriented Postgres settings. WAITING FOR 9.1 � UNLOGGED TABLES (2011): "thats really fast" wal_buffers performance by Robert Haas (2012): pretty graphs download file now

Speeding up Django tests Disable migrations during tests

Speeding up Django tests Disable migrations during tests Running all migrations before the testrun can take a lot of time. For some reason, they are very slow. Running 50 migrations could easily take more than 1 minute! Fourtunately, disabling migrations is very easy. Just add the following code to the tests settings file: # Disable migrations when running tests MIGRATION_MODULES = { app [ app . rfind ( '.' ) + 1 :]: 'your_app.migrations_not_used_in_tests' for app in INSTALLED_APPS } Some of our migrations add data to the database and tests expect this data to be there. To fix that problem we will need to overwrite test runner. Add to the settings file: TEST_RUNNER = 'your_app.test_runner.CustomDiscoverRunner' Then create test_runner.py in the project root with the following content: from django.test.runner import DiscoverRunner from myapp.management.commands._setup_functions import create_groups class CustomDiscoverRunner ( DiscoverRunner )...