Showing posts with label database testing. Show all posts
Showing posts with label database testing. Show all posts

3:3

 

1.Database tetsing???


The method you want to test executes a rather large JOIN operation and uses the data to calculate some important results. Your business logic performs a mix of SELECT, INSERT, UPDATE and DELETE statements. You need to setup test data in (possibly much) more than two tables to get reasonable initial data for the methods you want to test. The DbUnit extension considerably simplifies the setup of a database for testing purposes and allows to verify the contents of a database after performing a series of operations. Sample test case for database testing: The test case for the above requirement is mentioned below: Test_Case_Id:1 Test_Case_Name:Check the unique identity of Student. Description:Test case to check the unique identity of Student. Prerequisite: 1.Database should be present 2.Student records should be present in student table. Input Data:1.Open your database(SQl,oracle or any which you are using) 2.Open its command prompt editor. 3.Select the proper database 4.Enter the query as:"Select * from Student_Details" 5.Run the query. Expected Result: The all unique student records will be displayed. Validation:Student is should be unique.

2.What is Facets testing ??

Facet means small small aspect or attributes.All the filter criteria options can come under
facets,testing of these size,name,contains is called as facet testing.


3.How we Check Perfomance testing In Manual?

If there is a back end database to the Web app you can use the database Performance analyser
tool to evaluate the same.General web apps are performance tested in terms of the time taken 
to load a page. This is manually timed using the systems clock.

For client server apps : The performance c/s apps is manually checked again using the systems
clock to validate the server response to a client request.The above tests are done only for fine 
tuning purpose of the applications.If the performance under load is to be tested a use of tool 
is essential.
Continue lendo

Database testing

1.Generally used SQL commands for testers.

The Transact-SQL commands most often used by a tester are:

USE database_name
SELECT
column_names FROM table_name

SELECT DISTINCT column_name FROM table_name'
SELECT column_name FROM table_name WHERE condition
SELECT column_name FROM table_name WHERE condition1 AND condition2
SELECT column_name FROM table_name WHERE condition1 OR condition2
SELECT column_name FROM table_name WHERE column_name IN (value1, value2, ...)
SELECT column_name FROM table_name WHERE column_name BETWEEN value1 AND value2
SELECT column_name FROM table_name WHERE column_name LIKE pattern
SELECT column_name FROM table_name WHERE condition ORDER BY column_name [ASC, DESC]
SELECT AVG column_name FROM table_name
SELECT COUNT column_name FROM table_name
SELECT MAX column_name FROM table_name
SELECT MIN column_name FROM table_name
SELECT SUM column_name FROM table_name
SELECT column_name1 SUM column_name2 FROM table_name GROUP BY column_name1
SELECT column_name1 SUM column_name2 FROM table_name GROUP BY column_name1 HAVING arithmetic function condition
SELECT table_alias.column_name1 column_alias FROM table_name table_alias
SELECT table_alias.column_name1 AS column_alias FROM table_name AS table_alias

SELECT column_names FROM table_name1 JOIN table_name2 ON table_name1.join1 = table_name2.join2 WHERE condition
SELECT column_names FROM table_name1 INNER JOIN table_name2 ON table_name1.join1 = table_name2.join2 WHERE conditionSELECT column_names FROM table_name1 OUTER JOIN table_name2 ON table_name1.join1 = table_name2.join2 WHERE condition INSERT INTO table_name (column1, column2, …) VALUES (value1, value2, …) UPDATE table_name SET column1 = “new_value” WHERE conditionUPDATE table_name SET column1 = “new_value” WHERE condition1 AND condition2UPDATE table_name SET column1 = “new_value” WHERE condition1 OR condition2

DELETE FROM table_name WHERE condition


2.Now suppose i have 50 records of employee table.
1) I want to find the person who is having 22nd highest salary.

2)i want to delete a person with postion number 39 with comminsion < 100

3) Update rec no 45 records are not shown.How do i do it.?



First question:

select min(salary) from (select distinct salary from employee order by salary desc) where rownum<=22);
or
select max(salary) from (select distinct salary from employee order by salary asc) where rownum<=22);

second question:

delete from employee where emp_id=39 and comm<100;

Third question

update table employee set recno=45;


3.When QA will use casestatement(sql query) in etl testing or datavalidation testing , like how he will be writing that Query to test the date validation.


Select * from EMP where EMP_DOJ = 010110

Here

EMP is the Table name,EMP_DOJ is the date of joining of the Employee in EMP table.

If any record/records found with DOJ as 010110,it will retrive all the records in the EMP table.
Now you need to compare the front end values with back end values with respect to corresponding record.

Note :some times Back end fields are storing for Date filed like "DDMMCCYY",but front end shows only "DDMMYY".

DD = Date
MM = Month
CCYY = Current year(2010 - Full year)
YY = Year(10 - Last 2 digits).

For above situation you need to identify the Date field format whether it is accepting "DDMMYY" or "DDMMCCYY"







Continue lendo
 

Software police Copyright © 2011 | Template design by O Pregador | Powered by Blogger Templates | Distributed by Way2 Blogger Templates