java - path testing and branch testing -
can please explain me different between path , branch testing?
i read in many articles still confused between two.
i searched in stack overflow didn't find suitable answer please me providing link if duplicate question.
thanks,
quick summary
summarized https://www.cs.drexel.edu/~jhk39/teaching/cs576su06/l4.pdf
path testing:
- 100% path coverage.
- execute possible control flow paths through program.
statement testing:
- 100% statement coverage.
- execute statements in program @ least once under test.
branch testing:
- 100% branch coverage.
- execute enough tests assure every branch alternative has been exercised @ least once under test.
in general path testing >= branch testing >= statement testing, in terms of how confidence can provide in correctness of system.
discussion
path coverage counts number of full paths input output through program executed, whereas branch coverage counts number of branches tested @ point in time. in definition full path coverage lead full branch coverage.
there may multiple paths hit single conditional statement, , full path coverage may test different variants (because inside if statement external resource may invoked branch coverage not identify). branch coverage more testing branch hit @ point, , argument passed mock external resource correctly (not comes afterwards).
as seen here: https://www.cs.drexel.edu/~jhk39/teaching/cs576su06/l4.pdf, can represent set of paths flow diagrams , goal verify each path start end works expected in path testing.
branch testing additional notes
from here: branch testing
testing in branches in program source code tested @ least once
path testing additional notes
from here: http://www.qualitytesting.info/forum/topics/what-is-difference-between-2 , http://www.cs.st-andrews.ac.uk/~ifs/books/se9/web/testing/pathtest.html
a path sequence of executable statements. testers concerned "entry-exit paths", begin @ entry point given process , proceed exit point. objective of path testing ensure each independent path through program executed @ least once. independent program path 1 traverses @ least 1 new edge in flow graph. in program terms, means exercising 1 or more new conditions. both true , false branches of conditions must executed.
Comments
Post a Comment