MVCF: Testing - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki
Tests for MVCF
In order to avoid breaking people's games, we will start testing MVCF before every release. Eventually this process will hopefully be automated, but for now it is manual. Each test has series of steps and an expected result, and fails if that result does not happen, or if an error is printed. All these test should be done with VEF and a mod that enables MVCF features, like Alpha Animals, VAE - Accessories, or Combat Bionics. Some tests require a specific mod or mods. Many of these tests can be done at once, but the steps are from starting the game each time, for completeness.
Vanilla
These test if vanilla functions still work, and are the most important.
Gun Equip
Steps
- Generate map, crashlanding (use Dev Quicktest)
- Draft colonist
- Equip colonist with the rifle
- Attempt to fire at something
Expected Result
The gun fires a bullet.
Gun Unequip
Steps
- Generate map, crashlanding (use Dev Quicktest)
- Draft colonist
- Equip colonist with the rifle
- Unequip the rifle
- Spawn an enemy
Expected Result
Colonist does not fire at the enemy with a gun they don't have.
Automatic Target Finding
Steps
- Generate map, crashlanding (use Dev Quicktest)
- Draft colonist
- Equip colonist with the rifle
- Unequip the rifle
- Spawn an enemy
Expected Result
The colonist shoots the enemy.
Hunting
Steps
- Generate map, crashlanding (use Dev Quicktest)
- Equip colonist with the rifle
- Set colonist to do Hunting work
- Designate an animal to hunt
Expected Result
Colonist hunts animal. Also, the "Colonist lacks hunting weapon" alert should not appear.
Enemies
Steps
- Generate map (use Dev Quicktest)
- Generate an enemy raid, preferably pirates
Expected Result
The enemies shoot the colonists. If there are any rocket launchers, ensure they disappear and are not fired more than once.
Mortars
Steps
- Generate map (use Dev Quicktest)
- Generate an enemy siege
Expected Result
The mortars are built and then fired at the colonists.
Saving and Loading
Steps
- Generate map, crashlanding (use Dev Quicktest)
- Draft colonist
- Equip colonist with the rifle
- Save
- Load the save
- Fire the weapon
Expected Result
Weapon is fired.
Animals
These tests are focused on ensuring the animal features work properly. Use Race to the Rim or Alpha Animals or something to test it.
Tamed
Steps
- Generate map (use Dev Quicktest)
- Spawn an animal with a ranged attack
- Dev tame it
- Select attack training
- Dev train it
- Spawn an enemy
Expected Result
Animal shoots at the enemy.
Manhunter
Steps
- Generate map (use Dev Quicktest)
- Spawn an animal with a ranged attack
- Use dev tools to force it to be manhunter (Mental State -> Manhunter (Permanent)
Expected Result
Animal shoots at colonists with a ranged attack.
Apparel
These tests test apparel verbs, as well as independent fire and drawing. All use VAE - Accessories.
Equip
Steps
- Generate map (use Dev Quicktest)
- Spawn Mini-Turret pack
- Equip pawn with it
- Spawn an enemy
Expected Result
You can see the pack rendered on the pawn's back. The gun on the pack will shoot at the enemy.
Unequip
Steps
- Generate map (use Dev Quicktest)
- Spawn Mini-Turret pack
- Equip pawn with it
- Have them drop it
- Spawn an enemy
Expected Result
The pack disappears. The enemy is not shot at.
Reloading
This part tests the reloading features of the mod. Use Reloadable Rockets or Heavy Weapons Reloading.
Unloading
Steps
- Generate map (use Dev Quicktest)
- Spawn a reloadable weapon
- Select a pawn and right click the hit "Unload"
Expected Result
Pawn unloads weapon, spawning ammunition items.
Firing
Steps
- Generate map (use Dev Quicktest)
- Spawn a reloadable weapon
- Draft pawn
- Equip pawn with weapon
- Fire weapon
Expected Result
Weapon is fired and ammunition count goes down.
Reloading
Steps
- Generate map (use Dev Quicktest)
- Spawn a reloadable weapon
- Draft pawn
- Equip pawn with weapon
- Fire weapon, several times
- Spawn ammo
- Select pawn, hit ammo, hit "Reload"
Expected Result
Weapon is reloaded: Ammo count increases and ammo items are removed.
Automatic Reloading
Steps
- Generate map (use Dev Quicktest)
- Spawn a reloadable weapon
- Draft pawn
- Equip pawn with weapon
- Fire weapon until empty
- Spawn ammo
- Undraft pawn
Expected Result
Pawn should reload the weapon with the ammo.
Inventory Reloading
This one also requires Pick Up and Haul, or a similar mod to add stuff to inventory.
Steps
- Generate map (use Dev Quicktest)
- Spawn a reloadable weapon
- Draft pawn
- Equip pawn with weapon
- Spawn ammo
- Put ammo in pawn's inventory
- Fire weapon until empty
Expected Result
Pawn reloads weapon with ammo from their inventory.
AI
Steps
- Generate map (use Dev Quicktest)
- Disable player damage
- Spawn Mercenary Heavies until there's a bunch with rocket launchers
Expected Result
Enemies should fire rockets at colonists, then reload their launchers, then switch weapons when they run out.
Hunting
This one also requires Pick Up and Haul, or a similar mod to add stuff to inventory.
Steps
- Generate map (use Dev Quicktest)
- Spawn a reloadable weapon
- Draft pawn
- Equip pawn with weapon
- Spawn ammo
- Put ammo in pawn's inventory
- Set pawn to hunt
- Designate animals to hunt
- Undraft pawn
Expected Result
Pawn will hunt animals until out of ammo, then reload and continue hunting.
Hediffs
This section tests hediff verbs. Requires Combat Bionics.
Add
Steps
- Generate map (use Dev Quicktest)
- Add wrist minigun to pawn's hands.
- Fire it at something.
Expected Result
Minigun fires correctly.
Remove
Steps
- Generate map (use Dev Quicktest)
- Add wrist minigun to pawn's hands.
- Remove it
- Spawn an enemy
Expected Result
Enemy is not fired at.