Sunday, January 30, 2011

TESTING (Cont.)

Incremental Testing:

- Disciplined method of testing the interfaces between unit-tested programs as well as between system components.

- Involves adding unit tested programs to a given module or component one by one and testing each result and combination.

- Two type – Top Down and Bottom Up.

Thread Testing:

- Often used during early integration testing.

- Demonstrates key functional capabilities by testing a string of units that accomplish a specific function in the application.

- Thread and incremental are usually utilized together.

Regression Testing:

- Conducted during all stages of testing introduced to application or downstream application after a change is made.

- Three type:

· Unit Regression Testing – retesting a single program or component after a change is made.

· Regional Regression Testing – retesting modules connected to the program or component has been changed.

· Full Regression Testing – retesting the entire application after a change has been made.

V – Model Approach:

- Illustrates the sequence in which testing should occur.

- Life Cycle Testing involves continuous testing of the system during the developmental process.

- The results of the development process are inspected to test the correctness at predetermined points.

- These inspections identify defects at the earliest possible point.

- Unless a formalized software development life cycle has been incorporated, life cycle testing cannot occur.

- The life cycle testing becomes ineffective when the information service personnel has discretion to determine the order which normally increases cost.

- The life cycle testing can be best by formation of a test team.

- The members must use formal testing methodology.

- Without a specific structured methodology, the test team concept is ineffective.

An 11 – Step Software Testing Process example:


Tuesday, January 25, 2011

TESTING - Testing Techiniques (Cont.)

White Box Testing:

- Verifies that the software design is valid and also whether it was built according to the specified design.

- Statement coverage – execute all statements atleast once.

- Decision coverage – execute each decision direction atleast once.

- Condition coverage – execute each decision with all possible outcomes atleast once.

- Decision/condition coverage – execute all possible combinations of condition outcomes in each decision. Treat all iterations as two way conditions exercising loops zero times and once.

- Multiple condition coverage – invokes each point of entry atleast once.

Black Box Testing:

- Tests customer software requirements.

- Focus on the functional requirements of the software.

- Attempts to find incorrect or missing functions, errors in data structures or external database access, interface errors, performance errors and initialization and termination errors.

- Conducted on integrated, functional components whose design integrity has been verified thro’ completion of traceable white box tests.

- Three techniques.

· Equivalence Partitioning – an equivalence class is a subset of data that is representative of a larger class.

Eg: A program for credit limits between $10,000 - $15,000

Less than 10,000 - Invalid

$10,000 - $15,000 - Valid

More than $15000 - Invalid

· Boundary Analysis – a technique that consists of a developing test cases and data that focus on the input and output boundaries of a given function.

Eg: Same credit limit.

Low boundary plus or minus one ($9,999 and $10,001)

On the boundary ($10,000 - $15,000)

Upper boundary plus or minus one ($14,999 and $15,000)

· Error Guessing – based on the theory that cases can be developed upon the intuition and experience of the test engineer.

Monday, January 24, 2011

TESTING - TESTING TECHNIQUES - White Box Testing:

- Tests internal program logic. ie., tests the basic program structure.

Purpose of unit Tests:

- Tests all loops.

- Test basis paths.

- Test conditional statements.

- Test data structures.

Reasons for white box testing:

- Normal path processing can be well understood.

- Exception handling is less well scrutinized or specified in requirement and when coded is therefore more susceptible to errors.

- Likely that a type will be discovered in an obscure logic path as a main processing path.

- Black box testing is much less likely to uncover subtle logic errors (more appropriate for higher level tests of functionality).

Developing Unit Tests:

- Identify units to be unit-tested.

- Identify test cases.

- Develop the test cases.

Basis path testing:

- Tom McCabe’s cyclomatic complexity metric:

· Measures the logical complexity of a procedural design.

· Provides flow-graph notation to identify independent paths of processing.

· Once paths are identified, tests can be developed for loops, conditions.

· Process guarantees that every statement will get executed atleast once.

Developing Unit Tests:

- Compute cyclomatic complexity of all complex units.

- Identify units in the 20th percentile of complexity: those most critical/complex.

- Define basis paths for all units.

- Define predicate test (conditional tests) for all units in the 20th percentile.

Flow Chart Notation

Flow Graph Notation

Flow graph Notation – Edges, nodes & regions

Computing cyclomatic complexity:

V(G) = E – N + 2 = 11 – 9 + 2 = 4

V(G) = P + 1 = 3 + 1 = 4

V(G) = the number of regions (closed spaces, plus the open space) = 4

Flow Graph Notation:

- Predicate nodes are any nodes with branching.

A Unique/Independent path:

- Is one where atleast one new edge is transverse.

Basis Path Set:

- Is a set of paths where all unique/independent paths are represented. Ie, the set is not unique.

Thursday, January 20, 2011

TESTING - TESTING POLICY Vs QUALITY POLICY

Testing Policy:

- A management definition of testing a department.

- Involves four criteria.

· Definition.

· Testing System.

· Evaluation.

· Standards.

Quality Policy:

