teachingwebdrivervideo / serenity-pageobject-junit

0 stars 0 forks source link

Bài 04: Phân tích các thông số mặc định trong file serenity.properties #9

Open teachingwebdrivervideo opened 4 years ago

teachingwebdrivervideo commented 4 years ago

serenity.properties

serenity.properties là file dùng để thay đổi các cấu hình chung cho toàn bộ test project. Bạn có thể dễ dàng thay đổi baseUrl, driver cho trình duyệt.... và nhiều thứ khác.

Tài liệu để bạn có thể tìm thấy nhiều hơn các cấu hình cung cấp bởi framework

teachingwebdrivervideo commented 4 years ago

Cách lấy dữ liệu trong file serenity.properties

Bạn có thể tạo ra nhiều file giống như serenity.properties

Ví dụ như android.properties hoặc ios.properties và muốn dùng nó thay cho file serenity.properties mặc định của serenity thì trong lệnh chạy chúng ta truyền thêm tham số sau

mvn verify -Dproperties=android.properties