Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


Help with Findbugs and automated tests

  • Hi Guys,

    Great job on this piece of software, congratulations! 

    I trying to find an way to activate the Findbugs using a Test class.
    This way I can force the team to solve all problems that findbugs reports in order to make the build pass.

    I have a draft of this class:
    public class FindBugTester {
    public static void main(String[] args) throws Exception {
    System.setProperty ("findbugs.home", "c:\\temp\\");
    String args2[] = new String[] {"-outputFile", "c:\\temp\\test.txt", "C:\\work\\exam\\target\\classes\\"};

    But I'm getting the error:
    Exception in thread "main" java.lang.AssertionError: no analysis passes
    at edu.umd.cs.findbugs.FindBugs2.analyzeApplication(
    at edu.umd.cs.findbugs.FindBugs2.execute(
    at edu.umd.cs.findbugs.FindBugs.runMain(
    at edu.umd.cs.findbugs.FindBugs2.main(
    at org.examcity.util.findbugs.FindBugTester.main(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at com.intellij.rt.execution.application.AppMain.main(

    The version that I'm using is:

    Any ideas?

    Thank you!