Forum Discussion

sonli's avatar
sonli
Occasional Contributor
10 years ago

Use “Run TestCase” only can run one time , second time will break.

I am using "ReadyAPI-1.5.0". I blocked by below issue , please help on it . 

 

We have a project , many test case will use commonn step "Given an active user". I created a common test suite for it and groovy output the property "Activeuser-Email" for other test cases. (randomNumber@domain.com)

 

I set the "Run Testcase" as below:

run testcase setting

 

Then I can run success for first time :

Screen Shot 2015-12-18 at 4.51.28 PM.png

 

Then run it at  second time , common test cases will broken , common steps can't run anymore:

Screen Shot 2015-12-18 at 4.52.42 PM.png

 

Got error :

Screen Shot 2015-12-18 at 4.57.03 PM.png

  • sonli's avatar
    sonli
    Occasional Contributor

    error logs are :

    =========

    Fri Dec 18 16:51:08 CST 2015:INFO:Added default schema from file:/Applications/ReadyAPI-1.5.0.app/Contents/java/app/lib-common/ready-api-soapui-1.5.0.jar!/com/eviware/soapui/resources/xsds/xop.xsd with targetNamespace http://www.w3.org/2004/08/xop/include
    Fri Dec 18 16:51:08 CST 2015:INFO:Added default schema from file:/Applications/ReadyAPI-1.5.0.app/Contents/java/app/lib-common/ready-api-soapui-1.5.0.jar!/com/eviware/soapui/resources/xsds/XMLSchema.xsd with targetNamespace http://www.w3.org/2001/XMLSchema
    Fri Dec 18 16:51:08 CST 2015:INFO:Added default schema from file:/Applications/ReadyAPI-1.5.0.app/Contents/java/app/lib-common/ready-api-soapui-1.5.0.jar!/com/eviware/soapui/resources/xsds/xml.xsd with targetNamespace http://www.w3.org/XML/1998/namespace
    Fri Dec 18 16:51:08 CST 2015:INFO:Added default schema from file:/Applications/ReadyAPI-1.5.0.app/Contents/java/app/lib-common/ready-api-soapui-1.5.0.jar!/com/eviware/soapui/resources/xsds/swaref.xsd with targetNamespace http://ws-i.org/profiles/basic/1.1/xsd
    Fri Dec 18 16:51:08 CST 2015:INFO:Added default schema from file:/Applications/ReadyAPI-1.5.0.app/Contents/java/app/lib-common/ready-api-soapui-1.5.0.jar!/com/eviware/soapui/resources/xsds/xmime200505.xsd with targetNamespace http://www.w3.org/2005/05/xmlmime
    Fri Dec 18 16:51:08 CST 2015:INFO:Added default schema from file:/Applications/ReadyAPI-1.5.0.app/Contents/java/app/lib-common/ready-api-soapui-1.5.0.jar!/com/eviware/soapui/resources/xsds/xmime200411.xsd with targetNamespace http://www.w3.org/2004/11/xmlmime
    Fri Dec 18 16:51:08 CST 2015:INFO:Added default schema from file:/Applications/ReadyAPI-1.5.0.app/Contents/java/app/lib-common/ready-api-soapui-1.5.0.jar!/com/eviware/soapui/resources/xsds/soapEnvelope.xsd with targetNamespace http://schemas.xmlsoap.org/soap/envelope/
    Fri Dec 18 16:51:08 CST 2015:INFO:Added default schema from file:/Applications/ReadyAPI-1.5.0.app/Contents/java/app/lib-common/ready-api-soapui-1.5.0.jar!/com/eviware/soapui/resources/xsds/soapEncoding.xsd with targetNamespace http://schemas.xmlsoap.org/soap/encoding/
    Fri Dec 18 16:51:08 CST 2015:INFO:Added default schema from file:/Applications/ReadyAPI-1.5.0.app/Contents/java/app/lib-common/ready-api-soapui-1.5.0.jar!/com/eviware/soapui/resources/xsds/soapEnvelope12.xsd with targetNamespace http://www.w3.org/2003/05/soap-envelope
    Fri Dec 18 16:51:08 CST 2015:INFO:Added default schema from file:/Applications/ReadyAPI-1.5.0.app/Contents/java/app/lib-common/ready-api-soapui-1.5.0.jar!/com/eviware/soapui/resources/xsds/soapEncoding12.xsd with targetNamespace http://www.w3.org/2003/05/soap-encoding
    Fri Dec 18 16:52:37 CST 2015:WARN:Not storing test run data for TestCase 'send reset-password email to registered user after user initiates reset password process' since there is no repository.
    Fri Dec 18 16:52:37 CST 2015:WARN:Not storing test step run data (latest runs) for TestCase 'send reset-password email to registered user after user initiates reset password process' since there is no database repository.
    Fri Dec 18 16:52:37 CST 2015:WARN:Not storing test run data for TestCase 'Register and Active User' since there is no repository.
    Fri Dec 18 16:52:37 CST 2015:WARN:Not storing test step run data (latest runs) for TestCase 'Register and Active User' since there is no database repository.
    Fri Dec 18 16:52:37 CST 2015:ERROR:An error occurred [java.lang.NullPointerException], see error log for details
    Fri Dec 18 16:52:37 CST 2015:ERROR:Exception during Test Execution
    java.lang.Exception: Failed to prepare testStep [Register user]; java.lang.NullPointerException
    at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:139)
    at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:1)
    at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:130)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    Fri Dec 18 16:52:37 CST 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(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    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

     

     

    ==========