2

I have to test using SQL in Oracle if the data stored in the DB is completely correct or not. For example, make sure we are up to date, no future dates, no invalid characters on varchar columns, etc.

What is the best option for this kind of testing, given the fact that the only knowledge within the team is SQL.

  • Is this related to software quality assurance and testing, or should this be asked somewhere else? Why aren't you enforcing the constraints within the database itself? – Kevin McKenzie Feb 10 at 1:08
-1

First thing first you need to be strict with UI elements This type of testing include validating the

text boxes,

select dropdowns,

calendars and buttons,

SQL Server database tools are used to perform unit testing The commercial tool in which tests are being created in VB or C# projects Tests are created in two ways such as either by generating tests from the database using T-SQL script or you can add tests manually using templates While generating tests from database project you can make use of SQL Server Object Explorer

Official Link: SQL Server

What are the primary concerns when doing db unit testing

Creating an up to date schema, managing schema changes Setting up data (reference data, test data) and maintaining test data Keeping tests independent Allowing developers to work concurrently Speed (tests involving database are typically slower and will make your whole build take more time) and how to do it "right"?

As hinted, follow known good practices and use dedicated tools/frameworks:

Prefer in memory database if possible (for speed) Use one schema per developer is a must (to allow concurrent work) Use a "database migration" tool (à la RoR) to manage schema changes and update a schema to the ultimate version Build or use a test harness allowing to put the database in a known state before each test and to perform asserts against the data after the execution (or to run tests inside a transaction that you rollback at the end of the test).

ApexSQL

  • I do not have tot test the User Interface. only the data that is daily updated. I have to check there are no delays, no incorrect data. eg: Data first goes into some inital tables from some scrapers and additional information for each row is inserted by manual data entry. Data is combined and send to final tables, i have to perform counts and queries to check if everything is as expected. Something more simple that i checked is for example looking for duplicates. I am doing this using sql queries in an Oracle Database and then prepare a report. Is there another way or an automated way? – Tom Jan 9 at 6:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.