Tuesday, August 19, 2008

Taking FunFX to the next level

Hi everybody

FunFX have been needing a facelift for a while now. It works, but there are aspects of FunFX that bearly works.

Aslak Helles√ły, a colleague from BEKK and creator of many fantastic Ruby applications, has taken the initiative to help me improve FunFX.

The bad thing about this facelift will be that there will be some changes in the way test scripts are written, so some rewriting will be necessary.

The first thing we have done is to base FunFX on Watir. This will make it simpler to get going with FunFX and alot of functionality is allready in place.

In the current version, all ruby classes of the Flex objects are created at runtime and in memory. This has made it difficult to begin using FunFX due to bad documentation. In the next version, these classes will be created on file, so that there will be a nice rdoc explaining these classes making it easier to use.

We have also changed to git instead of subversion, so it will be possible to create own versions, that we can merge.

I will write more about the upcomming FunFX during development. For now it is possible to find the new FunFX source at github.com. But notice that it is still early in development.

Hope you will use the new version!


sj33ehv said...
This comment has been removed by the author.
sj33ehv said...

Hi Peter,

What you did so far is just amazing, keep up the good work! Especially the integration with Watir is awesome, because we use Watir for all our 300+ functional tests daily.


Mariovsky said...

Hi Peter,
Congratulations for your great job.
I'm working now on how to include the FunFX library in my company's framework.
How can I get all the objects inside a flex object?
Something like:
@ie.objects.each {|myObject|
puts myObject.name
puts myObject.className
In this case in myObject I'll have the object but also could be good for me to have only the name and then access to the object:

thanks a lot.

Ilkka said...


would you have any idea why i cannot try the new version available at github? I manage to install watir, update rubygems, add new source but still command "gem install peternic-funfx" does not work for me. Rubygems claims that it cannot find the gem anywhere. Further, the gem is not listed on this page: http://gems.github.com/. Should it be?

Peter Motzfeldt said...

Hi Ilkka

Sorry about the late response, been lazy and just been working, riding wakeboard and been moose hunting the last 2 weeks, (no FunFX)

The github page for FunFX is updated now. It is not possible yet to install it as a gem from github. You must clone the project and build it with rake.

Later today I will write on the github page how to compile flex projects with the swc file.

jnguy said...

Hi Peter,

Thanks for releasing this into the OSS community. I think there might be a typo in flex.rb L101. Instead of checkComponents, I changed it to checkComponent and that solved one of the early issues. However, I was wondering if it is possible to traverse the tree of children. Thanks.


Peter Motzfeldt said...

Hi Jack. There is a method to get the children for one component, but no way to traverse all the children. Maybe we can get that into the new version.

Prashant said...

Hi Peter,

Congratulations for your great job. After reading your comment about traverse all the children, just thought of fxspy (http://code.google.com/p/fxspy/). This tool creates tree of the DisplayObject (its children, the children of its children, etc.). It might help in adding in FunFx. I am looking forward to use new release based on top of Watir.


Stinky Trash said...
This comment has been removed by the author.
Stinky Trash said...
This comment has been removed by the author.
Stinky Trash said...

Hi Peter,

Thanks for your effort for creating such wonderful library.

I have noticed if I have a button inside a ControlBar funfx can not it but when it's defined inside a panel funfx can find it. Please Let me know how can I search for a button defined inside ControlBar.


Peter Motzfeldt said...

Hi Ari

The controlbar is a troubled child when it comes to FunFX, I am not sure why it does not work. I have forgotten to test the control bar with the new version we are finalizing these days. I'll post an update on how the new version handles controlbars.

High Bits Performance Tester said...

Hello Peter,
At my current company we have a geneology application that uses the Flex technology to build a family tree. I'm easily able to build performance tests using Silk Performer but for the functional automation side of things it's not so easy. We've purchased Test Complete but it doesn't work with the flex objects and we can't afford the QTP solution.

I'm familiar with the Watir solution from some of the seminars I was trained with Bret Pettichord. My question is how developed is FunFX? Would you need to be at a developer level to code the tests. www.genetree.com is the site address. If you created a free account and traversed into creating your own family tree you'll see the kind of flex that's being used. Any suggestions would be helpful

Nebehr Gudahtt said...

I'm trying to build the latest funfx version to hack into tabular_data for data_grids... but I'm stuck at the "rake gem" stage with the following error:

Don't know how to build task 'ext/FunFX.swc'

I'm building it on Windows. Found no better place to post this problem. :-|

Peter Motzfeldt said...


If you go to the root (funfx) and then type 'rake flex'. it will build the funfx.swc file. I think that will solve the problem.

Let me know how it goes.

Nebehr Gudahtt said...

Thanks, that solved the problem indeed. It's only required to correct the path to Flex Builder in the build.bat (I guess this is pretty obvious for everyone, but not for me - maybe it's a good idea to put it somewhere in the pre-installation instructions?)

I assume, this new FunFX.swc should replace some of the swc files that were used to compile Flex applications for FunFx 0.0.4? Which one then, FunFXAdapter.swc? Should the other swcs (automation*.swc) and build instructions change too?

Peter Motzfeldt said...

You are absolutely right, it is not very obvious.

Shall try to update the howto this week. The funfx.swc will replace the FunFXAdapter.swc yes, and you must still have the other automation files included, also automation_dmv if you use the advanced datagrid.

I am stil trying to get a relase version ready, so if you see anythig that should be fixed, please let me know.

- Peter

Nebehr Gudahtt said...

Well, there was one more problem. Install newgem failed because I did not have nmake, cl and other MS tools needed for, I think, RedCloth. I ended up downloading newgem, redcloth and other gems and installing them manually (instead of building). Might also be worth mentioning in the instructions.

LanOK said...

Is it possible to use FunFX in a frame?
I can access flex object with Watir, but I don't know how to make FunFX drive my test in this frame.
Method "setFlexObject" is IE class method. May be it's possible to write "setFlexObject" as Watir method, now I'm trying to do this.
Does anybody have any ideas, or any another way to solve this problem?

Daniel Ferreira Monteiro Alves said...

Hey Peter,

I just liked what you have done, just great!!

But, how is the project status? Apparently, there is some time after the last release or publication info about the project...


Peter Motzfeldt said...


The project is soon to be released. For now you must pull it from github.com (http://github.com/peternic/funfx/tree/master)

I have not had the time to update this blog unfortunatly, but I will write some during this week.

But do check out the new version, it is much better than the previous version.

- Peter