Chapter 3 (Static Testing) Flashcards
Static Testing
What does static testing rely on?
- It relies on the manual examination of work products (F.E: Reviews)
- Or tool-driven evaluation of the code or other work products (F.E: Static Analysis)
Static Testing
For both types of static testing, does it need to actually execute the code or work product being tested when the testers assess the code?
No, it does not actually execute the code or work product being tested.
Static Testing
When is “Static Analysis” applied?
Static analysis:
1. Applied to any work product with a formal structure (code or models)
- Applied when evaluating work products written in natural language like requirements.
Static Testing
When is “Review” applied?
Review:
1. Applied to any work product that the participants know how to read and understand.
Example: Manual
Static Testing Basics
Reviews and Tools:
Tell me things you know about reviews and tools for static testing.
Hint: 4 points
1. The formality of reviews?
2. What types of tests can tools perform?
3. When is it typically used?
4. What other areas can it be used on?
- Reviews can range from informal to very formal
- Tools can perform some types of static tests (Ex: Checking for coding standards/compliance)
- Typically used for requirements and design
- Can and should also be used in code, database schemas, documentation, tests, and written work product.
Static Testing Basics
Use models and prototypes:
Why use diagrams?
A diagram of a complex system can often reveal design problems hidden in text/words.
Note: An ugly diagram often means a lot of bugs
Static Testing Bascis:
Creation of test cases and data is a form of static testing:
Why is it so?
- Test analysis and design based on requirements and design specifications is a form of structured review.
- Test analysis and design often reveal problems, thus preventing bugs
Static Testing Basics: Static Tools
Static Analysis: What do you know about static analysis?
Hint: 3 points
1. What can it check?
2. What does it check?
3. What can it measure?
- It can check for problematic wording: using spelling/ grammar checkers
- It checks for dangerous programming constructs , using tools like J-Test, Safer C, Lint..
- It can measure the complexity of code: complexity analysis
Static Testing Basics: Static Tools
System simulations: What are the 3 system simulations?
- General purpose system simulator: Simulate basic system components like queue and resources.
- Performance modelling / operations research tools: Predict systems under load
- Spreadsheets: Simulate system behaviour like performance, and also functionality.
Work products that can be examined by Static Testing:
Almost any work product can be examined using static testing (reviews/static analysis), what do they include?
- Specifications (Business requirements, functional requirements, security requirements) and also Architecture and design specifications.
- Epics, user stories, and acceptance criteria
- Code
- Testware, including test plans, test cases, test procedures, and automated test scripts
- User guides
- Web pages
- Contracts, project plans, schedules, and budgets
- Models, such as activity diagrams
What are the benefits of static testing?
- Shorter schedules (due to early / efficient bug removal), reducing development cost and time, and also reducing testing cost and time
- Improved quality of product (reduces downstream costs, both in development and after releases)
- Detecting and correcting defects more efficiently
- Prevent defects in design or coding by uncovering inconsistencies, ambiguities, contradictions, omissions, inaccuracies, and redundancies in requirements.
- Increase development productivity ( Improved design, more maintainable code)
- Improve communication between team members in the course of participating in reviews.
What are the similarities and differences between static and dynamic testing?
Similarities:
- They both seek to identify defects.
- Work best when a broad cross-section of stakeholders are involved.
- Save the company time and money.
Differences:
1. Each technique can find different types of defects more efficiently than the other.
2. Static techniques find defects rather than failures (Like chapter 1: Mistake, Defects, Failures)
3. Static- Test object is not being executed and Dynamic- test object is being executed.
Typical defects found and fixed through static testing (easier and cheaper to):
- Requirement defect
- Design defect
- Coding defect
- Maintainability defects
- Deviations from standards
- Incorrect interface specifications
- Security vulnerabilities
- Gaps or inaccuracies in test basis traceability or coverage
Static Test
3 questions:
1. What is the definition of static tests?
2. What is the objective of static tests?
3. What is the basic idea of static tests?
- Definition: Analysis of a test object via intensive observation (mostly documents).
- Objective: Detection of faults or defects in an artefact.
- Basic idea: Defect prevention
Reviews:
- What does it observe and how?
- How many people?
- What are used to test and evaluate the work products?
- What software work product can be reviewed?
- Observation of the test object and manually
- Manual testing done by one or more people
- Human analysis and thinking capabilities are used to test and evaluate work products
- Any software work product can be reviewed (requirements, specifications, design specification, code, testware)
Review Process
- What is the formality of the review process?
- What are the characteristics of an informal review?
- What are the characteristics of a formal review?
- How is a formality of a review process defined?
- What is the focus on the review process?
- Reviews may range from informal to formal.
- Informal reviews are characterised by not following a defined process & not having a formal documented output.
- Formal reviews are characterised by team participation, documented results of the review, and documented procedures for conducting the review.
- The formality is related to factors such as the SDLC, maturity of the development process, complexity of work product to be reviews, requirements, and any legal regulatory requirements.
- The focus depends on the agreed objectives of the review.
The phase of the review process
Explain the “Planning” phase in the Review process
- You define the scope: The purpose of the review, documents or part of documents to reviews, and the quality characteristics to be evaluated.
- You estimate the effort and timeframe.
- Identify review characteristics such as the review type, roles, activities, and checklists.
- Selecting the people to participate in the review and assigning roles.
- Defining the exit and entry criteria for more formal review types.
The phase of the review process
Explain the “Initiate Review” phase in the Review process
- Distributing the work product and other material such as issue log forms, checklists, and related work products.
- Explain the scope, objective, process, roles, and work products to the participants in the review process.
- Answering any questions that participants may have about the review process.
The phase of the review process
Explain the “Individual Review” phase in the Review process.
AKA Individual preparation
- Review all part of the work product.
- Noting down the potential defects, recommendations, and questions.
The phase of the review process
Explain the “Issue communication and analysis” phase in the Review process
- Communicating identified potential defects.
- Analysing potential defects, assigning ownership, and status to them.
- Evaluate and document quality characteristics.
- Evaluate the review findings against the exit criteria, to make a review decision. (Reject as not done or accept it that it is done)
The phase of the review process
Explain the “Fixing and reporting” phase in the Review process
- Creating defect reports for findings that require changes.
- Fixing defects found in the work product reviewed.
- Communicating defects to the appropriate person or team.
- Recording updated status of defects.
- Gathering metrics
- Checking that the exit criteria are met.
- Accept the work product when the exit criteria is reached.
Formal Review
What are the roles in a formal review?
- Author
- Manager
- Facilitator (moderator)
- Review Leader
- Reviewers (inspectors)
- Scribe (recorder)
Roles and responsibilities in a: Formal Review
What is the R&R for the “Author” in a formal review?
- Creates the work product that is under review.
- Fixes defects in the work product under review.
Roles and responsibilities in a: Formal Review
What is the R&R for the “Manager” in a formal review?
- Responsible for review planning (chooses the test objects and documents to be used).
- Decides on the execution of reviews.
- Assigns staff, budget, and time.
- Monitors ongoing cost-effectiveness.
- Executes control decisions in the event of inadequate outcomes.