1. Trang chủ
  2. » Luận Văn - Báo Cáo

Kiểm thử tự động với công cụ katalon studio trên hệ thống nopcommerce

105 13 3

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

TRƯỜNG ĐẠI HỌC KINH TẾ KHOA THỐNG KÊ – TIN HỌC BÁO CÁO THỰC TẬP NGHỀ NGHIỆP NGÀNH HỆ THỐNG THÔNG TIN QUẢN LÝ CHUYÊN NGÀNH QUẢN TRỊ HỆ THỐNG THÔNG TIN KIỂM THỬ TỰ ĐỘNG VỚI CÔNG CỤ KATALON STUDIO TRÊN HỆ THỐNG NOPCOMMERCE Đơn vị thực tập : TMA Solutions Bình Định Giảng viên hướng dẫn : TS Phan Đình Vấn LỜI CẢM ƠN Để hồn thành báo cáo thực tập nghề nghiệp lần trước hết em xin gửi đến quý thầy cô khoa Thống kê – Tin học trường đại học Kinh tế Đà Nẵng lời cảm ơn chân thành tạo điều kiện cho em có tập ý nghĩa Và em xin cảm ơn thầy Phan Đình Vấn tận tình hướng dẫn em trình thực tập ! Đặc biệt em xin gửi lời cảm ơn đến TMA Solutions Bình Định tạo điều kiện cho em tiếp xúc với môi trường làm việc thực tiễn ngành nghề em theo đuổi trình thực tập cơng ty Cuối chúng em xin cảm ơn team DG4, anh Nguyễn Lê Anh Tuấn tận tình giảng dạy kiến thức chuyên môn, buổi chia sẻ kinh nghiệm làm việc kỹ mềm….để em hồn thành báo cáo thực tập nghề nghiệp Với kiến thức cịn thiếu sót, kỹ cịn hạn hẹp, chúng em tránh sai lầm, em mong thầy cơng ty thông cảm bỏ qua cho chúng em Em xin chúc quý thầy cô, anh chị team DG4 ln khỏe mạnh, hồn thành tốt cơng việc ln hạnh phúc Em xin chân thành cảm ơn! i LỜI CAM ĐOAN Em xin cam đoan báo cáo thực tập nghề nghiệp em bạn Cao Như Uyên hướng dẫn giáo viên Phan Đình Vấn thực hướng dẫn mentor, khơng có chép người khác Nội dung đề tài báo cáo trình mà chúng em học tập, nghiên cứu, tham gia dự án với công ty để thực Các số liệu, kết trình bày báo cáo hồn tồn trung thực Nếu có chép khơng hợp lệ, vi phạm em xin chịu hồn tồn trách nhiệm, kỷ luật môn nhà trường ii MỤC LỤC LỜI CẢM ƠN i LỜI CAM ĐOAN ii MỤC LỤC iii DANH MỤC HÌNH ẢNH vii DANH MỤC BẢNG BIỂU ix DANH MỤC CÁC TỪ VIẾT TẮT x LỜI MỞ ĐẦU 1 Lý chọn đề tài Mục tiêu nghiên cứu đề tài Phương pháp nghiên cứu Đối tượng phạm vi đề tài Nội dung đề tài CHƯƠNG TỔNG QUAN VỀ TMA SOLUTIONS BÌNH ĐỊNH & tester 1.1 Giới thiệu cơng ty TMA Solutions Bình Định: 1.1.1 Lịch sử hình thành 1.1.2 Lĩnh vực hoạt động công nghệ sử dụng 1.1.3 Cơ hội việc làm 1.2 Tổng quan nghề Tester 1.2.2 Vai trò trách nhiệm Tester 1.2.3 Những kỹ cần có Tester 1.2.4 Triển vọng nghề Tester - Nghề Tester Việt Nam iii CHƯƠNG CƠ SỞ LÝ THUYẾT VỀ KIỂM THỬ PHẦN MỀM 2.1 Tìm hiểu Software Testing 2.1.1 Software Testing gì? 2.1.2 Tại kiểm thử phần mềm cần thiết? 2.1.3 Bảy nguyên tắc kiểm thử 2.2 Quy trình kiểm thử phần mềm 2.2.1 Requirement analysis - Phân tích yêu cầu 2.2.2 Test planning - Lập kế hoạch kiểm thử 2.2.3 Test case development - Thiết kế kịch kiểm thử 2.2.4 Test execution – Thực kiểm thử 2.2.5 Test cycle closure – Đóng chu trình kiểm thử 2.3 Các loại kiểm thử phần mềm 2.3.1 Manual Testing 2.3.2 Automation Testing 2.4 Các cấp độ kiểm thử phần mềm 2.4.1 Unit Test 2.4.2 Integration Test 2.4.3 System Test 10 2.4.4 User Acceptance Test 10 2.5 Các phương pháp kiểm thử phần mềm 10 2.5.1 Kiểm thử hộp đen 10 2.5.2 Kiểm thử hộp trắng 11 2.6 Test case 11 2.6.1 Test case gì? 11 iv 2.6.2 Tham số đặc trưng Test case 11 2.7 Report Bug 12 2.7.1 Tại bạn nên quan tâm đến giải thích lỗi tốt? 12 2.7.2 Chúng ta nên làm trước báo lỗi? 12 2.7.3 Tham số đặc trưng Report Bug 12 2.8 Xpath 13 2.8.1 Xpath gì? 13 2.8.2 Các loại Xpath 13 2.9 Tổng quan công cụ Katalon Studio 13 2.10 Giới thiệu ngôn ngữ Groovy 14 CHƯƠNG TRIỂN KHAI DỰ ÁN KIỂM THỬ TỰ ĐỘNG VỚI CÔNG CỤ KATALON STUDIO TRÊN HỆ THỐNG NOPCOMMERCE 15 3.1 Tổng quan trang web Nopcommerce 15 3.2 Sơ đồ Usecase hệ thống 15 3.3 Đặc tả yêu cầu 16 3.3.1 Đặc tả yêu cầu cho chức “Đăng nhập” 16 3.3.2 Đặc tả yêu cầu cho chức ‘Quản lý sản phẩm’ 19 CHƯƠNG THỰC HIỆN KIỂM THỬ 37 4.1 Môi trường kiểm thử 37 4.2 Dữ liệu kiểm thử 37 4.3 Trạng thái Test case 37 4.4 Thiết kế Test case 37 4.4.1 Test case Login 38 4.4.2 Test case Producst 38 v 4.5 Triển khai code tự động Katalon 39 4.5.1 Tạo Keyword 39 4.5.2 Một vài Xpath thực 40 4.5.3 Thực thi test case 41 4.5.4 Kết Test Suites thực 46 KẾT LUẬN VÀ HƯỚNG PHÁT TRIỂN 47 Kết đạt 47 Bài học kinh nghiệm 47 Hướng phát triển 48 TÀI LIỆU THAM KHẢO 49 CHECK LIST CỦA BÁO CÁO 50 PHỤ LỤC 51 vi DANH MỤC HÌNH ẢNH Hình 1.1 Cơng ty TMA Solutions Bình Định Hình 2.1 Bảy nguyên tắc kiêm thử Hình 2.2 Quy trình kiểm thử phần mềm Hình 2.3 Các cấp độ kiểm thử phần mềm Hình 2.4 Kiểm thử hộp đen 11 Hình 2.5 Kiểm thử hộp trắng 11 Hình 2.6 Cơng cụ Katalon Studio 14 Hình 3.1 Sơ đồ Usecase hệ thống 16 Hình 3.2 Giao diện hình đăng nhập 17 Bảng 3.1 Phân tích Usecase đăng nhập 17 Hình 3.3 Giao diện hình Login trang web 18 Bảng 3.2 Hệ thống kiểm tra liệu đầu vào Login 18 Hình 3.4 Giao diện trang web đăng nhập thành cơng 19 Hình 3.5 Giao diện chức quản lý sản phầm 19 Bảng 3.3 Phân tích Usecase Products 22 Bảng 3.4 Hệ thống kiểm tra liệu đầu vào button Products 23 Hình 3.6 Giao diện hình hiển thị sản phẩm mà người dùng muốn tìm kiếm 23 Hình 3.7 Giao diện hình thêm sản phẩm 24 Bảng 3.5 Phân tích chức Products infor 26 Bảng 3.6 Phân tích chức Prices 26 Bảng 3.7 Phân tích chức Shipping 27 Hình 3.8 Giao diện hình thêm sản phẩm 27 Bảng 3.8 Hệ thống kiểm tra liệu đầu vào button Add New 27 Hình 3.9 Giao diện hình tìm kiếm sản phẩm 28 Hình 3.10 Giao diện hình tải danh sách sản phẩm dạng PDF 28 vii Hình 3.11 Giao diện hình xuất tệp sản phẩm 29 Hình 3.12 Giao diện hình để lựa chọn mục để xuất sản phẩm 30 Hình 3.13 Giao diện hình để nhập tệp sản phẩm 31 Hình 3.14 Giao diện hình Click vào button Import 31 Bảng 3.9 Hệ thống kiểm tra liệu đầu vào button Import 32 Hình 3.15 Giao diện hình chọn sản phẩm để xóa 32 Hình 3.16 Giao diện hình để xác nhận xóa sản phẩm 33 Hình 3.17 Giao diện hình tìm kiếm lại sản phẩm xóa 33 Bảng 3.10 Hệ thống kiểm tra liệu đầu vào button Delete 34 Hình 3.18 Giao diện hình để người dùng click vào button chỉnh sửa 34 Hình 3.19 Giao diện hình người dùng chỉnh sửa thơng tin 35 Hình 3.20 Giao diện hình người dùng lưu sản phẩm 37 Hình 3.21 Giao diện hình người dùng tìm kiếm lại sản phẩm chỉnh sửa 37 Bảng 4.1 Thống kế số Testcase viết 38 Hình 4.1 Xpath hộp thoại Email 40 Hình 4.2 Xpath hộp thoại Password 40 Hình 4.3 Kết Test Suites hình Login 47 Hình 4.4 Kết Test Suites hình Products 47 viii DANH MỤC BẢNG BIỂU Bảng 3.1 Phân tích Usecase đăng nhập 17 Bảng 3.2 Hệ thống kiểm tra liệu đầu vào Login 18 Bảng 3.3 Phân tích Usecase Products 22 Bảng 3.4 Hệ thống kiểm tra liệu đầu vào button Products 23 Bảng 3.5 Phân tích chức Products infor 26 Bảng 3.6 Phân tích chức Prices 26 Bảng 3.7 Phân tích chức Shipping 27 Bảng 3.8 Hệ thống kiểm tra liệu đầu vào button Add New 27 Bảng 3.9 Hệ thống kiểm tra liệu đầu vào button Import 32 Bảng 3.10 Hệ thống kiểm tra liệu đầu vào button Delete 34 Bảng Thống kế số Testcase viết 38 ix Open 'https://admindemo.nopcommerce.com/' Enter Email and Password -> Login Choose 'Catalog' > 'Products' Click 'Edit' in 'HU' Edit information Product name Edit information Short Description Edit information Full Description admin login Edit information SKU Products017 Verify that successfully Choose Categories: admin edit There is a Display the message: Display the message: 'Computers' or 'Computers Email: 'The product has been 'The product has been the products list of >> Desktops' or admin@yourstore.com updated successfully.' updated successfully.' successfully products 'Computers >> Notebooks' Password: admin Return to home page 77 Return to home page Pass or 'Computers >>Software' or 'Electronics' or 'Electronic >>Camera & photo' or Electronic >> Cellphones' or 'Electronic >> Others or 'Apparel' or 'Apparel >> Shoes' or 'Apparel >> Clothing' or 'Apparel >> Accessories' or Digital downloads' or 'Books' or 'Jewelry' or 'Gift Cards' 10 Choose Manufacturers: 'All' or 'Apple' or 'HP' or 'Nike' 11 Tick or not tick Published 78 12 Edit information Product tags 13 Edit information GTIN (global trade item number) 14 Edit information Manufacturer part number 15 Tick or not tick in Show on home page if tick when enter Display order 16 Choose Product type: 'All' or 'Simple' or 'Grouped' 17 Choose Product template: 'Simple product' 18 Tick or not tick Visible individually 19 Choose Customer roles: 'Administrators' or Forum Moderators' or 'Guest' or 79 'Registered' or 'Vendors' 20 Choose Limited to stores: 'Your store name' or 'Test store 2' 21 Choose Vendor: 'No Vendor' or 'Vendor 1' or 'Vendor 2' 22 Tick or not tick Require other products if ticked when enter Required product IDs and click 'Add required product button.And tick or not tick Automatically add these products to the cart 23 Tick or not tick Allow customer reviews 24 Choose Available start 80 date 25 Choose Available end date 26 Tick or not tick Mark as new if ticked when choose Mark as new Start date and Mark as new End date 27 Edit Admin comment 28 Click 'Save' or 'Save Continue Edit' 10 Verify that admin edit the product 'HU' successfully 81 Open 'https://admindemo.nopcommerce.com/' Enter Email and Password -> Login Choose 'Catalog' > 'Products' Click 'Edit' in 'HU' Click 'Copy product' Click Enter 'New product name': 'HU2' Tick or not tick Verify that admin login 'Published' and ' Copy Display message: 'The Display message: admin copy successfully Multimedia' product in Products018 There is a product has ben copied 'The product has ben Click 'Copy product' Email: successfully' edit product list of 10 Verify that admin copy admin@yourstore.com Display copied product Display copied successfully products product successfully Password: admin 82 in list copied successfully' product in list Pass Open 'https://admindemo.nopcommerce.com/' Enter Email and Password -> Login Choose 'Catalog' > 'Products' Click 'download catalog as PDF' Verify that Products019 Products020 admin admin login Verify that admin download successfully download file PDF catalog as There is a successfully Email: PDF list of Verify that data in file admin@yourstore.com Data in file PDF is Data in file PDF is PDF is correct Password: admin correct successfully products admin download file admin download file PDF successfully PDF successfully correct Verify that admin login Open 'https://admin- admin export all found admin successfully demo.nopcommerce.com/' products to XML file admin export all export the There is a successfully found products to Enter Email and Password Email: products to list of -> Login admin@yourstore.com Data in XML file is XML file XML (all Choose 'Catalog' > Password: admin successfully products 83 correct Pass Pass found) 'Products' Data in XML file is successfully Click the 'Export' button correct Choose 'Export to XML (all found)' Verify that admin export all found products to XML file successfully Open 'https://admindemo.nopcommerce.com/' Enter Email and Password -> Login Verify that Choose 'Catalog' > admin 'Products' export the admin export admin login Choose products want to products to successfully exports: 'Windows Pro'; Products021 admin export selected selected products to products to XML file XML file successfully successfully XML There is a 'Sound Forge Pro 11 Email: (selected) list of (recurring)'; 'Nikon D5500 admin@yourstore.com Data in XML file is Data in XML file is DSLR - Black' Password: admin correct successfully products 84 correct Pass Click the 'Export' button Choose 'Export to XML (selected)' Verify that admin export selected products to XML file successfully Open 'https://admindemo.nopcommerce.com/' Enter Email and Password -> Login Choose 'Catalog' > Verify that 'Products' admin Click the 'Export' button export the admin export all admin login Choose 'Export to Excel admin export all found found products to products to successfully (all found)' Products022 products to Excel file Excel file successfully successfully Excel (all There is a Verify that admin export Email: found) list of all found products to Excel admin@yourstore.com Data in Excel file is Data in Excel file is file successfully Password: admin correct successfully products 85 correct Pass Open 'https://admindemo.nopcommerce.com/' Enter Email and Password -> Login Choose 'Catalog' > 'Products' Choose products want to exports: 'Windows Pro'; 'Sound Forge Pro 11 (recurring)'; 'Nikon D5500 Verify that DSLR - Black' admin Click the 'Export' button export the admin export admin login Choose 'Export to Excel products to successfully (selected)' Products023 admin export selected selected products to products to Excel file Excel file successfully successfully Excel There is a Verify that admin export Email: (selected) list of selected products to Excel admin@yourstore.com Data in Excel file is Data in Excel file is file successfully Password: admin correct successfully products 86 correct Pass Open 'https://admindemo.nopcommerce.com/' Products024 Enter Email and Password Display the error -> Login message: 'For Choose 'Catalog' > security purposes, the 'Products' feature you Click the 'Import' button Display the message: have requested is not Verify that Choose file 'Products have been available on the admin Click 'Import from Excel' Email: imported successfully.' demo site.' import file admin login Verify that admin import admin@yourstore.com Display imported data No display imported successfully successfully file successfully Password: admin in list data in list Fail Open 'https://admindemo.nopcommerce.com/' Products025 Verify that admin login Enter Email and Password admin can successfully -> Login choose to There is a 3.Choose 'Catalog' > Email: show how list of 'Products' admin@yourstore.com Display items first in Display items first Click ' Show _items' Password: admin many items products 87 display order in display order Pass Choose: '7' Verify that catalogue show items successfully Open 'https://admindemo.nopcommerce.com/' Enter Email and Password -> Login Choose 'Catalog' > Products026 Verify that 'Products' admin can Click button refresh Email: refresh page admin login Verify that admin refresh admin@yourstore.com The pages returns to its The pages returns to successfully successfully this page successfully Password: admin original state its original state Display another page Display another page Pass admin login Open 'https://admin- Products027 Verify that successfully demo.nopcommerce.com/' admin can There is a Enter Email and Password Email: change page list of -> Login admin@yourstore.com of catalogue This page of catalogue This number Choose 'Catalog' > Password: admin products 88 is correct page is correct Pass 'Products' Click page '2' or '>' or ' Login Choose 'Catalog' > 'Products' Click 'nopCommerce' in Products029 Verify that 'Powered by nopCommerce' admin can Switch to the guide page Display instruction Display instruction click Verify that click page about page about 'Powered by 'nopCommerce' in Powered Email: Nopcommerce Nopcommerce nopCommer admin login by nopCommerce admin@yourstore.com https://www.nopcomm https://www.nopcom ce' Password: admin successfully successfully erce.com/ merce.com/ admin logout admin logout Pass Open 'https://admin- Products030 Verify demo.nopcommerce.com/' admin Enter Email and Password Email: logout admin login -> Login successfully successfully Click 'Logout' admin@yourstore.com successfully successfully Password: admin Return to login page 90 Return to login page Pass Verify that admin logout successfully 91

Ngày đăng: 12/12/2023, 19:44

w