- Providing customer satisfaction for first time and every time.

Testing Economics:

Testing Levels:

- Four Levels.

· Unit testing.

· Integration testing.

· System testing.

· Acceptance testing.

Unit Testing:

- The individual unit of the software are tested in isolation from other parts of a program.

Integration Testing:

- Software units of an application are combined and tested for a communication interfaces between them.

- Three types.

· Big bang testing.

· Bottom up testing.

· Top down testing.

- Big bang testing

· software components of an application are combined all at once into a overall system.

· Every module is first unit tested in isolation from every module.

· Each module combined all at once and tested.

- Bottom Up Testing

· The modules at the lower leveld in the hierarchy first and then working up the hierarchy until final module is tested.

· Appropriate for object oriented systems.

- Top Down Testing

· The modules at the higher levels in the hierarchy first and then to the lower level modules.

System Testing:

- Conducted on a complete, integrated system’s compliance with its specific requirements.

Acceptance Testing:

- Testing conducted by client to evaluate the system compliance as per the business requirements.

Tuesday, January 18, 2011

Relational Data Base Management Systems (RDBMS)(3)

G1.       What is a Linked Server?

·         Linked Servers is a concept in SQL Server by which we can add other SQL Server to a Group and query both the SQL Server Database using T-SQL Statements.
·         With a linked server, you can create very clean, easy to follow, SQL statements that allow remote data to be retrieved, joined and combined with local data.
·         Stored Procedure sp_addlinkedserver, sp_addlinkedsrvlogin will be used add new Linked Server.

2.       What is Cursor?

·         Cursor is a database object used by applications to manipulate data in a set on a row-by- row basis, instead of the typical SQL commands that operate on all the rows in the set at one time. 
·         In order to work with a cursor we need to perform some steps in the following order:
·         Declare cursor
·         Open cursor
·         Fetch row from the cursor
·         Process fetched row
·         Close cursor
·         Deallocate cursor


3.       What is Collation?

·         Collation refers to a set of rules that determine how data is sorted and compared.
·         Character data is sorted using rules that define the correct character sequence, with options for specifying case sensitivity, accent marks, kana character types and character width.

4.       What is Difference between Function and Stored Procedure?

·         UDF can be used in the SQL statements anywhere in the WHERE/HAVING/SELECT section where as Stored procedures cannot be.
·         UDFs that return tables can be treated as another rowset.
·         This can be used in JOINs with other tables.
·         Inline UDF's can be thought of as views that take parameters and can be used in JOINs and other Rowset operations.

5.       What is sub-query? Explain properties of sub-query?

·         Sub-queries are often referred to as sub-selects, as they allow a SELECT statement to be executed arbitrarily within the body of another SQL statement.
·         A sub-query is executed by enclosing it in a set of parentheses.
·         Sub-queries are generally used to return a single row as an atomic value, though they may be used to compare values against multiple rows with the IN keyword.
·         A subquery is a SELECT statement that is nested within another T-SQL statement.
·         A subquery SELECT statement if executed independently of the T-SQL statement, in which it is nested, will return a resultset.
·         Meaning a subquery SELECT statement can standalone and is not depended on the statement in which it is nested.
·         A subquery SELECT statement can return any number of values, and can be found in, the column list of a SELECT statement, a FROM, GROUP BY, HAVING, and/or ORDER BY clauses of a T-SQL statement.
·         A Subquery can also be used as a parameter to a function call. Basically a subquery can be used anywhere an expression can be used.

Monday, January 17, 2011

TESTING - SOFTWARE TESTING FUNDAMENTALS


- A process designed to compensate for an ineffective software development process.

- It is no longer an adjunct to the system development life cycle, but rather a key part of it.

- No real “shortcut” to a sound testing philosophy, but the highest pay back comes from detecting problems early in the system development life cycle.

Primary role of Software Testing:

- Determine whether the system meets specifications (Producer’s View).

- Determine whether the system meets business and user needs (Customer View).

Secondary role of Software Testing:

- Raising issues.

- Installing confidence in the system.

- Providing insight into the software delivery process.

- Continuously improving the test process.

Who participates in Software Testing?

- Software Customer.

- Software User.

- Software Developer.

- Software Tester.

- Information service management.

- Senior organization management.

- Auditor.

What is Defects?

- A variance from a desired product attributes.

- Two categories.

· In product specifications.

· From customer/user expectation.

Creating a test strategy:

- Three concepts.

· The demo of the validity of software at each stage in system development life cycle.

· Determination of the validity of the final system with respect to user needs and requirements.

· Examination of the behavior of a system by exceeding the system on sample test data.

Problems associated with Testing:

- Failure to define testing objectives.

- Testing at the wrong phase in life cycle.

- Use of ineffective test techniques.

How to apply continuous improvements to testing:

- Examine organization needs and business goals.

- Conduct assessment.

- Initiate process improvement.

- Analyse assessment output and derive action plan.

- Implement improvements.

- Confirm improvements.

- Sustain improvement gains.

- Monitor performance.