Actionscript 3 :: Test And Compare The Results Of The Changes?

Mar 6, 2010

I have a library that provides a reflection API on top of describeType() (a method that returns an XML object with all the specs of a class or instance). Since this library is used in several other libraries and frameworks.

The problem I'm facing is that I'm not sure about the best approach to refactor this libraries' code and make it possible to test and compare the results. I could easily add timers to the code, log the ouput and compare the results, but it seems like a lot of work to do this manually.How did you test and compare the results of the changes?Is there perhaps any testing framework (also non-actionscript) that helps in performance testing in such a scenario?

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Print Test Game Results?

Aug 2, 2011

I have a flash quiz game, written in AS2, a few years old and needs some updating. I need to include a print button for at the very end, so the user can print out their test scores. I've found one script for the PrintJob Class, but it hasn't worked so far. [highlight=Actionscript]

btn.onRelease = function(){
var pj = new PrintJob();
var success = pj.start();

[code]...

What's the problem with this script; and alternatively, is there another way to print the results?

View 1 Replies

ActionScript 3.0 :: Mailing Test Results From Flash + Asp?

Jul 29, 2009

i can find and cant get this to send a email.here is the code i have:
 
Flash/AS3:
stop();
submit_btn.addEventListener(MouseEvent.CLICK, sendInfo);
var emailfrom:String = "someone@somewhere.com";var emailto:String = "someone@somewhere.com";var emailsubject:String = "test

[code]....
 
Nothing happens when i hit the send button can anyone tell why.... I just got off phone with web host provider and they do support asp and i do have the correct SMTP

View 32 Replies

Flex :: Extract Test Results From Flash?

Apr 5, 2011

I've got a suite of unit tests for my project (pure AS3), and they all work brilliantly outputting standard JUnit XML to the trace output window. However, when I tried to get my test suite running on our continuous integration server I ran up against a wall.Flash is a sandboxed beast, isolated from the file system. I can't see an intuitive way to get this generated JUnit XML in to our CI software so it can be verified as passing.

I've taken a shot at implementing the approach shown in Continuous Integration with Flex,but it relies on reading trace output logged to flashlog.txt that is prone to failure on many fronts (debug player must be installed, flashlog.txt must be created, mm.cfg file must be configured properly). Also, I find that some of the time it fails to find the results in the flashlog and the build fails despite all the tests passing. This could be because I have too many tests and some are being pushed out of the log file.

View 3 Replies

Actionscript 3 :: Dictionary Mechanism - Dictionary Use Id To Compare If The Two Keys Are Equal, Not Use Strict Equal(===) To Compare If The Key Is The Same?

Aug 27, 2010

The dictionary use strict equals(===) for key comparison, how to change the comparison, so I can use my standard for comparison, for example, I have a class named Student:

class Student{
var id:int;
var name:String;[code]....

I want Dictionary use id to compare if the two keys are equal, not use strict equal(===) to compare if the key is the same.

View 2 Replies

Flex :: Test Spark Components In FlexUnits Visual Test Environment

Sep 17, 2011

I'm trying to test a custom Flex 4 skinnable component, using the FlexUnit UIImpersonator class. If I run my tests from a FlashBuilder Spark only project everything works fine. If I try to test from a project with the mx component set on the classpath I get a "getElementIndex not available in non Flex 4 projects" error.Can I unit test spark components in FlexUnits visual test environment while still having the mx component set on the classpath?

UIImpersonator delegates it's method calls to a "testEnvironment".The implementation used for this "testEnvironment" is decided by the VisualTest EnvironmentBuilder class and the FlexEnvironmentBuilder class. If the FlexEnvironmentBuilder class can find the "mx.core.Container" on the classpath it returns a MX environment, else a Spark environment. Only the spark environment has valid implementations for Flex 4 relevant method calls on the UIImpersonator - like the addElement method.

View 1 Replies

Professional :: Buttons Don't Work When Test Movie/Test Scene?

Aug 4, 2011

My buttons only work when I click on them on the stage while having the "enable simple buttons" option on. They do not work if I try to "test movie," "test scene" and publish it to a SWF. Nothing responds whenever I am in these modes. I am using Adobe Flash Professional CS5 Actionscript 2.0.
 
This is the code that I put in for the buttons:
 
[Code].....

View 5 Replies

ActionScript 3.0 :: Movie Works In Flash Test But Not Html Test?

Aug 30, 2009

i have a movie that has worked fine in past during Html test but ive been doing some dubugging using the flash test latly and it runs fine here but when i go back and try to test in Html mode no errors come just the movie never fully starts (starts up about as much as if there was an error).

View 5 Replies

ActionScript 2.0 :: Test Movie Works But Test Scene Does Not

Mar 19, 2009

I have two scenes in my flash file and in scene 1, first button takes you to frame 2 where movie clip is -works

on (release) {
gotoAndStop("scene1",2);
}
second button takes you to frame 3

but on scene 2 that performs same function as scene 1, the first button

on(press){
gotoAndStop("scene2",2);
}

instead of going to frame 2 goes to frame 3. and the second button goes correctly to frame 3.that happens when i test scene! when i test movie all buttons work properly.

View 1 Replies

Flex :: Access The Test Name Of A FlexUnit 4 Test?

Jan 21, 2010

In FlexUnit 1 it is possible to access the name of the currently-running test using the TestCase.getName() method because all tests subclass TestCase. In FlexUnit 4, however, there's no base class for tests; the tests are identified by annotations. So, how can I replicate the getName() functionality in FlexUnit 4?

View 2 Replies

Flash :: Packet Loss Test Like In Ping Test From Flash Technologies?

Feb 22, 2012

Does any one have a idea about how to do a packet loss test like in ping test from flash technologies (Flash or Flex)?

View 1 Replies

ActionScript 2.0 :: CS3 - How To Compare The Dates

Oct 6, 2009

How does one Compare Dates, as in


If (sampleDate is before TodaysDate) {
do something
}elseif (sampleDate is after TodaysDate) {
do something else
}

View 4 Replies

ActionScript 3.0 :: How To Compare Two Arrays

Jul 28, 2009

Is there any simple way to compare two arrays. i.e.; I have two arrays (a,b,c,d,e) and (b,c,d) after comparison I would like to get an array (a,e).

View 5 Replies

ActionScript 3.0 :: Compare Value Of Two Combo Box?

Sep 8, 2010

I've two Combo Box(cbFirst & cbSecond). I want to compare the value that has been selected by the user and based on the result, output is displayed. In both Combo Box I've provided the value.Here is my code:

var a:Number;var b:Number;
function First(evt:Event):void{  a = evt.target.value;  trace(a);  }cbFirst.addEventListener(Event.CHANGE, First);

[code]......

View 6 Replies

.net :: How To Compare Two Audio Files

Nov 24, 2009

How to compare two audio files to see the difference of them.

View 4 Replies

Compare String In Flex?

Dec 16, 2009

I want to check whether string is empty or not when i create object=Shared.getLocal("abc"); it assigns undefinded to the object at the first time

if(object.data.name=="undefnied") {
// is this correct
}

View 4 Replies

Actionscript 3 :: Compare The Name Of Properties To The 'name'?

Dec 13, 2010

I have this function:

private function returnFees(row:Object,name:String):int
{
var fee:int;
for each(var obj:Object in row)

[code].....

I want to compare the name of properties to the 'name'. But in this code the 'obj' is giving me the values of properties not the name.

View 1 Replies

Flex :: Compare Between Values?

Jan 24, 2011

With 5 variables consist of a value, I would need to check if any value between fa to fe has a gap of 6 in integer as in f1=1, f2=0, f3=0, f4=7, f5=10; and between f1 and f4, which has a gap of 6.

var f1:int
var f2:int
var f3:int

[code].....

View 1 Replies

ActionScript 2.0 :: How To Compare Two Array

Jul 9, 2010

How i can compare two array. following my code..

var my_array:Array=Array(5,10,15,20,25,30)
var new_array:Array=Array(7,8,9,10,11,12,13)
for(var i:Number=0;i<my_array.length;i++){

[code]....

View 6 Replies

ActionScript 2.0 :: How Can You Compare Two Arrows

Aug 23, 2010

I have two arrays myArray1 and myArray2.[code]How can you compare two arrows?

View 3 Replies

ActionScript 2.0 :: Compare XML Tag With SWF File Name?

Jun 24, 2011

I need to compare a random numbers of XML files, sometimes is 3 and others 500, the swf need�s to loop the entire directory and check each XML to see if the TAG inside of it it�s equal to the SWF filename, here�s what I got until now.

ActionScript Code:
var file_name_only:Array = _root._url.split("/");
var file_swf:String = file_name_only[file_name_only.length-1];
//var file_swf='6723.swf'

[code]....

View 0 Replies

Actionscript 3.0 :: Compare XML And Reload?

Jan 21, 2010

I'm a AS3 beginner and are trying to make a nowplaying script for a local station where I do some work as volunteer.

The xml script that is created looks like [code]...

What I wanted to create is that flash takes information from the xml, the artist for example and compares this every 15 second with value it already has. If it's equal then do nothing else unload xml and movieclip and reload the new one.

View 10 Replies

ActionScript 2.0 :: Compare Two Arrays To See If They Are The Same?

Nov 10, 2004

i was wondering if its possible to compare two arrays to see if they are the same. ive tried it like this,

Code:
array1 = [bob,ted];
array2 = [bob,ted];
if(array1 == array2){
trace("monkey")
}

but do not get monkey returned

can i compare arrays and how do i go about doing it?

View 7 Replies

ActionScript 3.0 :: Compare String To A Variable Name?

Sep 9, 2009

Compare a string to a variable name. Is there anyway you can do that?[code]...

View 1 Replies

ActionScript 2.0 :: Compare One Text Field With Another?

Aug 19, 2010

how to compare one text field with another? I would like to compare the words or word count and compare their uniqueness, like, the sentence in one field "We love Flash", and a sentence in the other field "We like Flash" would return a 33% uniqueness.

View 2 Replies

Data Integration :: Compare String With XML

Jul 3, 2006

I have an Array retrived from XML via xPath. I then compare one bucket with a string and dont get the result i want. It seems that the XML string isn't really a string.

[Code]....

View 1 Replies

ActionScript 3.0 :: Theory On How To Best Compare Objects

May 6, 2009

I have four objects with a .speed property. I want to compare all four and snag the object with the lowest speed. That alone I can get a grip on no problem. But, it's quite possible that 2 or more of the objects could have the same lowest speed. Here's where my ideas start to get muddled and rather involved. Compare two, toss the lowest in an array, if equal toss them both in.Compare the third to the array, if it's lower replace the existing item(s) with this one, if it's equal add it.Do a similiar thing with the fourth.To do all that I can't think of anything but a boatload of IFs and nested IFs.

View 3 Replies

ActionScript 3.0 :: How To Make A Compare Function

May 30, 2009

Okay in AS2 I had an array of Points. And I sorted it like this: myArray.sortOn(["x", "y"],[Array.NUMERIC, Array.NUMERIC]);I was changing the code over to AS3 and I thought I would change my array into a Vector of Points. But then I realized there isn't a sortOn method for Vectors.The sort method takes a compare function and I think I have that working. But I was wondering if there is a better or cleaner way of writing compare functions?[code]

View 7 Replies

ActionScript 3.0 :: Compare Two Multidimensional Arrays Against Each Other?

Feb 3, 2010

i need to compare two multidimensional arrays against each other
 
var aa:Array = new Array(1,2,3);
var bb:Array = new Array(1,2,3);
if(aa == bb){
trace("same")
}
 
dose not seam to worke, even in a 1d array :/

View 3 Replies

Flex - Compare Two Instances Of A Class?

Oct 8, 2009

Let's say I have created a class named Store. This class has several elements such as Name, PhoneNumber, Owner. I've created 2 instances of this class and want to know which values are different. So lets say that Store1 and Store2 are instances of this class.

Store1.Name = "John's Corner";
Store1.PhoneNumber = 111222333;
Store1.Owner = "John";
Store2.Name = "John's Corner";
Store2.PhoneNumber = 444555666;
Store2.Owner = "John";

[Code]...

Is there a way to automatically loop through all elements of a class instance and compare them to the same element in another class instance and return something when they differ?

This might be obvious but I can't figure it out.

View 5 Replies







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