Tests/BlockParty: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (typo)
 
(44 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{merge|Tests/Activity/Block Party}}

== Block Party Tests ==
== Block Party Tests ==
''Test results from March 2008''


{| border=1 cellspacing=2 cellpadding=2
{| border=1 cellspacing=2 cellpadding=2
Line 29: Line 32:
|colspan="2"| '''New game''': initialisation tests.
|colspan="2"| '''New game''': initialisation tests.
|-
|-
| Points, lines and level are initialised properly. || <span style="color:red">fail: Level is initialised erratically to values around 5</span>
| Points, lines and level are initialised properly. || <span style="color:green">pass</span>
|-
|-
| A random piece is at the top of the well. || <span style="color:red">fail: Some spawn above the well, the I-piece 1 below the top.</span>
| A random piece is at the top of the well. || <span style="color:red">fail: Some spawn above the well, the I-piece 1 below the top</span>
|-
|-
| A random piece is in the next piece window. || <span style="color:green">pass</span>
| A random piece is in the next piece window. || <span style="color:green">pass</span>
|-
|-
| Game is paused. || <span style="color:green">pass</span>
|colspan="2"| '''Piece generation''': generation of new pieces while playing.
|-
|-
| The next piece shown in the window is the next piece given. || <span style="color:green">pass</span>
| Starting level can be changed within bounds. || <span style="color:green">pass. It is not intuitive that it can be changed though.</span>
|-
|-
| A random piece appears in the next piece window for each new piece. || <span style="color:green">pass</span>
| Enter starts the game. || <span style="color:red">pass. However, so does almost every other key, making it pointless.</span>
|-
| Level selected is the level shown. || <span style="color:green">pass</span>
|-
|-
|colspan="2"| '''Piece movement''': movement and rotation of pieces while playing.
|colspan="2"| '''Piece movement''': movement and rotation of pieces while playing.
Line 50: Line 55:
|-
|-
| Piece falls at a set rate depending on the current level. || <span style="color:green">pass</span>
| Piece falls at a set rate depending on the current level. || <span style="color:green">pass</span>
|-
| Piece drops instantly and correctly when drop key pressed. || <span style="color:green">pass</span>
|-
|-
|colspan="2"| '''Piece landing''': movement and rotation of piece just as it lands.
|colspan="2"| '''Piece landing''': movement and rotation of piece just as it lands.
Line 57: Line 64:
| Points are awarded once piece has settled. || <span style="color:green">pass</span>
| Points are awarded once piece has settled. || <span style="color:green">pass</span>
|-
|-
| Piece cannot be placed outside well. || <span style="color:red">fail: As piece spawns above well, it can be placed above well.</span>
| Piece cannot be placed outside well. || <span style="color:red">fail: As piece spawns above well, it can be placed above well</span>
|-
| The next piece shown in the window is the next piece given. || <span style="color:green">pass</span>
|-
| A random piece appears in the next piece window for each new piece. || <span style="color:green">pass</span>
|-
|-
|colspan="2"| '''Line completion''': complete and remove a line/s.
|colspan="2"| '''Line completion''': complete and remove a line/s.
Line 69: Line 80:
|colspan="2"| '''Level increase''': level increases once points/lines reach a certain point.
|colspan="2"| '''Level increase''': level increases once points/lines reach a certain point.
|-
|-
| Level increases when points/lines reach a certain point. || <span style="color:green">pass: Unsure of that point however</span>
| Level increases when lines reach a certain interval. || <span style="color:green">pass</span>
|-
|-
|colspan="2"| '''Game over''': end of game.
|colspan="2"| '''Game over''': end of game.
|-
|-
| The game ends when a new piece spawns on an existing block. || <span style="color:green">pass</span>
| The game ends when a new piece spawns on an existing block. || <span style="color:green">pass</span>
|-
| The game ends when a new piece lands outside the well. || <span style="color:red">fail: Pieces can successfully land outside the top of the well without game over.</span>
|-
| When prompted, it is clear which key is yes or no. || <span style="color:red">fail. It isn't clear which key is 'yes' or 'no'</span>
|-
| When prompted, game can be played again using the appropriate key. || <span style="color:red">pass. I don't know what key 'x' or 'o' is, but almost any key on the keyboard starts again.</span>
|-
| When prompted, game can not be played again using the appropriate key. || <span style="color:red">fail. I don't know what key 'x' or 'o' is, but almost any key on the keyboard starts again.</span>
|-
| If played again, game returns to a new game screen. || <span style="color:green">pass</span>
|}
|}


== Opening the activity ==
== Opening the activity ==
Justification: [[HIG]]. The application behaves correctly while opening and conforms to Human Interface Guidelines.
Justification: [[HIG]]


Actions:
Actions:
Line 89: Line 110:


==Close the activity==
==Close the activity==
Justification: [[HIG]]. The application behaves correctly while closing and conforms to Human Interface Guidelines.
Justification: [[HIG]]


Actions:
Actions:
# click the X button in the top right corner.
# click the X button in the top right corner.
# you can use as well the shortcuts (ctrl+q) or (ctrl+esc) to quit the activity


Verify:
Verify:
* that clicking the X button (or using keyboard shortcuts) closes the Block Party activity.
* that clicking the X button closes the Block Party activity.
* that the Block Party icon disappears from the activity doughnut.

Actions:
# use keyboard shortcuts (ctrl+q, ctrl_esc) to close the activity.


Verify:
* that using the appropriate keyboard shortcut closes the Block Party activity.
* that the Block Party icon disappears from the activity doughnut.
* that the Block Party icon disappears from the activity doughnut.


== Journal functionality ==
== Journal functionality ==
Justification: [[HIG]]. The application interacts correctly with the journal and conforms to Human Interface Guidelines.
Justification: [[HIG]]


Actions:
Actions:
Line 107: Line 135:
Verify:
Verify:
* A journal entry for the previous activity session appears.
* A journal entry for the previous activity session appears.

* Clicking on the journal entry restores the activity to an appropriate state.
Actions:
# click on the journal entry.

Verify:
* The activity is restored to an appropriate state.


==Black and white functionality==
==Black and white functionality==
Justification: [[HIG]]
Justification: [[HIG]]. The application can be viewed in both colour and black and white modes.


Actions:
Actions:
# set the screen to black and white mode.
# set the screen to black and white mode.

Verify:
* The game can still be viewed and played.

Actions:
# set the screen to colour mode.


Verify:
Verify:
Line 119: Line 158:


==New game==
==New game==
Justification: Testing the initial state of a state transition diagram for Block Party. Checking that all variables are initialised correctly, pieces set-up correctly, and the game is ready to be played. Testing for randomness can only be done speculatively, so the results are only based on what is observed as random.
Justification:


Actions:
Actions:
Line 127: Line 166:
* Points equal 0.
* Points equal 0.
* Lines equal 0.
* Lines equal 0.
* Level equals 1.
* Level equals 5.
* A random piece is spawned at the top of the well.
* A random piece is spawned at the top of the well.
* A random piece is generated in the next piece window.
* A random piece is generated in the next piece window.
* The game is paused.


Actions:
==Piece generation==
# change starting level using arrow keys
Justification:

Verify:
* Minimum level is 0.
* Maximum level is 9.


Actions:
Actions:
# press enter to start game.
# drop piece.


Verify:
Verify:
* Enter starts the game.
* When the piece is dropped, the next piece spawned is the one from the next piece window.
* A random piece is generated in the next piece window.
* Level selected is the level shown once game begins.


==Piece movement==
==Piece movement==
Justification: Testing that all aspects of movement and rotation (user controlled) have been checked.
Justification:

Actions:
# start a new game.

Verify:
* Tetromino falls at a set rate depending on the level of speed, regardless of actions taken, until it cannot fall anymore.


Actions:
Actions:
# move the piece left and right using the arrow keys or arrow pad.
# move the piece left and right using the arrow keys or arrow pad.
# rotate the piece using the up arrow or up pad direction.
# drop the piece using the space key or down pad direction.


Verify:
Verify:
* Tetromino moves accordingly to the key pressed if it can.
* Tetromino moves accordingly to the key pressed if it can.
* Tetromino doesn't move through existing blocks or walls/floor.

Actions:
# rotate the piece using the up arrow or up pad direction.

Verify:
* Tetromino rotates in the same direction whenever rotated if it can.
* Tetromino rotates in the same direction whenever rotated if it can.
* O-piece tetromino doesn't rotate at all.
* O-piece tetromino doesn't rotate at all.
* Tetromino doesn't move/rotate through existing blocks or walls/floor.
* Tetromino doesn't rotate through existing blocks or walls/floor.

* Tetromino falls at a set rate depending on the level of speed, regardless of actions taken, until it cannot fall anymore.
Actions:
# drop the piece using the space key or down pad direction.

Verify:
* Tetromino instantly drops to lowest position directly under it without passing through existing blocks.


==Piece landing==
==Piece landing==
Justification: Testing the behaviour just before, during and after a piece has landed, regardless of whether a line was completed or not. These tests test all boundaries of the partitions between the old piece and the new piece, except for line completion, which is a special case and is tested in Line completion.
Justification:


Actions:
Actions:
# drop the piece or let it fall to the ground.
# move the piece left or right if it can when the piece is resting on a block or floor.
# move the piece left or right if it can when the piece is resting on a block or floor.
# rotate the piece if it can when the piece is resting on a block or floor.
# rotate the piece if it can when the piece is resting on a block or floor.
Line 167: Line 227:
* Points are awarded once the piece is fixed based on how long the piece has been falling.
* Points are awarded once the piece is fixed based on how long the piece has been falling.
* Piece cannot be placed outside well.
* Piece cannot be placed outside well.
* After the piece is dropped, the next piece spawned is the one from the next piece window.
* After the next piece has spawned, a random piece is generated in the next piece window.


==Line completion==
==Line completion==
Justification: When a piece is landed so that it completes a line/s, the correct behaviour is observed. This is a special case that occurs when a piece lands.
Justification:


Actions:
Actions:
Line 181: Line 243:


==Level increasing==
==Level increasing==
Justification: The game must get harder as more points/lines are scored. This boundary appears to be based on number of lines completed. The level only goes up when lines are greater than or equal to (level + 1) * 5. The lines can only go up when a piece has landed, thus this is a special case for Piece landing.
Justification:


Actions:
Actions:
# score the points/lines required for the next level.
# score the lines required for the next level.


Verify:
Verify:
* The level increases once the points/lines reach that point.
* The (integer) level increases when lines are greater than or equal to (level + 1) * 5.


==Game over==
==Game over==
Justification: The game ends when a game over condition is met and the behaviour afterwards allows the user to choose to play again (reset to the first state in a state transition diagram) or not (close the application). Also, the options are clear to the user by [[HIG]].
Justification:


Actions:
Actions:
# fill the well with blocks, so a new piece spawned collides with existing blocks.
# fill the well with blocks, so a new piece spawned collides with existing blocks or the new piece is outside the well.


Verify:
Verify:
* If the newly spawned piece collides with existing blocks, then the game is over.
* If the newly spawned piece collides with existing blocks, then the game is over.
* If the newly spawned piece lands outside the well (from the top), then the game is over.
* If game over, the play again prompt screen appears.

Actions:
# select to play again using the appropriate key.

Verify:
* The options are clearly divided between yes and no.
* The 'yes' key plays again.
* The 'no' key quits the application.


[[category:tests]]
[[category:tests]]
[[Category:Test results]]

Latest revision as of 05:28, 17 November 2008

Merge-arrows.gif
It has been suggested that this article or section be merged with Tests/Activity/Block Party. (Discuss)


Block Party Tests

Test results from March 2008

Action Result
Opening the activity: click on the activity icon.
The icon appears in the activity donut, and pulses during activity startup. pass
The activity opens properly. pass
Closing the activity: click the X in the upper-right-hand corner of the activity.
The activity closes properly. fail: No X icon on screen
The icon disappears from the activity donut. pass
Journal functionality: open the journal activity.
A journal entry for the previous activity session appears. pass
Clicking on the journal entry restores the activity to an appropriate state. pass
Black and white functionality: set the screen to black and white mode.
The game is still easily viewable and playable. fail: O-pieces are hard to see
New game: initialisation tests.
Points, lines and level are initialised properly. pass
A random piece is at the top of the well. fail: Some spawn above the well, the I-piece 1 below the top
A random piece is in the next piece window. pass
Game is paused. pass
Starting level can be changed within bounds. pass. It is not intuitive that it can be changed though.
Enter starts the game. pass. However, so does almost every other key, making it pointless.
Level selected is the level shown. pass
Piece movement: movement and rotation of pieces while playing.
Pieces can be moved left and right using arrow keys/pad (assuming no collisions). pass
Pieces can be rotated using up arrow key/pad (assuming no collisions). pass
Piece doesn't move/rotate through solid objects. pass
Piece falls at a set rate depending on the current level. pass
Piece drops instantly and correctly when drop key pressed. pass
Piece landing: movement and rotation of piece just as it lands.
Piece can be moved/rotated while resting for a limited amount of time. pass
Points are awarded once piece has settled. pass
Piece cannot be placed outside well. fail: As piece spawns above well, it can be placed above well
The next piece shown in the window is the next piece given. pass
A random piece appears in the next piece window for each new piece. pass
Line completion: complete and remove a line/s.
When a line/s is completed, the completed lines disappear and blocks above shuffle down. pass
When a line/s completed, the line score increases. pass
When a line/s completed, the points increase. pass: Although, this could be a result of piece landing
Level increase: level increases once points/lines reach a certain point.
Level increases when lines reach a certain interval. pass
Game over: end of game.
The game ends when a new piece spawns on an existing block. pass
The game ends when a new piece lands outside the well. fail: Pieces can successfully land outside the top of the well without game over.
When prompted, it is clear which key is yes or no. fail. It isn't clear which key is 'yes' or 'no'
When prompted, game can be played again using the appropriate key. pass. I don't know what key 'x' or 'o' is, but almost any key on the keyboard starts again.
When prompted, game can not be played again using the appropriate key. fail. I don't know what key 'x' or 'o' is, but almost any key on the keyboard starts again.
If played again, game returns to a new game screen. pass

Opening the activity

Justification: HIG. The application behaves correctly while opening and conforms to Human Interface Guidelines.

Actions:

  1. start the Block Party activity by clicking on the corresponding icon on the taskbar.

Verify:

  • that the Block Party icon is added to the activity doughnut.
  • that the Block Party icon pulses to indicate the activity starting up.
  • that the Block Party activity starts properly.
  • that the window shows a new game screen and the game is paused.

Close the activity

Justification: HIG. The application behaves correctly while closing and conforms to Human Interface Guidelines.

Actions:

  1. click the X button in the top right corner.

Verify:

  • that clicking the X button closes the Block Party activity.
  • that the Block Party icon disappears from the activity doughnut.

Actions:

  1. use keyboard shortcuts (ctrl+q, ctrl_esc) to close the activity.


Verify:

  • that using the appropriate keyboard shortcut closes the Block Party activity.
  • that the Block Party icon disappears from the activity doughnut.

Journal functionality

Justification: HIG. The application interacts correctly with the journal and conforms to Human Interface Guidelines.

Actions:

  1. open the journal activity.

Verify:

  • A journal entry for the previous activity session appears.

Actions:

  1. click on the journal entry.

Verify:

  • The activity is restored to an appropriate state.

Black and white functionality

Justification: HIG. The application can be viewed in both colour and black and white modes.

Actions:

  1. set the screen to black and white mode.

Verify:

  • The game can still be viewed and played.

Actions:

  1. set the screen to colour mode.

Verify:

  • The game can still be viewed and played.

New game

Justification: Testing the initial state of a state transition diagram for Block Party. Checking that all variables are initialised correctly, pieces set-up correctly, and the game is ready to be played. Testing for randomness can only be done speculatively, so the results are only based on what is observed as random.

Actions:

  1. start a new game

Verify:

  • Points equal 0.
  • Lines equal 0.
  • Level equals 5.
  • A random piece is spawned at the top of the well.
  • A random piece is generated in the next piece window.
  • The game is paused.

Actions:

  1. change starting level using arrow keys

Verify:

  • Minimum level is 0.
  • Maximum level is 9.

Actions:

  1. press enter to start game.

Verify:

  • Enter starts the game.
  • Level selected is the level shown once game begins.

Piece movement

Justification: Testing that all aspects of movement and rotation (user controlled) have been checked.

Actions:

  1. start a new game.

Verify:

  • Tetromino falls at a set rate depending on the level of speed, regardless of actions taken, until it cannot fall anymore.

Actions:

  1. move the piece left and right using the arrow keys or arrow pad.

Verify:

  • Tetromino moves accordingly to the key pressed if it can.
  • Tetromino doesn't move through existing blocks or walls/floor.

Actions:

  1. rotate the piece using the up arrow or up pad direction.

Verify:

  • Tetromino rotates in the same direction whenever rotated if it can.
  • O-piece tetromino doesn't rotate at all.
  • Tetromino doesn't rotate through existing blocks or walls/floor.

Actions:

  1. drop the piece using the space key or down pad direction.

Verify:

  • Tetromino instantly drops to lowest position directly under it without passing through existing blocks.

Piece landing

Justification: Testing the behaviour just before, during and after a piece has landed, regardless of whether a line was completed or not. These tests test all boundaries of the partitions between the old piece and the new piece, except for line completion, which is a special case and is tested in Line completion.

Actions:

  1. drop the piece or let it fall to the ground.
  2. move the piece left or right if it can when the piece is resting on a block or floor.
  3. rotate the piece if it can when the piece is resting on a block or floor.

Verify:

  • Piece can still be moved/rotated for a specific amount of time depending on the level if it can.
  • Points are awarded once the piece is fixed based on how long the piece has been falling.
  • Piece cannot be placed outside well.
  • After the piece is dropped, the next piece spawned is the one from the next piece window.
  • After the next piece has spawned, a random piece is generated in the next piece window.

Line completion

Justification: When a piece is landed so that it completes a line/s, the correct behaviour is observed. This is a special case that occurs when a piece lands.

Actions:

  1. place a piece so that it completely fills a line/s horizontally.

Verify:

  • The line/s disappear.
  • All blocks above the line/s are shuffled down.
  • The line/s score increments by the number completed.
  • Points are awarded for the piece.

Level increasing

Justification: The game must get harder as more points/lines are scored. This boundary appears to be based on number of lines completed. The level only goes up when lines are greater than or equal to (level + 1) * 5. The lines can only go up when a piece has landed, thus this is a special case for Piece landing.

Actions:

  1. score the lines required for the next level.

Verify:

  • The (integer) level increases when lines are greater than or equal to (level + 1) * 5.

Game over

Justification: The game ends when a game over condition is met and the behaviour afterwards allows the user to choose to play again (reset to the first state in a state transition diagram) or not (close the application). Also, the options are clear to the user by HIG.

Actions:

  1. fill the well with blocks, so a new piece spawned collides with existing blocks or the new piece is outside the well.

Verify:

  • If the newly spawned piece collides with existing blocks, then the game is over.
  • If the newly spawned piece lands outside the well (from the top), then the game is over.
  • If game over, the play again prompt screen appears.

Actions:

  1. select to play again using the appropriate key.

Verify:

  • The options are clearly divided between yes and no.
  • The 'yes' key plays again.
  • The 'no' key quits the application.