Você está na página 1de 68

Application Testing2.

Testing Competency Team

2010 Wipro Ltd Internal & Restricted

Course Objectives
After completing this course, you should be able to:
Understand how to use Quality Center effectively Understand the Role of Tools in Testing Activities Prepare Test Data for Tests Understand the basics of RDBMS and SQL Understand the basics of VB Scripting

2009 Wipro Ltd - Confidential

Application Testing 2.2 Agenda


1 Quality Center Basics 2 Tool Support for Testing 3 Test Data Preparation

4 Database Basics 5 VB Scripting

2009 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Quality Center Basics

2010 Wipro Ltd Internal & Restricted

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

2009 Wipro Ltd - 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

2009 Wipro Ltd - Confidential

Quality Center Basics


Quality Center Basics
Quality Center

2009 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Tool Support for Testing

2010 Wipro Ltd Internal & Restricted

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

2009 Wipro Ltd - 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.

10

2009 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.

11

2009 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.

12

2009 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

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

13

2009 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)

14

2009 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.

15

2009 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.

16

2009 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.

17

2009 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.

18

2009 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.

19

2009 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.

20

2009 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.

21

2009 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.

22

2009 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.

23

2009 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).

24

2009 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.

25

2009 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.

26

2009 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

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.

27

2009 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.

28

2009 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.

29

2009 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

30

2009 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

31

2009 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.

32

2009 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.

33

2009 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.

34

2009 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.

35

2009 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

36

2009 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?

37

2009 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.

38

2009 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

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

39

2009 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Test Data Preparation

40

2010 Wipro Ltd Internal & Restricted

Test Data Preparation


Test Data Preparation Test Data Set categories
No Data Blank of Default Data Valid Data Set Invalid Data set Illegal Data Format Boundary condition data set Data set for performance, load and stress testing

Test Data Management


Excel Sheets useful when multiple data sets exist for similar set of tests Flat files Used when the application expects input in form of flat files (ex. batch upload features) XML files this can be used when the data is hierarchical in nature, i.e. when business entities have child entities, which further have child entities, and so on. This type of data management framework is useful for Test Automation, where the script can parse the XML input data. The XML data can be displayed in a UI tree structure

41

2009 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

Database Basics

42

2010 Wipro Ltd Internal & Restricted

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

43

2009 Wipro Ltd - 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

44

2009 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

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

SQL-Bascis.doc

45

2009 Wipro Ltd - Confidential 2010 Wipro Ltd Internal & Restricted

VB Scripting

46

2010 Wipro Ltd Internal & Restricted

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

47

2009 Wipro Ltd - 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

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 VBScript and it improve clarity.

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

VB Script - Color Constants


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

VB Script - Date and 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

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.

VB Script - 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

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.

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

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

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

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

VB Script Runtime Error


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

ipt 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

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

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

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.

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

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

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

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.

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

Você também pode gostar