Hi Shyam,

I had a quick look at the implementation of tSQLt. It raises errors of
several levels. Levels above 10 will cause JDBC to throw an exception.
Levels below or equal to 10 cause SQLWarning.

Currently, you cannot read these exceptions or warnings with jOOQ 3.3,
although we had recently fixed an issue related to that:
https://github.com/jOOQ/jOOQ/issues/3011

But I don't think that there will be a smooth integration between tSQLt and
any JDBC-based API like jOOQ.

Cheers
Lukas


2014-02-20 12:51 GMT+01:00 Sha <[email protected]>:

> Hi Lukas,
>   As you know the basic purpose of my POC is to develop a unit testing
> suits for stored procedures.
> And jOOQ is excellent to develop/fulfil Integration test suites .
>
> So after some googling I found  *tSQLt utility* of SQLServer which
> supports unit testing for stored procedures.
>
> Here is a sample you can have a look
> http://tsqlt.org/after-running-the-examples-smss/
> i.e. *2. Write your own new test *section.
>
> In the above link there is one stored procedure named  as "*tSQLt.Run".*
> Using our jOOQ code generator I generated an equalient jOOQ routine(s).
> Then the jOOQ generated *Run routine *executed using java class in the
> Eclipse editor.
>
> *Then the Eclipse console output is *
> Exception in thread "main" org.jooq.exception.DataAccessException: SQL [{
> call [tSQLt].[Run](?) }]; Test Case Summary: 2 test case(s) executed, 1
> succeeded, 1 failed, 0 errored.
> at org.jooq.impl.Utils.translate(Utils.java:1223)
> at
> org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:495)
> at
> org.jooq.impl.AbstractRoutine.executeCallableStatement(AbstractRoutine.java:307)
> at org.jooq.impl.AbstractRoutine.execute(AbstractRoutine.java:227)
> at org.jooq.impl.AbstractRoutine.execute(AbstractRoutine.java:216)
> at org.jooq.samples.SampleSP.main(SampleSP.java:39)
> Caused by: java.sql.SQLException: Test Case Summary: 2 test case(s)
> executed, 1 succeeded, 1 failed, 0 errored.
>
>
> *When i executed on the DB below is the console output *
> [TryItOut].[test this causes a failure] failed: (Failure) This is what a
> failure looks like
>
> +----------------------+
> |Test Execution Summary|
> +----------------------+
>
> |No|Test Case Name                         |Result |
> +--+---------------------------------------+-------+
> |1 |[TryItOut].[test this one passes]      |Success|
> |2 |[TryItOut].[test this causes a failure]|Failure|
>
> -----------------------------------------------------------------------------
> Msg 50000, Level 16, State 10, Line 1
> Test Case Summary: 2 test case(s) executed, 1 succeeded, 1 failed, 0
> errored.
>
> -----------------------------------------------------------------------------
>
> *I have below question for you :*
> *1) Why there an exception ? How to fix it ? Any idea ?*
> *2) If I want to redirect the output of DB console on the java editor
> console , how to do that ? Any Clue please advice me.*
>
> Thank you.
> ~Shyam
>
>  --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to