Statement Coverage - Georgia Tech - Software Development Process

Поділитися
Вставка
  • Опубліковано 11 гру 2024

КОМЕНТАРІ • 30

  • @rushi494
    @rushi494 8 місяців тому +4

    For the print sum example , isn't the answer 84% , as the statement printcol("red", result); is not executed and jumps to elseif statement

    • @nox9079
      @nox9079 4 місяці тому

      same thought.

  • @dimaivanov4521
    @dimaivanov4521 2 роки тому +1

    Best explanation I have ever seen!!!!

  • @choudaryshazaib5795
    @choudaryshazaib5795 6 років тому +19

    In second case executed statements are 6 not 7. so 6/7*100=85%.

    • @Halfkroon
      @Halfkroon 6 років тому +27

      The goal is not to execute all statements in one case, but in all test cases together. Therefor, if you combine the two cases, you cover 100% of the statements.

    • @DeepakKumar2105
      @DeepakKumar2105 4 роки тому +2

      @@Halfkroon But he skipped the line no.4 in second test case.Then how come statement coverage is 100%.??????

    • @ceddyvik
      @ceddyvik 4 роки тому +2

      ​@@DeepakKumar2105 ​ Because he used negative numbers in the TC2, which means the statement is in the 3rd line is FALSE, therefore we can jump to line 5. And he already covered line 4 in the TC1 which was the TRUE path. A flow chart would be so helpful here.

  • @beingakid1697
    @beingakid1697 2 роки тому +1

    3:03 how have we covered all the statements in the -ve values for a and b , we only covered 6/7 statements becuase we wont cover the data inside of If statement since its < 0.

    • @amoordenjosiaceemmanuel8225
      @amoordenjosiaceemmanuel8225 2 роки тому

      i think its because both test cases add up and executes all statement
      even if test case 2 doesnt cover the statement in the if loop the first one did

  • @atikaakmal3661
    @atikaakmal3661 7 років тому +7

    could someone explain why he chk again false condition because in statment coverage we dont need to chk false condition

    • @FullAdvanced
      @FullAdvanced 3 роки тому

      The main idea of "statement coverage" is to cover as many statements (declarations, lines) as possible, so, checking the false part of the decision is necessary to achieve 100% of "statement coverage"

  • @selomgadzey5352
    @selomgadzey5352 2 роки тому +1

    Thank you for the clear video

  • @dinhgiangdinhgiang1287
    @dinhgiangdinhgiang1287 3 роки тому

    The video sound is pretty good, beyond my imagination

  • @NAGIAEPP
    @NAGIAEPP 2 роки тому

    Very very helpful!! Thank you!!

  • @javalearner4227
    @javalearner4227 6 років тому +1

    Thanks! It is very helpful! Can you please clear that how to find out the total number of statements suppose we have while loop Ex..( a = 10; while (int i=0;i=5;i++) {print a}, do we also count the iterations in the loop as well?? Please any one Thanks!

    • @lorenzobiancardi4526
      @lorenzobiancardi4526 2 роки тому +1

      total number of statements is the number of lines of code, counted only once

  • @haroonmansi
    @haroonmansi 4 роки тому

    I am curios to know what people think to achieving 100% code coverage? You think it is not possible in the given time or is that because you do not have good test infrastructure to inject fault and cover error branches?

  • @michaelnajera7958
    @michaelnajera7958 8 років тому +2

    This should be the video in the Udacity Course explaining test coverage

  • @haadi7363
    @haadi7363 2 місяці тому

    nice video but that cliff hanger is crazy

  • @zefengwang4777
    @zefengwang4777 5 років тому +1

    in the statement coverage, why line 4 is executed?

    • @zefengwang4777
      @zefengwang4777 5 років тому

      Oh! Is it because it’s the combination of the two cases together?

    • @inshafahmed8656
      @inshafahmed8656 3 роки тому

      @@zefengwang4777 ohh ! thank u , man

  • @shawncartwright
    @shawncartwright 6 років тому +1

    What if your value is 0? Thats not covered in the code? So surely its not 100% covered

    • @rickreihl6193
      @rickreihl6193 6 років тому

      Combining test cases 1 and 2 exercises all statements in the code, thus 100% statement coverage.

  • @medhanieweldemariam3579
    @medhanieweldemariam3579 8 років тому

    But why do we say Statement coverage covers only the Ture conditions, It cannot test the false conditions?

    • @arunec3930
      @arunec3930 7 років тому

      yes i got same doubt. but he ran false loop here as well. .

    • @ileshious
      @ileshious 7 років тому +2

      There are 2 test cases the aim is to cover the whole code so with TC#1 we cover one part of it, with TC#2 we cover the remaining part of it ...

  • @BugsbunnyEh
    @BugsbunnyEh 7 років тому

    Good explanation

  • @anamixnetwork8446
    @anamixnetwork8446 3 роки тому +1

    printSum(int a, int b){
    ---
    ---
    }
    printSum(int a, int b)
    {
    ---
    ---
    }
    Are we considering same statement count in these two scenarios or do we have to reformat it before doing this process?