COMP3311 23T1 Assignment 2
Testing Your Work
Database Systems
Last updated: Tuesday 4th April 8:54pm
Most recent changes are shown in red ... older changes are shown in brown.

[Assignment Spec]  [Database Design]  [Examples]  [Testing]  [Submitting]  [Fixes+Updates]


Introduction

This document contains details of how you can/we will test your scripts.




A Note on Disk Quota

autotest will create new database for testing.

In order to do this you must have enough disk quota to create a new database.

You will likely need to delete some of your old databases to free up space.

Eg, your ass1 database, and any databases from Prac activities.

You should have enough space to create have a separate ass2 database for manual testing.

Testing Your Work

A set of automated tests (based off of the examples provided) are available for you to run.

To run the automated tests

... login to vxdb2, source env, run your server as usual ...
vxdb2$ source /localstorage/$USER/env
vxdb2$ p1
... cd into the directory containing your ass2 python scripts ...
vxdb2$ cd /my/dir/for/ass2
... Run the autotests ...
vxdb2$ 3311 autotest ass2

Your helpers.sql file must load into a clean database without errors for autotest to run

Once you have completed all Views and Functions you should see something similar to the following

vxdb2$ 3311 autotest ass2
Ran 36 tests | 36 tests passed | 0 tests failed: 100%|████████████████████████████████████████████████████████████████████| 36/36 [00:11<00:00,  3.07 test/s]
Test My_Pokemon_1 (./my_pokemon 11243 << 1 1 1 1 1 1 1) - passed
Test My_Pokemon_2 (./my_pokemon 11243 << 7 3 2 5 2 5 2) - passed
Test My_Pokemon_3 (./my_pokemon 2252 << 4 7 3 10 5 2 4) - passed
Test My_Pokemon_4 (./my_pokemon 17 << 4 5 12 9 3 7) - passed
Test My_Pokemon_5 (./my_pokemon 3 << 4 7 2 1) - passed
Test Possible_Evolutions_1 ('./possible_evolutions Dreepy') - passed
Test Possible_Evolutions_2 ('./possible_evolutions Monferno') - passed
Test Possible_Evolutions_3 ('./possible_evolutions Quilava') - passed
Test Possible_Evolutions_4 ('./possible_evolutions Eevee') - passed
Test Possible_Evolutions_5 ('./possible_evolutions Nincada') - passed
Test Possible_Evolutions_6 ('./possible_evolutions Ursaluna') - passed
Test Possible_Evolutions_7 ('./possible_evolutions Porygon2') - passed
Test Possible_Evolutions_8 ("./possible_evolutions 'Basculin - White-Striped Form'") - passed
Test Possible_Evolutions_Error_1 ('./possible_evolutions Fluffluff') - passed
Test Pokemon_Density_1 ('./pokemon_density Kanto') - passed
Test Pokemon_Density_2 ('./pokemon_density Galar') - passed
Test Pokemon_Density_3 ('./pokemon_density Sinnoh') - passed
Test Pokemon_Density_Error_1 ('./pokemon_density Aurorania') - passed
Test Encounter_Summary_1 ('./encounter_summary "Route 201" "Diamond"') - passed
Test Encounter_Summary_2 ('./encounter_summary "Route 1" "Red"') - passed
Test Encounter_Summary_3 ('./encounter_summary "Route 22" "Fire Red"') - passed
Test Encounter_Summary_4 ('./encounter_summary "Slateport City" "Omega Ruby"') - passed
Test Encounter_Summary_5 ('./encounter_summary "Tunnel to the Top" "The Crown Tundra"') - passed
Test Encounter_Summary_6 ('./encounter_summary "Kala\'e Bay" "Ultra Sun"') - passed
Test Attack_Damage_1 ("./attack_damage 'Bulbasaur' 'Squirtle' 'Fire Red'") - passed
Test Attack_Damage_2 ("./attack_damage 'Pikachu' 'Tentacruel' 'Yellow'") - passed
Test Attack_Damage_3 ("./attack_damage 'Pikachu' 'Klinklang' 'Shield'") - passed
Test Attack_Damage_4 ("./attack_damage 'Palkia' 'Overqwil' 'Legends: Arceus'") - passed
Test Attack_Damage_5 ("./attack_damage 'Dragapult' 'Riolu' 'Violet'") - passed
Test Attack_Damage_6 ("./attack_damage 'Goodra' 'Comfey' 'Sun'") - passed
Test Attack_Damage_7 ("./attack_damage 'Hisuian Avalugg' 'Gliscor' 'Legends: Arceus'") - passed
Test Attack_Damage_8 ("./attack_damage 'Darmanitan - Galarian Zen Mode' 'Darmanitan - Galarian Standard Mode' 'Black 2'") - passed
Test Attack_Damage_Error_1 ("./attack_damage 'Grumpig'  'Grumpig'   'Glass'") - passed
Test Attack_Damage_Error_2 ("./attack_damage 'Aipom'    'Fluffluff' 'Heart Gold'") - passed
Test Attack_Damage_Error_3 ("./attack_damage 'Cacturne' 'Grumpig'   'Red'") - passed
Test Attack_Damage_Error_4 ("./attack_damage 'Smeargle' 'Passimian' 'Ultra Moon'") - passed
36 tests passed 0 tests failed

You can run tests for a specific question by adding the script name to the end of the autotest command

vxdb2$ 3311 autotest ass2 Possible_Evolutions
Ran 9 tests | 9 tests passed | 0 tests failed: 100%|████████████████████████████████████████████████████████████████████████| 9/9 [00:03<00:00,  2.59 test/s]
Test Possible_Evolutions_1 ('./possible_evolutions Dreepy') - passed
Test Possible_Evolutions_2 ('./possible_evolutions Monferno') - passed
Test Possible_Evolutions_3 ('./possible_evolutions Quilava') - passed
Test Possible_Evolutions_4 ('./possible_evolutions Eevee') - passed
Test Possible_Evolutions_5 ('./possible_evolutions Nincada') - passed
Test Possible_Evolutions_6 ('./possible_evolutions Ursaluna') - passed
Test Possible_Evolutions_7 ('./possible_evolutions Porygon2') - passed
Test Possible_Evolutions_8 ("./possible_evolutions 'Basculin - White-Striped Form'") - passed
Test Possible_Evolutions_Error_1 ('./possible_evolutions Fluffluff') - passed
9 tests passed 0 tests failed

Any test that doesn't pass will show the difference between the expected output and your output