• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

FlexUnit support for Cobertura?

Explorer ,
Jul 22, 2010 Jul 22, 2010

Copy link to clipboard

Copied

FlexUnit developers,

Hello again.  I saw a brief mention of Cobertura in a recent forum post, and was wondering what sort of Cobertura support is in the works for FlexUnit?  We use Cobertura extensively for performing our Java test coverage, and have infrastructure in place already to publish Cobertura reports.

We have not tried to generate any coverage data with flexcover yet, mainly because it requires that the binaries be built using a special instrumented Flex SDK. This is a problem for us (long story). Another approach that would allow the build to be done with the standard Adobe Flex SDK would be preferred, and I am wondering if you guys (or the flexcover folks) are planning to  do something like that using Cobertura perhaps...

So, my question is simple:

Would the Cobertura support functionality eliminate the need for using the flexcover SDK to perform the compilation?  (sorry if this is more of a flexcover question)...

Thanks,

Trevor

TOPICS
FlexUnit

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Jul 23, 2010 Jul 23, 2010

Sorry, forgot to answer the flexcover question.  Since the integration work will be communicating directly with each Cobertura's APIs, this will remove the dependency on an AIR app to generate test reports that flexcover currently has.  Additionally, since we'll be using apparat to instrument SWFs, a special variant of the SDK will no longer be needed to compile your test SWFs.  The instrumentation happens after the test SWFs compilation; think of it as a post compilation byte-weaving step simil

...

Votes

Translate

Translate
Engaged ,
Jul 23, 2010 Jul 23, 2010

Copy link to clipboard

Copied

@trevorbutler - So for FU4.2 I've been working on porting over the code coverage work done by Joa Ebert of apparat and Velo of flexmojos for the flexmojos 4.0 release.  They cracked open the Java APIs for Cobertura and Emma and figured out how to generate coverage reports.  They then found a way to use apparat to instrument a SWF to send data across the wire to say when a line of code was "touched" to record coverage.

Currently I'm in the process of integrating intial coverage support for Cobertura, since it's what I'm most familiar with.  Hopefully it'll be as simple as a couple new properties (e.g. - coverage and coverageReportDir) from a user perspective.  I also plan to release more granular Ant tasks in addition to the existing task which will isolate the ability to generate a test SWF and instrument a test SWF.  Later if I can get Cobertura working, I'll look into supporting Emma as well.  On a side note, I've rewritten the Ant task to use a multi-threaded NIO daemon process and AMF for less lag on test execution in terms of message and report processing; it much simpler than the current impl and will be coming in 4.2 as well.

Since 4.1 is still beta, 4.2 may not be out for a while as a release, but once I have an initial implementation out, I will put a message out on the forums for anyone who wants to give my fork a try.  Hope this helps to clarify my plans a bit.

-Brian

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 23, 2010 Jul 23, 2010

Copy link to clipboard

Copied

Sorry, forgot to answer the flexcover question.  Since the integration work will be communicating directly with each Cobertura's APIs, this will remove the dependency on an AIR app to generate test reports that flexcover currently has.  Additionally, since we'll be using apparat to instrument SWFs, a special variant of the SDK will no longer be needed to compile your test SWFs.  The instrumentation happens after the test SWFs compilation; think of it as a post compilation byte-weaving step similar to how AspectJ does compile-time weaving for Java classes.  When we roll Cobertura initially, we'll get also get cyclomatic complexity for free since it's managed by the Java API, which is something flexcover doesn't offer; that being said, it's not a popular metric imo.

Hope this helps.

-Brian

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 23, 2010 Jul 23, 2010

Copy link to clipboard

Copied

LATEST

Brian,

Thanks - this was the answer I was "hoping" to hear.  And it sounds like something we would definitely be interested in. Please do keep me in the loop.  I am sure we could offer some pre-testing help for this new coverage functionality (and possibly assistance with any Cobertura changes that might be necessary).

Thanks,

Trevor

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines