intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Nhập môn Công nghệ phần mềm: Chương 4 - Lương Trần Hy Hiến

Chia sẻ: Lê Quang Sáng | Ngày: | Loại File: PPTX | Số trang:33

100
lượt xem
14
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Nhập môn Công nghệ phần mềmn - Chương 4: Software Testing Topic in Web Testing trình bày các nội dung chính: các khía cạnh test trên web, các thành phần và chuẩn UI, công cụ kiểm thử. Đây là tài liệu tham khảo dành cho sinh viên ngành Công nghệ thông tin.

Chủ đề:
Lưu

Nội dung Text: Nhập môn Công nghệ phần mềm: Chương 4 - Lương Trần Hy Hiến

  1. S o ftware Te s ting Topic in We b Te s ting HIENLTH, FIT of HCMUP, Vie tnam 1
  2. How to te s t a we bs ite • Easiest way to start is by treating the web site as a black box. – Look at a sample website such as www.apple.com to get a sense of the scale of such an endeavor. – Treat each page as a state with hyperlinks as state transitions.
  3. Nội dung • Các khía cạnh test trên web • Các thành phần và chuẩn UI • Công cụ kiểm thử 3
  4. Kiến trúc 3 lớp 4
  5. Kịc h b ản te s t 5
  6. PRESENTATION LAYER TEST • Kiểm tra nội dung - Content testing – Lỗi chính tả, font chữ – Giá trị mặc định – Thông tin thể hiện… • Kiểm tra kiến trúc - Website architecture – Lỗi cấu trúc, link hỏng – Các trang bị thiếu • Kiểm tra môi trường người dùng - User environment – Tương thích trình duyệt, hệ điều hành 6
  7. We bs ite te xt • Web page text should be treated like documentation and tested using the techniques we described previously. • Check for … – correctness of contact information e.g., phone numbers, addresses – correctness of dates and copyright notices – title bar text, bookmark text on browser’s favorites – correctness of the ALT text (i.e., mouse over text) – layout issues when browser window is resized
  8. We bs ite hype rlinks • Each link should be checked to make sure it jumps to the correct destination or website. • Ensure that hyperlinks are obvious: – E.g., underlined text, mouse pointer changes • If the link opens an e-mail message, test it – Send an e-mail and verify that you get a response. • Check for orphan page s that are part of the website but cannot be accesses through a hyperlink. – Someone forgot to create the link – Might be intentional … Google will find it, though
  9. We bs ite graphic s • Do all graphics load and display properly? • Is a graphic missing or incorrectly named? • Does the website intermix text and graphics? – Does the text wrap around the graphics? – What happens when the browser window is re-sized? • Does the page load fast enough? – Are there too many graphics? – Did you try to test the website on a dialup connection instead of a high-speed LAN?
  10. We bs ite forms • Forms are the text boxes, list boxes, and other fields for entering and selecting information on the web page. • Are the form fields positioned properly? • Are the fields the correct size? • Do they accept correct data? • Do they reject bad data? • Are optional fields really optional? • A favorite entry point for buffer overflow attacks (more on this later).
  11. “Grey-box” te s ting • A mixture of white-box and black-box testing. • You stick to black-box testing primarily and supplement it by taking a peek at the HTML to figure out how the website works. • For website testing it is worth looking at the HTML code. – It’s there, easy to look at, why not? • Not looking at the HTML code is wasteful, especially since HTML is such a simple language. – HTML is a tagging language for text and graphics. – To create dynamic web content requires that HTML be supplemented by programming code (e.g., J ava applets, ActiveX, VBScript, CGI, Perl).
  12. White -box te s ting • To make sure you find the important bugs you should have some knowledge of the website’s programming: – Dynamic content – Database-driven web pages – Programmatically created web pages – Server performance and loading and security
  13. Dynamic c onte nt • Dynamic content is graphics and text that changes based on certain conditions. – E.g., time of day, weather, stock tickers • Client-side programming involve embedding scripting code (e.g., J avaScript) into HTML. – Less efficient if the computations are expensive – Code is local, easy to access for testing • Server-side programming is code located on the server. – More efficient for intensive calculations – Requires access to the web server to view the code (might be a problem for testing).
  14. BUSINESS LAYER TEST • Performance – Thời gian đáp ứng, thực hiện transaction, xử lí các nghiệp vụ có trong thời gian cho phép • Data validity – Kiểm tra dữ liệu hợp lệ . • Transaction – Giao tác hoạt động như thế nào (ví dụ chuyển tiền, xác nhận email, tính thuế trong các trang web thương mại điện tử). – Khi xảy ra lỗi có roll back và bảo toàn tính toàn vẹn dữ liệu không 14
  15. Se rve r pe rformanc e loading and s e c urity • Popular websites can receive millions of hits per day. – www.youtube.com hits 100 Million Videos per day – Check out http://www.youtube.com/watch?v=jP26ZYhQktY for a software testing video! • Each hit requires a download of data from the website’s server to the browser’s computer. • You need to simulate millions of connections and downloads to test a system for performance and loading. • Security issues include: – Denial of service attacks – Buffer overflow attacks
  16. DATA LAYER TEST • Các tiêu chuẩn khi kiểm tra data layer – Response time: thời gian thực hiện các câu lệnh insert, delete, update xuống CSDL – Data integration: kiểm tra lỗi trong việc lưu trữ dữ liệu như kiểm tra độ dài chuỗi, kiểu dữ liệu… – Fault tolerance and recover ability: khả năng chịu lỗi và phục hồi lỗi • xác định được thời gian trung bình giữa các lần hư hỏng (MTBF) và thời gian trung bình sữa chửa khi có sự cố(MTTR) 16
  17. DATA LAYER TEST(tt) • Data layer là nơi quan trọng, lưu giữ thông tin của hệ thống, khách hàng có khả năng gây hậu quả nghiêm trọng nếu bị lỗi (ví dụ tài khoản..). • Việc đầu tiên của data layer testing là kiểm tra hệ quản trị cơ sở dữ liệu dùng để lưu trữ và tìm kiếm thông tin. – Các site nhỏ có thể lưu dữ liệu trên file text – Các site lớn thì lưu trên một hệ quản trị cơ sở dữ liệu. – Tùy tính chất của công việc và thông tin mà ta có 17 thể chọn 1 trong 2 cách lưu trữ trên
  18. Databas e -drive n we b page s • Most E-commerce that show catalogs or inventories are database driven. – E.g., Amazon • Data is pulled from the database, formatted into HTML and sent to the web browser for viewing.A three tier architecture is used: – Tier 1: web browsers (presentation) – Tier 2: web page formatter (converts data from Tier 3 to HTML) – Tier 3: database (queried by Tier 2)
  19. Các khía c ạnh c ần te s t trê n we b 19
  20. Các thành ph ần và chu ẩn giao diện • Các phần tử (element) trên web – Nắm được các element trên web nhằm hỗ trợ cho việc report bug. – Tham khảo file Level Element Definition • Chuẩn giao diện – Chuẩn giao diện nhằm giúp developer và tester có chung định hướng khi phát triển giao diện. – Tùy mỗi công ty có chuẩn riêng nhằm phù hợp với các website khác nhau. – Tham khảo file Web UI Standard 20
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2