Home > Uncategorized > “A Jolly Ride” with FlexUnit in Flash Builder4

“A Jolly Ride” with FlexUnit in Flash Builder4

Flash Builder 4 now introduces a whole bunch of glamorous features(glam-gals) namely Data Centric Rapid Application Development, FlexUnit Integration in Flash Builder, Network Monitor etc. Hence offering immense richness in the RIA development tool.

Here is a preview of the builder with its latest “Super Models“.

Check the Beauty

Check the Beauty

A quick brief on each of these Models:

a) Data Centric Rapid Application Development : is an initiative to enrich various back-ends to connect seemlessly with Flex client 🙂 The supported back-ends include all hot stars namely PHP,ColdFusion,Java and .NET.

b) Network Monitor : is a sniffer built within Flash Builder to sniff service calls made from Flex client(mind you its flex specific call sniffer). Various protocols supported are REST,SOAP,HTTPS and AMF.

c) FlexUnit Integration : FB now offers exclusive support for Test Driven Development by providing exclusive tooling support for FlexUnit – an open source, in-house unit testing framework.

In this post i shall talk  more on my hot-sweet celebrity “FlexUnit Integration in FB“.

“FlexUnit Integration in Flash Builder” allows the developer to write unit tests for his code seemlessly. He/She is facilitated with a bunch of helpful wizards which let one easily create a Test Case or a Test Suite class, a sophisticated Result View and extensive  support to test Flex, Action Script, Flex Library and AIR projects.

Here are the step-by-step instructions :

1) Launch Flash Builder, create a Flex project

2) Test Case : File->New->Test Case class where you select a ‘Class to test’ and ‘Methods to test’.

Class wizard

Class wizard

3) Test Suite creation: File->New->Test Suite where you include all the test cases as part of your suite.

Second Step

Second Step

3) Execution: Context click(right click) on the project and select “Execute FlexUnit Tests”. Option to RUN are also available under Run/Debug/Profile menu.

Execute tests from Debug menu

Execute tests from Debug menu

Note: The current test configuration can also be saved as an mxml file and loaded back on need-serve basis(Refer to Load and Save button in the wizard).

4) View the RESULTS in the FlexUnit Result view.

Sophisticated Result view

Sophisticated Result view

5) Analyse the result by leveraging the result view options like Source code navigation on double-click, Save/Load the results view, re-running options of selected tests, stopping the tests etc.

All TDD enthusiasts “WATCH OUT” 🙂

Just check out the BETA version of FB when you guys find time , play around with our features and write your experience to me @ balajisridhar07@gmail.com also feel free to log your  issues @ https://bugs.adobe.com/flex/.

Hope you all had a Jolly ride and start loving our “glam-gals” 🙂

Categories: Uncategorized

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: