Please provide below a detailed introduction to the issue itself, and describe what you were doing when the issue happened. Or, what do you want to achieve?
Generate test cases for Akka Actors.
Steps to Reproduce
Please break down here below all the needed steps to reproduce the issue.
[If possible, please upload an example of the project you are generating tests for.]
Create a class which extends akka.actor.AbstractActor
Generate test for class which extends akka.actor.AbstractActor
Example:
import akka.actor.AbstractActor;
public final class TestClassDemo extends AbstractActor{
@Override
public Receive createReceive() {
// TODO Auto-generated method stub
return null;
}
}
EvoSuite Arguments
Please provide the whole EvoSuite commmand you executed (if relevant)
-projectCP target\classes -class com.test.TestClassDemo
Current Result
Please describe here below the current result you got (if relevant)
[if relevant, include a screenshot]
Generated the test case as below. ( initialization of actor failed. )
public class TestClassDemo_ESTest extends TestClassDemo_ESTest_scaffolding {
} catch(RuntimeException e) {
//
// You cannot create an instance of [com.bt.TestClassDemo] explicitly using the constructor (new). You have to use one of the 'actorOf' factory methods to create a new actor. See the documentation.
//
verifyException("akka.actor.ActorInitializationException$", e);
}
}
Expected result
Please describe here below what should be the expected behavior (if relevant)
Successful test case creation.
Additional info
Please add any information of interest here below
please help me to initialize the actor class.
Thanks for reporting this. What do you expect EvoSuite to do? The class has a constructor, EvoSuite calls it - it has no way of knowing that this is not the preferred way of doing it.
Context
Please provide below a detailed introduction to the issue itself, and describe what you were doing when the issue happened. Or, what do you want to achieve?
Generate test cases for Akka Actors.
Steps to Reproduce
Please break down here below all the needed steps to reproduce the issue. [If possible, please upload an example of the project you are generating tests for.]
Generate test for class which extends akka.actor.AbstractActor Example:
import akka.actor.AbstractActor; public final class TestClassDemo extends AbstractActor{ @Override public Receive createReceive() { // TODO Auto-generated method stub return null; } }
EvoSuite Arguments
Please provide the whole EvoSuite commmand you executed (if relevant) -projectCP target\classes -class com.test.TestClassDemo
Current Result
Please describe here below the current result you got (if relevant) [if relevant, include a screenshot]
Generated the test case as below. ( initialization of actor failed. )
public class TestClassDemo_ESTest extends TestClassDemo_ESTest_scaffolding {
@Test(timeout = 4000) public void test1() throws Throwable { TestClassDemo testClassDemo0 = null; try { testClassDemo0 = new TestClassDemo(); fail("Expecting exception: RuntimeException");
}
Expected result
Please describe here below what should be the expected behavior (if relevant)
Successful test case creation.
Additional info
Please add any information of interest here below please help me to initialize the actor class.