Keyword Framework for Windmill

41 views
Skip to first unread message

j1z0

unread,
Feb 9, 2011, 3:55:10 AM2/9/11
to Windmill Developers
Hi All,

Couple of questions. I'm preparing a paper to be submitted for PyCon
Asia 2011. I had planned on developing a keyword framework for
Windmill, something similar to RASTA for Watir. But I though it would
be prudent to check and see if some such beast already exists. Does
anybody know if such a thing exists? Is there a list of Windmilll
extensions available anywhere? Also would anybody be interested in
using a keyword framework on top of Windmill to simplify script
creation and maintenance?

Thanks,

j1z0

Adam Christian

unread,
Feb 9, 2011, 4:09:58 AM2/9/11
to windmi...@googlegroups.com
Greetings j1z0,

Most of the extensions for Windmill are kept in house and pretty specific to various company needs, but this sounds like a really cool project -- I look forward to seeing it happen.

Please let me know if there is anything I can do to help your development!

Once you have completed it, I would be happy to put it up on getwindmill.com and get a getwindmill blog post online.

Adam

> --
> You received this message because you are subscribed to the Google Groups "Windmill Developers" group.
> To post to this group, send email to windmi...@googlegroups.com.
> To unsubscribe from this group, send email to windmill-dev...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/windmill-dev?hl=en.
>

Jeremy Johnson

unread,
Feb 9, 2011, 4:22:54 AM2/9/11
to windmi...@googlegroups.com
Adam,

Thanks for the encouragement. Are you a developer of Windmill? If so I'm sure I"ll have some questions once I get into the meet of the project, just kind of scoping out requirements right now. Trying to decide the minimum functionality I can release for a 0.1 release that would actually be usable. So if you have any suggestions on that front, then I would be happy to hear them. :)

Cheers,
Jeremy

Adam Christian

unread,
Feb 9, 2011, 4:33:18 AM2/9/11
to windmi...@googlegroups.com
I co-created Windmill a couple years ago, and have been continuing to help it move forward.

I'm a big fan of keyword based frameworks, and excited to see what you come up with.

Adam

Jeremy Johnson

unread,
May 18, 2011, 3:24:53 PM5/18/11
to Jeremy Johnson, windmi...@googlegroups.com
Well I finally sat down to work on this. After some investigation I figure I will write a Windmill Library for the Robot Framework project, which is a generic Keyword framework. Anyways I'm stuck at like step 1. :) So hopping somebody can help me out.

Basically Robot Framework reads a keyword file, and my windmill Library will implement python functions for those keywords that call / execute tests in windmill.

So obviously the first keyword is start_server which should start the windmill server.

I figured I would just call something simple like:

admin_lib.start_windmill()

however when I do this I get a traceback about trying to write a closed file. It appears to have something to do with calling flush from logging, but I have no idea how to fix that. Robot Framework allows a library to implement logging by simply writing to Stdout (aka. Print). So I'm assuming that Robot Framework is closing the stdout or something before Windmill tries to log to it. Any idea how to prevent this from happening on the windmill side?

The way I was going to work around it, was to use Popen and just run the windmill server in a different process. This seems to work. So I tried executing a command and I'm not sure if my understanding of how Windmill works is correct. I'm trying to do something like:

portArg = "port=" + str(PORT)
cmd = ["/usr/local/bin/windmill",portArg, "run_service", "firefox"]
subprocess.Popen(cmd)
print 'Windmill Server started with command "%s" ' % ' '.join(cmd)

from time import sleep
sleep(10)
#setup client
windmill.settings = windmill.conf.configure_settings(localSettings=None)
if 'controllers' not in windmill.settings:
windmill.settings['controllers'] = []

windmill.settings['SERVER_HTTP_PORT'] = PORT


method_proxy = windmill.tools.make_jsonrpc_client()
command = {'method':'open', 'params':'url=http://localhost:8080/redmine'}
result = method_proxy.execute_command(command)
print result


Which successfully fires up the server but when I try to execute a command I get an error keywords must be strings.


So my question is two fold. Should I be trying to do option 1, i.e. run the windmill server as a thread, or am I better of trying to run it as a separate process?

And if I'm running as a seperate process, does my client side setup code seem correct for the simplest case? And what is the structure I need to use for the command dictionary form method_proxy.execute_command?

Any assistance would be greatly appreciated as I've gotten myself pretty confused.

Jeremy

Reply all
Reply to author
Forward
0 new messages