软件测试作业——三

作业见《软件测试基础》中文版49页第7题。英文版63页 a) b) 令MAXPRIMES = 4,t1不能检查出错误,t2发生

作业见《软件测试基础》中文版49页第7题。英文版63页

a)

               

b) 令MAXPRIMES = 4,t1不能检查出错误,t2发生数组越界,使得t2比t1更容易发现。

c)t3=(n=1)

d)节点覆盖:TR={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}

  边覆盖:TR={(1,2),(2,3),(2,12),(3,4),(4,5),(5,6),(6,8),(8,5),(6,7),(7,9),

            (5,9),(9,10),(10,11),(9,11),(12,13),(13,14),(14,15),(15,13),(13,16)}

  主路径:TR={(1,2,3,4,5,6,8),(1,2,3,4,5,6,7,9,11),(1,2,3,4,5,6,7,9,10,11)

                         (1,2,12,13,14,15),(1,2,12,13,16),(1,2,3,4,5,9,10,11),(1,2,3,4,5,9,11),

                        (2,3,4,5,6,7,9,11,2),(2,3,4,5,6,7,9,10,11,2),(2,3,4,5,9,10,11,2),(2,3,4,5,9,11,2)

                        (3,4,5,6,7,9,11,2,3),(3,4,5,6,7,9,10,11,2,3),(3,4,5,9,10,11,2,3),(3,4,5,9,11,2,3)

        (4,5,6,7,9,11,2,3,4),(4,5,6,7,9,10,11,2,3,4),(4,5,9,10,11,2,3,4),(4,5,9,11,2,3,4)

                         (5,6,8,5),(5,6,7,9,10,11,2,3,4,5),(5,6,7,9,11,2,3,4,5),(5,9,10,11,2,3,4,5)

         (5,9,11,2,3,4,5),(6,8,5,6),(6,7,9,10,11,2,3,4,5,6),(6,7,9,11,2,3,4,5,6)

          (7,9,10,11,2,3,4,5,6,7),(7,9,11,2,3,4,5,6,7),(8,5,6,8)(9,10,11,2,3,4,5,6,7,9)

          (9,10,11,2,3,4,5,9),(9,11,2,3,4,5,6,7,9)(9,11,2,3,4,5,9),(10,11,2,3,4,5,6,7,9,10)

          (10,11,2,3,4,5,9,10)(11,2,3,4,5,6,7,9,11)(11,2,3,4,5,6,7,9,10,11)(11,2,3,4,5,9,10,11)

          (13,14,15,13),(14,15,13,14),(15,13,14,15)}

您可能有感兴趣的文章
软件测试(理论基础)

什么是软件测试,软件测试究竟是做什么的

软件测试基础知识整理

软件测试概念及分类整理汇总

软件测试步骤详解