Evosuite仅生成几个测试用例

时间:2018-10-08 11:51:56

标签: java evosuite

我正在尝试Evosuite,发现它仅生成一些测试用例。这可能是配置/输入问题吗?

正在测试的类:(一个非常简单的评估类)

public class ComputeEngine {
    public Integer add(Integer a, Integer b) {
        if (a == null) {
            a = 0;
        }

        if (b == null) {
            b = 0;
        }

        return a + b;
    }
}

Evosuite生成一些测试用例:

/*
 * This file was automatically generated by EvoSuite
 * Mon Oct 08 10:54:53 GMT 2018
 */

@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) 
public class ComputeEngine_ESTest extends ComputeEngine_ESTest_scaffolding {

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      ComputeEngine computeEngine0 = new ComputeEngine();
      Integer integer0 = new Integer((-3145));
      Integer integer1 = computeEngine0.add((Integer) null, integer0);
      assertEquals((-3145), (int)integer1);
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      ComputeEngine computeEngine0 = new ComputeEngine();
      Integer integer0 = new Integer(394);
      Integer integer1 = computeEngine0.add(integer0, integer0);
      assertEquals(788, (int)integer1);
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      ComputeEngine computeEngine0 = new ComputeEngine();
      Integer integer0 = new Integer(2976);
      Integer integer1 = computeEngine0.add(integer0, (Integer) null);
      assertEquals(2976, (int)integer1);
  }

  @Test(timeout = 4000)
  public void test3()  throws Throwable  {
      ComputeEngine computeEngine0 = new ComputeEngine();
      Integer integer0 = computeEngine0.add((Integer) null, (Integer) null);
      Integer integer1 = computeEngine0.add(integer0, integer0);
      assertEquals(0, (int)integer1);
  }
}

我至少会期望其他许多情况,或者这不是Evosuite的目的吗?

0 个答案:

没有答案