Program slicing and testing in software engineering.
- It summarized static slicing and dynamic slicing
- Also, it summarized white and black box testing
5. Slicing
Program dependence graph
Statements are nodes, and data and control dependencies are the
edges
Data dependence graph
Describes in the assignment statements the left value to the right value
dependence relationship
Control dependence graph
Describes in a program the conditional statements and circular statements with
the statements embedded in them, their control relationship
Statements in the branches of if or while statements are control dependent on
the control predicate
5/14Software Slicing & Testing
8. White box testing is the testing of a software solution’s
internal coding and infrastructure
Focuses on security and improves design and usability
White Box Testing
8/14Software Slicing & Testing
Fig) Like see-through box concept
Cited from https://global.rakuten.com/ko/store/hanjo/item/10012725/
9. Internal security holes
Broken or poorly structured paths in the coding process
The flow of specific inputs through the code
Expected output
The functionality of conditional loops
Testing of each statement, object, and function on an individual
basis
White Box Verification
9/14Software Slicing & Testing
10. White BoxTesting
10/14Software Slicing & Testing
White Box Testing
Code coverage Analysis
Branch Coverage Statement Coverage
There are the other coverages such as condition, multi condition, path, function…
;however, branch and statement will cover 80-90% which is sufficient.
11. It identifies areas of a program that are not exercised by a set of test
cases.
Once gap are identified, you create test cases to verify untested
parts of code, thereby increase the quality of the software product.
Branch coverage checks every possible path ( if-else and other
conditional loops ) of a software application.
Statement coverage requires every possible statement in the code
to be tested at least once during the testing process.
Code Coverage Analysis
11/14Software Slicing & Testing
12. Functionality of the software under test is checked without looking
at the internal code structure, implementation details or knowledge
of internal paths of the software.
Based entirely on the software requirements and specifications
Black Box Testing
12/14Software Slicing & Testing
Cited from https://imgur.com/gallery/EL0jZ8e
Not being able to see the inner workings of the
Software so that only the end-user experience can
be tested
13. Therefore, you can test these applications by just focusing on the
inputs and outputs without knowing their internal code
implementation.
There are three types of black box testing.
Functional testing
Non-functional testing
Regression testing
Black Box Testing
13/14Software Slicing & Testing
14. White box testing (which is unit testing) validates internal structure
and working of your software code.
The main focus of black box testing is validation of functional
requirements.
Black box testing gives abstraction from code and focuses testing
effort on the software system behavior.
White and Black Box Testing Comparison
14/14Software Slicing & Testing
Static slicing & dynamic slicing
Control dependence graph
Data dependence graph
There is partial analysis , measurement : slice size , execution time, analysis time
Partial analysis has a value between static and dynamic
Dynamic Slicing
Static Slicing
Program dependence graph
Control dependence graph
Data dependence graph
Static slicing size is larger than dynamic slicing since it considers all possible paths.
Dynamic slicing cost is more expensive than static slicing since recording an execution trace needs much cost.
Statements are the nodes, and data and control dependencies are the edges.
Numbering statements : except if-then-else and while-do
It involves, checking a series of predefined inputs against expected or desired outputs, so that when a specific input does not result in the expected output, you have encountered a bug.
Functional Testing
: This black box testing type is related to functional requirements of a system.
Non–Functional Testing
: This type of black box testing is not related to testing of a specific functionality, but non-functional requirements such as performance, scalability and usability.
Regression Testing
: It’s done after code fixes, upgrades or any other system maintenance to check the new code has not affected the existing code.