软件测试代写 | COM3529 Week 2 Practical — Coverage Part 1

本次英国代写主要为软件测试与分析限时测试

COM3529 — SOFTWARE TESTING & ANALYSIS
Week 2 Practical — Coverage Part 1
1. Do the “Who Wants To Be A Software Tester?” Quiz for this week. If you’re unclear about any
of the answers then ask!
2. Navigate to the uk.ac.shef.com3529.lectures package, and open the Triangle class. The
class has a method, classify, that categorises the type of the triangle based on the lengths of
its three sides, which correspond to the parameters to the method — side1, side2, and side3.
The equilateral triangle is one in which all sides are the same length, an isosceles triangle is
one in which at least two sides are the same length, a scalene triangle is any other (valid)
triangle.
(a) Draw the CFG for the classify method.
(b) Write a JUnit test suite for Triangle that gives full Branch Coverage.
(c) Enumerate all the paths through the CFG for the method. (There are no loops in the
method, so this is possible.) Which paths are infeasible?

Week 3 Practical Session
Coverage Part 2
1. Do the “Who Wants To Be A Software Tester?” Quiz for this week. If you’re unclear about any
of the answers then ask!
2. The code segment that returns when a triangle is isosceles could be re-written as:
if ((side1 + side2 > side3) &&
(side1 == side2 || side2 == side3) &&
(side1 != side2 || slide2 != side3)) {
return Type.ISOCELES;
}
For the above branch predicate:
(a) Enumerate each of the conditions.
(b) Determine the test requirements for coverage with Restricted MCDC. Format this as a
table, which shows the truth values of the conditions and the branch predicate in columns
of the table (as done in the lecture). Which test requirements are infeasible, if any?
(c) The same question as before, but this time with Correlated MCDC.
(d) Take either (a) your Restricted MCDC test requirements or (b) your Correlated MCDC
test requirements. Use these to construct a JUnit test suite but run against the original
Triangle class. Note anything unusual about the results of your test suite.
3. Navigate to the uk.ac.shef.com3529.practicals package (do a git pull first), and open the
SpaceDefender class.
(a) Draw the CCFG for this class.
(b) Annotate each node n of the CCFG with defs(n) and uses(n).
(c) Write out the set DU. In particular, identify any elements of DU that are infeasible.
(d) Identify which elements of DU are applicable to

i. All Defs Coverage
ii. All Uses Coverage
iii. All Def-Use Paths Coverage


程序代写代做C/C++/JAVA/安卓/PYTHON/留学生/PHP/APP开发/MATLAB


blank

本网站支持淘宝 支付宝 微信支付  paypal等等交易。如果不放心可以用淘宝交易!

E-mail: itcsdx@outlook.com  微信:itcsdx


如果您使用手机请先保存二维码,微信识别。如果用电脑,直接掏出手机果断扫描。

blank

发表评论