Activity overview
Latest activity by simonjmartin
I've just figured out how to disable SQL Prompt in Visual Studio 2012.
Run VS as Administrator; hold down Ctrl and right click it, then select "Run as Administrator..." this should let you unselect the Start up check box.
Restart as normal and SQL Prompt is not enabled.
Works great for me. I Love SQL Prompt in SSMS (and do all my database work in there), Visual Studio (for me) is for .NET development and I don't really do any SQL work in the IDE so having it running just gets in my way at times.
Hope that helps / comments
I've just figured out how to disable SQL Prompt in Visual Studio 2012.
Run VS as Administrator; hold down Ctrl and right click it, then select "Run as Administrator..." this should let you unselect...
Window corruption
When I start SSMS the SQL Test window / tab is corrupted very much as in which is referenced in http://sqltest.uservoice.com/forums/140716-sql-test-forum/suggestions/3576855-tsqlt-window-popup-fai...
Are you saying that if I fake the tables that TVF_PROMsGetUploadedScorecardsFilteredByHeaders references then when it runs it would query the data I've loaded as part of the test. So I could set up those tables to return data that matches what's being expected? / comments
Are you saying that if I fake the tables that TVF_PROMsGetUploadedScorecardsFilteredByHeaders references then when it runs it would query the data I've loaded as part of the test. So I could set up...
Can TVFs be faked
I am trying to isolate dependencies in a stored procedure I want to bring under test, one of which is a TVF. I have tried to use SpyProcedure on the TVF so I can return a known result but the messa...
datacentricity wrote:
I think I've just spotted your issue. It's difficult to see on the web page without syntax highlighting and I've only just seen it on a another review of the code.
When you call AssertEqualsTable, if your expected and actual tables are in a schema other than dbo (which they are), you have to specify the schema name too.
EXEC tSQLt.AssertEquals @Expected = 'BoardSummary.Expected', @Actual = 'BoardSummary.Actual'
That was it! The assertion wasn't using the right schema :oops: / comments
datacentricity wrote:
I think I've just spotted your issue. It's difficult to see on the web page without syntax highlighting and I've only just seen it on a another review of the code.
When yo...
There is a lot of set up code at the moment, I was hoping to refactor that out as in your tutorials, I had a go at fake tables but ran into issues so went with the full verbose approach to get things started.
The PROMsBoardSummaryReport procedure is aggregating data from the tables I'm adding to above. There are constraints on those tables (foreign key etc) so faking the tables and only loading the minimum required data for the test is definitely where I'm aiming for.
Then I was hoping to look into the Test Data Builder to further clean up the setup for these tests, but its small baby steps for me at the moment. Which is all good because once I've stumbled through things I can give a good presentation to my team.
I definitely appreciate the help and depth of the reply, when trying to learn something new all the information comes in handy. It's getting over the gap between hello world and real world that's the big hurdle and having someone who knows what's what help out is invaluable / comments
There is a lot of set up code at the moment, I was hoping to refactor that out as in your tutorials, I had a go at fake tables but ran into issues so went with the full verbose approach to get thin...
I'm getting closer, now when I run my test I get:
Setup called!
Warning: Null value is eliminated by an aggregate or other SET operation.
[BoardSummary].[test GetBoardSummary_2ScorecardsAdded_MaxMinUsedForRanges] failed: 'Actual' does not exist
I modified the SetUp so it should be using the same schema:
CREATE TABLE [BoardSummary].Actual
and in the test now:
INSERT INTO [BoardSummary].Actual
The version is returned as: 1.0.4504.21220
I like OCD coding, fewer things can bite you in the rear [image] / comments
I'm getting closer, now when I run my test I get:
Setup called!
Warning: Null value is eliminated by an aggregate or other SET operation.
[BoardSummary].[test GetBoardSummary_2ScorecardsAdded_Max...
I have been following your series and it was actually the inspiration for finally taking the plunge with SQL Test.
I was trying to refactor my Expected and Actual table creation to the SetUp method but after doing so all my tests are broken and the output shows that the [BoardSummary].[Actual] table does not exist... there are other similar failures on all my tests. It looked to me like the method simply wasn't being called. The class I've got for all my tests is BoardSummary, I created a new test in the class then renamed it to SetUp so I'm confident it is in the right class - but either I've massively mucked up the setup method or it isn't being called before the tests... I'm not sure.
What would you recommend I try? / comments
I have been following your series and it was actually the inspiration for finally taking the plunge with SQL Test.
I was trying to refactor my Expected and Actual table creation to the SetUp method...
Setup method?
Is SetUp deprecated?
I thought tSQLt allowed a [Schema].[SetUp] sproc which would run before all tests in the schema, but I have been unable to get this working.
How do I run common set up code, fo...