In data base management system query testing can be done at two places, they are
Client side testing
Testing the new query
When you are testing a new query you should test the query by running it. If all goes well, the new query will run rather quickly and you should inspect all the record in the table of results.
Server side testing
On part of SQL server testing, it is totally different when compared to other types of testing, we can have following as major portions of SQL server testing.
Code compliance testing
In code compliance testing, the code will be checked in compliance with requirements, developer can develop the code in different ways for a requirement. When a piece of code arrives to tester, he has to look into the following areas in SQL server code compliance testing
- Parameter passage: These plays very important with data type and length, parameter movement.
- Code blocking: Faster code will leave the begin and end for single statement, when code is changed or modified and a code will execute even though condition fails, as a tester you should make sure that which code is in block and out of block.
- Condition/Loops: In this simple condition is easy to understand and long condition will put confuse to a developer. The meaning of loop will change with dowhile and while. As a tester you need to make sure that they are properly conditioned. We can put this under branch testing.
- Exception handling: This is very important area, which comes under range testing, every report has to be sent back to the caller, and either it is requested result or not.
- Code commenting/alignment: This is low priority task compared to others but plays very important role in future versions and maintenance of the code.
- Return values: For some of the code, returns values are mandatory and the return values should be in contest of requirement.
This is validating database administrator role, performance of piece of code plays major role in network based project, after code is in-compliance with the requirement.
- SQL Queries: This is the closure area where you will be looking for optimization of code; queries are source of interacting data on SQL server, SQL queries can be written in different forms and some of the queries will be differentiated only with execution plan to identify the optimized one.
- Indexing: This is area where performance could be increased for the requested queries
- Bulk transaction: When there is bulk data transaction we must sure that certain objects are disabled.
- Clustering: SQL server clustering can provide fault tolerance for many aspect of a SQL server, such as hardware, network, operating system and application failure, make sure that it will not affect the performance and database is clustered on required portions.
- Database designing: This is the basic area to look for optimization; too much normalization will affect the performance.
- Data types: the lazy designers always use the maximum data typeâ€™s usage. In data types valid or invalid and use varchar (8), these data type will consume more memory, which is not used by the code but still occupying, which will intern increasing the paging.
- Locking/Unlocking: Some of the code will lock certain portions and until it is released other operations are not performed.
In order to get certain portions of data, we may require integration of different server and following are major areas to look on aspect of integration
- Calling of external stored procedure
- Usage of multiple servers