Junit test for NPC Sprint4 - UQdeco2800/2022-studio-2 GitHub Wiki
Each file written by the NPC group is tested and satisfies the format of the test and is calculated as successfully as possible into the coverage.
Path:
The tests for sprint3 focus on these 7 sections and this time I will test the code for the other functional sections we have implemented.
1.Test that the text in the dialog box loads.
2.Test whether the text of each NPC can be corresponded to.
3.Test that the text in the dialog box is loaded correctly according to the change in value.
4.Test whether items can be added to the inventory.
5.Test to see if the correct NPC has added items to the inventory.
6.Iterate for the old NPC location test. Test if the NPC is at the new location.Whether the new NPC location is in the map.
7.Test that the dialog box buttons are in the correct position.
Sprint4 Test plan:
1.Test that each NPC has been created on the map as the correct entity type.
2.Test the proper operation of the Atlas file that manages each NPC animation to ensure that the animation effect is created.
3.Test the proper operation of the Atlas file that manages each dialog animation to ensure that the dialog and its animation effects are created.
NPC Factory Test
Initialise all required serviceLocators and set values for them.
Create a corresponding entity for each NPC and test whether they belong to the corresponding entity type at the time of creation.
Test that the animated Atlas files for all NPCs are working correctly.
Dialogue Factory Test
Initialise all required serviceLocators and set values for them.
Test that the animated Atlas file for the dialogue icons loads properly.
NPCAnimationController Test
Test run Atlas files to configure the environment for testing NPC animations.
Test the animation of each NPC.
DialogueAnimationController Test
Configuring the environment for animated testing of dialogue icons.
Test the animation of Dialogue.
GameArea Test
I tried to iterate for the previous test file of whether NPCs and dialogs were present on the map, in order to be able to comply with sonar's test rules. However, after trying to initialize all the required variables, he still reports that the value of the variable is null, and I'm not sure if this is a viable solution.
npc Test
Here I made the same attempt, but with a different test approach, in order to iterate on the previous test. But it still failed.
Display files: The functionality of these display files has been fully tested in the last sprint, even if they were not counted in the coverage.
Tests written but no coverage
- Bokai Zhang
- GitHub: hideonbush-crl
- Discord: Bkai Z(bokai)#6469