Вы находитесь на странице: 1из 9

Wellington Institute of Technology

IT6280-Assignment 3
Evan Keats

Shane Bunquin

Contents
Theory ..................................................................................................................................................... 2
Decision Table ................................................................................................................................. 2
Does this process include both validation and verification? .......................................................... 2
Practical................................................................................................................................................... 4
Sikuli Scripts ........................................................................................................................................ 4
Minimizing All Active Windows....................................................................................................... 4
Deleting Documents of Multiple Types .......................................................................................... 4
Tracking Bus Movement ................................................................................................................. 5
Navigating a Map ............................................................................................................................ 5
Drag Drop ........................................................................................................................................ 6
Working with the Sliders ................................................................................................................. 7
Responding to Message Boxes Automatically ................................................................................ 8

Figure 1: Test Script for Minimizing Active Windows ............................................................................. 4


Figure 2: Test Script for Deleting Documents ......................................................................................... 4
Figure 3: Test Script for Tracking Bus Movement ................................................................................... 5
Figure 4: Test Script for Navigating Map ................................................................................................ 5
Figure 5:Test Script for Drag & Drop ....................................................................................................... 6
Figure 6: Test Outcome ........................................................................................................................... 6
Figure 7: Test Script and Outcome for Sliders ........................................................................................ 7
Figure 8: Test Script for Automatic Response ......................................................................................... 8

1|Page

Theory
Decision Table
A decision table is an excellent tool to use in both testing and requirements management. Essentially
it is a structured exercise to formulate requirements when dealing with complex business rules.
Decision tables are used to model complicated logic. They can make it easy to see that all possible
combinations of conditions have been considered and when conditions are missed, it is easy to see
this.
A disadvantage of the technique is that a decision table is not equivalent to complete test cases
containing step-by-step instructions of what to do in what order. When this level of detail is
required, the decision table has to be further detailed into test cases. Decision tables can be used in
all situations where the outcome depends on the combinations of different choices, and that is
usually very often. In many systems there are tons of business rules where decision tables add a lot
of value. Decision tables should best be constructed during system design, since they become useful
to both developers and testers. The requirements specialist also becomes more confident that
everything that is important is actually documented. If there are no decision tables, testers can
create them during test design to be able to write better test cases.
Decision tables are a good way to describe requirements when there are several business rules that
interact together. Using decision tables it becomes easier for the requirements specialist to write
requirements which cover all conditions. As to the tester, it becomes easier for them to write
complete test cases
Conclusion
Decision table is a good way to deal with combinations of things. It provides a systematic way of
stating complex business rules, which is useful for developers as well as for testers. It can be used in
test design whether or not they are used in specifications, as they help testers explore the effects of
combinations of different inputs and other states that must correctly implement business rules.
Does this process include both validation and verification?
A state transition table is a table showing what state a finite semi-automaton or finite state machine
will move to, based on the current state and other inputs. A state table is essentially a truth table in
which some of the inputs are the current state, and the outputs include the next state, along with
other outputs. A state table is one of many ways to specify a state machine, other ways being a state
diagram, and a characteristic equation.
Validation checks that the product design satisfies or fits the intended use. This is done through
dynamic testing and other forms of review. Verification and validation is not the same thing,
although they are often confused.
Software Validation is the process of evaluating software during or at the end of the development
process to determine whether it satisfies specified requirements. On the other hand software
Verification is the process of evaluating software to determine whether the products of a given
development phase satisfy the conditions imposed at the start of that phase.

2|Page

In other words, software validation ensures that the product actually meets the user's needs, and
that the specifications were correct in the first place, while software verification is ensuring that the
product has been built according to the requirements and design specifications. Software validation
ensures that "you built the right thing". Software verification ensures that "you built it right".
Software validation confirms that the product, as provided, will fulfil its intended use.
Conclusion
From the article, State-transition diagrams describe all of the states that an object can have, the
events under which an object changes state, the conditions that must be fulfilled before the
transition will occur, and the activities undertaken during the life of an object. I can say that in this
process it includes both validation and verification. Both are present during the process but not on
the same time. A validation is necessary for the process during or at the end of the development.
And they should also make sure that the product of a given development phase satisfy the
conditions stated at the beginning which is the verification.

3|Page

Practical
1. Implement automated tests for the test procedures you have documented in Sikuli (or at
least as many as you can reasonably complete prefer quality over quantity). It is expected
that these scripts will generate reports about the test outcomes

Sikuli Scripts
Minimizing All Active Windows

Figure 1: Test Script for Minimizing Active Windows

This script minimizes all active windows by calling find repeatedly in a while loop (1) and
calling click on each minimize button found (2), until no more can be found.

Deleting Documents of Multiple Types

Figure 2: Test Script for Deleting Documents

This script deletes all visible Office files (Words, Excel, PowerPoint) by moving them to the
recycle bin. First, it defines a function recycleAll() to find all icons matching the pattern of a
given file type and move them to the recycle bin (1-3). Since icons may appear in various

4|Page

sizes depending on the view setting, anySize is used to find icons of other sizes (2). A for loop
iterates through all matching regions and calls dragDrop to move each match to the recycle
bin (3). Next, an array is created to hold the patterns of the three Office file types (4) and
recycleAll() is called on each pattern (5-6) to delete the files. This example demonstrates
Sikuli Scripts ability to define reusable functions, treat visual patterns as variables, perform
fuzzy matching (anySize), and interact with built-in types (array).
Tracking Bus Movement

Figure 3: Test Script for Tracking Bus Movement

This script tracks bus movement in the context of a GPSbased bus tracking application.
Suppose a user wishes to be notified when a bus is just around the corner so that the user
can head out and catch the bus. First, the script identifies the region corresponding to the
street corner (1). Then, it enters a while loop and tries to find the bus marker inside the
region every 60 seconds (2-3). Notice that about 30% of the marker is occupied by the
background that may change as the maker moves. Thus, the similar pattern modifier is used
to look for a target 70% similar to the given pattern. Once such target is found, a popup will
be shown to notify the user the bus is arriving (4).

Navigating a Map

Figure 4: Test Script for Navigating Map

This script automatically navigates east to Houston following Interstate 10 on the map (by
dragging the map to the left). A while loop repeatedly looks for the Interstate 10 symbol and
checks if a string Houston appears nearby (1). Each time the string is not found, the position

5|Page

100 pixels to the left of the Interstate 10 symbol is calculated and the map is dragged to that
position (3), which in effect moves the map to the east. This movement continues until the
Interstate 10 can no longer be found or Houston is reached.
Drag Drop

Figure 5:Test Script for Drag & Drop

The script will drag and drop all the word files into specified folder.

Figure 6: Test Outcome

6|Page

Working with the Sliders

Figure 7: Test Script and Outcome for Sliders

7|Page

Responding to Message Boxes Automatically

Figure 8: Test Script for Automatic Response

This script generates automatic responses to a predefined set of message boxes. A


screenshot of each message box is stored in a visual dictionary d as a key and the image of
the button to automatically press is stored as a value. A large number of message boxes and
desired responses are defined in this way (1-100). Suppose the win32gui library is imported
(101) to provide the function getActiveWindow(), which is called periodically (102) to obtain
the handle to the active window (103). Then, we take a screenshot by calling
getScreenshot() (104) and check if it is a key of d (105). If so, this window must be one of the
message boxes specified earlier. To generate an automatic response, the relevant button
image is extracted from d (106) and the region inside the active window matching the
button image is found and clicked (107). This Sikuli Script can interact with any Python
library to accomplish tasks neither can do it alone.

8|Page

Вам также может понравиться