Unable to find any test data conversion strategy for parameter with name ArrayList<XXX>
2014-08-21 16:13
555 查看
1. Problem
EasyTest
2. Analysis
The cause is simple, I placed duplicated test method names in excel, and one of them had no test data. So the solution is obvious.
EasyTest
@RunWith(SpringTestRunner.class) @DataLoader(filePaths = { "fixture/versionedBasRequests.xls" }, loaderType = LoaderType.EXCEL) @ContextConfiguration(locations = "classpath*:applicationContext.xml") @ActiveProfiles("test") @TransactionConfiguration(transactionManager = "transactionManager") @Transactional public class BasRequestDaoTest { @Autowired private IBasRequestDao basRequestDao; @Test public void testGetCurrentVersionBetRequest( @Param(name = "ArrayList<BasRequest>") ArrayList<BasRequest> originalList, @Param(name = "targetBet") Integer targetBet, @Param(name = "currentVersion") Integer currentVersion) {
java.lang.AssertionError: Unable to find any test data conversion strategy for parameter with name ArrayList<BasRequest>and type class java.util.ArrayList at org.junit.Assert.fail(Assert.java:93) at org.easetech.easytest.annotation.Param$DataSupplier.getValueSources(Param.java:208) at org.easetech.easytest.internal.EasyAssignments.potentialsForNextUnassigned(EasyAssignments.java:100) at org.easetech.easytest.runner.InternalParameterizedStatement.runWithAssignment(InternalParameterizedStatement.java:109) at org.easetech.easytest.runner.InternalParameterizedStatement.evaluate(InternalParameterizedStatement.java:93) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.easetech.easytest.runner.SpringTestRunner$1.evaluate(SpringTestRunner.java:376) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.easetech.easytest.runner.SpringTestRunner.runChild(SpringTestRunner.java:101) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.easetech.easytest.strategy.SerialScheduler.schedule(SerialScheduler.java:16) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.easetech.easytest.util.RunAftersWithOutputData.evaluate(RunAftersWithOutputData.java:111) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
2. Analysis
The cause is simple, I placed duplicated test method names in excel, and one of them had no test data. So the solution is obvious.
相关文章推荐
- Unable to resolve host “<insert URL here>” No address associated with hostname
- ERROR: In <declare-styleable> MenuView, unable to find attribute android:preserveIconSpacing异常解决
- Argument for @NotNull parameter 'name' of com/android/tools/idea/welcome/Platform.<init> must not be
- 【android初学日志】Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverf<一>
- datanode----nitialization failed for Block pool <registering> (Datanode Uuid unassigned) service to
- okhttp Unable to resolve host “<host-name>”: No address associated with hostname的解决办法
- ros-indigo卸载不全,出现The package <package name> needs to be reinstalled, but I can’t find an archive for
- Could not load NIB in bundle: 'NSBundle <xxx> (loaded)' with name ''xxx''
- "BEA-000450" "Unable to find internal data record for the socket"
- java-mysql异常<Data truncation: Data too long for column 'name ' at row 1>讨论
- “System.Collections.Generic.IEnumerable<TestDAL.HistoryData>”不包含“ToList”的定义
- Error:Execution failed for task ':app:clean'. > Unable to delete file: xxx.file
- ERROR: In <declare-styleable> MenuView, unable to find attribute android:preserveIconSpacing
- Swift使用CoreData报错:CoreData: warning: Unable to load class named 'xxx' for entity 'xxx'.
- ERROR: In <declare-styleable> MenuView, unable to find attribute android:preserveIconSpacing
- <Error> <Server> <BEA-002606> <Unable to create a server socket for listening on channel "Default[2
- cocoapod升级的坑 && pod search :Unable to find a pod with name
- Device Checks for ASM Fails with PRVF-5150: Path ORCL:<diskname> is not a valid path [ID 1210863.1]
- ERROR: In <declare-styleable> MenuView, unable to find attribute android:preserveIconSpacing
- 解决git的这个错误:fatal: Unable to find remote helper for 'https'