Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Tham khảo tài liệu 'emerging communications for wireless sensor networks part 4', kỹ thuật - công nghệ, cơ khí - chế tạo máy phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Automated Testing and Development of WSN Applications 53 After we detected a failure by executing a test case our next step is to fix the fault within the application being tested which caused it to fail. But before we can correct the application code we have to locate the fault see Figure 9 . Fig. 9. The process of quality assurance in the context of a test case In general we do this by gradually isolating its code location until we can pinpoint the fault. Therefore Agans recommends using a divide and conquer approach Agans 2002 . To illustrate this approach we shall use the test case for the application which measures the water pollution we introduced in Dection 2 Suppose that the test case reports a failure that not all sensory data was transmitted to the base station. The cause may lie within the activity of each sensor node to collect and store the sensory data or it may lie within the task to transfer the stored data to the base station. To answer which case is true we next check if all sensory data was stored on each sensor node as expected. If this is true we have to look for a cause associated to the transmission of the data to the base station. Otherwise the stored data is corrupted the code for collecting and storing the sensory data is faulty. Now we have identified the part of the code where we have to look for a fault. If the application failed to collect and store the sensory data we may divide the location of the fault again by asking whether the collection task or the storing task went wrong. In general we iteratively divide the code part where the fault is located and thus narrow our focus until we are able to locate the fault itself. The process of isolating a fault is a very demanding cognitive task where hypotheses about the cause of a failure are suggested and verified iteratively Xu Rajlich 2004 . We do so when using the divide and conquer approach by suggesting a hypothesis that will help us -once verified - to divide the code where the .