2. Yêu cầu
1. Sơ đồ ca sử dụng
2. Các chức năng và kịch bản
Feature: Admin add a video
As a admin
I want to add a video
In order to attracted many viewers
Scenario: Admin
Given I am on "/admin"
Then I should see "Thêm mới"
And I should see "Danh sách"
When I follow "Thêm mới"
Then I should be on "admin/Videos/AddVideo"
Scenario: Add completed
Given I am on "admin/Videos/AddVideo"
When I fill in "name" with "We dont talk anymore"
And I fill in "source" with "https://api.unblockvideos.com/youtube_downloader?id=37Z_bIqIWpg&selector=mp4&redirect=true"
And I fill in "image" with "http://i.imgur.com/iUorXiU.jpg?2"
And I fill in "eng" with "subtitles/we_dont_talk_anymore_eng.vtt"
And I fill in "vi" with "subtitles/we_dont_talk_anymore_vi.vtt"
When I press "Thêm mới video"
And I go to "admin/Videos/ListVideos"
Then I should see "We dont talk anymore"
Scenario: Add failed
Given I am on "admin/Videos/AddVideo"
When I fill in "name" with "Try"
And I fill in "source" with "https://api.unblockvideos.com/youtube_downloader?id=37Z_bIqIWpg&selector=mp4&redirect=true"
And I fill in "image" with "http://i.imgur.com/iUorXiU.jpg?2"
And I fill in "eng" with "subtitles/we_dont_talk_anymore_eng.vtt"
And I fill in "vi" with "subtitles/we_dont_talk_anymore_vi.vtt"
When I press "Thêm mới video"
And I go to "admin/Videos/ListVideos"
Then I should not see "Try"
Feature: Admin delete a video
As a admin
I want to delete a video
In order to manage video list
Scenario: Delete a video
Given I am on "admin/Videos/ListVideos"
When I follow "Delete"
Then I should not see "A thousand year"
Feature: View list video from admin
As a admin
I want to view list video
In order to manage video list
Scenario: view list video
Given I am on "/admin"
Then I should see "Thêm mới"
And I should see "Danh sách"
When I follow "Danh sách"
Then I should see "A thousand years"
Feature: Back home
As a user
I want to back home
In order to convenient for use
Scenario: back home
Given I am on "/video/3"
When I follow "20GG"
Then I should be on "/"
Feature: View list Video
As a user
I want to view list of most viewed
In order to convenient for find a good video
Scenario: view list video
Given I am on the homepage
Then I should see "Top xem nhiều"
Feature: View a video
As a user
I want to view a video
In order to view content of a video
Scenario: view a video
Given I am on the homepage
When I follow "A thousand years"
Then I should be on "/video/3"
Feature: View list Video
As a user
I want to view list video
In order to select a video
Scenario: view list video
Given I am on the homepage
Then I should see "A thousand years"
And I should see "We dont talk anymore"
And I should see "Just give me a resson"
Feature: Play a video
As a user
I want to watch a video
In order to study English
Scenario: play a video
Given I am on "/video/3"
When I click "play"
Then I can watch the video
Scenario: Change subtitle
Given I am on "/video/3"
When I check "English (en)" from "transcript-video"
Then I should see "Heart beats fast"
But I check "Viet Nam (vi)" from "transcript-video"
Then I should see "Tim đập rộn ràng"
Scenario: Go to
Given I am on "/video/3"
When I click "Heart beats fast"
Then the video go to "0:20"
3. Yêu cầu chất lượng
Tính khả dụng: Trang web đơn giản, thân thiện, giúp người dùng dễ sử dụng, người dùng có thể sử dụng ngay trong lần đầu tiên truy cập trang web.
Hiệu năng: Tốc độ tải video cao, hoàn thành tải trang web dưới 5s với mạng có tốc độ 1MB/s. Xem video không bị chậm. Phục vụ nhiều người sử dụng cùng lúc