SQL Tests coverage errors

Hi,

I am facing two issues with SQL Tests.

1) Unable to create new test class from SSMS. Showing error dialog without details. I am able to create tests from query window without errors. Not getting error creating new tests on existing test class.



2) I am getting below error in code coverage tab.

SQLCover.SqlCoverException: SQL Cover failed to start. ---> System.NullReferenceException: Object reference not set to an instance of an object. at SQLCover.Gateway.DatabaseGateway.GetString(String query) at SQLCover.Source.DatabaseSourceGateway.GetVersion() at SQLCover.Trace.TraceControllerBuilder.GetTraceController(DatabaseGateway gateway, String databaseName, TraceControllerType type) at SQLCover.CodeCoverage.Start() --- End of inner exception stack trace ---


This issue seems to be related to permissions because everything works fine when I run on local db but I get these errors when I work on Azure SQL.

Could you please help resolve this?
Tagged:

Answers

  • Jessica RJessica R Posts: 1,319 Rose Gold 4

    Thank you for your forum post and so sorry to hear you're running into an issue!

    I'm hoping the underlying error in #1 can shed more light for us. Can we please check a few things:

    - Can you please click on the option at the bottom of the error window to send in a report and send one in with your email address included (the one used to log into the forum)?

    - Can you please check your log files in %localappdata%\Red Gate\logs\SQL Test 4 for any related errors?

    - Can I also please check which Azure authentication mode you are using?

    Thank you!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • catalogdbcatalogdb Posts: 21 New member
    Hi Jessica,

    - Can you please click on the option at the bottom of the error window to send in a report and send one in with your email address included (the one used to log into the forum)?

    Error message is empty. However, I solved the issue by editing create test class procedure. It was failing at CREATE SCHEMA step. Just changed it to EXEC ('CREATE SCHEMA ' + @QuotedClassName + ' AUTHORIZATION [dbo]');  

    - Can you please check your log files in %localappdata%\Red Gate\logs\SQL Test 4 for any related errors?

    - Can I also please check which Azure authentication mode you are using?


    I am using AAD Integrated method to connect to azure sql.


  • catalogdbcatalogdb Posts: 21 New member
    #2 is burning issue. Please guide us to resolve this.
  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi @catalogdb,

    My apologies for the delay in getting back to you on this. I've raised this with our developers and I'm very sorry to say that AAD integrated is not supported. (SQL Test works with Azure only with SQL authentication.)

    So sorry for the inconvenience and that this limitation isn't specified in the documentation at the moment, we will be updating this shortly.


    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Sign In or Register to comment.