Static testing Elena Rudovol February, 13, 2014. Sitecore. Compelling Web Experiences www.sitecore.net Page 2 What is static testing? Static Testing do.

Slides:



Advertisements
Similar presentations
Test process essentials Riitta Viitamäki,
Advertisements

Verification and Validation
DETAILED DESIGN, IMPLEMENTATIONA AND TESTING Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Testing and Quality Assurance
Automated Software Testing: Test Execution and Review Amritha Muralidharan (axm16u)
Damian Gordon.  Static Testing is the testing of a component or system at a specification or implementation level without execution of the software.
1 Lecture 2: Processes, Requirements, and Use Cases.
Copyright  2002, Medical Present Value, Inc. All rights reserved. Copyright © 2010 Texas Education Agency. All rights reserved. TEA confidential and proprietary.
Static Technique. Static Technique - Review  A way of testing software work products  Program code, requirement spec., design spec.  Test plan, test.
T Project Review Groupname [PP|…|DE] Iteration
Testing Without Executing the Code Pavlina Koleva Junior QA Engineer WinCore Telerik QA Academy Telerik QA Academy.
Roadmap to Continuous Integration Testing and Benefits Gowri Selka, Walgreens Natalie Koltun, Walgreens May 20th, 2014 ©2013 Walgreen Co. All rights reserved.
Testing and Debugging CS221 – 2/13/09. Airline Program.
1 Static Testing: defect prevention SIM objectives Able to list various type of structured group examinations (manual checking) Able to statically.
SE 450 Software Processes & Product Metrics Activity Metrics.
1 Lecture 1: Processes, Requirements, and Use Cases.
 QUALITY ASSURANCE:  QA is defined as a procedure or set of procedures intended to ensure that a product or service under development (before work is.
Stoimen Stoimenov QA Engineer QA Engineer SitefinityLeads,SitefinityTeam6 Telerik QA Academy Telerik QA Academy.
Design, Implementation and Maintenance
Testing Dr. Andrew Wallace PhD BEng(hons) EurIng
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Extreme Programming Software Development Written by Sanjay Kumar.
Verification and Validation Yonsei University 2 nd Semester, 2014 Sanghyun Park.
1 Software Testing (Part-II) Lecture Software Testing Software Testing is the process of finding the bugs in a software. It helps in Verifying and.
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
Balancing Practices: Inspections, Testing, and Others JAXA scenario (formal method) Masa Katahira Japanese Space Agency.
© 2012 IBM Corporation Rational Insight | Back to Basis Series Chao Zhang Unit Testing.
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
Applying the Inspection Process. What Software Artifacts Are Candidates for Inspection? Software Requirements Software Designs Code Test Plans.
Testing – A Methodology of Science and Art. Agenda To show, A global Test Process which work Like a solution Black Box for an Software Implementation.
1 Debugging and Testing Overview Defensive Programming The goal is to prevent failures Debugging The goal is to find cause of failures and fix it Testing.
 CS 5380 Software Engineering Chapter 8 Testing.
Product Metrics An overview. What are metrics? “ A quantitative measure of the degree to which a system, component, or process possesses a given attribute.”
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 23 Reliability III.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Software Construction Lecture 18 Software Testing.
T Iteration Demo Group name [PP|I1|I2] Iteration
Fundamentals of Information Systems, Second Edition 1 Systems Development.
1 Phase Implementation. Janice Regan, Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine subphases)
Chapter 12: Software Inspection Omar Meqdadi SE 3860 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Unit III Static Testing. static testing Testing of a component or system at requirements or implementation level without execution of any software, e.g.,
Chapter 1: Fundamental of Testing Systems Testing & Evaluation (MNN1063)
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Chapter 22 Metrics for Process and Projects Software Engineering: A Practitioner’s Approach 6 th Edition Roger S. Pressman.
Copyright 2015, Robert W. Hasker. Continuous Inspection  Code reviews  Powerful tool  Difficult to ensure meaningful reviews take place  Static analysis.
 Software Testing Software Testing  Characteristics of Testable Software Characteristics of Testable Software  A Testing Life Cycle A Testing Life.
Dynamic Testing.
Static and Integration Testing. Static Testing vs Dynamic Testing  To find defects  This testing includes verification process  without executing.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
CS223: Software Engineering Lecture 21: Unit Testing Metric.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Testing Integral part of the software development process.
Introduction to Software Testing Part1 Summary & Terms
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
Chapter - 8 Implementation.
Types of Testing Visit to more Learning Resources.
COTS testing Tor Stålhane.
Advantages OF BDD Testing
Software testing strategies 2
Baisc Of Software Testing
PPT4: Requirement analysis
ISTQB / ISEB Foundation Exam Practice 4 Dynamic test techniques
Test Cases, Test Suites and Test Case management systems
Chapter 7 Software Testing.
Chapter 10: Testing and Quality Assurance
Unit IV – Chapter 2 V-Test Model.
Presentation transcript:

