Setting Up Functional Tests In Flex?

Apr 23, 2010

I'm setting up a functional test suite for an application that loads an external configuration file. Right now, I'm using flexunit's addAsync function to load it and then again to test if the contents point to services that exist and can be accessed.

The trouble with this is that having this kind of two (or more) stage method means that I'm running all of my tests in the context of one test with dozens of asserts, which seems like a kind of degenerate way to use the framework, and makes bugs harder to find. Is there a way to have something like an asynchronous setup? Is there another testing framework that handles this better?

View 3 Replies


Similar Posts:


Flex :: Include Unit Tests In A Library?

Nov 24, 2009

I'm working on a general code library for ActionScript 3.0 called as3lib which includes several extensions to the core API and some useful functions. I've written several unit tests (using FlexUnit) to make sure everything is working correctly.

What is the best way to organize these tests in the library? Currently, I have all my code in src/ and my tests in test/ but I've set up a secondary Flex project to run the unit tests. I am also manually adding and removing the test files from the library when I want to run the tests.

Preferably one where the compiled library doesn't include the test files but I don't need two separate projects to test them.

View 4 Replies

Flex :: Writing Integration Tests For App Using SqLite?

Jun 28, 2010

I want to write integration tests for a Flex application using pureMVC architecture.The back-end is sqlite.

View 1 Replies

Flex :: Configure Eclipse To Run FlexUnit Tests Automatically?

Jun 8, 2009

I'd like to set up my projects in Eclipse to run FlexUnit tests everytime I save my work.

I found an example with JUnit here : [URL]

How would you do it? Is it possible to run FlexUnit tests without Flash Player?

View 3 Replies

Flex :: Flash Builder: Change Default Suite For Unit Tests?

Dec 7, 2010

What are the steps to change your default suite when running unit tests in Flash Builder 4 with PureMVC?

View 2 Replies

Flex :: Continuous Integration - Run Unit Tests From The Command Line On Linux?

Mar 12, 2011

I am setting up a FlexBuilder build under Hudson/Jenkins on a Linux system. I want to execute our unit tests, but do it without using the standard GUI-based test runner.

View 1 Replies

ActionScript 3.0 :: FullScreenTakeOver Functional?

Feb 9, 2012

I am having really trouble with fullscreentakeover... I have a VideoPlayBack Component and a menu with 8 videos that sets the source of that component, when i test it windowed, or when i start the published .exe and change to windowed mode at start, the videos works perfectly, even if i change to full screen after load the first movie... If i start it full screen, i get a beautiful black screen.... This is my code:

