java - NullPointerException when using EvoSuite -


i tried use new evosuite (0.1.1), however, has failed exception below. have tried several classes, result same. able finish without exception. using ubuntu 14.04 64-bit java 8. -projectcp parameter correct. have attached output of simpler generation , cut.

command:

java -jar ../../sette-tool/test-generator-tools/evosuite/evosuite.jar -projectcp build -generatetests -dsearch_budget=10 -class hu.bme.mit.sette.snippets._1_basic.b2_conditionals.b2a_ifelse 

output:

* evosuite  * going generate test cases class: hu.bme.mit.sette.snippets._1_basic.b2_conditionals.b2a_ifelse * starting client * connecting master process on port 12480 * analyzing classpath:    - build * finished analyzing classpath * generating tests class hu.bme.mit.sette.snippets._1_basic.b2_conditionals.b2a_ifelse * test criteria:   - line coverage   - branch coverage   - exception   - mutation testing (weak)   - method-output coverage   - top-level method coverage * setting search algorithm individual test generation * total number of test goals:    - line 55   - branch 82   - exception 0   - mutationfactory 333   - output 18   - method 6 * total number of test goals: 494 * budget: 10  ! budget exceeded * ga-budget:     - maxtime :               1,431,415,037 / 10           finished!     - globaltime :                      16 / 600          ! #goals not covered: 125 * search finished after 14s, 11 statements, best individual has fitness 145.43707410246085 * covered 369/494 goals * coverage of criterion line: 73% * number of covered goals: 40 * coverage of criterion branch: 77% * number of covered goals: 63 * coverage of criterion exception: 100% (no goals) * coverage of criterion weakmutation: 74% * number of covered goals: 248 * coverage of criterion output: 67% * number of covered goals: 12 * coverage of criterion method: 100% * number of covered goals: 6 * resulting test suite: 2 tests, length 37 * computation finished [master] 09:17:17.601 [pool-1-thread-2] error clientnodeimpl - error when generating tests for: hu.bme.mit.sette.snippets._1_basic.b2_conditionals.b2a_ifelse seed 1431415019886. configuration id : null java.lang.nullpointerexception: null     @ org.evosuite.ga.chromosome.getnumofnotcoveredgoals(chromosome.java:415) ~[evosuite.jar:na]     @ org.evosuite.statistics.searchstatistics$ibranchgoalssequenceoutputvariablefactory.getvalue(searchstatistics.java:517) ~[evosuite.jar:na]     @ org.evosuite.statistics.searchstatistics$ibranchgoalssequenceoutputvariablefactory.getvalue(searchstatistics.java:509) ~[evosuite.jar:na]     @ org.evosuite.statistics.sequenceoutputvariablefactory.update(sequenceoutputvariablefactory.java:39) ~[evosuite.jar:na]     @ org.evosuite.statistics.searchstatistics.currentindividual(searchstatistics.java:159) ~[evosuite.jar:na]     @ org.evosuite.rmi.service.masternodeimpl.evosuite_collectstatistics(masternodeimpl.java:145) ~[evosuite.jar:na]     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) ~[na:1.8.0_45]     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) ~[na:1.8.0_45]     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) ~[na:1.8.0_45]     @ java.lang.reflect.method.invoke(method.java:497) ~[na:1.8.0_45]     @ sun.rmi.server.unicastserverref.dispatch(unicastserverref.java:323) ~[na:1.8.0_45]     @ sun.rmi.transport.transport$1.run(transport.java:200) ~[na:1.8.0_45]     @ sun.rmi.transport.transport$1.run(transport.java:197) ~[na:1.8.0_45]     @ java.security.accesscontroller.doprivileged(native method) ~[na:1.8.0_45]     @ sun.rmi.transport.transport.servicecall(transport.java:196) ~[na:1.8.0_45]     @ sun.rmi.transport.tcp.tcptransport.handlemessages(tcptransport.java:568) ~[na:1.8.0_45]     @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run0(tcptransport.java:826) ~[na:1.8.0_45]     @ sun.rmi.transport.tcp.tcptransport$connectionhandler.lambda$run$241(tcptransport.java:683) ~[na:1.8.0_45]     @ sun.rmi.transport.tcp.tcptransport$connectionhandler$$lambda$8/1383432533.run(unknown source) ~[na:na]     @ java.security.accesscontroller.doprivileged(native method) ~[na:1.8.0_45]     @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run(tcptransport.java:682) ~[na:1.8.0_45]     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142) [na:1.8.0_45]     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617) [na:1.8.0_45]     @ java.lang.thread.run(thread.java:745) [na:1.8.0_45]     @ sun.rmi.transport.streamremotecall.exceptionreceivedfromserver(streamremotecall.java:276) ~[na:1.8.0_45]     @ sun.rmi.transport.streamremotecall.executecall(streamremotecall.java:253) ~[na:1.8.0_45]     @ sun.rmi.server.unicastref.invoke(unicastref.java:162) ~[na:1.8.0_45]     @ java.rmi.server.remoteobjectinvocationhandler.invokeremotemethod(remoteobjectinvocationhandler.java:194) ~[na:1.8.0_45]     @ java.rmi.server.remoteobjectinvocationhandler.invoke(remoteobjectinvocationhandler.java:148) ~[na:1.8.0_45]     @ com.sun.proxy.$proxy9.evosuite_collectstatistics(unknown source) ~[na:na]     @ org.evosuite.rmi.service.clientnodeimpl.updatestatistics(clientnodeimpl.java:219) ~[evosuite.jar:na]     @ org.evosuite.statistics.statisticssender.sendindividualtomaster(statisticssender.java:46) ~[evosuite.jar:na]     @ org.evosuite.statistics.statisticssender.executedandthensendindividualtomaster(statisticssender.java:76) ~[evosuite.jar:na]     @ org.evosuite.testsuitegenerator.generatetests(testsuitegenerator.java:470) ~[evosuite.jar:na]     @ org.evosuite.testsuitegenerator.generatetestsuite(testsuitegenerator.java:252) ~[evosuite.jar:na]     @ org.evosuite.rmi.service.clientnodeimpl$1.run(clientnodeimpl.java:125) ~[evosuite.jar:na]     @ java.util.concurrent.executors$runnableadapter.call(executors.java:511) [na:1.8.0_45]     @ java.util.concurrent.futuretask.run(futuretask.java:266) [na:1.8.0_45]     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142) [na:1.8.0_45]     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617) [na:1.8.0_45]     @ java.lang.thread.run(thread.java:745) [na:1.8.0_45] 

code of class:

public final class b1b_constants {     private b1b_constants() {         throw new unsupportedoperationexception("static class");     }      public static final boolean const_boolean = true;     public static final byte const_byte = 123;     public static final short const_short = 12345;     public static final int const_int = 1234567890;     public static final long const_long = 1234567890123456789l;     public static final float const_float = 12345.67890f;     public static final double const_double = 1.2345678e90;     public static final char const_char = 'c';      public static boolean constboolean() {         return b1b_constants.const_boolean;     }      public static byte constbyte() {         return b1b_constants.const_byte;     }      public static short constshort() {         return b1b_constants.const_short;     }      public static int constint() {         return b1b_constants.const_int;     }      public static long constlong() {         return b1b_constants.const_long;     }      public static float constfloat() {         return b1b_constants.const_float;     }      public static double constdouble() {         return b1b_constants.const_double;     }      public static char constchar() {         return b1b_constants.const_char;     } } 

a npe bug in tool. however, not reproduce issue on machine (a mac 10.10). note evosuite targeted java 7. wondering if encountering side effects (eg handling of rmi) of java 8 here... (or jvm built ubuntu).

you might try run -dnew_statistics=false , see if still same issue.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -