February 2, 2009 at 11:00 pm
How to do SQL Code Coverage in SQL Server 2008? Did anyone worked on this?
Regards,
Mahesh
February 3, 2009 at 5:59 am
You can use trace events to capture individual statements within a stored procedure. Is that what you're looking for?
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 4, 2009 at 1:13 am
NO. Code Coverage is used to measure how much code is touched and not touched. Refer this site http://www.cenqua.com/clover/doc/coverage/intro.html
Regards,
Mahesh
February 4, 2009 at 6:30 am
Huh. This sure sounds like what Profiler provides:
What is Code Coverage?
Code coverage measurement simply determines those statements in a body of code have been executed through a test run and those which have not. In general, a code coverage system collects information about the running program and then combines that with source information to generate a report on test suite's code coverage.
But, OK.
What about using the dynamic management view sys.dm_exec_query_stats. It shows all the cached queries, how many times they were executed, aggregate performance data, etc. It does work off the cache, so you will only see things that have been recently called, but, assuming the test run is relatively small, it should fit the bill.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 9, 2009 at 4:29 pm
thanks for the feed back i need a new inbox maller which will allow me adversise my product to them.............thanks you can also get back to my mail maximcole@yahoo.ca
April 12, 2016 at 1:33 am
I realise this is pretty old but I wrote this, works with 2008r2+
https://the.agilesql.club/blogs/Ed-Elliott/2016-04-08/SQLCover-Code-Coverage-For-SQL-Server-T-SQL
and this explains what code coverage is:
https://the.agilesql.club/blogs/Ed-Elliott/2016-04-11/what-is-code-coverage-in-sql-server-t-sql
ed
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply