Premus

What is Premus?

The name Premus comes from PRoxying EMUlator Service. It is a mobile browser emulator that converts WML, XHTML MP, cHTML and Vodafone's PML (see PmlSupport) into standard HTML that you can browse in your normal web browser. It lets you specify the user-agent strings and headers you want to use, and will make a best effort approach at rendering the page that is returned from the URL you point it at. It can also validate the response against a DTD and report on any errors it finds. More than anything else, Premus is a tool for developers who want to test how their site behaves when connected to with different devices.

What is Premus not?

Premus is not emulating device specific appearance, behaviour or bugs, and it is not wrapping the output in any phone skins. What it does do is send the device specific user-agent string when it connects, but it does not represent the response in any different way depending on which device you select.

Why was Premus written?

When I started writing Premus, some time around 2003, I was increasingly frustrated with the emulators available to mobile developers. Developing for WML, XHTML, cHTML and PML, I had eight different emulators installed on my computer for different aspects of my testing. One allowed adding custom headers but wasn't strict enough in validating the content, another was strict but suffered in usability or didn't cover the markup I was currently working on. I had an itch to scratch and I started scratching it.

How can I use Premus?

You can use the latest version of Premus directly on http://code.dlade.net/premus/emu/, where I have installed it for public use. If, on the other hand, you require testing within a firewall or you want bookmarking enabled, you can grab your own copy from the subversion repository on http://code.dlade.net/svn/ and install on your own server.

Why has bookmarking been disabled?

The public version has unfortunately had bookmark saving disabled, because some people decided to spam it with things that shouldn't be there. The URL format used by the emulator is however made so that you should be able to bookmark your pages in your normal browser bookmarks, as long as the site you're testing doesn't rely on cookies or sessions, which will obviously time out. If you install your own copy of the emulator from the subversion repository, bookmarking will be enabled there by default.

How do I install Premus on my own?

First, you need Apache with mod_python and python 2.4 or above. If you're building your own, make sure you build apache with -pthread, or it won't work. Second, grab the latest stable version of Premus from svn. Currently, that is http://code.dlade.net/svn/premus/tags/1.1.1/. Place both the emu and emu-helpers directories somewhere in your webroot and add the following to your apache config:

<Directory /path/to/emu/>
  AddHandler python-program .py
  PythonHandler index
  PythonDebug On
  DirectoryIndex index.py
</Directory>

Then install the python libraries listed below:

Finally, change the configuration files, /emu/configuration.py and /emu-helpers/configuration.py (See PremusConfiguration for more information about these)

Now, restart apache and you should be able to point your browser at /emu/ and see the emulator working.

Where do I go if I need more information?

Unfortunately, this is it for now. If you need help getting installed or you just want to know more about the emulator, send an email to code [at] dlade.net with your questions.

CategoryPremus

Welcome (last edited 2007-04-26 11:12:29 by DavidJohansson)