How to fix failed tests in dbForge Studio for SQL Server

This topic describes an example of the failed test and the way to fix it.

The following image demonstrates a test case, which is implemented as the tSQLt.AssertLike stored procedure. The test compares the return result (N’Test’) with an expected pattern N’Test%T’. The result of running the test is displayed in the Test Result window.

The test has failed because the return result ‘Test’ does not match the expected pattern N’Test%T’.

The window also shows the error message ‘Fail’. The message output is an optional feature, which can be implemented by defining the Message parameter of the AssertLike procedure.

Test Failed

To fix the failed test

1. Double-click the test or right-click the test and select Open Test. The source code for the AssertLike test will be displayed.

2. Modify the source code by writing N’Test%’ instead of N’Test’, as shown in the following image, and run the test again.

As you can see, the test has succeeded because now the return result matches the expected value.

Test Succeded

Download dbForge Studio for SQL Server and try it absolutely free for 30 days!

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for SQL Server?