|
|
|
|
Browse by Tags
All Tags » Database Unit Testing (RSS)
-
The biggest advantage of unit testing is the ability to make changes quickly, and with confidence that we have not broken anything with our change. Whether we need to speed up a query real quick, or to fix a bug, automated testing saves us a lot of time, Read More...
|
-
Once we have a considerable amount of unit tests, their maintenance begins to take noticeable time. If we need to change a module covered by unit tests, it may take less time to make the change itself than to change the corresponding tests accordingly. Read More...
|
-
Ideally unit test harness should run very fast. Because all unit testing involving a database is quite slowish, we need to apply some effort to ensure that our tests finish in acceptable time. This slowness might not be a concern when we try out a cool Read More...
|
-
Unit tests provide a very accurate snapshot of what we were thinking about (and what we were missing) when we were writing them. In fact, they are working examples of how we think our code should be used. More to the point, unit tests must be up-to-date, Read More...
|
-
Well-written unit tests should succeed only when the module being tested meets the requirements completely.If the test fails, it can do much better than just indicate failure. If the test has managed to provide a clear and comprehensive report of what Read More...
|
-
In this post we shall see how to incorporate a typical manual test in an automated test harness with minimal effort. Because our goal is to benefit from unit testing, and not to develop as many features as we can think of, we shall concentrate on the Read More...
|
-
Ideal unit tests are easy to roll out, easy to maintain, run fast, and make a difference: without them making changes and troubleshooting are more difficult. Some common examples of unit tests do not grade well against this criteria. For instance, writing Read More...
|
-
When we write articles, blog posts, and books, our examples must be simple. On the other hand, when we write automated tests in real life, the most complex modules need automated tests much more than simple ones. Consider, for example, the following trivial Read More...
|
-
Unit testing may be extremely useful if we do it right – if . On the other hand, if unit testing is being used inefficiently, it can be a huge waste of time and effort. When we were beginning to unit test our T-SQL more than three years ago, we wrote Read More...
|
-
How do you unit test your T-SQL? Which libraries/tools do you use? What percentage of your code is covered by unit tests and how do you measure it? Do you think the time and effort which you invested in your unit testing harness has paid off or not? If Read More...
|
-
Writing ANSI Standard SQL is not practical - this is the conclusion I came to after several years of writing portable applications, which had to work against both SQL Server and Oracle. Let me elaborate. T he best practice is to use stored procedures. Read More...
|
-
<Denis Gobo’s mode on> Suppose you have an empty table: SELECT COUNT (*) FROM SampleTable --- 0 What would be the result of the following query: DBCC CHECKIDENT ( 'SampleTable' , RESEED , 1 ) INSERT SampleTable ( j ) SELECT 1 SELECT SCOPE_IDENTITY Read More...
|
-
When you run NUnit/C# unit tests against your local instance, you are a dbo. As such, you are not getting any errors caused by missing permissions. However, you can impersonate another user, and run your unit tests in the context of that other user. The Read More...
|
-
Well, I have just finished a series of articles about unit testing on simple-talk.com, and some techniques were not included, just to keep the articles short. Still problems such as reproducing a lock timeout and unit testing the retry after it (lock Read More...
|
|
|
|
|
|