Static testing Elena Rudovol February, 13, 2014

Sitecore. Compelling Web Experiences Page 2 What is static testing? Static Testing do not execute code. It manually checks work documents to find errors in early stage. Review work documents: Requirement specifications Design document Source Code Test Plans Test Cases Test Scripts Help or User document Web Page content … Static Testing Techniques (ISTQB): Individual: - desk-checking, data-stepping, proof-reading Group: - Reviews (informal & formal): for consensus - Walkthrough (guide a group): for education - Inspection (most formal): to find faults

Sitecore. Compelling Web Experiences Page 3 Static VS dynamic testing Note: Both types of testing are important. Static testingDynamic testing Without executing the programBy executing the program Verification processValidation process Prevention of defectsFinding and fixing the defects Evaluates code/documentationFinds dugs/bottlenecks in the system Cost of defect is lessCost of defect is high Return on investment will be high (early stage)Return on investment will be low (after development phase)

Sitecore. Compelling Web Experiences Page 4 Requirements specification review “Most of the bugs in software are due to incomplete or inaccurate functional requirements” Requirements: - should be clear and specific with no uncertainty, - should be related to project goal, - should be measurable in terms of specific values (e.g. “response in 2 seconds” instead of “works fast”), - should be testable having some evaluation criteria for each requirement, - should be complete and consistent, without any duplicates and missing requirements Good practices:  Write good-structured requirements or user stories (easy-to-find),  Use techniques of model-based testing in requirements (decision tables, state transition diagrams),  Supplement with examples of scenarios how to use a system,  BDD is a good approach for writing good specification. It includes all best practices above.

Sitecore. Compelling Web Experiences Page 5 Why do we need manual code review?  Knowledge sharing:  Easier to make bug-fix  Easier to get started for newcomers  Easier to support the code  Less work in the future:  Less amount of mistakes  Less time to understand the code  Easier to support the code  Adoption:  Frequently changed requirements require fast adoption to them

Sitecore. Compelling Web Experiences Page 6 Manual code review Main goals:  Finding potential bugs on the cheap:  “obvious” mistakes,  mistakes that difficult to find “after-the-fact” (e.g. thread synchronization, resource leaks etc.),  ensuring that unit tests cover all code paths,  Well-documented software:  consistent end-user documentation (It’s important for Sitecore to provide well-documented API!),  adequate comments in code,  Software that complies with enterprise coding standards:  following code standards and OOP practices,  no “anti-patterns” in code and database structure,  Teaching and sharing knowledge between developers. Good practices:  review can to be done by any team member (not only lead developer),  add a status “Ready for Review” into bug-tracking system.

Sitecore. Compelling Web Experiences Page 7 Main metrics in Sonar Code coverage - % of code which is covered by unit tests:  Line Coverage - % of rows which run and tested (e.g. 80%)  Branch coverage - % of conditionals (true/false) run and tested (e.g. 80%) Branch coverage is more important because it shows real coverage of business logic Comments in code:  API should be well documented (feedback from marketing department)  tools for comments generating (e.g. GhostDoc, Doxygen)  most public methods should be documented (E.g. metric is 80%)  no commented rows in code Duplications: We should achieve 0% of copy-paste in code. Violations: We should pay attention on Sonar violations and fix blockers, critical and major.

Sitecore. Compelling Web Experiences Page 8 LCOM4 metric Lack of Cohesion of Methods (LCOM4) metric: The more cohesion the higher probability to fail if functionality is changed. Bad LCOM4 example: public class Client { public string FirstName; public string LastName; public string Street; public string City; public string ZipCode; public string GetFullName() { return this.FirstName + " " + this.LastName; } public string GetFullAddress() { return this.Street + " " + this.City + " " + this.ZipCode; } Good LCOM4 example: public class ClientData { public string FirstName; public string LastName; public string GetFullName() { return this.FirstName + " " + this.LastName; } public class ClientAddress { public string Street; public string City; public string ZipCode; public string GetFullAddress() { return this.Street + " " + this.City + " " + this.ZipCode; }

Sitecore. Compelling Web Experiences Page 9 Package tangle index metric Package tangle index: Dependencies should flow in one direction. No cyclomatic dependencies. Example: UI Business logic Database

Sitecore. Compelling Web Experiences Page 10 Code complexity The complexity is measured by the number of if, while, do, for, ?:, catch, switch, case statements, and operators && and || (plus one) in the body of a constructor, method, static initializer, or instance initializer. Complexity = number of decisions + 1. E.g. Following flow has complexity 3. Generally: - up to 7 for method - up to 15 for class

Sitecore. Compelling Web Experiences Page 11 Static Testing Techniques Benefits of reviews:  Development productivity improvement  Reduced development timescales  Reduced testing time and cost  Lifetime cost reductions  Reduced fault levels  Improved customer relations etc.

Sitecore. Compelling Web Experiences Page 12 Code review in Sitecore

Sitecore. Compelling Web Experiences Page 13 Code review in Sitecore Demo & questions