system testing
play

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


  1. System Testing & Static Analysis Report 201011316 김성엽 200913247 권순필 201011373 최지환

  2. Index • Non-functional requirement validation • Specification and code review • System testing report • Static analysis report

  3. Non-functional Requirement Validation • Well met

  4. Specification & Code Review • displayS () in Interface doesn’t exist • Attribute db is not protected • Message is not in associative relationship

  5. Specification & Code Review • Data type variable name (x) • Variable name : data type (o)

  6. Specification & Code Review • Program logic is all in Interface • Doesn’t take advantage of OOP

  7. Specification & Code Review • Diagram and implementation differ

  8. Specification & Code Review • Diagram shows exception case should happen

  9. Specification & Code Review • Message instance created then right after receives a new instance • This happens several times!

  10. CPT Result (last week) • 56 개중 45 개 성공

  11. CPT Result (this week) • 56 개중 50 개 성공

  12. Failed Test Case Report • 데이터베이스에 없는 단어를 검색하면 몇몇 단어는 단어와 의미가 똑같이 나옴 – Apple = apple – 지난주의 문제가 개선되지 않음

  13. Pairwise Testing (last week) • 16 개중 13 개 성공

  14. Pairwise Testing (this week) • 16 개중 16 개 성공

  15. Brute-force Testing (last week) • 28 개 중 12 개 성공

  16. Brute-force Testing (this week) • 28 개 중 20 개 성공

  17. Failed Test Case Report • 8~9, 19~23 번 아이 모드를 클릭하면 “ ui 에러 ” 경 고창이 뜸

  18. Miscellaneous • 모드 선택 후 창이 뜨는데 시간이 매우 10 초 이상 걸림 • 아이 모드에서 정답을 제출하지 않으면 비활성화 된 버튼이 다음 문제로 넘어가도 활성화가 안됨 • 마찬가지로 정답을 입력하고 지워도 활성화가 안됨 • 삭제 버튼이 ui 업데이트를 안함 • 몇몇 단어는 검색이 안됨 (i.e. apple, cow) • 업데이트된 프로그램은 마지막 테스트 결과에서 발견한 문제점을 개선하는 방향보단 없앤 것이 많아 보임

  19. Jfeature & Redmine

  20. Static Analysis • SonarQube 7 axis of code quality – Architecture & design – Duplications – Unit tests coverage – Complexity – Potential Bugs – Coding Rules – Comments

  21. Basic metrics size

  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

  23. Architecture & Design • Some suggestions – Divide classes into packages • UI • Database • Talkkid • Common – Message, Word

  24. Duplications • All duplications found in Interface.java

  25. Duplications • 349 ~ 365, 656 ~ 672 • Adding “go to main” button on both child and parent UI

  26. Duplications • 773 ~ 790, 796 ~ 813 • Overloaded methods • Implemented very similarly • Can be coded to get string array

  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

  28. Unit Test Coverage • SonarQube analyzes on – Coverage – Condition coverage – Line coverage – Unit test success/failure – Etc • This project has no unit test!

  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

  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

  31. Potential Bugs & Coding Rules • Sonar rules + PMD + Check Style + Findbugs 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

  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 • Major errors Rule Count Require This 573 Law Of Demeter 95 Line Length 79 Empty Line Separator 75 Javadoc Method 68 Javadoc Variable 63

  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

  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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend