TAILIEUCHUNG - Java Testing and Design- P7

Java Testing and Design- P7: The ultimate test of every software construction effort is the user’s success using the product to accomplish some practical goal. No matter how much state-of-the-art technology goes into the software, success can only be judged through the lens of the user. | Preparation and Setup Agents 279 The agent begins the main body of the commands by opening the commands file. dbfile open target The default open command opens a file for read access. The agent then duplicates the command constants originally defined in Prepare_Setup_Agent. The agent loops through each record in the file and processes each command. While the post_message function does not actually send a request to a Web-enabled application it does print the reply message with the correct indentation to the screen. The agent then creates variables used during command processing including a counter for the number of commands processed an identifier for the next new message and an integer value to track the indentation of the next reply message in the tree of reply messages. Setup_agent processes each command in the commands file. The for command loops through every line in the commands file. for line in The agent creates a list variable called commands by reading a line from the commands file and splitting it into a list of individual values by delimiting each value by a comma character using the split function. commands The commands variable is a list so commands 0 refers to the first value found in the current line of the commands file. In the discussion system example the first time through this loop commands 0 contains a new_thread command. The agent handles commands and takes action accordingly. When handling a new_thread command the agent indicates the command has been handled bumps up the number of handled commands posts the message using the post_message function pushes the indentation value onto the stack using the push function then bumps up the number of messages and the indentation value. if int command new_thread handled 1 tick 1 node post_message next_message indent 280 Chapter8 State Design and Testing top-message commands 1 commands 2 push indent next_message 1 indent 1 The handled variable is a simple flag that

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.