1 / 18

Examining the Code

Examining the Code. Static While-Box Testing : เป็นการตรวจสอบ การออกแบบ และ Code. Static While-Box Testing : is the process of carefully and Methodically reviewing the software design , architecture or Code for bugs without executing it.

christin
Télécharger la présentation

Examining the Code

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Examining the Code

  2. Static While-Box Testing :เป็นการตรวจสอบ การออกแบบ และ Code Static While-Box Testing : is the process of carefully and Methodically reviewing the software design , architecture or Code for bugs without executing it. It’s sometimes referred to as structural analysis

  3. Reason ที่ต้องทำ to find bugs early and to find bugs that would be difficult to uncover or isolate with dynamic black-box testing. ประโยชน์ เพื่อเป็นการง่ายต่อทีมงานที่ต้องทำ black-box ใน test cases เมื่อพวกเขารับ Software มาทำการทดสอบ

  4. Who:  Programmer who organize and run the reviews.  Software tester ในฐานะผู้สังเกตการณ์  Other - Designer - People who can work.

  5. Formal Reviews :  is the process under which static white-box testing is performed.  can range from a simple meeting bet. programmers to detailed, rigorous inspection of the Code.

  6. There are 4 essential elements to a formal review : 1. Identify Problem find problem with SW directed at the code  พิจารณาเนื้องาน ไม่ใช่ คนทำ (Not อคติ) 2. Follow Rules Set the amount of code to reviewed (ไม่ควรน้อยเกินไป)  How much time will be spent.  What can be commented.

  7. 3. Prepare เพราะ tester หวังการเตรียมพร้อมจะช่วยให้การ Review ไปได้ดี tester อาจมีหลายคน ต่างภาระที่ได้รับมอบหมาย บางครั้งปัญหาอาจจะเจอ ตั้งแต่การเตรียมให้ Review 4. Write a Report:  How many problems were found,  Where they were found.

  8. Finding Problems inderect result • Communications • Quality • Team Camaraderie : to build respect for each other’s skills and to better understand each other’s jobs and job needs • Solutions

  9. Generic Code Review Checklist Data Reference Errors เป็น Bugs เพราะ การใช้ Variable, constant, array, string และการลืมกำหนดค่าเริ่มต้น ควรคำนึง • Is an uninitialized Variable referenced ?การกำหนดค่า array subscripts และ string dimension • การกำหนด ช่องของข้อมูล และ array • การกำหนดค่า ตัวแปร ค่างจากชนิดของตัวแปร • Memory allocated for reference pointer

  10.  Data Declaration Errors • Variables • Constants ควรคำนึงถึง  กำหนด correct length, type และ storage class - array of string - array of character  การตั้งชื่อ ค่า ตัวแปร คล้ายๆกัน อาจไม่ใช้ Bugs แต่ก่อให้เกิดความสับสน  ตัวแปรบางตัว แทบไม่ได้ เรียกใช้เลย  การกำหนดตัวแปร - Local Variable - Global Variable

  11. Comparison Errors • < , > , = , = , <= , >= , true , false • ความสับสนในการใช้ • การเปรียบเทียบ ค่าที่ใกล้เคียงกันมากๆ 1.0000001 กับ 1.0000002 • การใช้ Boolean expression

  12. Control flow error • There are usually cause direct / indirect. • ขึ้นอยู่กับภาษาที่ใช้ • ค่า terminate of loop • premature exit or loop never executes

  13. Subroutine Parameter Errors • ประเภท ขนาด ของ parameter ที่ส่งไปตรงกับ ที่เรียกใช้ หรือไม่ • ค่าส่งผ่าน คงที่หรือเปลี่ยนแปลง

  14. Input / Output Errors any data related to reading from file และค่าที่รับผ่าน keyboard  กำหนด format เฉพาะที่ของแต่ละ data ที่รับจาก External Device หรือไม่?  SW ได้จัดการกับกรณี ไฟดับ ขณะรับ Data  Show error message?

  15. Foundamental testing techniques 1. Static black box ( testing the specification ) 2. Dynamic black box ( testing the software ) 3. Static White box ( Examining the code ) 4. Dynamic White box ( X-ray specification ) ( structural testing )

  16. Testing the software with X-ray glasses  Dynamic White-Box testing Should tell you exactly what material it covers. It runs program, • Look inside the box • Examming the code • Watch it as it runs เพื่อจะได้รู้ว่า What the code does  How its work

  17. Dynamic White-box testing เน้น 4 ด้าน • low-level functions, procedure, subroutines, libraries • Top level completed program  test base on operation ที่ Tester รู้ • Access to read variables and state information from SW 4. ดูจำนวน Code ที่เจอข้อผิดพลาด อาจจะต้องมีการเอาที่ซ้ำกันออก หรือเพิ่มส่วนที่ขาด

  18. Dynamic White-Box TestingDebugging Dynamic White box testing Debugging Isolating The bug Testing Programming Goal is Goal is To find Bugs To fix them

More Related