Tuesday, August 13, 2013

All about Metrics and formulae


Definition: Metric is a unit of measure.

(IEEE) A quantitative measure of the degree to which a system, component, or process possesses a given attribute


Why measure?

1. to get better understanding of the attributes of models

2. to gain insight into the design and construction of the software

3. focus on specific attributes of software engineering work products resulting from analysis, design, coding, and testing

4. assess the stability of a software product

5. determine the quality of the current product or process

6. estimate the cost & schedule of future projects

7. evaluate the productivity impacts of new tools and techniques

8. establish productivity trends over time

9. forecast future staffing needs

10. anticipate and reduce future maintenance needs


Categories of metrics

1.     Projects

·         Productivity and schedule related

2.     Products

·         Assesses the state of the project

·         Track potential risks

·         Uncover problem areas

·         Adjust workflow or tasks

·         Evaluate teams ability to control quality

3.     Processes

·         Activities related to production of software

·         Lead to long term process improvement


Metrics definitions and formulae


Metric Name
Definition
Unit of Measure
Formula


Project Related Metrics

Effort Variance
Effort Variance is used to keep the track of the variation in effort for an activity with respect to planned effort
(%) of Hrs
 (Actual Effort – Planned Effort) / (Planned Effort ) X 100

Schedule (Delivery) Variance
Schedule Variance is used to keep track of variation in number of days required for each deliverable in the project with respect to planned days (%age)
(%) No of Days
(Actual End Date – Planned End Date) / (Planned End Date – Planned Start Date +1) X 100
OR
(Actual Duration – Planned Duration)/Planned Duration  X 100

Milestone Variance
Milestone Variance is used to keep track of number of days required for difference milestones in the project in %age
(%) No of days
Actual End Date – Revised End Date)/
(Revised End Date – Planned Start Date) X 100

Productivity
Productivity is the effort that we are putting in developing one unit of size which helps in planning activity
(%) No of Hours
Size / Effort
(Size is defined here as Budgeted Hours)


Process Related Metrics
Testing Efficiency
Testing Efficiency is used to track efficiency in terms of number of test steps authored  per one unit (hr) of testing effort
Test Steps authored + Executed
Test Steps Authored + Executed / Testing Time
(Testing time is considered as QA’s time which include test case authoring, execution, automating scripts and automation testing)
Review Efficiency
Review Efficiency is used to keep track of efficiency in terms of number of defects per one unit (hr) of testing effort
Defects / hr
(Actions + Defects) / Review Time
Testing Effectiveness
Testing Effectiveness is used to keep track of defects that are leaked to subsequent phases with respect to defects injected in that phase
Defects Rate
No of Defects / (No of Defects detected + leaked to later phases) X 100
Review Effectiveness
Review Effectiveness is used to keep track of defects that are leaked to subsequent phases with respect to defects injected in that phase
Defects Rate
No of defects detected / (No of defects detected + leaked to later phases) x 100

Product Related Metrics
Defect Density
Defect Density is used to keep the track the product quality at the end of each phase in the project
(%) No of Defects
No of Defects / Size
(Size is defined here as Budgeted Hours)
Defect Removal Effectiveness (DRE)
DRE is used to track the % age of defects effectively removed during a phase
Defects
No of Defects identified in the current SDLC stage / workstream / (No of defects injected in the current SDLC stage / workstream phase + No of defects leaked in to the current SDLC stage / workstream phase from previous phase) X 100
Cost of Quality (COQ)
COQ is used to track effort spent in reviews, testing, rework, defects prevention, training and audits with respect to total project effort
 (%) Hrs
Review Effort + Testing Effort + Rework Effort
Cost of Poor Quality (COPQ)
COPQ is used to track the rework for the defects during review and testing in a project with respect to total project effort
 (%) Hrs
Rework Effort
Cost of Poor Quality Index (CPQI)
CPQI is used to track the amount of rework effort spent against Customer Budgeted hours
(%) Hrs
Rework Effort / Budgeted Hours X 100










Monday, August 5, 2013

Option explicit disadvantages

At any point in a program, you can use any variable name even if it has not been declared, and execution will continue by assigning the Variant data type to it. However, this is not good programming practice for the following reasons:

1. Memory & Calculation Speed: As the un-declared variable will have a variant data type, the variable takes up more memory than many of the other data types.

While a few extra bytes per variable might not seem to be a lot of memory, it is not uncommon for users to have thousands of variables in their programs. Therefore, the additional memory used to store Variants instead of Integers or Singles, can add up significantly.

2. Process time: Variant data types also take more time to process than some of the other data types, so if you have thousands of unnecessary Variant data types, this can slow down your calculations.

3. Prevention of 'Typo' Bugs: This will prevent you from introducing bugs into your code by accidentally typing a variable name incorrectly. For example, you might be using a variable called "sVAT_Rate" and, when assigning a value to this variable, you might accidentally type "VATRate = 0.175". From this point onwards, you are expecting your variable "sVAT_Rate" to have the value 0.l75, but of course it doesn't, because this value has been assigned to a different variable (the variable "VATRate"). However, if you were using the Option explicit option to force you to declare all variables before using them, this error would be highlighted by the compiler, as the variable "VATRate" would not have been declared.

4. Highlighting Unexpected Data Values: If you declare a variable to have a specific data type, and you attempt to assign the wrong type of data to it, this will generate an error in your program. While this may initially seem to be a good reason not to declare variables, you should think about this more carefully - you actually need to know as soon as possible if your variable receives an unexpected data type. Otherwise, if the program continues to run, you could end up with incorrect or unexpected results at a later time, when it is likely to be much more difficult to detect the causes of the errors.

Therefore, it is recommended that you always declare all variables when programming.

Friday, July 12, 2013

Mouse over using web driver

package pack;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;

public class MouseOverDemo {

       public static void main(String[] args) throws InterruptedException {

              WebDriver driver = new FirefoxDriver();
              driver.get("http://www.rightstart.com");
              // Mouseover on Health adn Safety
              // create new action builder instance by passing WebDriver instance to
              // the class
              Actions builder = new Actions(driver);
              // WebElement and build it to generates a composite action containing
              // all actions so far, ready to be performed.
              // a is control tagname
              WebElement a = driver
                           .findElement(By.id("navigation-top-cat-label-336"));
              builder.moveToElement(a).build().perform();
              Thread.sleep(2000);
              // Mouseover on sleep safety
              builder = new Actions(driver);
              a = driver.findElement(By.id("navigation-top-cat-label-1060"));
              builder.moveToElement(a).build().perform();
              Thread.sleep(2000);
              // Mouseover on baby monitors and click on baby monitors

              builder = new Actions(driver);
              a = driver.findElement(By.id("navigation-top-cat-label-1312"));
              builder.moveToElement(a).click().build().perform();
       }

}

AI in Software Testing: How Artificial Intelligence Is Transforming QA

For years, software testing has lived under pressure: more features, faster releases, fewer bugs, smaller teams. Traditional QA has done her...