Bài này dịch từ: https://sahipro.com/docs/using-sahi/business-driven-test-automation.html
Introduction - Giới thiệu
BDTA - Kiểm thử tự động hướng nghiệp vụ cho phép các tính năng kiểm thử tự động chạy sớm trong chu trình dự án - Tại lúc khi tính năng đang ở giai đoạn khái niệm. Ứng dụng (hoặc phần mềm) cần test chưa cần phải sẵn sàng (chưa cần hoạt động được) để bắt đầu BDTA.
Với BDTA bạn có thể làm các việc dưới đây kể cả khi ứng dụng chưa hoàn chỉnh:
Mô tả các dòng chảy bằng các dòng tiếng Anh đơn giản, gọi đơn giản là Key Words (Từ khóa) (Tại sao là tiếng Anh ? - Vì tiếng Anh thông dụng, và rõ ràng). (vd. Login, Add book… etc).
Thêm vào các tham số khác nhau theo nhu cầu test - ở mỗi bước khác biệt. (Vd: Login | Username:test | Password: |) Những thứ này có thể chỉnh sửa/ thêm/ xóa sau đó khi ứng dụng đã hoàn chỉnh.
Đối với những dữ liệu kiểm thử chuyên sâu, bạn có thể tạo ra những bước liên quan theo cách kiểm thử hướng dữ liệu (Data Driven) và tạo và lưu trữ trong file data input.
Tổ chức lại các test-cases và ngữ cảnh test trong Suites.
Tag các test-case để phân định logic và kiểm soát tốt hơn khi thực thi.
Chia sẻ cho các member khác, quản lý để review lại.
Đánh dấu lại dùng Version control
Khi ứng dụng đã sẵn sàng (để chạy test):
Thực thi Từ khóa trước đó, sử dụng nút chạy hoặc / lưu bước để “thực thi” đối với các phần mềm hỗ trợ lưu bước, tạo sourcecode theo bước (Một khuyết điểm ở chỗ này là code thừa rất nhiều, hoặc code gen ra thiếu steps, không đúng thực tế…) . Cuối quy trình này bạn phải review và sửa code!
Đóng gói các đối tượng lại thành đối tượng (object), file để dễ bảo trì sau này!
Chạy testcases automation và xác minh công việc.
Chốt: Với quy trình BDTA, hầu hết các công việc automation đều được xử lý trước khi tính năng sẵn sàng hoạt động . Thậm chí khi automation không xong được, chúng ta vẫn có thể sử dụng mấy cái testcase này để Manual (tran: lạy mấy mẹ viết cái này, thế manual từ đầu cho khỏe).
English bellow:
Business-Driven Test Automation (BDTA) allows test automation to begin much earlier in the project lifecycle - right at the feature conceptualization stage. The application under test need not be ready to begin BDTA.
With BDTA you can do the following even before your feature or application is ready:
Define the flow of the application in simple english. (Eg. Login, Add Books etc.). These are called Key Words.
Add optional parameters to different steps as the test demands. (Eg. Login | Username:test | Password: |). These can be fine tuned/added/modified later when the application is ready.
For data intensive tests, you can make the relevant steps data driven and create and populate the data input file.
Organize your tests and scenarios in Suites.
Tag the tests for logical separation and for better control on execution.
Get these verified by peers and managers.
Checkin into Version control
When the application is ready,
Use Run/Record feature to record steps and "implement" the Key Words. The wizard lets you parametrize etc and create the necessary javascript/sahiscript function.
Use Accessor Repository during recording itself or do it later to separate all object identification into a separate file for easier maintenance.
Run and verify that your automation works fine.
With BDTA, most of the automation tasks have moved to before the feature is ready. Even if automation is not done, they can serve as good manual test cases since there is no code involved in them.
Nhận xét
Đăng nhận xét