System Testing & Static Analysis Report 201011316 200913247 - - PowerPoint PPT Presentation

system testing
SMART_READER_LITE
LIVE PREVIEW

System Testing & Static Analysis Report 201011316 200913247 - - PowerPoint PPT Presentation

System Testing & Static Analysis Report 201011316 200913247 201011373 Index Non-functional requirement validation Specification and code review System testing report Static analysis report


slide-1
SLIDE 1

201011316 김성엽 200913247 권순필 201011373 최지환

System Testing & Static Analysis Report

slide-2
SLIDE 2

Index

  • Non-functional requirement validation
  • Specification and code review
  • System testing report
  • Static analysis report
slide-3
SLIDE 3

Non-functional Requirement Validation

  • Well met
slide-4
SLIDE 4

Specification & Code Review

  • displayS() in Interface doesn’t exist
  • Attribute db is not protected
  • Message is not in associative relationship
slide-5
SLIDE 5

Specification & Code Review

  • Data type variable name (x)
  • Variable name : data type (o)
slide-6
SLIDE 6

Specification & Code Review

  • Program logic is all in Interface
  • Doesn’t take advantage of OOP
slide-7
SLIDE 7

Specification & Code Review

  • Diagram and implementation differ
slide-8
SLIDE 8

Specification & Code Review

  • Diagram shows exception case should happen
slide-9
SLIDE 9

Specification & Code Review

  • Message instance created then right after

receives a new instance

  • This happens several times!
slide-10
SLIDE 10

CPT Result (last week)

  • 56개중 45개 성공
slide-11
SLIDE 11

CPT Result (this week)

  • 56개중 50개 성공
slide-12
SLIDE 12

Failed Test Case Report

  • 데이터베이스에 없는 단어를 검색하면 몇몇

단어는 단어와 의미가 똑같이 나옴

– Apple = apple – 지난주의 문제가 개선되지 않음

slide-13
SLIDE 13

Pairwise Testing (last week)

  • 16개중 13개 성공
slide-14
SLIDE 14

Pairwise Testing (this week)

  • 16개중 16개 성공
slide-15
SLIDE 15

Brute-force Testing (last week)

  • 28개 중 12개 성공
slide-16
SLIDE 16

Brute-force Testing (this week)

  • 28개 중 20개 성공
slide-17
SLIDE 17

Failed Test Case Report

  • 8~9, 19~23번 아이 모드를 클릭하면 “ui에러” 경

고창이 뜸

slide-18
SLIDE 18

Miscellaneous

  • 모드 선택 후 창이 뜨는데 시간이 매우 10초 이상

걸림

  • 아이 모드에서 정답을 제출하지 않으면 비활성화

된 버튼이 다음 문제로 넘어가도 활성화가 안됨

  • 마찬가지로 정답을 입력하고 지워도 활성화가

안됨

  • 삭제 버튼이 ui 업데이트를 안함
  • 몇몇 단어는 검색이 안됨 (i.e. apple, cow)
  • 업데이트된 프로그램은 마지막 테스트 결과에서

발견한 문제점을 개선하는 방향보단 없앤 것이 많아 보임

slide-19
SLIDE 19

Jfeature & Redmine

slide-20
SLIDE 20

Static Analysis

  • SonarQube 7 axis of code quality

– Architecture & design – Duplications – Unit tests coverage – Complexity – Potential Bugs – Coding Rules – Comments

slide-21
SLIDE 21

Basic metrics

size

slide-22
SLIDE 22

Architecture & Design

  • Covers

– File cycles

  • Minimal number of files cycles in a directory to identify all

undesired dependencies

– Files dependencies to cut – Package cycles

  • Minimal number of directory cycles to identify all

undesired dependencies

– Package dependencies to cut

  • This project has no directory nor package

– Nothing measured on architecture & design

slide-23
SLIDE 23

Architecture & Design

  • Some suggestions

– Divide classes into packages

  • UI
  • Database
  • Talkkid
  • Common – Message, Word
slide-24
SLIDE 24

Duplications

  • All duplications found in Interface.java
slide-25
SLIDE 25

Duplications

  • 349 ~ 365, 656 ~ 672
  • Adding “go to main” button on both child and

parent UI

slide-26
SLIDE 26

Duplications

  • 773 ~ 790, 796 ~ 813
  • Overloaded methods
  • Implemented very similarly
  • Can be coded to get string array
slide-27
SLIDE 27

Duplications

  • 677 ~ 692, 858 ~ 872, 891 ~ 904, 915 ~ 928
  • Makes a new table whenever table is changed
  • Queries database everytime and retrieves all

data to re-create the table again

– Get table model from jtable and use addRow(), removeRow() etc.

  • Duplicated 4 times
slide-28
SLIDE 28

Unit Test Coverage

  • SonarQube analyzes on

– Coverage – Condition coverage – Line coverage – Unit test success/failure – Etc

  • This project has no unit test!
slide-29
SLIDE 29

Complexity

  • Also known as McCabe metric
  • Control flow of a function splits, the complexity

counter gets incremented by one

  • Keywords that increases the complexity

– if, for, while, case, catch, throw, return (not the last statement of a method), &&, ||, ?

  • Keywords that do not increase the complexity

– Else, default, finally

  • Accessors do not increase complexity
  • McCabe saw threshold upto 10
slide-30
SLIDE 30

Complexity

  • Overall complexity

File Complexity Complexity / method Interface.java 149 8.8 Database.java 35 8 Parent.java 32 6.4 Child.java 12 4.4 User.java 8 4 Word.java 1 1 Message.java 1 1

slide-31
SLIDE 31

Potential Bugs & Coding Rules

File Number of errors Interface.java 2,990 Database.java 498 Parent.java 303 Child.java 214 User.java 113 Word.java 110 Message.java 109

  • Sonar rules + PMD + Check Style + Findbugs
slide-32
SLIDE 32

Potential Bugs & Coding Rules

  • Critical errors

Rule Count Exception handlers should preserve the original exception 18 Throwable.printStackTrace(...) should never be called 6 Fields in a "Serializable" class should either be transient or serializable 5 Dodgy - Redundant nullcheck of value known to be non-null 4 Empty If Stmt 3 Dodgy - Dead store to local variable 1 Rule Count Require This 573 Law Of Demeter 95 Line Length 79 Empty Line Separator 75 Javadoc Method 68 Javadoc Variable 63

  • Major errors
slide-33
SLIDE 33

Comments

  • Public methods have no documentation
  • Too few comments

– Reader has to guess how the program works

  • Too many comments

– May take more time in just reading the comments – Too many comments are needed  too complex or it doesn’t follow the coding standards

slide-34
SLIDE 34

Developer’s Seven Deadly Sins

  • Bugs and Potential Bugs
  • Coding Standards Breach
  • Duplications
  • Lack of Unit Tests
  • Bad Distribution of Complexity
  • Spaghetti Design
  • Not Enough or Too Many Comments