ActionScript Code:
function clic(event:MouseEvent):void
{

[code]......

View 0 Replies

MX Hit Tests Won't Always Work?

Dec 28, 2009

Macromedia Flash MX 2004 I posted this somewhere else - but then realized no one actually uses that forum except to post ads...

Quote:
onClipEvent(enterFrame){
if(this.hitTest(_root.blaze))
_root.floor.speed = -20;
else{

[Code]...

I won't post the file because I'm using someone else's character and it's fine with them, but I doubt it should be here - this is the only code that's a problem, though.

View 12 Replies

Playhead Not Functional In Motion Editor?

Sep 4, 2009

The playhead in Motion Editor doesn't work and I'm seeing in tutorials.I can't scrub it along the timeline.When I pick a keyframe point it doesn't appear there unless I change the value of that point. If I then click on the playhead rectangle, the playhead disappears (actually it appears to jump to the first frame where it's half visible and can't be moved).I was playing with the motion editor interface trying to better define the problem and I figured out what's wrong.

The Motion Editor values for graph size, expanded graph size, and viewable frames were unusable in their default settings. In particular, viewable frames were set to 1 by default. As I increased the value the playhead started to function. I can't set a value higher than 117. I've maxed-out the graph size setting at 180 (300" wide format display) and the expanded graph size at 200.

View 3 Replies

Add Functional Buttons To A Sliding Panel?

Nov 6, 2009

i want to make a sliding panel with 2 buttons on it. The panel pops up from the bottom of the screen when the mouse is hovering over the the bottom 25 pixels of the screen. The panel is set to disappear when the user hovers the mouse off of the panel. At first i just tried to put buttons on the panel and covert the whole thing to a symbol, but then i could not access the individual properties of the buttons. What i tried instead is to make invisible buttons over the area where the image of the buttons were on the panel. The problem is that when now when the user hovers over the button, flash reads it as the mouse leaving the panel and the panel disappears.

View 3 Replies

ActionScript 3.0 :: Webcam Non-functional On Some Servers?

Feb 13, 2010

We used the FLARmanager, developed a nice little app, runs find locally, runs fine on our dev Linux server.Put it on an IIS server. When we click on the 'allow webcam' prompt, the webcam control panel pops up (as usual), butthere is no camera image displayed. The camera light does not come on. The camera control panel goes awayCould it be server configuration? Settings? Security? Why would it be different on different servers, all things being equal?

View 0 Replies

Actionscript 3.0 :: Btn Non-functional Once Loaded Via Preloader

May 6, 2010

I have a button on a swf that works fine (click it and it launches a html page) on its own when rendered as a swf - the code forwards to a new page on a html site.[code]but I have used a separate preloader to help load in the graphic, the trouble is this does not seem to pass on the above code, yet the rollover code (that makes the mc resize a little) that is a layer or 2 into the bttn works fine in the original swf and the preloader.[code]
I wonder if anyone could advise me as to how, in as3, I can regain the click functionality back so the swf works after being preloaded.Also, is there a quick way to get the 'finger' pointer instead of the 'arrow' one if I so wished?.

View 5 Replies

ActionScript 2.0 :: MC's Not Functional With Alpha Effect

Dec 26, 2006

I have a series of nested movieclips that on rollOver they come to full alpha value and on rollout they go to like 20 alpha. In one of the clips it has a scroller but when I apply the alpha effect it makes the scrollbar not functional.How can I make an alpha effect like this with making everything inside the MC functional?I was using this type of code by the way: my_mc.alphaTo(20,1);

View 7 Replies

ActionScript 2.0 :: No Even One Functional Mail Form?

May 26, 2007

I've been solving the problem with a mail form already for hours. I've tried many of them, but none of them works. The mail can't be sent. For example this one:send me some functional form so I could try it?I don't have any clue where the problem is. I have been trying it from two servers and on two different e-mail addresses. Nothing works.

View 1 Replies

ActionScript 3.0 :: NavigateToUrl Not Functional In Dropdown Menu

Apr 29, 2010

I have created a drop down menu all as one movieclip. I have placed for the variable, event listener within my scripts layer in this movieclip as it should be, no errors. It works fine if I attempt to navigate from my main navigation buttons (ones that can be rolled over and clicked on (when rolling over them, it also unmasks a menu of submenu buttons. However, my issue is that if i attempt to change this navigation code to the submenu button, it no longer performs as it should (again, no errors). The only difference is that my submenu buttons are on a layer underneath the main buttons within this same movieclip, and they are masked by a shape for the rollover event.

[Code]....

if i change the home_btn back to site_btn (a submenu button), it no longer functions, but works properly when assigned to home_btn.

View 3 Replies

ActionScript 2.0 :: How To Make Buttons Become Functional Links

Jan 13, 2008

I found a cool menu that I'd like to be able to use but right now I don't know how to make the buttons become functional links. If its just a matter of editing the XML only? Or...does something need to be added to the actionscipt as well. I have a hunch both need to be edited and I have already tried various revisions. Below is the link where the example and files can be found. Be aware that if you try to use the actual files you will need an mc tween extension found at [URL].

Here is the XML code
<?xml version="1.0" encoding="iso-8859-1"?>
<item nazov="button num 1 "load="" image=""/>
<item nazov="button num 2" load="" image=""/>
<item nazov="button num 3" load="" image=""/>
<item nazov="button num 4" load="" image=""/>
[Code] ....

View 2 Replies

Organizing FlexUnit 4 Tests In FlexBuilder 3?

Jan 24, 2011

I've recently started practising test driven development - thus far I've been working on a library project, so I've organised my FlexUnit tests in a separate FlexBuilder 3 project, linking against my library's swc.Now I'm working on a web app and wondering how best to organise the tests for this. At the moment I've put them in a src/test package in the project I'm testing, with the test runner application at the same level as the default application. Is this the best way to do it, or should I have a separate test project and link in the source for the application I'm testing?

View 1 Replies

ActionScript 3 :: Binding Event Listeners - Only Last One In List Functional?

Jan 17, 2011

Here is piece of code:
protected function handleTriggers(raw:Object) : void {
var name:String, value:String, map:Object;
map = {
'onclick': MouseEvent.CLICK,
'ondblclick': MouseEvent.DOUBLE_CLICK,
[Code] .....

Object is generic DisplayObject and raw object contains series of onclick, onmouseover, etc event triggers. It was meant that I could attach event listeners automatically following the properties of that raw object. And it seems like it works, as I indeed can see some listener Functions in listeners property of the DisplayObject and their number corresponds to the number of triggers. But later when everything is put on stage, only the last event handler gets triggered.

View 1 Replies

ActionScript 2.0 :: Button Inside Movie Clip Not Functional?

Sep 29, 2005

how to have a button work when it is inside a movie clip that has actions on it. for example ..i have a movie symbol that has a 'on rolloever..x-scale up to 150%..and then back down to 100 on rolloff.' when i put a button inside this, that button loses its functionality.

View 3 Replies

ActionScript 2.0 :: Fully Functional Back Button In Flash?

May 2, 2005

I was wondering how to code the AS to make the back button functional in a Flash web site?rhamej uses this function in his web site

View 3 Replies

Actionscript :: Programming Tests For Flash Developers?

Feb 19, 2010

What programming tests do company's give Flash developers?

I would like to level the playing field for developers and recruiters.

I've heard companies give debugging tests with broken documents you have to fix. Flash developers could include Flash IDE users and actionscript programmers.

Everyone would like to know what to expect and understand some of the blind spots we face. A rundown on "what to be prepared for" may be a right answer. Best anecdote or inside scoop on major companies is good too (don't have to use real names, it's up to you). Perhaps you have an opinion of what is fair or reasonable, I'd like to know.

View 6 Replies

Actionscript :: Creating A Function That Tests If An Array Contains Something?

Jun 19, 2011

openList = Array([1,1], [2,3], [4,5]);
containss = function (input, arrayData, tellID) {
for (i = 0; i < arrayData.length; i++) {
if (arrayData[i] == input) {

[code]....

This code returns false when openList contains 2,3. When I add trace(arrayData[i]), I get 1,1 2,3 4,5 and when I do trace(input) I get 2,3.

View 1 Replies

Actionscript 3 :: Write Unit Tests For Dictionary

Jan 20, 2012

This is kinda related to my other question: flex dictionary bug? The HashMap has a method getValues() which returns an array of values:

[cODE]....

the loop for (var key:* in map) iterates the keys of the dictionary map, but it seems its implementation does it in some random way. What is the best way to write a test since I don't know what the array returned by getValues method will contain? I thought I could do it by calling the sort method, and compare the values, is there a better way to do it?assertEquals(map.getValues().sort(), "value A,value B,value C,value X,value Y,value Z");

View 1 Replies

ActionScript 3.0 :: Boolean Tests Combination Of Values

Nov 12, 2011

The objective is when user clicks on any combination of 2 buttons you would then gotoAndPlay a new page based onthe two specific buttons you have selected? Ideally user would be able to intermix the button combinations. Code below only works for two specific buttons, but doesn't allow to intermix button clicks.

[Code]...

View 5 Replies

ActionScript 3.0 :: Positioning Works In Tests But Not In Browser?

Oct 25, 2010

I wrote an app that uses the stage.stageWidth and stage.stageHeight to position various elements. It works beautifully when I run the swf in the standalone player, but when I upload it to a site and view it in the browser the positioning is all wrong!

View 2 Replies

ActionScript 3.0 :: Boolean That Tests Combination Of Values?

Nov 11, 2011

The objective is when user clicks on any combination of 2 buttons you would then gotoAndPlay a new page based onthe two specific buttons you have selected? Ideally user would be able to intermix the button combinations.

I've attached a simple diagram that visually explains objective of actionscript.

Code below only works for two specific buttons, but doesn't allow to intermix button clicks.

[Code]...

View 4 Replies

ActionScript 3.0 :: Simple Tree Menu With Functional Horizontal Slider-bar?

Aug 17, 2011

where can find a tutorial or Tree Menu like the astra Tree Menu with a functional horizontal slider? I am dont know how to make the changes. All I need is the simple astra tree menu but I NEED that horizontal slider.

View 0 Replies

ActionScript 2.0 :: Making A Functional Smooth Dynamic Content Scroller

Mar 5, 2006

Can someone point me in the right direction to making a functional Smooth Dynamic Scroller just like [URL] (Under Portfolio). I'm not saying "The Same" - I mean like, be able to have two icons that I create (One Up and One Down) then have them function the same as the 2Advanced website. Click and hold, it smoothly rolls down/up, release it stops. Also for it to only scroll as far as the content does.

View 5 Replies

Reset Database To Known State Between FlexUnit4 Integration Tests?

Oct 24, 2010

I have a Flex web app that communicates with a Java back-end via BlazeDS. The Flex client is composed of a flex-client module, which holds the views and presentation models and a separate flex-service module which holds the models (value objects) and service objects.

I am in the process of writing asynchronous integration tests for the flex-service module's RemoteObjects using FlexUnit4. In some of the tests, I modify the test data and query it back to see if everything works (a technique shown here: [url]...

How do I go about resetting the database to a known state before each FlexUnit4 test method (or test method chain)? In my Java server integration tests, I did this via a combination of DBUnit and Spring Test's transactions -- which rollback after each test method. But these Flexunit integration span multiple requests and thus multiple transactions.

View 3 Replies

Actionscript :: Functional Programming - Validating Parameters In A Provided Callback Function?

Feb 29, 2012

I don't think this is possible, but is there a way to validate the arguments a callback accepts. For example someone passes me callback "mycallback", I want to assert it accepts an argument String.

public function addHandler(handler : Function) : void{
//pseudo code
Assert.functionAcceptsArguments(handler, String);
}

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved