Sunteți pe pagina 1din 128

Application Testing 2.

2010 Wipro Ltd - Confidential

Agenda
VB Scripting Quality Center Overview & Important Features Database Basics Tool Support for Testing

Software Testing Life Cycle


Entry and Exit criteria for various testing levels Architecture Client and server (Desktop and Web based application)

2010 2010 Wipro Wipro Ltd Ltd - Confidential Confidential

VB Scripting

2010 Wipro Ltd - Confidential

VB Scripting
Topics Covered in this lesson are:
Syntax Constants Errors Functions Keywords Methods Operators Statements

2010 2010 Wipro Wipro Ltd Ltd - Confidential Confidential

Overview of VB Script
VBScript is a Microsoft scripting language. VBScript is the default scripting language in ASP. A scripting language is a lightweight programming language VBScript is a light version of Microsoft's programming language Visual Basic VBScript is only supported by Microsoft's browsers (Internet Explorer) VBScript uses the Component Object Model to access elements of the environment

2010 Wipro Ltd - Confidential

VB Scripting Syntax and Guidelines


VBScript is used to develop scripts to perform both simple and complex object-based tasks The following general VBScript syntax rules and guidelines: Case-sensitivity - VBScript is not case sensitive by default . For example : The two statements are identical in VBScript Browser("Mercury").Page("Find a Flight:").WebList("toDay").Select "31" browser("mercury").page("find a flight:").weblist("today").select "31 Text strings - When you enter a value as a text string, you must add quotation marks before and after the string. Variables - Used to store strings, integers, arrays and objects . Parentheses - To achieve the desired result and to avoid errors, we use parentheses () correctly in your statements. Comments - Comments are added wherever possible, to make your scripts easier to understand and maintain. Spaces - Spaces are ignored by and it improve clarity. 2010 Wipro Ltd -VBScript Confidential

VB Script - Constants
A constant is a meaningful name that takes the place of a number or string and never changes. There are number of useful constants built-in Vbscript. The various categories of constants in VBScript Color Constants Date and Time Constants Date Format Constants Miscellaneous Constants MsgBox Constants String Constants

Tristate Constants
VarType Constants
7
2010 Wipro Ltd - Confidential

VB Script - Color Constants


Color Constants - Defines about the eight basic colors that can be used in scripting.

2010 Wipro Ltd - Confidential

VB Script - Date & Time Constants


Date and Time : Defines about the date and time constants used by various date and time functions.

Constant vbSunday vbMonday vbTuesday vbWednesday vbThursday

Value Description 1 Sunday 2 3 4 5 Monday Tuesday Wednesday Thursday

2010 Wipro Ltd - Confidential

VB Script - Date Format Constants


Date Format - Defines about the constants used for formatting dates and times.

Constant Value Explanation vbGeneralDate 0 Display a date and/or time. Date and time display is determined by system settings. vbLongDate 1 Display a date using the long date format as per computer settings. vbShortDate 2 Display a date using the short date format as per computer's regional settings. vbLongTime 3 Display a time using the long time format as per computer settings. vbShortTime 4 Display a time using the short time format as per computer's regional settings.

10

2010 Wipro Ltd - Confidential

VB Script - Date Miscellaneous Constants


Miscellaneous - Defines about the constants that don't conveniently fit into any other category.

Constant vbObjectError

Value Description -2.147E+09 User-defined error numbers should be greater than this value, for example, Err.Raise Number = vbObjectError + 1000

11

2010 Wipro Ltd - Confidential

VB Script String Constants


String - Defines a variety of non-printable characters used in string manipulation.

Constant vbCr VbCrLf vbFormFeed vbLf vbNewLine

Value Explanation Chr(13) Carriage return. Chr(13) & Chr(10) Carriage returnlinefeed combination. Chr(12) Form feed; not useful in Microsoft Windows. Chr(10) Line feed. Chr(13) & Chr(10) Platform-specific newline character; whatever is or Chr(10) appropriate for the platform. vbNullChar Chr(0) Character having the value 0. vbNullString String having value Not the same as a zero-length string (""); used 0 for calling external procedures. vbTab Chr(9) Horizontal tab. vbVerticalTab Chr(11) Vertical tab; not useful in Microsoft Windows.

12

2010 Wipro Ltd - Confidential

VB Script - Tristate Constants


Tristate - Defines constants used with functions that format numbers.

Constant vbUseDefault vbTrue vbFalse

Value

-2
-1 0

Description Use default from settings. TRUE FALSE

13

2010 Wipro Ltd - Confidential

VB Script - VarType Constants


VarType - Defines about the various Variant subtypes.

Constant vbEmpty vbNull vbInteger vbCurrency vbDate vbString vbObject vbError vbBoolean vbVariant
vbDataObject vbDecimal vbByte vbArray
14

Value 0 1 2 6 7 8 9 10 11 12
13

Description Uninitialized (default) Contains no valid data Integer subtype Currency subtype Date subtype String subtype Object Error subtype Boolean subtype Variant (used only for arrays of variants) Data access object

14 Decimal subtype 17 Byte subtype 8192 Array


2010 Wipro Ltd - Confidential

VB Script - Errors
The Error that occur during the execution are classified into : VB Script runtime errors VB Script syntax errors

15

2010 Wipro Ltd - Confidential

VB Script Runtime Error


Runtime error - Unexpected errors that causes hindrance during the execution of scripts

16

2010 Wipro Ltd - Confidential

VB Script Syntax errors


Syntax error The error that results when the structure of one of your VBScript statements violates one or more of the grammatical rules of the VBScript scripting language

17

2010 Wipro Ltd - Confidential

VB Script - Functions
VB Script supports some well/pre defined functions for easy manipulations. Below pointers are some of the important functions.

18

2010 Wipro Ltd - Confidential

VB Script - Keywords

Function

Value Return

Example

Empty

Used to indicate an uninitialized variable value. A variable value is uninitialized when it is first created and no value is assigned to it, or when a variable value is explicitly set to empty.

Dim Captain , Captain=Dhoni, Captain=Empty

Nothing Null

Set Used to indicate an uninitialized object value, ExcelOb=CreateObject(Excel.Application) or to disassociate an object variable from an object , to release the system resources Set ExcelOb=Nothing.

Used to indicate that the variable has no data.

x = Null , x contains no valid data

19

2010 Wipro Ltd - Confidential

VB Script - Methods

Function

Value Return

Example Object.clear, On error resume next ; err.raise=6 ; err.clear ; msgbox err.number will return 0.

Clear

Clears all the existing property values for the err.

Replace Method

Replaces the text found in an regular expression search.

object.Replace(string1, string2) , Example : ReplaceTest = regEx.Replace(str1, replStr)

Execute

Executes a regular expression search against a string.

object.Execute(Str) -, Example : Var1 = 1,Var2 = 2;Execute("Var1 = Var2 + 3") Response.Write (Var1) will print 5.

20

2010 Wipro Ltd - Confidential

VB Script - Operators
VBScript's operators can be separated into four semi-distinct categories Math Operators

Operator + * / ^ mod

English Addition Subtraction Multiplication Division Exponent Modulus

Example 1+1 2-1 4*4 4/2 2^3 4 mod 3

Result 2 1 16 2 8 1

21

2010 Wipro Ltd - Confidential

VB Script Operators (Cont ..)


Comparison Operators
Operator = > < >= <= <> English Equal to Greater than Lesser than Greater than or equal to Lesser than or equal to Not equal to Example 10=11 10>9 9<8 4>=2 2<=3 4 <> 3 Result False True False True True False

22

2010 Wipro Ltd - Confidential

VB Script Operators (Cont ..)


Comparison Operators

The Is operator has specific comparison functionality that differs from the operators in the following table. The following table contains a list of the comparison operators and the conditions that determine whether result is True, False, or Null:
Operator < Description Less than True if expression1 < expression2 expression1 <= expression2 expression1 > expression2 False if expression1 >= expression2 expression1 > expression2 expression1 <= expression2 expression1 < expression2 expression1 <> expression2 expression1 = expression2 Null if expression1 or expression2 = Null expression1 or expression2 = Null expression1 or expression2 = Null expression1 or expression2 = Null expression1 or expression2 = Null expression1 or expression2 = Null

<=

Less than or equal to

>

Greater than

>=

Greater than or equal expression1 >= to expression2 Equal to expression1 = expression2 expression1 <> expression2
2010 Wipro Ltd - Confidential

<>
23

Not equal to

VB Script Operators (Cont ..)


Comparison Operators When comparing two expressions, you may not be able to easily determine whether the expressions are being compared as numbers or as strings. The following table shows how expressions are compared or what results from the comparison, depending on the underlying subtype:
If Both expressions are numeric Both expressions are strings One expression is numeric and the other is a string Then Perform a numeric comparison. Perform a string comparison. The numeric expression is less than the string expression. Perform a numeric comparison, using 0 as the Empty expression. Perform a string comparison, using a zero-length string ("") as the Empty expression. The expressions are equal.
2010 Wipro Ltd - Confidential

One expression is Empty and the other is numeric

One expression is Empty and the other is a string Both expressions are Empty
24

VB Script Operators (Cont..)


String Operators
Operator
&

English
Connected to

Example
Wipro&Technolo gies

Result
Wipro Technologies

Logical Operators
Operator AND OR NOT English Both must be true Either on must be true Inverse of Truth Example True and True True and False Not False Result True True True

25

2010 Wipro Ltd - Confidential

VB Script Statements (Looping)


Looping statements are used to run the same block of code a specified number of times.
Function For...Next statement Value Return Use the For...Next statement to run a block of code a specified number of times Example For i=0 to 2 msgbox Wipro End For will print Wipro three times. Cars=array(Mercedez,Jaguar) For each y in cars msgbox y Next Will print Mercedez and then Jaguar.

For Each...Next Loop

A For Each...Next loop repeats a block of code for each item in a collection, or for each element of an array.

Do While i>5 The Do...Loop statement repeats a block of code 'some code Do...Loop statement while a condition is true, Loop If i=4 , it will never get executed , if or until a condition becomes true. i=7 it will get executed until the some code part return a value less than 5 i=4 ,While i<5 msgbox "printed" i=6 Wend will print printed once in a message box.

While...Wend statement

Executes a series of statements as long as a given condition is True.

26

2010 Wipro Ltd - Confidential

VB Script Conditional Statements


Conditional statements are used to perform different actions for different decisions.In VBScript we have four conditional statements:
Function Value Return Example Dim Cricketer , Cricketer=Dhoni If Cricketer=Dhoni Then msgbox "Top Ranking Player" End if. Dim Mark , Mark=50 If Mark>=50 Then Msgbox Pass Else msgbox "fail" end if Dim State , State=Pass If State=Pass Then msgbox 1 ElseIf State=Fail Then msgbox 0 Else msgbox The entered state is other than Pass or Fail End If

If statement

executes a set of code when a condition is true

If...Then...Else statement

Select one of two sets of lines to execute

If...Then...ElseIf statement

select one of many sets of lines to execute

Select Case statement

select one of many sets of lines to execute

Dim MonthInt, MonthInt=2 Select Case(MonthInt) Case 1 msgbox January Case 2 msgbox February Case else msgbox Enter either 1 or 2 End Select

27

2010 Wipro Ltd - Confidential

Quality Center Overview & Important Features

28

2010 Wipro Ltd - Confidential

Quality Center Basics


Topics Covered in this lesson are: Quality center Overview Quality center Interface Working with releases Working with requirements Work with data Test Planning Test Execution

29

2010 2010 Wipro Wipro Ltd Ltd - Confidential Confidential

Quality Center Basics


Topics Covered in this lesson are: (Continued) Defect tracking Exporting from Excel to Quality Center Defining Requirements Test Planning Test Execution Defect Tracking Reporting and Analysis Exporting from Word to Quality Center

30

2010 2010 Wipro Wipro Ltd Ltd - Confidential Confidential

Quality Center Basics


Quality Center Basics
Quality Center

31

2010 2010 Wipro Wipro Ltd Ltd - Confidential Confidential

Database Basics

32

2010 Wipro Ltd - Confidential

Database Basics
Topics Covered in this lesson are: RDBMS Concepts Introduction to Basic SQL statements Ordering of Rows SQL Functions Joins Data Definition Language DML statements

33

2010 2010 Wipro Wipro Ltd Ltd - Confidential Confidential

RDBMS Concepts
Please refer to the following Websites:http://en.wikipedia.org/wiki/Relational_database http://www.tutorialspoint.com/sql/sql-rdbms-concepts.htm

34

2010 2010 Wipro Wipro Ltd Ltd - Confidential Confidential

SQL Basics
Please refer to the following training material: (attached file)-

SQL-Bascis.doc

35

2010 2010 Wipro Wipro Ltd Ltd - Confidential Confidential

Tool Support for Testing

36

2010 Wipro Ltd - Confidential

Tool Support for Testing


Topics Covered in this lesson are: Types of Test Tools Effective use of Test Tools Introducing a Tool into an Organization

37

2010 2010 Wipro Wipro Ltd Ltd - Confidential Confidential

Types of Test Tools


Test Tool Classification Some tools perform a very specific and limited function. Tool support is useful for repetitive task. A tool that measures timing for non-functional (performance) testing needs to interact very closely with that software in order to measure it. In order to measure coverage, tool must first identify all of the structural element might be exercised to see whether a test exercise it or not. Debugging tool is used to try to find a particular defect.

38

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tool Support for Management of Testing and Tests The management of testing applies over the whole of the software development life cycle. A test management tool may also manage the tests, which would begin early in the project. Test management tools are typically used at system or acceptance test level.

39

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tool Support for Management of Testing and Tests Test management tool features Management of test Schedule of tests to be executed Management of testing activities Interface to other tool Traceability of tests, test results and defects to requirement or other sources. Logging test results Preparing progress reports based on metrics - Tests run and tests passed - Incident raised - Defects fixed - Outstanding defects Helps to gather, organize and communicate information about the testing on a project.
2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

40

Types of Test Tools


Tool Support for Management of Testing and Tests Requirement management tools Tests are based on requirements, better the quality of requirements, easier it will be to write test from them. It is also important to be able to trace tests to requirements and requirements to tests. Requirement management tool features 1. Storing requirement statements 2. Checking consistency of requirement 3. Traceability of requirement to tests and tests to requirement, functions or features

41

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tool Support for Management of Testing and Tests Incident management tools Incidence may also be perceived problems, anomalies, or enhancement requests. Incident report go through number of stages from initial identification and recording of the details, through analysis, classification, assignment for fixing, fixed, re-tested, and closed. Incident management tool features Storing information about the attributes of incidents (e.g. severity) Storing attachment (e.g. screen shots) Prioritizing incidents; Assigning actions to people (fix, confirmation to test, etc.) Status (e.g. open, rejected, closed, etc.) Reporting of statistics/ metrics about incidents. (e.g. average time open, total number raised, open or closed)

42

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tool Support for Management of Testing and Tests Configuration management tools Good configuration management is critical for controlled testing. Test ware needs to be under configuration management. Test ware also has different version and is changed over time. Configuration management tool features Storing information about versions and builds of the software and testware.

43

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tool Support for Static Testing Review process support tool features It can be called as a repository for rules, procedure and checklists to be used in reviews. A common reference for the review process or process to use in different situation.

44

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tool Support for Static Testing Static analysis tools (D) Static analysis tools are extension of compiler technology. Static analysis can also be carried out on things other than software code. Also can be used to enforce coding standards. Static analysis tool features (D) Calculate metrics such as, Cyclomatic complexity. Enforce coding standards. Analyze structure and dependencies. Aid in code understanding. Identify anomalies or defect in the code.

45

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tool Support for Static Testing Modeling tools ( D) Helps to validate models of the system or software. They can be used before dynamic tests can be run. Model-based testing tools are actually tools that generates test inputs or test cases from stored information about a particular model. Modeling tools features ( D) Helping to identify and priorities areas of the model for testing. Predicting system response and behavior under various situations, such as level of load. Helping to understand system functions and identify test conditions using a modeling language such as UML.

46

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tools Support for Test Specification Test design tools Helps to construct test cases or at least test inputs. If automated oracle is available, then tool can also construct the expected result. Test design tool may be bundled with coverage tool.

47

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tools Support for Test Specification Test data preparation tools Enables data to be selected from an existing database or created for use in test. Test data preparation tool features Enables records to be sorted or arranged in a different order. Generate new records populated with pseudo-random data, or data set up according to some guidelines. Construct a large number of similar records from a template, to give a large set of records for volume tests.

48

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tools Support for Test Execution and Logging Test execution tools Tools is also referred as a test running tool. Test execution tools use a scripting language to drive the tool. Test execution tool features Executing tests from stored scripts and optionally data files accessed by the script. Dynamic comparison of screen, elements, links, control, objects and values. Ability to initiate post-execution comparison. Logging results of test run. Masking or filtering of subsets of actual and expected results. Measuring timing for tests. Synchronizing inputs with the application under test. Sending summary results to a test management tool.

49

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tools Support for Test Execution and Logging Test harness/ unit test framework tools (D) Test harness provides stubs and drivers, which are small programs that interact with software under test. Some unit test framework tools provide support for object oriented software. Test harness/ unit test framework tool features (D) Executing a set of tests within the framework or using the test harness. Recording the pass/fail results of each test. Storing tests Support for debugging. Coverage measurement at code level.

50

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tools Support for Test Execution and Logging Test comparator Dynamic comparison is where the comparison is done dynamically i.e. while the test is executing. Post-execution comparison, where the comparison is performed after the test has finished executing and the software test is no longer running. Test comparator features Post-execution comparison of stored data. Masking or filtering of subsets of actual and expected results.

51

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tools Support for Test Execution and Logging Coverage measurement tools features (D) Calculating the percentage of coverage items that were exercised by a suit of tests. Reporting coverage items that have not been exercised as yet. Identifying test inputs to exercise as yet uncovered items. Generating stubs and drivers (if part of unit test framework).

52

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tools Support for Performance and Monitoring Dynamic analysis tools features (D) They are analysis rather than testing tool. Detecting memory leaks. Identifying pointer arithmetic errors such as null pointer. Identifying time dependencies.

53

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tools Support for Performance and Monitoring Performance-testing, Load-testing and Stress-testing Tools Performance-testing tools are concerned with testing at system level to see whether or not the system will stand up to a high volume of usage. A load-test checks that the system can cope with its expected number of transaction. A volume test checks that the system can cope with a large amount of data. A stress test is one that goes beyond the normal expected usage of the system. Performance-testing, Load-testing and Stress-testing Tool features Generating a load on a system to be tested. Measuring the timing of specific transaction as the load on the system varies. Measuring average response times. Producing graphs or charts of response over time.
2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

54

Types of Test Tools


Tools Support for Performance and Monitoring Monitoring tools Monitoring tools are used to continuously keep track of the system in use. Monitoring tool features Identifying problems and sending an alert message to the administrator. Logging real time and historical information. Finding optional setting. Monitoring the number of users on a network. Monitoring network traffic.

55

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tools Support for Specific Application Areas There are web-based performance-testing tools. Performance testing tool for back-office. There are static analysis tools for specific development platform and programming languages. There are dynamic analysis tools that focus on security issues. Dynamic analysis tools for embedded systems.

56

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Types of Test Tools


Tools Support suing other Tools A word processor or spreadsheet acts as a testing tool Tool used by developers when debugging To help localize defect and check their fixes.

57

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Effective Use of Testing Tools


Potential Benefit of using Tools Repetitive work is reduced. Greater consistency and repeatability Objective assessment Ease of access to information about tests or testing

58

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Effective Use of Testing Tools


Risk of using Tools Test execution tool In order to know what test to execute and how to run them, test execution tool must have some way of knowing what to do- this is the script for the tool. The scripting language may be specific to a particular tool, or it may be more general language. There are different levels of scripting - Liner scripts - Structured scripts - Shared scripts - Data-driven scripts - Keyword-driven scripts

59

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Effective Use of Testing Tools


Special Considerations for some types of Tools Performance testing tool When using a performance testing tool we are looking at - The transaction throughput - The degree of accuracy of a given computation - The computer resource being used for a given level of transactions. - The time taken for certain transaction - The number of users that can use the system at once.

60

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Effective Use of Testing Tools


Special Considerations for some types of Tools Performance testing tools issues The design of the load to be generated by the tool. Timing aspects The length of the test and what to do if a test stops prematurely. Narrowing down the location of a bottleneck. Exactly what aspects to measure How to present the information gathered.

61

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Effective Use of Testing Tools


Special Considerations for some type of Tools Static analysis tools Helps to check that the code is written to coding standards. Static analysis tools can generate the large number of messages. A filter on the output of static analysis tool could make the more important messages more likely to be noticed and fixed.

62

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Effective Use of Testing Tools


Special Considerations for some types of Tools It is important to define test process before test management tool are introduce. The reports need to be designed and monitored so that they provide benefit. The tool should help to build on the strengths of organization and address it weaknesses.

63

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Introducing a Tool in to an Organization


The following factors are important in selecting a tool Assessment of the organizations maturity E.g. Readiness for change Identification of the areas within the organization where tool support will help to improve testing processes. Evaluation of tools against clear requirement and objective criteria. Proof-of-concept to see whether the product works as desired and meets the requirements and objectives defined for it. Evaluation of the vendor or open-source network of support. Identifying and planning internal implementation. Including coaching and mentoring for those new to the use of the tool

64

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Introducing a Tool in to an Organization


Pilot Project Objectives should be set for the pilot in order to assess whether or not the concept is proven. Objectives for a Pilot Project To learn more about the tool. More details, more depth To decide on standard ways of using the tool that will work for all potential users. E.g. naming conventions, creation of libraries, defining modularity. To evaluate the pilot project against its objectives. Have the benefits been achieved at reasonable cost?

65

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Introducing a Tool in to an Organization


Success Factors Adapting and improving processes, testware and tool artifacts to get the best fit and balance between them and use of the tool. Defining and communicating guidelines for the use of the tool, based on what was learned in the pilot. Monitoring tool use and benefits.

66

2009 2010 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

STLC

67

2010 Wipro Ltd - Confidential

STLC
Software Testing is not a just a single activity. It consists of series of activities carried out methodologically to help certify your software product. These activities (stages) constitute the Software Testing Life Cycle (STLC). Software Testing Life Cycle process is an integral part of the Software Development Life Cycle. The overall aspect of STLC phase deals with testing and rectifying any error code generating within the program under various test conditions. Each of these stages have a definite Entry & Exit criteria , Activities & Deliverables associated with it. In an Ideal world you will not enter the next stage until the exit criteria for the previous stage is met. But practically this is not always possible. We will focus on activities and deliverables for the different stages in STLC. Lets look into them in detail:-

68

2010 Wipro Ltd - Confidential

Phases in STLC
Project Initiation & Requirement Analysis Test Planning Test Case Preparation Environment Setup Test Execution

Test Closure

69

2010 Wipro Ltd - Confidential

Project Initiation
During this phase, Requirement Specification Document is reviewed for consistency & Testability. Software Project Plan (SPP) Testing with scope, schedule & estimation will be prepared. This will also include risks analysis, test strategy etc. This document is inspected and signed-off. Activities Identify test requirements Assess Risks Identify Resources Estimation & Schedule Project Plan

70

2010 Wipro Ltd - Confidential

Requirement Analysis
During this phase, test team studies the requirements from a testing point of view to identify the testable requirements. The QA team may interact with various stakeholders (Client, Business Analyst, Technical Leads, System Architects etc) to understand the requirements in detail. Requirements could be either Functional (defining what the software must do) or Non Functional (defining system performance /security availability ). Automation feasibility for the given testing project is also done in this stage.

71

2010 Wipro Ltd - Confidential

Requirement Analysis
Activities Identify types of tests to be performed. Gather details about testing priorities and focus. Prepare Requirement Traceability Matrix (RTM). Identify test environment details where testing is supposed to be carried out. Automation feasibility analysis (if required). Deliverables RTM Automation feasibility report (if applicable)

72

2010 Wipro Ltd - Confidential

Test Planning
This phase is also called Test Strategy phase. Typically, in this stage, a Test Lead/QA manager will determine effort and cost estimates for the project and would prepare and finalize the Test Plan. Activities

Preparation of test plan/strategy document for various types of testing Test tool selection Test effort estimation Resource planning and determining roles and responsibilities. Training requirement

73

Deliverables
2010 Wipro Ltd - Confidential

Test Case Development


This phase involves creation, verification and rework of test cases & test scripts. Test data, is identified/created and is reviewed and then reworked as well.

Activities

Create test cases, automation scripts (if applicable) Review and baseline test cases and scripts Create test data (If Test Environment is available)
Deliverables

Test cases/scripts Test data


74
2010 Wipro Ltd - Confidential

Test Environment Setup


Test environment decides the software and hardware conditions under which a work product is tested. Test environment set-up is one of the critical aspects of testing process and can be done in parallel with Test Case Development Stage. Test team may not be involved in this activity if the customer/development team provides the test environment in which case the test team is required to do a readiness check (smoke testing) of the given environment.

75

2010 Wipro Ltd - Confidential

Test Environment Setup


Activities Understand the required architecture, environment set-up and prepare hardware and software requirement list for the Test Environment. Setup test Environment and test data Perform smoke test on the build Deliverables Environment ready with test data set up Smoke Test Results.

76

2010 Wipro Ltd - Confidential

Test Execution
During this phase test team will carry out the testing based on the test plans and the test cases prepared. Bugs will be reported back to the development team for correction and retesting will be performed. Activities Execute tests as per plan Document test results, and log defects for failed cases Map defects to test cases in RTM Investigate unexceptional results Defect Tracking Metrics Analysis Retest the defect fixes Track the defects to closure Deliverables Completed RTM with execution status Test cases updated with results Defect reports
2010 Wipro Ltd - Confidential

77

Test Closure
Testing team will meet , discuss and analyze testing artifacts to identify strategies that have to be implemented in future, taking lessons from the current test cycle. The idea is to remove the process bottlenecks for future test cycles and share best practices for any similar projects in future.

78

2010 Wipro Ltd - Confidential

Test Closure
Activities Retrospection Meeting Document the learning out of the project Identifying the improvement opportunities Prepare Test closure report Qualitative and quantitative reporting of quality of the work product to the customer. Test result analysis to find out the defect distribution by type and severity. Deliverables Test Closure report Handover to client/production Test metrics

79

2010 Wipro Ltd - Confidential

Summary of STLC
Finally, Summary of STLC along with Entry & Exit Criteria
STLC Stages Requirement Analysis Entry Criteria Requirements Document available (both functional and non functional) Acceptance criteria defined. Application architectural document available. Activities Analyze business functionality to know the business modules and module specific functionalities. Identify all transactions in the modules. Identify all the user profiles. Gather user interface/authentication, geographic spread requirements. Identify types of tests to be performed. Gather details about testing priorities and focus. Prepare Requirement Traceability Matrix (RTM). Identify test environment details where testing is supposed to be carried out. Automation feasibility analysis (if required). Exit Criteria Signed off RTM Test automation feasibility report signed off by the client Deliverables RTM Automation feasibility report (if applicable)

80

2010 Wipro Ltd - Confidential

Summary of STLC - Contd


STLC Stages Test Planning Entry Criteria Requirements Documents Requirement Traceability matrix. Test automation feasibility document. Activities Analyze various testing approaches available Finalize on the best suited approach Preparation of test plan/strategy document for various types of testing Test tool selection Test effort estimation Resource planning and determining roles and responsibilities. STLC Stages Test Case Preparation Entry Criteria Requirements Documents RTM and test plan Automation analysis report.
81

Exit Criteria Approved test plan/strategy document. Effort estimation document signed off.

Deliverables Test plan/strateg y document. Effort estimation document.

Activities Create test cases, automation scripts (where applicable) Review and baseline test cases and scripts Create test data

Exit Criteria Reviewed and signed test cases/scripts Reviewed and signed test data

Deliverables Test cases/script s Test data

2010 Wipro Ltd - Confidential

Summary of STLC - Contd


STLC Stages Test Environment Setup Entry Criteria System Design and architecture documents are available Environment set-up plan is available Activities Understand the required architecture, environment set-up Prepare hardware and software requirement list Finalize connectivity requirements Prepare environment setup checklist Setup test Environment and test data Perform smoke test on the build Accept/reject the build depending on smoke test result Exit Criteria Environment setup is working as per the plan and checklist Test data setup is complete Smoke test is successful Deliverables Environmen t ready with test data set up Smoke Test Results.

82

2010 Wipro Ltd - Confidential

Summary of STLC - Contd


STLC Stages Test Execution Entry Criteria Baselined RTM, Test Plan , Test case/scripts are available Test environment is ready Activities Execute tests as per plan Document test results, and log defects for failed cases Update test plans/test cases, if necessary Map defects to test cases in RTM Exit Criteria All tests planned are executed Defects logged and tracked to closure Deliverables Completed RTM with execution status Test cases updated with results

Test data set up is done


Unit/Integration test report for the build to be tested is available

Retest the defect fixes


Regression testing of application Track the defects to closure

Defect reports

83

2010 Wipro Ltd - Confidential

Summary of STLC - Contd


STLC Stages Test Closure Entry Criteria Testing has been completed Test results are available Defect logs are available Activities Evaluate cycle completion criteria based on - Time, Test coverage , Cost , Software Quality , Critical Business Objectives Prepare test metrics based on the above parameters. Document the learning out of the project Exit Criteria Test Closure report signed off by client Deliverables Test Closure report Test metrics

Prepare Test closure report


Qualitative and quantitative reporting of quality of the work product to the customer. Test result analysis to find out the defect distribution by type and severity

84

2010 Wipro Ltd - Confidential

Entry & Exit Criteria in Software Testing

85

2010 Wipro Ltd - Confidential

Entry and Exit Criteria For Software Testing


Entry and Exit criteria are required to start and end the testing. It is must for the success of any project. If you do not know where to start and where to finish then your goals are not clear. By defining exit and entry criteria you define your boundaries. For instance, you can define entry criteria that the customer should provide the requirement document or acceptance plan. If these entry criteria are not met then you will not start the project. On the other end, you can also define exit criteria for your project. For instance, one of the common exit criteria in projects is that the customer has successfully executed the acceptance test plan.

86

2010 Wipro Ltd - Confidential

Testing Start Process


The entry criteria defines what all need to start the testing. It is very necessary to know for tester /QA what should be start criteria for entering into testing phase. In general, entry criteria is a set of conditions that permits a task to perform, or in absence of any among these condition will not allow to perform that task is taken as the Entry Criteria of that task.

87

2010 Wipro Ltd - Confidential

Testing Start Process


For Example:In order to generate the Testcases, the following document/information is required, The requirement (Functional /Business) document, Complete understanding of the flow, The test case format/Tool that is used in your organization and many more Similarly if you need to execute TCs the Entry criteria should be All developed code must be unit tested. Unit Testing must be completed and signed off by development team. Functional and Business requirement should be approved & signed-off. Test plan, test cases reviewed and approved. Test environment should be ready Test data should be available Availability of application Tester gets significant knowledge of application.
88
2010 Wipro Ltd - Confidential

Testing Stop Process


The Exit criteria is a set of conditions based on which you can say this particular task is finished. This can be difficult to determine. Many modern software applications are so complex, and run in such as interdependent environment, that complete testing can never be done. "When to stop testing" is one of the most difficult questions to a test engineer. Common factors in deciding when to stop are:

89

2010 Wipro Ltd - Confidential

Testing Stop Process - contd


Exit criteria will include what all required to end the test cycle as follows:

Deadlines (release deadlines, testing deadlines, etc.) Test cases completed with certain percentage passed Test budget depleted Coverage of code/functionality/requirements reaches a specified point All defects are fixed or closed Closure reports are signed off All the test cases have been executed and passed Beta or alpha testing period ends Budget allocated for testing is exhausted The risk in the project is under acceptable limit.

90

2010 Wipro Ltd - Confidential

Testing Stop Process - contd


Practically, we feel that the decision of stopping testing is based on the level of the risk acceptable to the management. As testing is a never-ending process we can never assume that 100% testing has been done; we can only minimize the risk of shipping the product to the client with X testing done. The risk can be measured by Risk analysis but for a small duration / low budget / low resources project, risk can be deduced by simply:

Measuring Test Coverage Number of test cycles Number of high priority bugs
One of the most important mechanisms is the use of exit criteria to set specific goals for an activity. Exit criteria can be used to define success at the end of any activity, test level or project, so this concept has multiple uses within software testing projects.
Entry criteria can also be used where it is necessary to decide entry to an activity based on factors other than the success of a previous activity.

91

2010 Wipro Ltd - Confidential

Making use of entry and exit criteria


Benefits of managing testing projects by making use of entry and exit criteria:There are two important advantages to managing testing projects by making use of objective entry and exit criteria. The criteria for successful completion are set at the beginning of the project, well before the pressures associated with delivery are felt, and can be based on a consensus of all the stakeholders. Decisions are visible and simple at the transitions from one test level to another and at delivery. These advantages do not, in themselves, provide any guarantee of a successful project. What they do achieve, however, is to make the decision-making process more open throughout the project. Every stakeholder can see how well the project is progressing against its quality criteria and if any decisions are required to authorize progress beyond a milestone for which the criteria has not been met; the implications are clear to all. At the point of delivery a final release decision will be based on criteria that are met, nearly met or not met. Where the criteria are met the release is straightforward. Where the criteria are nearly met a risk-based decision can be made based on the gap between the criteria and the actual achievement. Where criteria are not met the decision may be more tricky, but even here the existence of objective criteria can help to quantify the level of risk and select the best action plan.
2010 Wipro Ltd - Confidential

92

Unit Testing
Test Objectives:-

Ensure proper target of test functionality, including navigation, data entry, processing & retrieval.
Entry Criteria:

Business Requirement or Functional specification document should be completed and approved. Technical specification document or technical design document should be completed and approved. Development of component should be completed. Development environment should be stable. Unit test cases document should be completed.
93
2010 Wipro Ltd - Confidential

Exit criteria for Unit Testing


All the unit test cases should be executed and test result should be passed. All the bugs found should be fixed and closed. Project code is completed. No major or critical bugs found are open.

94

2010 Wipro Ltd - Confidential

Integration Testing
Test Objectives:-

Ensure that all the components being integrated works together correctly.
Entry Criteria:

Modules needed for integration testing should be ready. System testing should be completed. All the issues document during system testing should fixed and closed. Test script needed for integration testing should be ready. Environment needed to perform integration testing should be ready.
95
2010 Wipro Ltd - Confidential

Exit criteria for Integration Testing


Defects found during integration testing should be fixed and closed. All the test case should be executed and test results should be pass for the all the test cases. Testing transition meeting will be held and should be signed off. Different testing like load testing, performance testing, usability testing performed should be meeting the standards committed to customer.

96

2010 Wipro Ltd - Confidential

