Updated March 17, 2023
What is Static Testing?
Static Testing is a type of testing technique performed on a software application, where the test elements are not actually executed or put to use. As the name says, it is opposite to dynamic testing, and so the application will not be tested while it is running. It involves manual functional testing processes, based on activities like visually/ physically evaluating the code for functionality coverage, code is analyzed for errors, unused snippets or variables in the code, coding standards, etc.
Static Testing is done in 2 ways:
- Reviews: Reviews are done in order to find the defects, issues, and ambiguities in the documents like requirements, design, etc. Reviews play an important role in static testing as it is better to find the cause of failure in the starting rather than failures at the end. As most of the issues arose after the development of software regarding the requirements, design not fixed in the starting or any ambiguity found in the documents. Reviews can be formal/informal depending on the particular stage of software testing. Reviews in software testing consist of Informal, Walkthrough, Inspection and Technical Review.
- Static Analysis: In Static Analysis, software or an application is tested to find the structural defects in the code written by developers without actually executing it. Static Analysis is usually done by the tools and is used to uncover the defects like unused/ unreferenced variables, programming standard violation, syntax violations, coding standards unfollowed, dead code (code written but not used anywhere), etc. There are certain tools available in the market that helps in static analysis of code, analyze structures and dependencies, calculate metrics like cyclomatic complexity or nesting levels and enforce developers to follow specific coding standards and helps in Static Analysis.
Static Testing Techniques
As mentioned above, static testing is done either manually which is performed in Reviews or through testing tools that are performed in Static Analysis.
Review Process: During static testing, Reviews can be done in two ways:
1. Informal Review
- An informal review is done in the early stages of the development lifecycle.
- No formal documents or procedures are used in an informal review.
- The informal review comes in various shapes and forms, the only feature is that they are not formally documented.
- The main aim of the Informal review is to improve the quality of software with the help of Authors.
- It follows a simple procedure like two persons sitting together one being the author reviewing the work of other colleagues like any document, design, code, etc. It may further add more members or a whole team depending on the level of testing.
2. Formal Review
- The formal review is very well structured and documented.
- The formal review is managed and follows different phases of reviews like Planning, Kick-Off, Preparation, Review Meeting, Rework and Follow Up.
- Formal Review covers wide and serious scenarios of the software like legal requirements, maturity of software development, etc.
Types of Reviews
Below mentioned are the various types of Reviews:
1. Walkthrough
- In the walkthrough, the Author leads the review process to fulfil the common understanding and other team members ask the possible questions and submit their feedback collected.
- The walkthrough can be formal or informal review.
- Minutes of Meeting and the defects/finding reported are noted down by the Scribe (who is not the Author) in order to track them later.
- Team members does not need to have a detailed knowledge of the content as the author is well prepared for that and it is kind of knowledge transfer session.
Main Objectives of Walkthrough
- Main objective is to enable learning and giving knowledge to other team members about the content.
- To present the document to all stakeholders, within and outside the software discipline and to gather more information about the document under consideration.
- They aim for other members to examine the content clearly so that they can provide suggestions, alternatives for the proposed document.
2. Inspection
- Inspection is one of the most formal kinds of Reviews.
- It is led by a trained Moderator who is not the author of the meeting.
- Reviewers are well prepared before the meeting about the documents or what needs to be discussed.
- Rules and checklists are used in this meeting during which time the product is examined and defects are logged.
- Defects found in the meeting are documented in the issue log or logging list.
- Meeting has proper entry and exit criteria.
- Reports created during the meeting are shared with the Author to take appropriate actions on that.
- A formal follow up process is done by the Moderator to address the improvement issues and learning from defects discovered.
Main Objectives of Inspection
- Improving the quality of documents under Inspection.
- Rapidly finding and fixing the defects found in the meeting.
- Creating more detailed understanding through group discussions and information exchange.
- Learning from the previously introduced defects and not repeating them in the future.
3. Technical Review
- It is well documented and follows defect detection technique which involves peers and technical experts.
- It is usually led by a trained Moderator and not the Author.
- In Technical Review, the product is examined and the defects are found which are mainly technical ones.
- No management participation is there in Technical Review.
- The full report is prepared to have a list of issues addressed.
Main Objectives of Technical Review
- Keep participants informed about the technical concepts of the document.
- To ensure that from the starting, technical concepts need to be understood correctly.
- To gather the alternatives and solutions from the participants regarding technical concepts.
- To maintain consistency in the technical and conceptual design of the software.
- To focus on the technical aspects of the software and technical feasibility which is equally important like conceptual one.
Conclusion
Static testing not only helps in finding the defects at early stages but also provides a closure look of the documents and helps to understand the missing requirements, ambiguity, design defects, maintenance issues, etc. A single document is subjected to multiple reviews and each review has its own objective and procedures. Each review serves a specific purpose like Informal review is done before any technical or formal review so that defects that can be found informally can be fixed first. The more review is done on any document before and during the development, the less are the probability of defects in the end.
Recommended Articles
This is a guide to Static Testing Techniques. Here we discuss various types of reviews and static techniques in detail. You can also go through our other suggested articles –