Test Case not completing gracefully when Groovy Test Step accessing database.
Ready API 1.5.0
I have a Test Case with the following Steps:
1. A JDBC test step to get the count of rows in a certain table.
2. REST API Request
3. Groovy Script to compare API Response with database (database connection and query are executed within the Groovy Script)
Upon running this test, once it gets to the groovy script all test steps become greyed out and the test case freezes. I have to close the test case.
NOTE: Previously I was running Ready API 1.4.1 and this issue did not occur. This only started happing after the upgrade.
I see the following error apeparing in the Ready API Log:
Wed Nov 11 14:37:14 GMT 2015:ERROR:Error notifying listener after run
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from test_step_run_history where execution_id = ?]; nested exception is org.h2.jdbc.JdbcSQLException: Column "icon_path" not found [42122-176]
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:660)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:695)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:722)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:772)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:192)
at com.smartbear.ready.db.repository.jdbc.JdbcTestStepRunHistoryEntryRepository.findByExecutionId(JdbcTestStepRunHistoryEntryRepository.java:142)
at com.eviware.soapui.impl.wsdl.history.DefaultLatestRunsProvider.a(DefaultLatestRunsProvider.java:357)
at com.eviware.soapui.impl.wsdl.history.DefaultLatestRunsProvider.a(DefaultLatestRunsProvider.java:329)
at com.eviware.soapui.impl.wsdl.history.DefaultLatestRunsProvider.a(DefaultLatestRunsProvider.java:317)
at com.eviware.soapui.impl.wsdl.history.DefaultLatestRunsProvider.getLatestRun(DefaultLatestRunsProvider.java:140)
at com.eviware.soapui.impl.wsdl.panels.testcase.ProWsdlTestCaseDesktopPanel$InternalTestRunListener.afterRun(ProWsdlTestCaseDesktopPanel.java:921)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.notifyAfterRun(AbstractTestCaseRunner.java:316)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:188)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:1)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:154)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.h2.jdbc.JdbcSQLException: Column "icon_path" not found [42122-176]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:178)
at org.h2.message.DbException.get(DbException.java:154)
at org.h2.jdbc.JdbcResultSet.getColumnIndex(JdbcResultSet.java:3122)
at org.h2.jdbc.JdbcResultSet.get(JdbcResultSet.java:3210)
at org.h2.jdbc.JdbcResultSet.getString(JdbcResultSet.java:304)
at com.smartbear.ready.db.repository.jdbc.JdbcTestStepRunHistoryEntryRepository$TestStepRunHistoryEntryRowMapper.mapRow(JdbcTestStepRunHistoryEntryRepository.java:383)
at com.smartbear.ready.db.repository.jdbc.JdbcTestStepRunHistoryEntryRepository$TestStepRunHistoryEntryRowMapper.mapRow(JdbcTestStepRunHistoryEntryRepository.java:1)
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:93)
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:60)
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:708)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:644)
... 19 more
Can this be investigated as a matter of urgency as this is affecting Regression on our Product. Or could the installer for Ready API 1.4.1 be supplied so I can downgrade to a more stable build.
Hi,
The problem seems to be that your test history database hasn't been upgraded properly. In this situation the test history feature is normally disabled until the upgrade has been made, but for whatever reason this didn't happen in your case. We'll try to reproduce this bug and fix it.
Meanwhile, you could probably solve this by going to the Compare or History tab and clicking on the Upgrade button.
If this doesn't work, as a last resort you can disable the test history feature completely with the following workaround.
1. Create a file called system.properties with the following single line:
test.history.disabled=true
2. Put in the directory .readyapi, which you'll find in your home folder (e.g. C:\Users\<your_user_name> on Windows)
3. Restart Ready! API
Hope this helps!
Manne, Ready! API Developer