mhevery / testability-explorer Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/testability-explorer
License: Apache License 2.0
Automatically exported from code.google.com/p/testability-explorer
License: Apache License 2.0
#summary Readme first =Testability Metric Explained= ==Basic Idea== The testability score represents the difficulty of testing a particular piece of code. The difficulty is a measure of: # how hard it will be to construct this object # how hard will it be to execute the method in order to be able to assert something in a test. ==How to run it== {{{ $ testability.sh Argument "classes and packages" is required classes and packages : Classes or packages to analyze. Matches any class starting with these. Ex. com.example.analyze.these com.google.and.these.packages com.google.AClass -cp VAL : colon delimited classpath to analyze (jars or directories) Ex. lib/one.jar:lib/two.jar -maxAcceptableCost N : Maximum Total Class cost to be classify it as 'acceptable'. -maxExcellentCost N : Maximum Total Class cost to be classify it as 'excellent'. -minCost N : Minimum Total Class cost required to print that class' metrics. -print VAL : summary: (default) print package summary information. detail: print detail drill down information for each method call. -printDepth N : Maximum depth to recurse and print costs of classes/methods that the classes un der analysis depend on. Defaults to 0. -whitelist VAL : colon delimited whitelisted packages that will not count against you. Matches p ackages/classes starting with given values. (Always whitelists java.*. RegExp O K.) -worstOffenderCount N : Print N number of worst offending classes. cyclomatic cyclomatic cost multiplier : When computing the overall cost of the method the individual costs are added us ing weighted average. This represents the weight of the cyclomatic cost. global global state cost multiplier : When computing the overall cost of the method the individual costs are added us ing weighted average. This represents the weight of the global state cost. }}} ==Output Format== There are two kinds of output format: summary and detail === Output Format: summary === Use the summary mode to get a quick overview of the project. This example shows what running the testability metric on itself produces. The top shows statistical breakdown of "Excellent", "Good" and "Needs work" classes. It is followed by a breakdown chart showing the breakdown visually. A more detailed breakdown is shown in the histogram. Finally the list of 20 highest offending classes is shown sorted by test difficulty. {{{ $ testability.sh -print summary com.google.test.metric -whitelist com.google.test.org.objectweb.asm. Analyzed classes: 125 Excellent classes (.): 123 98.4% Good classes (=): 0 0.0% Needs work classes (@): 2 1.6% Breakdown: [..................................................] 0 98 3 |......................................................................: 98 9 |......... : 12 15 |...... : 8 21 |.. : 2 27 |... : 3 33 | : 0 39 | : 0 45 | : 0 51 | : 0 57 | : 0 63 | : 0 69 | : 0 75 | : 0 81 | : 0 87 | : 0 93 | : 0 99 | : 0 105 | : 0 111 |@ : 1 117 | : 0 123 | : 0 129 | : 0 135 | : 0 141 | : 0 147 |@ : 1 Highest Cost ============ com.google.test.metric.Testability 148 com.google.test.metric.asm.MethodVisitorBuilder 113 com.google.test.metric.method.BlockDecomposer 29 com.google.test.metric.asm.MethodVisitorBuilder$GetFieldRunnable 27 com.google.test.metric.asm.MethodVisitorBuilder$PutFieldRunnable 27 com.google.test.metric.asm.MethodVisitorBuilder$2 23 com.google.test.metric.Type 22 com.google.test.metric.asm.ClassInfoBuilderVisitor 18 com.google.test.metric.asm.FieldVisitorBuilder 18 com.google.test.metric.MetricComputer 17 com.google.test.metric.asm.MethodVisitorBuilder$30 17 com.google.test.metric.asm.MethodVisitorBuilder$12 16 com.google.test.metric.collection.KeyedMultiStack 15 com.google.test.metric.method.BlockDecomposer$1 14 com.google.test.metric.method.op.turing.MethodInvocation 14 com.google.test.metric.asm.MethodVisitorBuilder$28 12 com.google.test.metric.asm.SignatureParser 12 com.google.test.metric.asm.SignatureParser$TypeVisitor 12 com.google.test.metric.report.TextReport 12 com.google.test.metric.asm.MethodVisitorBuilder$7 10 }}} === Output Format: detail === To get a more in depth view of view a particular class has a high cost use the detail output format. {{{ $ testability.sh -print detail com.google.test.metric.example.Lessons.Primeness ----------------------------------------- Packages/Classes To Enter: com.google.test.metric.example.Lessons.Primeness* Max Method Print Depth: 1 Min Class Cost: 1 ----------------------------------------- Testability cost for com.google.test.metric.example.Lessons.Primeness [ cost = 2 ] [ 2 TCC, 0 TGC ] com.google.test.metric.example.Lessons.Primeness.isPrime(I)Z [2, 0 / 2, 0] }}} An example score for a method is: `package.Class.methodName()V[1, 2 / 3, 4]` The four numbers, in order, represent this method's: # _Testability Complexity_: # _Global State Complexity_: # _Total Testability Complexity_: # _Total Global State Complexity_: ==Simplest Example== Let's start with a simple example of analyzing a simple class. *SOURCE:* {{{ public class Primeness { public boolean isPrime(int number) { for (int i = 2; i < number / 2; i++) { if (number % i == 0) { return false; } } return true; } } }}} *TRY IT: `testability.sh -printDepth 10 com.google.test.metric.example.Lessons.Primeness` *OUTPUT:* {{{ ----------------------------------------- Packages/Classes To Enter: com.google.test.metric.example.Lessons.Primeness* ----------------------------------------- Testability cost for com.google.test.metric.example.Lessons.Primeness [ 2 TCC, 0 TGC ] com.google.test.metric.example.Lessons.Primeness.isPrime(I)Z [2, 0 / 2, 0] ----------------------------------------- Summary Statistics: TCC for all classes entered: 2 TGC for all classes entered: 0 Average TCC for all classes entered: 2.00 Average TGC for all classes entered: 0.00 Key: TCC: Total Compexity Cost TGC: Total Global Cost Analyzed 1 classes (plus non-whitelisted external dependencies) }}} *EXPLANATION:* In the above example the test complexity is 2. This is because the method `isPrime` has a loop and an `if` statement. Therefore there are 2 additional paths of execution for a total of 3. # Loop does not execute # Loop executes but if does not evaluate to true # Loop executes and if evaluates to true. *Note:* Test cost is the method's cyclomatic complexity minus one. Subtract one to not penalize the method for decomposing the method into 2 smaller methods. (If the lowest cost would be 1, splitting the method into two would result in the cost of 2.) The simplest method's score is 0 such that the method can be split into smaller methods with no penalty. ==Example: Injectability Scoring== This example shows the differences in scores based on how injectable a class is. `SumOfPrimes1` directly instantiates a `new Primeness()`. The `new` operator prevents you from being able to inject in a different subclass of `Primeness` for testing. Thus the scores differ: * `sum(I)I[2, 0 / 4, 0]` <- total test complexity of 4 for `SumOfPrimes1` * `sum(I)I[2, 0 / 2, 0]` <- total test complexity of 2 for `SumOfPrimes2` *SOURCE:* {{{ public class SumOfPrimes1 { private Primeness primeness = new Primeness(); public int sum(int max) { int sum = 0; for (int i = 0; i < max; i++) { if (primeness.isPrime(i)) { sum += i; } } return sum; } } }}} *TRY IT:* `testability.sh -printDepth 10 com.google.test.metric.example.Lessons.SumOfPrimes1` *OUTPUT:* {{{ ----------------------------------------- Packages/Classes To Enter: com.google.test.metric.example.Lessons.SumOfPrimes1* ----------------------------------------- Testability cost for com.google.test.metric.example.Lessons.SumOfPrimes1 [ 4 TCC, 0 TGC ] com.google.test.metric.example.Lessons.SumOfPrimes1.sum(I)I [2, 0 / 4, 0] line 25: com.google.test.metric.example.Lessons.Primeness.isPrime(I)Z [2, 0 / 2, 0] ----------------------------------------- Summary Statistics: TCC for all classes entered: 4 TGC for all classes entered: 0 Average TCC for all classes entered: 4.00 Average TGC for all classes entered: 0.00 Key: TCC: Total Compexity Cost TGC: Total Global Cost Analyzed 1 classes (plus non-whitelisted external dependencies) }}} The testability and global state costs for the constructor (indicated by <init>) is zero. The testability complexity of `sum` is 2, and the total testability complexity is 4. The 2 comes from `sum` directly. The total of 4 is `sum`'s 2 plus 2 from `isPrime`. The reason for this is that there is no way for a test to execute the `sum` method and intercept the call to `isPrime` method. In other words there is no way to write a true unit test which will test only the class `SumOfPrimes1`. In this case it may not be a problem as the `isPrime` method is not very expensive (in terms of complexity), however if the `isPrime` method represented something expensive, like an external system, this would possess a testing problem as there would be no way to test `sum` method without incurring the cost of `isPrime`. *SOURCE:* {{{ public class SumOfPrimes2 { private final Primeness primeness; public SumOfPrimes2(Primeness primeness) { this.primeness = primeness; } public int sum(int max) { int sum = 0; for (int i = 0; i < max; i++) { if (primeness.isPrime(i)) { sum += i; } } return sum; } } }}} *TRY IT:* `testability.sh -printDepth 10 com.google.test.metric.example.Lessons.SumOfPrimes2` *OUTPUT:* {{{ ----------------------------------------- Packages/Classes To Enter: com.google.test.metric.example.Lessons.SumOfPrimes2* ----------------------------------------- Testability cost for com.google.test.metric.example.Lessons.SumOfPrimes2 [ 2 TCC, 0 TGC ] com.google.test.metric.example.Lessons.SumOfPrimes2.sum(I)I [2, 0 / 2, 0] ----------------------------------------- Summary Statistics: TCC for all classes entered: 2 TGC for all classes entered: 0 Average TCC for all classes entered: 2.00 Average TGC for all classes entered: 0.00 Key: TCC: Total Compexity Cost TGC: Total Global Cost Analyzed 1 classes (plus non-whitelisted external dependencies) }}} In this case `Primeness` is injected the into the constructor of the `SumOfPrimes2`. As a result the cost of the `sum` method remains at 2, but the cost of `isPrime` is now 0. (A mock of `Primeness` could be injected to test `SumOfPrimes2`). The cost of construction is added to the cost of testing the class. (You can only test a class which you can construct). In order to compute the cost we go through several phases: # Compute the cost of the constructor, giving zero cost to injectable variables # Look for setter methods and use those to mark more fields as injectable. # Compute the cost of the method while respecting the injectability of fields, and method parameters. ==Injectability== A variable (local variable, field or a parameter) is considered injectable if it can be set from the outside (i.e. in the test). Any variable assigned from an injectable variable is also considered injectable. In other words injectability is transitive. An Injectable variable can be replaced by a mock in test. Any method dispatched on an injectable variable has no cost. (It can be intercepted). _(Caveat: The method can not be static, private, or final, as those methods can not be overridden)._ ==Example: Global State== Global state makes it hard to tests ones code as it allows cross talk between test. This makes it so that tests can pass by themselves but fail when run in a suite. It is also possible to make tests which will run in only a specific order. *SOURCE:* {{{ package com.google.test.metric.example; public class GlobalExample { public static class Gadget { private final String id; private int count; public Gadget(String id, int count) { this.id = id; this.count = count; } public String getId() { return id; } public int getCount() { return count; } public int increment() { return ++count; } } public static class Globals { public static final Gadget instance = new Gadget("Global", 1); } public Gadget getInstance() { return Globals.instance; } public String getGlobalId() { return Globals.instance.getId(); } public int getGlobalCount() { return Globals.instance.getCount(); } public int globalIncrement() { return Globals.instance.increment(); } } }}} *TRY IT:* `testability.sh -printDepth 10 com.google.test.metric.example.GlobalExample com.google.test.metric.example.GlobalExample` *OUTPUT:* {{{ ----------------------------------------- Packages/Classes To Enter: com.google.test.metric.example.GlobalExample* ----------------------------------------- Testability cost for com.google.test.metric.example.GlobalExample [ 0 TCC, 2 TGC ] com.google.test.metric.example.GlobalExample.getGlobalCount()I [0, 0 / 0, 1] line 55: com.google.test.metric.example.GlobalExample$Gadget.getCount()I [0, 1 / 0, 1] com.google.test.metric.example.GlobalExample.globalIncrement()I [0, 0 / 0, 1] line 59: com.google.test.metric.example.GlobalExample$Gadget.increment()I [0, 1 / 0, 1] Testability cost for com.google.test.metric.example.GlobalExample$Globals [ 0 TCC, 3 TGC ] com.google.test.metric.example.GlobalExample$Globals.<init>()V [0, 0 / 0, 1] line 43: com.google.test.metric.example.GlobalExample$Globals.<clinit>()V [0, 1 / 0, 1] com.google.test.metric.example.GlobalExample$Globals.<clinit>()V [0, 2 / 0, 2] ----------------------------------------- Summary Statistics: TCC for all classes entered: 0 TGC for all classes entered: 5 Average TCC for all classes entered: 0.00 Average TGC for all classes entered: 1.67 Key: TCC: Total Compexity Cost TGC: Total Global Cost Analyzed 3 classes (plus non-whitelisted external dependencies) }}} ===`getGlobalId()`=== Method `getGlobalId()` has no global cost. This may be surprising given that it accesses static variables. However, upon closer examinations, these variables are not mutable (they are declared `final`). For this reason there is no global mutable state associated with this method. ===`getInstance()`=== Similarly `getInstance()` has no global cost either as it only accesses variables which are final. ===`getGlobalCount()`=== Method `getGlobalCount()` accesses the `Globals.instance` which is a global constant. Accessing global constants is not a problem and hence does not incur a cost. It then calls the `Gadget.getCount()` which accesses the `count` field. Because the `Gadget`'s `this` is a global constant, all of its fields are global as well. The global property is transitive. Because `count` is mutable (no `final` keyword) reading `count` incurs a cost. ===`globalIncrement()`=== Method `getGlobalIncrement()` follows the same logic as `getGlobalCount()`. ==Future Enhancements / Requests== Please talk about what you want on the mailing list: http://groups.google.com/group/testability-metrics
When running the maven testability-explorer plugin on a muti-modules
project, i'd like to have a report in the very parent project, which would
hold the aggregated data of its children.
Original issue reported on code.google.com by [email protected]
on 14 Sep 2009 at 12:31
What steps will reproduce the problem?
1. Enable TE in reporting section, see [1]
2. Run report with "mvn site:site site:deploy"
What is the expected output? What do you see instead?
Expected: Valid HTML on TE report
What I am seeing: broken HTML, the page ends with "</html>", after which
some more output from the generated report HTML is shown, see [2]
What version of the product are you using? On what operating system?
TE plugin 1.3.3, started from Hudson via embedded Maven 2.2.1
Please provide any additional information below.
The contents of the project are somewhat confidental, so I can't attach the
complete generated HTML page.
[1]: snippet from the project POM
<reporting>
<plugins>
<plugin>
<groupId>com.google.testability-explorer</groupId>
<artifactId>maven-testability-plugin</artifactId>
<version>1.3.3</version>
</plugin>
</plugins>
</reporting>
[2]: snippet from the generated HTML page
...
</div>
<div class="clear">
<hr/>
</div>
</div>
</body>
</html>
ble class="issuesExplanation">
<tr class="even">
<td>
On line
20,
</td>
<td>
<tt>SecurityMonitorInterceptor()</tt> is complex
</td>
<td class="percent">contributing 50% of total class cost</td>
</tr>
</table>
...
... some more TE html output
...
<p class="suggestion">Refactor the method by breaking the complex
portions into several smaller methods.</p>
<!--input type="button" value="Show more suggestions"/><br/-->
<!--p>If these changes were made, the cost of testing this class would
be reduced by <b>0%</b>.</p-->
</div>
<div class="copyright">
<a
href="http://testabilityexplorer.org">http://testabilityexplorer.org</a></div>
</body>
</html>
Original issue reported on code.google.com by hakan.tandogan
on 10 May 2010 at 1:12
I understand the point that "maven2-plugin" makes sense in terms of the
groupId and in terms of the project structure, but it really doesn't make
senese for people who use maven. You can specify some plugins without
groupIds. This may be only for
org.apache.maven.plugins....I cannot recall at this time. If you can do it
for any
groupId mapped in your settings.xml such as
<pluginGroups>
<pluginGroup>com.google.testability-explorer</pluginGroup>
</pluginGroups>
then you might have a problem with this approach because then they would
only need to
put the following the pom:
<plugin>
<artifactId>maven2-plugin</artifactId>
</plugin>
and that can be really confusing. While I think this is always a bad way
to define
plugins without groupIds, I see it all the time.
Original issue reported on code.google.com by [email protected]
on 7 Mar 2009 at 10:06
What steps will reproduce the problem?
Here is the Maven build output when I try to build it
[INFO] Testability Explorer .................................. SUCCESS [1.313s]
[INFO] Testability Explorer Core ............................. FAILED [4.359s]
[INFO] Testability Explorer ant task ......................... NOT BUILT
[INFO] Maven testability plugin .............................. NOT BUILT
What is the expected output? What do you see instead?
BUILD SUCCESSFUL...
I see the foll.
Mojo:
org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile
FAILED for project:
com.google.testability-explorer:core:jar:1.3.2-SNAPSHOT
Reason:
D:\WorkSpaces\DiamondsPhase2\TestabilityExplorer\core\src\main\java\com\google\t
est\metric\ReportGeneratorBuilder.java:[27,49]
package com.sun.org.apache.xml.internal.serialize does not exist
D:\WorkSpaces\DiamondsPhase2\TestabilityExplorer\core\src\main\java\com\google\t
est\metric\ReportGeneratorBuilder.java:[28,49]
package com.sun.org.apache.xml.internal.serialize does not exist
D:\WorkSpaces\DiamondsPhase2\TestabilityExplorer\core\src\main\java\com\google\t
est\metric\ReportGeneratorBuilder.java:[118,8]
cannot find symbol
symbol : class XMLSerializer
location: class com.google.test.metric.ReportGeneratorBuilder
D:\WorkSpaces\DiamondsPhase2\TestabilityExplorer\core\src\main\java\com\google\t
est\metric\ReportGeneratorBuilder.java:[118,42]
cannot find symbol
symbol : class XMLSerializer
location: class com.google.test.metric.ReportGeneratorBuilder
D:\WorkSpaces\DiamondsPhase2\TestabilityExplorer\core\src\main\java\com\google\t
est\metric\ReportGeneratorBuilder.java:[120,8]
cannot find symbol
symbol : class OutputFormat
location: class com.google.test.metric.ReportGeneratorBuilder
D:\WorkSpaces\DiamondsPhase2\TestabilityExplorer\core\src\main\java\com\google\t
est\metric\ReportGeneratorBuilder.java:[120,34]
cannot find symbol
symbol : class OutputFormat
location: class com.google.test.metric.ReportGeneratorBuilder
What version of the product are you using? On what operating system?
I downloaded the latest code from the repository
http://testability-explorer.googlecode.com/svn and am trying to build
using Eclipse using maven.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 10 Jun 2009 at 12:31
If you list the name of a class or classes on the command line, you get an
empty report. In previous versions, you got a report on the classes you listed.
What steps will reproduce the problem?
1. Download the enclosed
2. tar xvf tebug.tar
3. cd tebug
4. javac com/example/Main.java
5. java com.example.Main [prints "hello, world"]
6. java -jar testability-explorer-1.2.0-r85.jar com.example.Main -cp .
[reports on just the com.example.Main class]
7. java -jar testability-explorer-1.3.0-r275.jar com.example.Main -cp .
[empty report with no classes at all listed]
What version of the product are you using? 1.3.0-r275
On what operating system? Linux
Original issue reported on code.google.com by [email protected]
on 27 Aug 2009 at 9:06
Attachments:
As a Windows user, I would like a batch (.bat) file to be included in the
ZIP distribution so that I can run Testability Explorer with the same ease
enjoyed by *nix users (who can use the included testability.sh file).
A sample of such a file is attached.
Original issue reported on code.google.com by [email protected]
on 5 Aug 2009 at 12:37
Attachments:
What is the expected output? What do you see instead?
I expect the final method to be marked as NOT overridable.
Failing Test:
public void testMediumFinalCost2() throws Exception {
MethodInfo method =
repo.getClass(Medium.class.getName()).getMethod("finalCost2()I");
assertFalse(method.canOverride());
MethodCost cost = computer.compute(Medium.class.getName(),
"finalCost2()I");
assertEquals(3l, cost.getTotalComplexityCost());
}
* Method necessary to add to the class Medium (static class inside
MetricComputerTest)
CODE:
/**
* I cost 2, but I am a <em>final</em> instance method that can not be
overridden.
* My cost is unavoidable.
*/
public final int finalCost2() {
int i = 0;
return i > 0 ? i > 1 ? 1 : 2 : 2;
}
Misko followed up on the mailing list with:
QUOTE:
Sounds like a real bug! Can you create a tests case and fix the
bug? :-) If you can't fix it send me the test case and I will patch it
in and submit a fix for you.
-- Misko
http://groups.google.com/group/testability-explorer/browse_thread/thread/49b34c6
ca1ad1209
Original issue reported on code.google.com by [email protected]
on 8 Oct 2008 at 12:26
What steps will reproduce the problem?
Setup the following in my ant file:
<project name="moo"
xmlns:googletest="antlib:com.google.ant"
>
<taskdef name="testability" classname="com.google.ant.TestabilityTask"
uri="antlib:com.google.ant">
<classpath>
<pathelement
location="${buildscripts.dir}/lib/ant-testability-explorer.jar" />
<pathelement
location="${buildscripts.dir}/lib/testability-explorer.jar" />
</classpath>
</taskdef>
<target name="testability-simple" >
<googletest:testability resultfile="testability.result.html"
print="html">
<fileset dir="${buildscripts.dir}/lib">
<include name="printer-framework.jar"/>
</fileset>
</googletest:testability>
</target>
What is the expected output? What do you see instead?
If I don't use the print="html", the file contains the same output as from
the command line (text). When using the html flag, I get the below. There
is nothing in the error file when that flag is added.
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 (on the ant line
which includes the print="html")
What version of the product are you using? On what operating system?
ant-testability-explorer-1.2.0-r54.jar and same version of testability-explorer
Please provide any additional information below.
Works the same when i remove namespace info.
Original issue reported on code.google.com by [email protected]
on 5 Aug 2008 at 4:58
Look at an issues report or a source report where there's an indirect cost
from a superclass, like from a setter. Since the cost is implicit, there's
no line number where the thing is called - instead, the report shows the
line number where the implicit method is declared.
However, the link still points to the current class's source file, which
doesn't make sense - the link is broken. The line number and the file link
need to refer to the same file.
Original issue reported on code.google.com by aeagle22206
on 1 Jul 2009 at 1:01
What steps will reproduce the problem?
1. Run ``mvn site'' with testability-explorer maven-testability-plugin 1.3.3
2. No explicit whiteList configuration
3.
What is the expected output? What do you see instead?
Static methods are called: Why is it bad?
I saw:
On line 391, static method String format(String, Object[]) is
called contributing 7% of total class cost
On line 143, static method String format(String, Object[]) is
called contributing 7% of total class cost
On line 422, static method String format(String, Object[]) is
called contributing 7% of total class cost
On line 355, static method String format(String, Object[]) is
called contributing 7% of total class cost
On line 291, static method String format(String, Object[]) is
called contributing 7% of total class cost
I expect that using this method (java.lang.String.format) will not contribute
to the testability cost.
What version of the product are you using? On what operating system?
I'm using the maven testability reporting plugin:
- testability-explorer maven-testability-plugin 1.3.3
- Running on ubuntu using mvn from the command-line.
Please provide any additional information below.
If this is expected, how can I whitelist this method?
I tried <configuration>
<whiteList>java.lang.String.format</whiteList>... to no avail
Thanks for your time and this is a great tool!
Original issue reported on code.google.com by [email protected]
on 7 Oct 2010 at 9:26
hercule 1673 $ ll lib/
total 4388
-rw-rw-r-- 1 clements ofacdev 9755 Aug 21 01:19 ant-task-1.3.2.jar
-rw-rw-r-- 1 clements ofacdev 4480690 Aug 21 01:18
testability-explorer-1.3.2-with-deps.jar
hercule 1674 $ cat build.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<project default="report">
<path id="classpath">
<fileset dir="lib" includes="*.jar"/>
</path>
<taskdef name="testability" classname="com.google.ant.TestabilityTask"
classpathref="classpath"/>
<target name="report" >
<testability filter="" resultfile="report.html"
errorfile="testability.err.txt"
printdepth="2" print="html" mincost="1"
maxexcellentcost="50"
maxacceptablecost="100" worstoffendercount="25"
whitelist=""
cyclomatic="1" global="10"
failproperty="testability.failproperty">
<classpath>
<pathelement path="log4j.1.2.15.jar"/>
</classpath>
</testability>
</target>
</project>
hercule 1675 $ ant -f build.xml
Buildfile: build.xml
report:
BUILD FAILED
com.google.inject.CreationException: Guice creation errors:
1) No implementation for com.google.classpath.ClassPath was bound.
while locating com.google.classpath.ClassPath
for parameter 1 at
com.google.test.metric.JavaTestabilityRunner.<init>(JavaTestabilityRunner.java:5
4)
at
com.google.test.metric.TestabilityModule.configure(TestabilityModule.java:20)
2) No implementation for com.google.classpath.ClassPath was bound.
while locating com.google.classpath.ClassPath
for parameter 0 at
com.google.test.metric.ReportGeneratorProvider.<init>(ReportGeneratorProvider.ja
va:73)
at
com.google.test.metric.TestabilityModule.configure(TestabilityModule.java:21)
3) No implementation for
com.google.test.metric.ReportGeneratorProvider$ReportFormat was bound.
while locating com.google.test.metric.ReportGeneratorProvider$ReportFormat
for parameter 4 at
com.google.test.metric.ReportGeneratorProvider.<init>(ReportGeneratorProvider.ja
va:73)
at
com.google.test.metric.TestabilityModule.configure(TestabilityModule.java:21)
4) No implementation for com.google.test.metric.WhiteList was bound.
while locating com.google.test.metric.WhiteList
for parameter 5 at
com.google.test.metric.JavaTestabilityRunner.<init>(JavaTestabilityRunner.java:5
4)
at
com.google.test.metric.TestabilityModule.configure(TestabilityModule.java:20)
5) No implementation for com.google.test.metric.WhiteList was bound.
while locating com.google.test.metric.WhiteList
for parameter 2 at
com.google.test.metric.MetricComputer.<init>(MetricComputer.java:40)
while locating com.google.test.metric.MetricComputer
for parameter 3 at
com.google.test.metric.JavaTestabilityRunner.<init>(JavaTestabilityRunner.java:5
4)
at
com.google.test.metric.TestabilityModule.configure(TestabilityModule.java:20)
6) No implementation for java.io.PrintStream annotated with
@com.google.test.metric.ConfigModule.Error() was bound.
while locating java.io.PrintStream annotated with
@com.google.test.metric.ConfigModule.Error()
for parameter 6 at
com.google.test.metric.JavaTestabilityRunner.<init>(JavaTestabilityRunner.java:5
4)
at
com.google.test.metric.TestabilityModule.configure(TestabilityModule.java:20)
7) No implementation for java.io.PrintStream annotated with
@com.google.test.metric.ConfigModule.Error() was bound.
while locating java.io.PrintStream annotated with
@com.google.test.metric.ConfigModule.Error()
for parameter 1 at
com.google.test.metric.MetricComputer.<init>(MetricComputer.java:40)
while locating com.google.test.metric.MetricComputer
for parameter 3 at
com.google.test.metric.JavaTestabilityRunner.<init>(JavaTestabilityRunner.java:5
4)
at
com.google.test.metric.TestabilityModule.configure(TestabilityModule.java:20)
8) No implementation for java.io.PrintStream annotated with
@com.google.test.metric.ConfigModule.Output() was bound.
while locating java.io.PrintStream annotated with
@com.google.test.metric.ConfigModule.Output()
for parameter 2 at
com.google.test.metric.ReportGeneratorProvider.<init>(ReportGeneratorProvider.ja
va:73)
at
com.google.test.metric.TestabilityModule.configure(TestabilityModule.java:21)
9) No implementation for java.lang.Integer annotated with
@com.google.inject.name.Named(value=printDepth) was bound.
while locating java.lang.Integer annotated with
@com.google.inject.name.Named(value=printDepth)
for parameter 3 at
com.google.test.metric.MetricComputer.<init>(MetricComputer.java:40)
while locating com.google.test.metric.MetricComputer
for parameter 3 at
com.google.test.metric.JavaTestabilityRunner.<init>(JavaTestabilityRunner.java:5
4)
at
com.google.test.metric.TestabilityModule.configure(TestabilityModule.java:20)
10) No implementation for java.util.List<java.lang.String> was bound.
while locating java.util.List<java.lang.String>
for parameter 4 at
com.google.test.metric.JavaTestabilityRunner.<init>(JavaTestabilityRunner.java:5
4)
at
com.google.test.metric.TestabilityModule.configure(TestabilityModule.java:20)
11) No implementation for com.google.classpath.ClassPath was bound.
at
com.google.test.metric.TestabilityModule.getClassRepo(TestabilityModule.java:25)
11 errors
at
com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.jav
a:354)
at
com.google.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:152)
at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at com.google.inject.Guice.createInjector(Guice.java:92)
at com.google.inject.Guice.createInjector(Guice.java:69)
at com.google.inject.Guice.createInjector(Guice.java:59)
at
com.google.ant.TestabilityTask.runTestabilityExplorer(TestabilityTask.java:135)
at com.google.ant.TestabilityTask.execute(TestabilityTask.java:110)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:
41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Total time: 1 second
hercule 1677 $ ant -version
Apache Ant version 1.7.1 compiled on June 27 2008
Original issue reported on code.google.com by [email protected]
on 2 Oct 2009 at 12:03
As a build owner, I would like the build to fail whenever the current
changes to the code introduce too many testability issues, so that
developers get quick feedback about the quality of their changelists.
Original issue reported on code.google.com by aeagle22206
on 19 Mar 2009 at 9:22
The antrun config in the pom.xml is only set up to compile the plugin
classes. It should run the unit tests as well.
Original issue reported on code.google.com by aeagle22206
on 18 Aug 2009 at 9:01
Maven places some navigation elements into the HTML report, which conflict
with the content that was written there by TE.
What steps will reproduce the problem?
1. run mvn:site with testability plugin enabled
2. browse to HTML report, it is borked
Original issue reported on code.google.com by aeagle22206
on 13 Apr 2009 at 11:11
As a Javascript developer, I'd like to see where my code is hard to test,
and get suggestions on how to fix it.
Original issue reported on code.google.com by aeagle22206
on 15 Apr 2009 at 5:00
running on a larger project (some 3.5 million lines of code, about 3500
classes) (JAVA - build 14.0-b16, Ubuntu 9.04 64bit)
quite quickly I will get
java.io.FileNotFoundException - Too many open files
in the stacktrace below i took out the name of my file and replaced it with
...
It does look like its opening the same files many many many times..
"main" java.lang.RuntimeException: java.io.FileNotFoundException: ... (Too
many open files)
at
com.google.classpath.DirectoryClassPath.getResourceAsStream(DirectoryClassPath.j
ava:82)
at
com.google.classpath.CompositeClassPath.getResourceAsStream(CompositeClassPath.j
ava:67)
at
com.google.test.metric.JavaClassRepository.inputStreamForClass(JavaClassReposito
ry.java:59)
at
com.google.test.metric.JavaClassRepository.getClass(JavaClassRepository.java:47)
at
com.google.test.metric.asm.ClassInfoBuilderVisitor.visit(ClassInfoBuilderVisitor
.java:41)
at com.google.test.org.objectweb.asm.ClassReader.accept(Unknown Source)
at com.google.test.org.objectweb.asm.ClassReader.accept(Unknown Source)
at
com.google.test.metric.JavaClassRepository.parseClass(JavaClassRepository.java:7
7)
at
com.google.test.metric.JavaClassRepository.getClass(JavaClassRepository.java:47)
at
com.google.test.metric.TestabilityVisitor$Frame.recordMethodCall(TestabilityVisi
tor.java:360)
at
com.google.test.metric.method.op.turing.MethodInvokation.visit(MethodInvokation.
java:67)
at
com.google.test.metric.TestabilityVisitor$Frame.applyMethodOperations(Testabilit
yVisitor.java:333)
at
com.google.test.metric.TestabilityVisitor$Frame.recordMethodCall(TestabilityVisi
tor.java:348)
at
com.google.test.metric.TestabilityVisitor$Frame.recordNonOveridableMethodCall(Te
stabilityVisitor.java:388)
at
com.google.test.metric.TestabilityVisitor$CostRecordingFrame.applyImplicitCost(T
estabilityVisitor.java:144)
at
com.google.test.metric.MetricComputer.addSetterInjection(MetricComputer.java:94)
at com.google.test.metric.MetricComputer.compute(MetricComputer.java:82)
at com.google.test.metric.MetricComputer.compute(MetricComputer.java:56)
at com.google.test.metric.Testability.execute(Testability.java:272)
at com.google.test.metric.Testability.main(Testability.java:142)
at com.google.test.metric.Testability.main(Testability.java:135)
Caused by: java.io.FileNotFoundException: .... (Too many open files)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at
com.google.classpath.DirectoryClassPath.getResourceAsStream(DirectoryClassPath.j
ava:80)
Original issue reported on code.google.com by [email protected]
on 13 Aug 2009 at 6:08
What steps will reproduce the problem?
1. Click on the [+] signs in html report.
What is the expected output? What do you see instead?
Nothing happens. Info about JavaScript error shows i IE status bar.
Error:
'firstChild'is empty or is not an object
(this is my translation from Polish)
What version of the product are you using? On what operating system?
version 1.3 Windows XP
Please provide any additional information below.
A change in method "clickHandler" in
"src/com/google/test/metric/report/report.js" is needed.
instead of:
"var element = event.target;"
you can code:
"var element = event.target != undefined? event.target: event.srcElement;"
Original issue reported on code.google.com by [email protected]
on 2 Mar 2009 at 2:11
GUICE it!
Original issue reported on code.google.com by [email protected]
on 1 Jul 2009 at 11:08
The readme[1] says that "The Maven plugin is not yet released to the Maven
central repository. To use it, you'll need to build it from source:".
However, TE is now in Maven central repo[2] and therefore one can just
update the POM file.
In addition, the available options lsits ...:maven2-te... instead of
...:maven-te... that is the correct artifactId.
[1] http://code.google.com/p/testability-explorer/wiki/Readme
[2]
http://repo1.maven.org/maven2/com/google/testability-explorer/maven-testability-
plugin/
Original issue reported on code.google.com by [email protected]
on 30 Oct 2009 at 1:40
What steps will reproduce the problem?
1.Run mvn test on core on a machine with a non-US local
What is the expected output? What do you see instead?
Tests should pass, but they don't
What version of the product are you using? On what operating system?
1.32-SNAPSHOT
Please provide any additional information below.
Patch included
Original issue reported on code.google.com by [email protected]
on 18 Jun 2009 at 3:15
Attachments:
What steps will reproduce the problem?
1. Have some method which creates a new Date object inline and does some
work with it
2. Run TE on said class / method
What is the expected output? What do you see instead?
The report shows that the method is super testable, because, all java.*
classes are whitelisted. I am not sure this is the correct approach,
because creating a bunch of date objects inline is a sure fire way to make
code untestable. But the report would say otherwise. Maybe the solution is
that instead of just whitelisting, atleast assign a token cost so that the
issue is atleast raised ?
I am not sure what the best way forward is, but its definitely not
whitelisting every java class.
Original issue reported on code.google.com by shyamseshadri
on 27 Mar 2009 at 8:09
As a (potential) contributor to the Testability Explorer Maven plugin, I
would like to be able to include TE in scheduled builds.
This is currently more difficult than it needs to be, as the pom.xml does
not include a pointer to the subversion repository. Ideally adding the
projects would be as simple as uploading/pointing to the root POM, rather
than providing the SVN URL separately; this would also allow the repository
location to change (which, although unlikely, is always a possibility).
In addition, not having the SCM information available in the POM can cause
problems: http://www.nabble.com/two-builds-with-one-error-td21906111.html
discusses an issue that one CI program has in this situation.
The attached patch provides basic SCM information, but see
http://maven.apache.org/pom.html#SCM for the full set of configuration items.
Original issue reported on code.google.com by [email protected]
on 15 Apr 2009 at 1:37
Attachments:
There are two standard plugin naming conventions maven-*-plugin or
*-maven-plugin. We
should really follow convention. Especially since there's a resolver
internally that knows about this
convention for quick goal resolution.
Additionally, the version shouldn't really track the core tool's version, since
the core tool is a
separate piece of software which can be released separately from the plugin.
This would allow us
more flexibility in releasing, since we can fix bugs in the plugin without
having to roll a new release
of core.
Original issue reported on code.google.com by [email protected]
on 23 Apr 2009 at 9:09
When I load the project into an IDE using the pom.xml as the sole source of
metadata, I don't get any of the code from the eclipse plugin in the build
path. It seems difficult to get a correct environment to work on the
eclipse plugin concurrently with core or other modules.
We should get maven to do the right OSGI magic to build the plugin without
using ant.
Original issue reported on code.google.com by aeagle22206
on 18 Aug 2009 at 9:03
As a developer with a testability issue, I'd like to see a mocked up
setUp() method, to help me understand the tangible cost of writing the test.
Original issue reported on code.google.com by aeagle22206
on 14 Apr 2009 at 5:54
There are several components within this project, and the defaults for
components in this issues
system aren't really appropriate for it. I recommend the administrators
change the components
to include at least
Component-core
Component-core-reports
Component-core-parser
Component-core-metrics-rules
Component-core-infrastructure
Component-maven-plugin
Component-ant-task
Original issue reported on code.google.com by [email protected]
on 23 Apr 2009 at 9:14
What steps will reproduce the problem?
1. mvn clean site
What is the expected output? What do you see instead?
- Expect to see report generated. Instead the process runs for a long
time, and quits with OOM:
WARNING: class not found: ####CENSORED BY SUBMITTER####
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Java heap space
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.OutOfMemoryError: Java heap space
at org.objectweb.asm.ClassReader.a(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at
com.google.test.metric.JavaClassRepository.parseClass(JavaClassRepository.java:7
5)
at
com.google.test.metric.JavaClassRepository.getClass(JavaClassRepository.java:47)
at
com.google.test.metric.TestabilityVisitor$Frame.recordMethodCall(TestabilityVisi
tor.java:359)
at
com.google.test.metric.method.op.turing.MethodInvokation.visit(MethodInvokation.
java:67)
at
com.google.test.metric.TestabilityVisitor$Frame.applyMethodOperations(Testabilit
yVisitor.java:332)
at
com.google.test.metric.TestabilityVisitor$CostRecordingFrame.applyMethodOperatio
ns(TestabilityVisitor.java:15
6)
at
com.google.test.metric.MetricComputer.compute(MetricComputer.java:85)
at
com.google.test.metric.MetricComputer.compute(MetricComputer.java:56)
at
com.google.test.metric.JavaTestabilityRunner.run(JavaTestabilityRunner.java:77)
at
com.google.maven.TestabilityExplorerMojo.executeReport(TestabilityExplorerMojo.j
ava:188)
at
org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java
:98)
What version of the product are you using? On what operating system?
- 1.3.1-SNAPSHOT, Windows XP
Please provide any additional information below.
- I was able to work around the problem by adding MAVEN_OPTS=-Xmx1g
Original issue reported on code.google.com by [email protected]
on 29 Apr 2009 at 6:02
Import project via maven eclipse plugin, and you end up with some builders that
are pulled in
because of existing eclipse metadata. Specifically the ANTLR eclipse builder
jobs have references
to ${M2REPO} and {workspace_loc:/testability-explorer-core} neither of which
exist.
The former can be set up as a library if desired, and the latter doesn't work
because m2eclipse
names the project after the artifactId, so it should be {workspace_loc:/core}
But in fact, I wonder if having the eclipse metadata in svn is the right answer
at all? I'd rather
remove it, because eclipse metadata tends to badly blend user-specific and
project specific
settings (just pay attention to your .settings folder in some projects - total
mix of personal and
project metadata). It becomes very hard to version and not clobber each other.
So I recommend removing .project, .classpath, and .settings entirely from svn
and svn:ignore-ing
them.
Original issue reported on code.google.com by [email protected]
on 23 Apr 2009 at 7:14
I built the maven testability from 1.3.2 tag from
http://testability-explorer.googlecode.com/svn/tags/testability-explorer-1.3.2
Then I am trying to use the plugin for my project as follow,
<reporting>
<plugins>
<plugin>
<groupId>com.google.testability-explorer</groupId>
<artifactId>maven-testability-plugin</artifactId>
<version>1.3.2</version>
</plugin>
</plugins>
</reporting>
It fails with the following error, can someone help solve this issue?
Also it will be great if you can post all the steps about the
installation of this tool
D:\ebox06-19-09\ebox\WS100509\EboxDsf>mvn site
[INFO] Scanning for projects...
WAGON_VERSION: 1.0-beta-2
[INFO]
------------------------------------------------------------------------
[INFO] Building EboxDsf
[INFO] task-segment: [site]
[INFO]
------------------------------------------------------------------------
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus
.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] **************************************************************
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File: org\apache\velocity\runtime\defaults
\velocity.pr
operties
[INFO] Default ResourceManager initializing. (class
org.apache.velocity.runtime.
resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated:
org.codehaus.plexus.velocity.ContextClassLo
aderResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class
org.apache.velocity.runtime.resource.
ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template :
VM_global_library.vm
[ERROR] ResourceManager : unable to find resource
'VM_global_library.vm' in any
resource loader.
[INFO] Velocimacro : error using VM library template
VM_global_library.vm : org
.apache.velocity.exception.ResourceNotFoundException: Unable to find
resource 'V
M_global_library.vm'
[INFO] Velocimacro : VM library template macro registration complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined inline in
templates
[INFO] Velocimacro : allowInlineToOverride = false : VMs defined
inline may NOT
replace previous VM definitions
[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
will be glob
al in scope if allowed.
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus
.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] Preparing testability:testability
[INFO] [enforcer:enforce {execution: default}]
[INFO] Preparing v4:prebuild
[WARNING] Removing: prebuild from forked lifecycle, to prevent
recursive invocat
ion.
[INFO] [enforcer:enforce {execution: default}]
[INFO] Preparing v4:process-css
[WARNING] Removing: prebuild from forked lifecycle, to prevent
recursive invocat
ion.
[INFO] [enforcer:enforce {execution: default}]
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [v4:process-css]
[INFO] [v4:process-js]
[INFO] [v4:process-content]
[INFO] content processing is off - skip content processing
[INFO] [v4:process-flash]
[INFO] [v4:prebuild {execution: ebox-v4-prebuild}]
[INFO] [resources:resources]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] [ebayBuildId:create {execution: default}]
BuildInfoGeneratorMojo: starting...
BuildInfoGeneratorMojo: build information was not provided.
[INFO] [ebayBuildId:generate {execution: default}]
BuildConfigVarGeneratorMojo: starting...
BuildConfigVarGeneratorMojo: build information was not provided.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] Preparing surefire-report:report
[WARNING] Removing: prebuild from forked lifecycle, to prevent
recursive invocat
ion.
[INFO] [enforcer:enforce {execution: default}]
[INFO] [resources:resources]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] [ebayBuildId:create {execution: default}]
BuildInfoGeneratorMojo: starting...
BuildInfoGeneratorMojo: build information was not provided.
[INFO] [ebayBuildId:generate {execution: default}]
BuildConfigVarGeneratorMojo: starting...
BuildConfigVarGeneratorMojo: build information was not provided.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] Preparing v4:resource-extraction
[WARNING] Removing: resource-extraction from forked lifecycle, to
prevent recurs
ive invocation.
[WARNING] Removing: prebuild from forked lifecycle, to prevent
recursive invocat
ion.
[INFO] [enforcer:enforce {execution: default}]
[INFO] [resources:resources]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] [ebayBuildId:create {execution: default}]
BuildInfoGeneratorMojo: starting...
BuildInfoGeneratorMojo: build information was not provided.
[INFO] [ebayBuildId:generate {execution: default}]
BuildConfigVarGeneratorMojo: starting...
BuildConfigVarGeneratorMojo: build information was not provided.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [v4:extract]
[INFO] resource externalization is off - skip resource externalization
[INFO] [v4:image]
[INFO] [v4:resource-extraction {execution: default}]
[INFO] [resources:testResources]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory: D:\ebox06-19-09\ebox\WS100509\EboxDsf
\target\s
urefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] Preparing surefire-report:report-only
[WARNING] Removing: prebuild from forked lifecycle, to prevent
recursive invocat
ion.
[INFO] [enforcer:enforce {execution: default}]
[INFO] Preparing cobertura:cobertura
[WARNING] Removing: prebuild from forked lifecycle, to prevent
recursive invocat
ion.
[INFO] [enforcer:enforce {execution: default}]
[INFO] [resources:resources]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] [ebayBuildId:create {execution: default}]
BuildInfoGeneratorMojo: starting...
BuildInfoGeneratorMojo: build information was not provided.
[INFO] [ebayBuildId:generate {execution: default}]
BuildConfigVarGeneratorMojo: starting...
BuildConfigVarGeneratorMojo: build information was not provided.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] Preparing v4:resource-extraction
[WARNING] Removing: resource-extraction from forked lifecycle, to
prevent recurs
ive invocation.
[WARNING] Removing: prebuild from forked lifecycle, to prevent
recursive invocat
ion.
[INFO] [enforcer:enforce {execution: default}]
[INFO] [resources:resources]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] [ebayBuildId:create {execution: default}]
BuildInfoGeneratorMojo: starting...
BuildInfoGeneratorMojo: build information was not provided.
[INFO] [ebayBuildId:generate {execution: default}]
BuildConfigVarGeneratorMojo: starting...
BuildConfigVarGeneratorMojo: build information was not provided.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [v4:extract]
[INFO] resource externalization is off - skip resource externalization
[INFO] [v4:image]
[INFO] [v4:resource-extraction {execution: default}]
[INFO] [cobertura:instrument]
[INFO] Cobertura 1.7 - GNU GPL License (NO WARRANTY) - See COPYRIGHT
file
Cobertura: Loaded information on 63 classes.
Instrumenting 65 classes to D:\ebox06-19-09\ebox\WS100509\EboxDsf
\target\generat
ed-classes\cobertura
[cobertura] WARN [main]
net.sourceforge.cobertura.instrument.ClassInstrumenter
- No line number information found for class
com.ebay.ebox.content.EboxContentCo
nfigBean$1. Perhaps you need to compile with debug=true?
[cobertura] WARN [main]
net.sourceforge.cobertura.instrument.ClassInstrumenter
- No line number information found for class
com.ebay.ebox.web.component.HeaderF
ooterHtmlComponent$1. Perhaps you need to compile with debug=true?
Cobertura: Saved information on 63 classes.
Instrument time: 1265ms
[INFO] Instrumentation was successful.
[INFO] [resources:testResources]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory: D:\ebox06-19-09\ebox\WS100509\EboxDsf
\target\s
urefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus
.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [site:site]
[WARNING] Unable to load parent project from repository: Could not
find the mode
l file 'D:\ebox06-19-09\ebox\WS100509\EboxDsf\..\pom.xml'. for project
unknown
[WARNING] No URL defined for the project - decoration links will not
be resolved
[INFO] Skipped "Maven Surefire Report" report, file "surefire-
report.html" alrea
dy exists for the English version.
[INFO] Generate "Testability Explorer" report.
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Guice provision errors:
1) Error in custom provider, java.lang.RuntimeException:
java.lang.reflect.Invoc
ationTargetException
at
com.google.maven.MavenConfigModule.generateHtmlReportAsWellAsRequestedForma
t(MavenConfigModule.java:68)
while locating com.google.test.metric.report.ReportGenerator
for parameter 0 at
com.google.test.metric.JavaTestabilityRunner.<init>(JavaT
estabilityRunner.java:54)
while locating com.google.test.metric.JavaTestabilityRunner
1 error
org.apache.log.Hierarchy
[INFO]
------------------------------------------------------------------------
[INFO] Trace
com.google.inject.ProvisionException: Guice provision errors:
1) Error in custom provider, java.lang.RuntimeException:
java.lang.reflect.Invoc
ationTargetException
at
com.google.maven.MavenConfigModule.generateHtmlReportAsWellAsRequestedForma
t(MavenConfigModule.java:68)
while locating com.google.test.metric.report.ReportGenerator
for parameter 0 at
com.google.test.metric.JavaTestabilityRunner.<init>(JavaT
estabilityRunner.java:54)
while locating com.google.test.metric.JavaTestabilityRunner
1 error
at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:767)
at com.google.inject.InjectorImpl.getInstance
(InjectorImpl.java:793)
at com.google.maven.TestabilityExplorerMojo.executeReport
(TestabilityExp
lorerMojo.java:177)
at org.apache.maven.reporting.AbstractMavenReport.generate
(AbstractMaven
Report.java:98)
at
org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(R
eportDocumentRenderer.java:67)
at
org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(
DefaultSiteRenderer.java:239)
at
org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(Defaul
tSiteRenderer.java:115)
at org.apache.maven.plugins.site.SiteMojo.renderLocale
(SiteMojo.java:124
)
at org.apache.maven.plugins.site.SiteMojo.execute
(SiteMojo.java:92)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo
(DefaultPlugi
nManager.java:451)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:558)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:499)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:478)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLi
fecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at org.codehaus.classworlds.Launcher.launchEnhanced
(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode
(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetExcepti
on
at com.google.inject.internal.ProviderMethod.get
(ProviderMethod.java:106
)
at com.google.inject.InternalFactoryToProviderAdapter.get
(InternalFactor
yToProviderAdapter.java:48)
at com.google.inject.SingleParameterInjector.inject
(SingleParameterInjec
tor.java:42)
at com.google.inject.SingleParameterInjector.getAll
(SingleParameterInjec
tor.java:66)
at com.google.inject.ConstructorInjector.construct
(ConstructorInjector.j
ava:84)
at com.google.inject.ConstructorBindingImpl$Factory.get
(ConstructorBindi
ngImpl.java:111)
at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:
758)
at com.google.inject.InjectorImpl.callInContext
(InjectorImpl.java:804)
at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:754)
... 26 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at com.google.inject.internal.ProviderMethod.get
(ProviderMethod.java:101
)
... 34 more
Caused by: java.lang.NoClassDefFoundError: org.apache.log.Hierarchy
at freemarker.log.AvalonLoggerFactory.getLogger
(AvalonLoggerFactory.java
:65)
at freemarker.log.Logger.getLogger(Logger.java:255)
at freemarker.template.utility.SecurityUtilities.<clinit>
(SecurityUtilit
ies.java:67)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
at freemarker.ext.beans.BeansWrapper.<clinit>
(BeansWrapper.java:147)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
at freemarker.template.ObjectWrapper.<clinit>
(ObjectWrapper.java:69)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
at freemarker.core.Configurable.<init>(Configurable.java:132)
at freemarker.template.Configuration.<init>(Configuration.java:
109)
at freemarker.template.Configuration.<clinit>
(Configuration.java:96)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
at com.google.test.metric.ReportGeneratorProvider.build
(ReportGeneratorP
rovider.java:104)
at com.google.test.metric.ReportGeneratorProvider.get
(ReportGeneratorPro
vider.java:174)
at
com.google.maven.MavenConfigModule.generateHtmlReportAsWellAsRequeste
dFormat(MavenConfigModule.java:71)
... 39 more
Caused by: java.lang.ClassNotFoundException: org.apache.log.Hierarchy
at java.lang.ClassNotFoundException.<init>
(ClassNotFoundException.java:7
6)
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
at org.codehaus.classworlds.RealmClassLoader.loadClassDirect
(RealmClassL
oader.java:195)
at org.codehaus.classworlds.DefaultClassRealm.loadClass
(DefaultClassReal
m.java:232)
at org.codehaus.classworlds.DefaultClassRealm.loadClass
(DefaultClassReal
m.java:274)
at org.codehaus.classworlds.RealmClassLoader.loadClass
(RealmClassLoader.
java:214)
at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
... 58 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Thu Oct 08 17:06:01 PDT 2009
[INFO] Final Memory: 36M/126M
[INFO]
------------------------------------------------------------------------
D:\ebox06-19-09\ebox\WS100509\EboxDsf>
Original issue reported on code.google.com by [email protected]
on 12 Oct 2009 at 9:45
Graphs embedded in the HTML report are created by inline calls to the
Google Charts API. This makes the reports impossible to view or create on
any machine that does not have internet access.
Using a built-in charting library would solve this problem and allow for
more detailed and clickable graphs to be produced without privacy worries.
Original issue reported on code.google.com by [email protected]
on 20 Nov 2008 at 11:46
What steps will reproduce the problem?
1. Build a Maven Project with a base class
2. Build a Maven Project with a class that extends a class from the first
project, or uses a class from the first project
3. Run Testability Explorer using the Maven plugin on the Second project.
What is the expected output? What do you see instead?
Expected: The Testability Report for the second project will include all
classes from the second project, and will presumably include transitive
costs from dependencies on classes in the first project.
Observed: Testability Explorer cannot find classes from the first project
for analysis, causing scores to be ignored, if the are a dependency, or
preventing analysis of a class in the second project if it extends a class
in the first project.
Trace Output:
------------------------------------------------------------------------
[INFO] Building Unnamed -
com.defect.example:consumer-project:jar:0.0.1-SNAPSHOT
[INFO] task-segment:
[com.google.testability-explorer:maven2-testability-plugin:1.3.1-SNAPSHOT:testab
ility]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing 2-testability:testability
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [2-testability:testability]
WARNING: class not found: com.defect.example.BaseClass
WARNING: can not analyze class 'com.defect.example.consumer.ExtenderClass'
since class 'com/defect/example/BaseClass' was not found.
------------------------------------------------------------------------
What version of the product are you using? On what operating system?
- 1.3.1-SNAPSHOT, Windows XP
Please provide any additional information below.
- Providing source as part of the first project's deployment does not
resolve the issue.
- Attached is two simple projects with an aggregator, that demonstrates the
issue when Testability explorer is run on the consumer-project.
Original issue reported on code.google.com by [email protected]
on 12 May 2009 at 6:39
Attachments:
Forwarded conversation
Subject: new in constructor
------------------------
From: Christian Gruber <[email protected]>
Date: Fri, Apr 24, 2009 at 11:05 AM
To: Alex Eagle <[email protected]>, Misko Hevery <[email protected]>
Cc: [email protected]
So I have code that I'm testing the TE maven plugin on, and it's flagging
"new in the constructor". The "new" in this case is my call to super(...).
I can't avoid it in this case, since super() sets a private final variable
with the parameter - it's the only way in. So it's not really complaining
about "new" except insofar as it sees the hard-dependency of new - which is
inherent in implementation inheritance anyway. So I think either this
special case should be labelled differently (in which case we're saying
that inheritance is a non-mockable dependency and therefore is bad) or
displayed differently - perhaps by flagging that the class is inheriting
complexity.
But there's no way to mock the superclass (which is I guess the point) and
while it's often misused, it is a valid thing to use inheritance where
appropriate. Any thoughts on how to describe this?
the class in question is here:
http://code.google.com/p/israfil-micro/source/browse/trunk/israfil-micro-contain
er/src/main/java/net/israfil/micro/container/DefaultContainer.java
and it's superclass is here:
http://code.google.com/p/israfil-micro/source/browse/trunk/israfil-micro-contain
er/src/main/java/net/israfil/micro/container/AbstractContainer.java
(for the record, if you do look at it - it's Java 1.1 code so it can go on
a CLDC, so there's no post 1.2 JDK niceties.)
Christian.
----
Christian Edward Gruber - Software Excellence Ninja, Engineering Productivity
Google :::: +1 (212) 565-9427 [work] :::: +1 (289) 221-9839 [cell]
:::: [email protected]
----------
From: Miško Hevery <[email protected]>
Date: 2009/4/29
To: Christian Gruber <[email protected]>
Cc: Alex Eagle <[email protected]>, [email protected]
Hi Christian,
I am not sure what you are asking here. You have a class and a report flags
the call to super as expensive, (If I understand it correctly). Are you
looking for a name for the pattern?
-- Misko
----------
From: Christian Edward Gruber <[email protected]>
Date: Wed, Apr 29, 2009 at 9:10 AM
To: [email protected]
More or less. The case shows up as "new" (which it is, in Java), but
it's an implicit new in the code because it's a super() call. So
there are two things:
1. Name it differently so that it's clear what cause is being
identified - a lot of java programmers wouldn't equate super() with
"new"
2. I'm wondering about the costs. If I have
public class MySuperClass {
private final Service1 service;
public MySuperClass(Service1 service) { this.service = service; }
public Object aMethod() {
return process(service.doSomething());
}
...
}
public class MySubClass extends MySuperClass {
private final Service2 service2;
public MySubClass(Service1 service, Service2 service2) {
super(service);
this.service2 = service2;
}
public Object doSomeOtherThing() {
return process(service2.doSomeOtherThing());
}
....
}
This case has some additional complexity because of the parent, but
from a testability perspective, the constructors nly assign to final
variables, and everything is mockable except for the actual real
methods, and they do a minimum of work that's additive, and that
should count. But the new in the constructor is given a fixed cost
that seems more expensive than the actual cost-to-testability here.
(You can always argue that I can re-work this into composition and
delegation, but I'm presuming some logical API that follows LSP and
really does need to have inheritance to be reasonably structured)
cheers,
Christian.
Christian Edward Gruber
e-mail: [email protected]
weblog: http://www.geekinasuit.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Testability Explorer" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/testability-explorer?hl=en
-~----------~----~----~----~------~----~------~--~---
----------
From: Misko Hevery <[email protected]>
Date: Wed, Apr 29, 2009 at 9:13 AM
To: [email protected]
Ohh now I get it call to super comes over as new. You are right that is not
obvious.
Yeah, we should name that a bit different.
-- Misko
Original issue reported on code.google.com by aeagle22206
on 4 May 2009 at 9:14
What steps will reproduce the problem?
1. clean checkout, go to core and run mvn package
2. run java -cp target/core-1.3.1-SNAPSHOT-with-deps.jar
com.google.test.metric.Testability -print source .
3. Observe 0% on packages in the source report (te-report/index.html)
What is the expected output? What do you see instead?
Should get the percentage of good, ok, needs work classes per package
Original issue reported on code.google.com by aeagle22206
on 15 Apr 2009 at 1:29
What steps will reproduce the problem?
1. Attempt to run TE with print="xml" in a non-Sun JVM
What is the expected output? What do you see instead?
An xml report should be generated, but a NoClassDef.. is thrown instead.
java.lang.NoClassDefFoundError:
com.sun.org.apache.xml.internal.serialize.XMLSerializer
What version of the product are you using? On what operating system?
Ant 1.7.7
IBM JDK 1.6
Linux
Please provide any additional information below.
I've take a look at the code and I know what the problem is. I will submit
a patch for it ASAP.
Original issue reported on code.google.com by [email protected]
on 9 Feb 2010 at 12:30
As a user, when I rename a class or do other refactors, I want the
testability diff to be smarter and not see an add/delete, so I don't get
distracting noise.
Original issue reported on code.google.com by aeagle22206
on 14 Apr 2009 at 5:56
As Eclipse user working on a 10Million LOC project, I would like to perform
testability analysis on a subset of the classes selected with Crtl or
adding the testability runner to the right-click menu. Currently the only
way to restrict the selection is to insert all the other classes inside
the white list.
Original issue reported on code.google.com by [email protected]
on 21 Jul 2009 at 2:12
Always use human readable names in the MethodInfo and MethodCost
Original issue reported on code.google.com by [email protected]
on 1 Jul 2009 at 11:25
I might like to run testability with a "check" goal that takes the result
and fails the build if certain criteria are not met in the testability
results xml file.
Also, I might just want to create a report and not fail the build.
Therefore, I think it might be nice to have a couple of goals "mojos" to
allow for this type of thing.
See the maven cobertura or pmd plugins for an example.
Original issue reported on code.google.com by [email protected]
on 7 Mar 2009 at 10:18
This code doesnt work
@Inject
@Named("bla")
List < String > blaList;
However it works when I change it
@Inject
@Named("bla")
List blaList;
bind(List.class).annotatedWith(Names.named("bla")).toInstance(BlaList);
Original issue reported on code.google.com by [email protected]
on 17 Jun 2010 at 11:15
As a continuous build owner, I would like to generate a testability report
in HTML or other format from stored XML testability data, so that I can
show informative reports without re-running the analysis.
Original issue reported on code.google.com by aeagle22206
on 19 Mar 2009 at 4:34
What steps will reproduce the problem?
1. Check out my project:
svn checkout https://contributions.coremedia.com/svn/isobox4j/trunk isobox4j
2. Run testability:testability
3. Have a look at the scores. The scores are too high (see stem graph)
4. Have a look at the reasons for the score. Sometimes a constructor is
reported 10 times with some obscure message (at least obscure at this place)
I am using the 1.3.1-SNAPSHOT trunk
Original issue reported on code.google.com by Sebastian.Annies
on 26 Apr 2009 at 2:09
Attachments:
What steps will reproduce the problem?
1. run the maven 2 plugin
2.
3.
What is the expected output? What do you see instead?
I expect the plugin will only run testability on the classes for a give
project not all of the dependencies of that project.
Also, the plugin should have a better artifactId that identifies the plugin.
I have fixed these issues in the attached patch.
Original issue reported on code.google.com by [email protected]
on 27 Feb 2009 at 12:21
Attachments:
What steps will reproduce the problem?
1. Sync to revision 368 to MAIN (currently 376)
2. mvn clean install
3. cd core
4. mvn -X
com.google.testability-explorer:maven2-testability-plugin:1.3.1-SNAPSHOT:testabi
lity
What is the expected output? What do you see instead?
- successfully run testability explorer
- instead sees "java.lang.ClassNotFoundException:
com.google.test.metric.report.Report" (see attached)
What version of the product are you using? On what operating system?
- revision 376 (head) on XP
Original issue reported on code.google.com by [email protected]
on 27 May 2009 at 2:54
Attachments:
see http://jira.codehaus.org/browse/SONARPLUGINS-40
Sonar is an open-source project metrics dashboard.
As a Sonar user, I would like to see a testability metric included in the
metrics about my project.
Original issue reported on code.google.com by aeagle22206
on 4 May 2009 at 9:50
What steps will reproduce the problem?
1. Have a main method with some complexity (say static method calls or
something)
2. Report shows up with main method being untestable
What is the expected output? What do you see instead?
I am not sure that we should be seeing main methods as untestable ? Do we
even test main methods ? I mean, the whole point is we move our untestable,
wiring up logic to main methods, and then I see them in the reports. That
just seems backwards to me.
But should we whitelist, filter ? I dunno. Just throwing it out there.
Original issue reported on code.google.com by shyamseshadri
on 27 Mar 2009 at 8:07
As a developer of applications that use the "enterprise archive" (EAR)
format, I would like to be able to scan such files by including them on the
classpath as follows:
$ testability-explorer.sh com.acme -cp my-app-1.0.ear
An EAR file is simply a ZIP-format file that contains one or more other
ZIP-format files in its top-level folder, see
http://en.wikipedia.org/wiki/EAR_%28file_format%29.
With the tool as it currently stands, I have to unpack the EAR file
manually and add each individual archive (JAR, WAR, etc.) to the classpath.
Original issue reported on code.google.com by [email protected]
on 5 Aug 2009 at 5:56
What steps will reproduce the problem?
1. create a build.xml with the testability-explorer ant task def
2. add your build directory with the proper class files to it's classpath
3. invoke the testability target you just created
What is the expected output? What do you see instead?
Expected: Proper testability report generated.
Actual: ZipException:
java.lang.RuntimeException: java.util.zip.ZipException: error in opening
zip file
at com.google.classpath.ClassPathFactory.createFromPaths
(ClassPathFactory.java:50)
at com.google.classpath.ClassPathFactory.createFromPath
(ClassPathFactory.java:39)
at com.google.test.metric.Testability.getClassPath
(Testability.java:248)
at com.google.test.metric.Testability.postParse
(Testability.java:190)
What version of the product are you using? On what operating system?
Testability v1.3.0 r275, same for the ant taskdef, operating system Linux
2.6.28, java version 1.6.0_11
Please provide any additional information below.
Full stacktrace as shown on my screen:
java.lang.RuntimeException: java.util.zip.ZipException: error in opening
zip file
at com.google.classpath.ClassPathFactory.createFromPaths
(ClassPathFactory.java:50)
at com.google.classpath.ClassPathFactory.createFromPath
(ClassPathFactory.java:39)
at com.google.test.metric.Testability.getClassPath
(Testability.java:248)
at com.google.test.metric.Testability.postParse
(Testability.java:190)
at com.google.test.metric.Testability.execute
(Testability.java:252)
at com.google.test.metric.Testability.main
(Testability.java:142)
at com.google.ant.TestabilityTask.runTestabilityExplorer
(TestabilityTask.java:113)
at com.google.ant.TestabilityTask.execute
(TestabilityTask.java:100)
at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown
Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke
(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets
(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:114)
at java.util.jar.JarFile.<init>(JarFile.java:133)
at java.util.jar.JarFile.<init>(JarFile.java:97)
at com.google.classpath.JARClassPath.loadEntries
(JARClassPath.java:47)
at com.google.classpath.ClassPathFactory.createFromPaths
(ClassPathFactory.java:48)
... 23 more
Original issue reported on code.google.com by [email protected]
on 18 Jan 2009 at 6:45
Run a report on any project that has static initialization. In the source
report, the static initializer is labeled as if there's a constructor at
that line.
Original issue reported on code.google.com by aeagle22206
on 25 Jun 2009 at 9:20
Write a User Story describing your role, what you'd like Testability
Explorer to do, and why.
For example:
As a project developer, I would like to see the testability score for each
class in my project, sorted highest score first, so that I can improve the
testability of my worst classes.
Original issue reported on code.google.com by aeagle22206
on 14 Apr 2009 at 5:57
This should run on any packaging that has classes. There are soooo many
different types of packaging, such as war, ear, jbi, and many many more
that I want to run testability-explorer on because they have code. This
check should only not run if the packaging is a "pom" project and if there
are not classes.
Original issue reported on code.google.com by [email protected]
on 7 Mar 2009 at 10:08
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.