System Testing
Test Objectives: To validate an application accuracy and completeness in performing the function as designed. It represents testing after a complete system is assembled & is performed after all integration and unit testing has been successfully applied. Entry Criteria: Unit testing of all the modules should be completed System testing environment should be ready. Specifications for the product have been completed and approved. System test cases should be documented. UI and functionalities to be tested should be frozen. Priority bugs have been fixed.
97
2010 Wipro Ltd - Confidential

Exit criteria for System Testing


Application meets all the document requirements and functionalities. Defects found during System testing should be fixed and closed. All the test cases for the system should be executed and passed. No critical defects should be opened which is found during system testing.

98

2010 Wipro Ltd - Confidential

User Acceptance Testing


Test Objectives: Ensure that the application is working and its done by the end user's in business perspectives.

Entry Criteria: Integration testing signed off should be received. Business requirements and functional requirements have been met. UAT test cases are ready for execution. UAT testing environment should be ready. Necessary access for testing should be obtained. No critical bugs should be present. All the modules committed for testing should be tested and test report should be handed over to client.
99
2010 Wipro Ltd - Confidential

Exit criteria for UAT


No critical defects found. Minimum outstanding medium priority defects should be found. Business process is workings satisfactorily. UAT close off meeting held.

100

2010 Wipro Ltd - Confidential

Regression Testing
Test Objectives: Ensure earlier functionalities are not affected. Entry Criteria: Defect has been repeatable and properly document. Defect has been fixed by developers. A regression test specific to the defect has been created, reviewed, and accepted.

101

2010 Wipro Ltd - Confidential

Exit criteria for Regression Testing


Results of the test show no negative impact to the application.

102

2010 Wipro Ltd - Confidential

Client- Server Architecture

103

2010 Wipro Ltd - Confidential

Definition of Client / Server


Client initiates request

Server services request

SERVER

CLIENT

Client Server
104

Initiates requests Waits for and receives replies Can connect to several servers at the same time Typically interacts directly with end-users using a Graphical User Interface (GUI) Waits for requests from clients Upon receipt of requests, processes them and then serves replies Usually accepts connections from a large number of clients Typically does not interact directly with end-users
2010 Wipro Ltd - Confidential

Client Server - Information


Servers typically contain data files & applications accessed by multiple clients Client & Server share the processing load Client / Server can be on same computer system or on different computer systems Client/Server model - a convenient way to interconnect programs distributed across different locations

105

2010 Wipro Ltd - Confidential

Client Server
Advantages
Sharing of Processing Load: Distribution or sharing of processing load among several independent computers Security for Data Access: Centralized data storage on server, hence easy to implement security of data access Easy to Administer: Clients with the appropriate permissions may be permitted to access and change centralized data. Hence easy to administer. Concurrent tasks at a time: Is capable of functioning with multiple different clients each with different capabilities

Disadvantages
Traffic congestion on the network: Number of simultaneous client requests to a server can cause a server to become overloaded and unable to service clients requests

Lack of robustness: Under client-server, should a critical server fail, clients requests cannot be fulfilled. Hence, lack of robustness is a cause for concern.

106

2010 Wipro Ltd - Confidential

Characteristics of C/S Model


Asymmetrical protocols Encapsulation of services Site/Location transparency Message-based exchanges Modular, Extensible design Platform Independence Scalability Separation of Client/Server Functionality Shared resources

107

2010 Wipro Ltd - Confidential

Types of Servers
File Server Database Server Application Server Web Server Object Server Others Chat Server, Fax Server, Mail server, News Server

108

2010 Wipro Ltd - Confidential

Function of each servers


Application Server
It runs the programs and processes the data Typically used for complex transactionbased applications Performs the business logic functions and some data access It provides middle tier processing between the user's machine and the database management system (DBMS)

Database Server
A computer in a LAN dedicated to database storage and retrieval The database server holds the Database Management System (DBMS) and the databases Upon requests from the client machines, it searches the database for selected records and passes them back over the network

File Server
To promote sharing of files (computer programs and/or data) To encourage indirect or implicit (via programs) use of remote computers To shield a user from variations in file storage systems among hosts To transfer data reliably and efficiently

Web Server
Web Server delivers web pages to browsers
109

2010 Wipro Ltd - Confidential

Features & Benefits of Server


Server can range from PCs to mainframes Standard Server hardware Support for large amount of RAM Fast input and output Fast network cards Ability to support multiple processors Support for fault tolerance Benefits of a Server: Optimization Centralization Data Integity Security Back-up

110

2010 Wipro Ltd - Confidential

On the Web
World Wide Web (WWW) or Web revolves around the client/server architecture Client computer system uses Browsers (like Internet Explorer, Mozilla etc. ) to interact with Internet servers using Protocols Protocols help in the accurate transfer of data - requests from browser & responses from server Commonly used protocols :

HTTP (Hyper Text Transfer Protocol) FTP (File Transfer Protocol) SMTP (Simple Mail Transfer Protocol)

111

2010 Wipro Ltd - Confidential

Middleware
Software which allows an application to interoperate with other software, without requiring the user to understand and code the lowlevel operations required to achieve interoperability With Synchronous systems, the requesting system waits for a response to the request in real time Asynchronous systems send a request but do not wait for a response in real time the response is accepted whenever it is received . " Middleware " - holds client/server applications together

112

2010 Wipro Ltd - Confidential

Six types of Middleware


1. Asynchronous Remote Procedure Calls (RPC) - client makes calls to procedures running on remote computers but does not wait for a response. If connection is lost, client must re-establish the connection and send request again. High scalability but low recovery, largely replaced by type 2 2. Synchronous RPC distributed program using this may call services available on different computers makes it possible to achieve this without undertaking detailed coding (e.g. RMI in Java) 3. Publish/Subscribe often called push technology, here server monitors activity and sends information to client when available. It is asynchronous, the clients (subscribers) perform other activities between notifications from the server. Useful for monitoring situations where actions need to be taken when particular events occur. 4. Message-Oriented Middleware (MOM) - asynchronous sends messages that are collected and stored until they are acted upon, while the client continues with other processing.

5. Object Request Broker (ORB) - object-oriented management of communications between clients and servers. ORB tracks the location of each object and routes requests to each object.
6. SQL-oriented Data Access - middleware between applications and database servers. Has the capability to translate generic SQL into the SQL specific to the database

113

2010 Wipro Ltd - Confidential

3-Tier Architecture
A three way interaction in a client/server environment.
The user is stored in the client. The bulk of the business application logic is stored in one or more servers. The data is stored in a database server.

114

2010 Wipro Ltd - Confidential

Layers
Presentation Tier The top-most level of the application is the user interface. The main function of the interface is to translate tasks and results to something the user can understand. Application Tier This layer coordinates the application, processes commands, makes logical decisions and evaluations and performs calculations. It also moves and processes data between the two surrounding layers. Data Tier Here information is stored and retrieved from a database or file system. The information is then passed Back to the logic tier for processing, and then eventually back to the user.

ASPX Pages, Forms, Dynamic Contents

Business Logic IIS, App Service

Windows OS SQL Server OS

115

2010 Wipro Ltd - Confidential

3-Tier Architecture - Benefits


Improved Availability: Mission critical applications can make use of redundant application servers and redundant database servers, so it can recover from network or server failures. Hidden database structure: Since the actual structure of the database is hidden from the caller. Scalability: The application servers can be deployed on many machines The database no longer requires a connection from every client TP monitors or ORBs can be used to balance loads and dynamically manage the number of application server(s) available. Better Re-Use: If an standard object is employed, the specific language of implementation of the middle tier can be made transparent. Improve Data Integrity: The middle tier can ensure that only valid data is allowed to be updated in the database. Improved Security: Since the client doesn't have direct access to the database. Business logic is generally more secure since it is placed on a more secure central serv er. Reduced Distribution: Changes to business logic only need to be updated on the application servers and don't have to be distributed to all the clients.

116

2010 Wipro Ltd - Confidential

3-Tier Architecture - Drawbacks


Increased Complexity/Effort: In general is more difficult to build a 3-tier application compared to 2tier application because: The points of communication are doubled: Many handy productivity enhancements provided by the client tools will be foregone or their benefit will be reduced. Fewer Tools: The existence of more tools available for a 2-tier model (e.g. most reporting tools)

117

2010 Wipro Ltd - Confidential

Two-Tier Architecture - Diagram


Client
- Presentation Logic - Business Logic - DB Access (SQL)

- Business logic in the form of stored procedures

DB Server

118

2010 Wipro Ltd - Confidential

Two-Tier Architecture - Internet

Request

Request

Internet
Response Response Web Server

Client

119

2010 Wipro Ltd - Confidential

3-Tier Architecture
Client

Business Logic
Service A Service B Service C

RDBMS Server
120

2010 Wipro Ltd - Confidential

3-Tier Architecture- Internet

Request

Request

Request

Internet
Response
Response Response

Client

Web Server

App Server

121

2010 Wipro Ltd - Confidential

C/S Model - Static HTML Pages


Browser 1

3 2

Server

1. Browser requests for a HTML File 2. Server locates the file and send to the browser 3. Browser displays the file
122

2010 Wipro Ltd - Confidential

C/S Model - Dynamic HTML Pages


Browser 1

5 2 3 4 Server 1. 2. 3. 4. 5.
123

Browser sends request to server Server locates the CGI program and passes the request information CGI program process the request and send the data to server Server send the data to the browser Browser displays the data
2010 Wipro Ltd - Confidential

C/S Model Server side scripting


Browser 1

4 2 3 Server 1. 2. 3. 4. Browser sends request to server Server checks the file and executes the embedded scripts Final formatted document Browser displays the document

124

2010 Wipro Ltd - Confidential

Differences
Desktop Application
Desktop application runs on personal computers and work stations, so when you test the desktop application you are focusing on a specific environment. You will test complete application broadly in categories like GUI, functionality, Load, and backend i.e DB. Desktop application: 1. Application runs in single memory (Front end and Back end in one place) 2. Single user only

Client Server Application


In client server application you have two different components to test. Application is loaded on server machine while the application exe on every client machine. You will test broadly in categories like, GUI on both sides, functionality, Load, client-server interaction, backend. This environment is mostly used in Intranet networks. You are aware of number of clients and servers and their locations in the test scenario. Client/Server application: 1. Application runs in two or more machines 2. Application is a menu-driven 3. Connected mode (connection exists always until logout) 4. Limited number of users 5. Less number of network issues when compared to web app.

Web Application
Web application is a bit different and complex to test as tester dont have that much control over the application. Application is loaded on the server whose location may or may not be known and no exe is installed on the client machine, you have to test it on different web browsers. Web applications are supposed to be tested on different browsers and OS platforms so broadly Web application is tested mainly for browser compatibility and operating system compatibility, error handling, static pages, backend testing and load testing. Web application: 1. Application runs in two or more machines 2. URL-driven 3. Disconnected mode (state less) 4. Unlimited number of users 5. Many issues like hardware compatibility, browser compatibility, version compatibility, security issues, performance issues etc.

125

2010 Wipro Ltd - Confidential

Reference
ISTQB Glossary of terms used in Software Testing Version 1.0 Foundations of Software Testing by Dorothy Graham, Erik Veenendaal, Isabel Evans, Rex Black Software Testing in Real World By Edward Kit Introducing Software Testing By Louise Tamres Software Engineering By Roger Pressmen Software Testing By Ron Patton Effective Methods of Software Testing By William Perry Lessons Learned in Software Testing By Cem Kaner, James Bach, Bret Pettichord Wikipedia

126

2010 2010 Wipro Wipro Ltd Ltd - Confidential Confidential

References
http://en.wikipedia.org www.velociq.wipro.com Some information from common testing web sites.

127

2010 Wipro Ltd - Confidential

Thank You

128

2010 Wipro Ltd - Confidential

S-ar putea să vă placă și