Hello Mozmill

11 02 2010

Hello Mozmill, have been working on Mozmill throughout the weekend. I find the framework very straight forward and easy to understand. I would like to share with you the basic of the framework from my understanding. They’re four special functions can we can define, they are “setupModule”, “teardownModule”, “setupTest” and “teardownTest” which are used to define common steps before a module or a test is run and also how to remove anything that might impact another test or module. After the basic are done, we now need to get the correct test case into the javascript. =)

I’ve attached along the screen shot of my first Work-In-Progress Mozmill test in the following image.

Hello MozmillIf you notice from the Screen shot, there’s this module tes1tSetup2Tabs, well it’s not a error or mistakes. For Mozmill will only run test with module names startling with “test”. So when I change it to tes1t, it will not run this module.Will be updated once I get the hold of it.

I’ve programmed the other module, testSomething

var testSomething  = function() {

if (controller.window.document.title != ‘Google – Mozilla Firefox’) {
throw ‘Title does not match “Google” !=  ‘ + controller.window.document.title;
var e = new elementslib.Name(controller.tabs.activeTab, “q”);
controller.type(e, “Black”);
controller.click(new elementslib.Name(controller.tabs.activeTab, “btnG”));
if (controller.window.document.title != ‘Black – Google Search – Mozilla Firefox’) {
throw ‘Title does not match “Google” !=  ‘ + controller.window.document.title;

In this code, what am I testing? Basically it’s to ask the Controller to open http://www.google.com.sg and check if the title is correct, else I will report it as a Failure. Next I will search “Black” and check if the title is correct.

Lastly, I would like to bring you to this link https://developer.mozilla.org/en/Mozmill_Tests/Mozmill_Controller_Object . I find it very useful as it link the user movement into Javascript code. Like click, double click, keypressed and many more.

That’s it for now.

Charlie Sierra 3108




One response

14 02 2010
NUS Student Projects – finalized for AY 09/10 Semester 2 « OSS Education – To Mozilla and beyond!

[…] Simon Teo (Simon or Nomis) is working on converting Litmus tests to Mozmill ones. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: