Testing Rubik's Cube
1. Cube.
1.1. Scrambles and unscrambles cube in a loop.
Should fly around the cube (celebrate mode), then shuffle, then solve in 5 minutes,
then celebrate again.
1.2. Allows to change window size, preserving cube proportions.
1. Run cube.
2. Increase window width.
3. Window width should become bigger, but cube size should remain the same.
4. Increase window height.
5. Window height should become bigger and cube size should become bigger, preserving proportions.
6. Maximize window.
7. Window should become maximized and cube size should become maximal, preserving proportions.
8. Minimize and then restore window.
9. Cube should continue to work as usual.
1.3.1. Allows to observe in pause, shuffle, solve and stop states.
1. Pressing left and right keys during pause after celebrate and before shuffle should change POV.
2. Pressing up and down keys during shuffle should change POV.
But only up to the limit (less then 60 degrees from horizontal plane).
3. Pressing + and - keys during solve should change cube size.
But only up to the limit (cube shouldn't intersect screen plane and shouldn't get out of sight).
4. Pressing right key during stop (after s) should allow
full 360 degrees rotation around cube.
1.3.2. Doesn't allow to observe in celebrate state.
Pressing left, right, up, down, + and - keys during celebrate should not have any effects.
1.4.1. F5 switches fullscreen mode.
Run cube.
Press F5, view should go to fullscreen.
Press F5, view should go to window mode.
Press F5, view should go to fullscreen.
1.4.2. Correctly handles maximized window switching to fullscreen.
Run cube.
Maximize window.
Press F5.
View should go to fullscreen.
Press F5.
Main window should be fine in normal (not maximized) state.
1.5.1. Shows About dialog on F1 key.
Pressing F1 during celebrate should give About dialog with cube icon, version, my name and my homepage link.
Clicking on homepage link should open it in new internet browser window.
1.5.2. Supports call for About dialog from fullscreen.
Run cube.
Switch to fullscreen.
Call About dialog.
View should switch to window mode and About dialog should appear in front of it.
1.6.1. w switches wireframe mode.
Run cube.
Press w.
Cube should become wireframe.
Press w.
Cube should become solid.
1.6.2. Preserves wireframe mode switching to fullscreen.
Run cube.
Switch to wireframe.
Switch to fullscreen.
Cube should remain wireframe.
Switch to window mode.
Cube should remain wireframe.
1.6.3. Preserves wireframe mode changing window size.
Run cube.
Switch to wireframe.
Change window size.
Cube should remain wireframe.
1.6.4. Wireframe mode is immediately updated.
Run cube.
Stop demo.
Press w.
Cube should become wireframe.
1.7. Esc closes app.
Run cube.
Press Esc.
App should close.
1.8. Allows some configuration via settings.config on next cube run.
1. Change of Window width to 100, should be visible.
2. Change of Window height to 100, should be visible.
3. Change of Shuffle count to 1, should be visible.
4. Change of Shuffle count to 0, should "eliminate" shuffle and solve.
5. Change of Start in fullscreen to True, should be visible.
6. Change of Software rendering to True, should slow rendering down and disable anti-aliasing.
7. Change of Black background to True, should make background black and brick base color a little brighter than background.
1.9. s stops demo loop.
1. Pressing s during celebrate should stop it immediately.
2. Pressing s during pause after celebrate should prevent further processing
(wait 10 seconds to see that nothing is happening).
3. Pressing s during shuffle should finish current move and stop.
4. Pressing s during solve should finish current move and stop.
1.10.1. Numpad keys 1-9 (with NumLock turned on) allow to rotate cube side by side in stop state.
Stop demo. Now keys 1-9 should rotate different cube planes for 90 degrees.
1.10.2. Numpad keys do not work while demo loop is active.
Pressing 1 during celebrate shouldn't change cube.
1.11.1. Keys F2 and F3 allow to save and load cube position in stop state.
Stop demo. Press 7 on Numpad. Press F2 and save cube.
Close and run cube app again.
Stop demo. Press F3 and load previously saved cube.
Cube should be in a state with lower plane rotated from right to left on 90 degrees.
1.11.2. Keys F2 and F3 don't work while demo loop is active.
Pressing F2 and F3 during celebrate shouldn't have any effect.
1.11.3. Supports call for cube save dialog from fullscreen.
Run cube.
Switch to fullscreen.
Stop demo.
Call save dialog.
View should switch to window mode and save dialog should appear in front of it.
1.12.1. Updates Rubik's Cube performance counters, if installed.
1. During celebrate should maintain Avg FPS equal to monitor vertical refresh rate
(or less, if computer is not fast enough). Min FPS should be lower and Max FPS - upper than Avg FPS.
Running demo with window maximized should lower all counters.
2. In stop state, pressing right key continuously should maintain near 30 Avg FPS
(or less, if your keyboard rate is not set to maximum).
1.12.2. Works fine if performance counters are not installed.
If performance counters are not installed, should celebrate at start as usual.
1.13.1. Indicates missed assemblies in main thread.
Remove cube resources.dll.
Run cube.
Should display message "cube resources not found" and terminate.
1.13.2. Inidcates missing libcube.dll.
Remove libcube.dll.
Run cube.
Should display message "libcube.dll not found" and terminate.
1.13.3. Indicates not installed Managed DirectX.
Remove %WINDIR%\assembly\GAC\Microsoft.DirectX\1.0.900.0__31bf3856ad364e35\Microsoft.DirectX.dll.
Run cube.
Should display message "Microsoft.DirectX not found" and terminate.
1.13.4. Indicates missed cube solver.dll.
Remove cube solver.dll.
Run cube and wait untill shuffle ends.
Should display message "cube solver not found".
1.13.5. Indicates missed amzi.dll.
Remove amzi.dll.
Run cube and wait untill shuffle ends.
Should display message "amzi.dll not found".
1.13.6. Indicates missed rubik.xpl.
Remove rubik.xpl.
Run cube and wait untill shuffle ends.
Should display message "rubik.xpl not found".
1.13.7. Demo loop errors are visible when app in fullscreen mode.
Change Start in fullscreen to True.
Change Shuffle count to 3.
Remove rubik.xpl.
Run cube and wait untill shuffle ends.
Should switch to window mode and display message "rubik.xpl not found".
1.14. Continues to work even when cube solver is not available.
Remove rubik.xpl.
Run cube and wait untill shuffle ends.
Should display message "rubik.xpl not found".
Demo loop should stop.
Pressing left key should rotate cube.
Pressing Numpad 7 should rotate cube side.
Pressing F2 should invoke cube save dialog.
1.15. Shuffle is random.
Change Shuffle count to 3.
Run cube and wait untill shuffle ends.
Memorize cube position.
Close cube and run again.
Wait untill shuffle ends.
Current scene should be different from memorized.
1.16. Cube processing speed doesn't depend on monitor refresh rate.
Set monitor refresh rate to 60 Hz.
Run cube.
Celebrate should finish in 10 seconds, solve rotations should run for a second for single (90 degrees) move,
shuffle rotations should run faster than solve rotations.
Close cube and repeat with refresh rate 120 Hz.
1.17. Celebrate flies all around the cube.
Set Shuffle count to 0.
Run cube.
Celebrate should fly around the cube in horizontal plane 2 times before pause.
Celebrate should change vertical POV to position down the cube and then up again before pause.
Celebrate should return POV to original at the end of its step.
During pause change POV to position down the cube (using down arrow key).
Celebrate should change vertical POV to position up the cube and then down again before pause.
Celebrate should return POV to original (down) position at the end of its step.
1.18. Inidcates unsupported video system.
Run cube under VMware.
Should display message "video system doesn't support 3D rendering".
1.19.1. Supports switch to other application from fullscreen when demo is running.
Run cube.
Switch to fullscreen.
Press winkey.
Cube view should disappear and window start menu should become active.
Switch back to cube.
Cube view should appear in full screen normally functioning.
1.19.2. Supports switch to other application from fullscreen when demo is stopped.
Run cube.
Switch to fullscreen.
Stop demo.
Switch to other application using Alt+Tab.
Cube view should disappear and other application should become active.
Switch back to cube.
Cube view should appear in full screen showing stopped position.
1.20.1. Supports resolution change when demo is running.
Run cube.
Change global windows screen resolution.
Cube should continue to work as usual.
1.20.2. Supports resolution change when demo is stopped.
Run cube.
Stop demo.
Change global windows screen resolution.
Cube should display last position.
Press right key.
POV should move a little.
2. Cube performance counter.
2.1. Creates and removes performance counters under Admin account and Full trust permission set.
1. First run should display "Rubik's Cube performance counters successfully created". Then
counters Min FPS, Max FPS and Avg FPS should be accessible in Perfmon.
2. Second run should display "Rubik's Cube performance counters successfully removed". Then
these counters should not be accessible in Perfmon anymore.
2.2. Indicates Full trust requirements.
Running permview.exe on this exe should show minimal requirements as unrestricted.
2.3. Fails under User, not Admin account.
1. If performance counters are installed, should display "Delete of Rubik's Cube counters failed: Access is denied". Then
these counters still should be accessible in Perfmon.
2. If performance counters are not installed, should display
"Creation of Rubik's Cube counters failed: Requested registry access is not allowed". Then
these counters still should not be accessible in Perfmon.
2.4. Fails under Everything, not Full trust permission set.
Should throw PolicyException immediately.
Copyright (C) 2003 Sergey Vlasov