Code Coverage Tool for ActionScript

The prerelease for ActionScript Code Coverage Plug-in is now live on labs.adobe.com. On the Flex SDK team we use this tool to perform code coverage for the Flex Framework. This tool is not tied to any specific SDK version and so it can be used to perform code coverage using the latest SDK build. Also any SWF compiled with -debug flag can be used to generate code coverage data. You can use it for your Flex Apps or AIR apps or pure AS3 apps.

For documentation related to the tool you can go here

This tool allows for the following:

  • Choose between line and/or method level coverage
  • Apply filters on the view – so you can hide packages in which you are not interested
  • Save detailed reports – so you can view them later and compare with other coverage reports for your code base
  • Export high level coverage summary – This is a csv based summary of coverage for your code base

When you save a detailed report, it creates two files on your system .ascc and .ascs. The .ascs file is a compressed file that contains the sources on which the coverage was performed. So if you want another engineers on your team to look at the coverage data, just give them the two files and they won’t need to sync to the sources on their computer (because the sources for the report will come from .ascs file).

It can even be used to perform code coverage for more than one applications at the same time (may be you have a library or framework for which you have a ton of test cases).

I encourage you to try the tool, and if you have any questions or feedback please use the forum.

8 comments to Code Coverage Tool for ActionScript

  • Paul Reilly

    Great work and nice to see this publicly released. Congrats!

  • Hi Gaurav,

    I am facing hard time to get ASCode Coverage working on my machine. I have Flash Builder 4 Premium version and also downloaded .jar file and placed it in plugin folder of Flash Builder. However, it does not show me anything.

    I have seen your comments on Adobe site but don’t know how to place my question there, hence putting my question here. My Adobe ID is same as my email address above.

    Please can you help me.

    Thanks,
    Sumeet

  • Gaurav

    You are using it on which OS? Do you see the code coverage perspective or not? Also which version of builder are you using?

  • I am using Flash Builder 4, SDK 3.5 on Windows XP. Yes I am able to see coverage perspective.

  • Gaurav

    To post question on the forum, you will have to login using your email and password.

    So currently when you click on the start button the status changes to “Listening..” but when you run the swf it doesn’t connect to the coverage tool? If yes, can you tell me the following:
    1. You are running in the debug player and using a debug swf?
    2. When the status changes to “Listening..” do you see an entry for PreloadSwf in mm.cfg?
    3. What are the contents of the trust file?

  • Hi,

    I am able to resolve it today…it is giving me result as I needed.

    Thanks a Ton Gaurav.

  • Can this plug-in given me an XML file of the coverage report instead of .CSV?

  • Gaurav

    File an enhancement request, at http://bugs.adobe.com/jira

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Advertisement

Advertisement