cs-utulsa / Encrypted-Chat-Service

This is the major project for the year long senior software class. The focus on this repository is to create a encrypted chat service, which can be used for secure communication. It will include not only peer to peer chat services, but also file transfer and group chats.
5 stars 1 forks source link

Testing: Unit Testing for Sprint 6 #80

Closed tuckplace closed 1 year ago

tuckplace commented 1 year ago

Goal of this story is to complete our sprint specific assignment. Each of us need to complete 3 unit tests. This is required as part of this sprint by the class.

Each unit test can be small or large. Just pick a small segment of code and ensure it works as intended for each unit test. The integration test also simply needs to ensure different parts work properly together. This could be between two methods or classes. Once you have completed your tests, add writeups of each in a comment on this issue.

dawsonjones2020 commented 1 year ago

Test 1 - Tested the set_config() function to make sure the config.txt file was being read and applied properly to the app. Test 2 - Tested the save_config() function to make sure the settings window inputs could properly save configurations to the config.txt file. Test 3 - Tested the get_prof_pic() function to make sure the profile pictures were correctly being saved to the config file and used in future executions of the app

EWFranks commented 1 year ago

Test 1 - Stress tested connecting to the server. Set up a script to connect and disconnect multiple users at once. The purpose was to see that multiple user can connect to the server. The code was automated to take in a mass amount of clients and see that they would successfully connect to a server. This was done locally.

Test 2 - Stress tested connecting to the client. Set up a script to connect and disconnect multiple users at once. The purpose of stress testing the client is to make sure that errors arise in starting the client up that would inherently cause later problems. The code was automated to start us a mass amount of clients and individually went in and made sure these started without problems.

Test 3 - Stress test starting up in GUI mode. Set up a script to run GUI mode in simultaneously having a preset string being entered. The purpose was to see if multiple users typing on the GUI at once would break it in mass amounts. The code was automated to have multiple user connect via the GUI.

Integration Test - Stress tested switch from Console and GUI mode and the other way. The purpose of this was to just make sure that we can seamlessly go back in forth between console and GUI for testing. The code was automated to start a server and switch between console and GUI mode on a large number scale of servers.

mypleasure370 commented 1 year ago

Test 1: Tested change_theme() to make sure that the theme of the application changes Test 2: Tested get_prof_pic() to make sure it retrieves a photo corrrectly Test 3: Tested sendFileMessage() to make sure files send properly

Will post details later

piangno commented 1 year ago

Test 1: Tested putInTextBox() method to make sure the emoji is shown in the text box before the user send the emoji Test 2: Tested how difficult it is to add an emoji to the current list of emojis in the menu. It is a matter of finding out the emoji's Unicode and add that Unicode to an array of string called allEmoji. It is just as simple as finding out the emoji name and add it to the emoji list. Test 3: Tested addEmoji() this method handled all the functionality of emojis. From creating the display for the emoji menu to displaying the emoji in the text bar. Tested if an emoji can be selected, they are displayed correctly in the menu and sent across users.

JR1178 commented 1 year ago

Test 1: regular expression for finding emoji codes. The purpose of this test is to ensure that the RegEx detects all of the emoji codes it needs to. Script tested the expression for all forms of the codes defined in the architecture, similar but wrong codes, and strings with other words along with the codes.

Test 2: getPos() method & utilization in GUI. The purpose of this test was to ensure that the getPos() method was returning correct and usable coordinates of the cursor while on the GUI window, and if the move() method was receiving these coordinates along with the event coordinates of where the cursor clicked the title bar. This test ensured the solving of the behavior of the cursor moving to the top left corner of the window every time the GUI window was moved around the screen.

Test 3: move() method & it's event values. The purpose of this test was to ensure that it was using the event values correctly, and that it was getting values from getPos() method. Inputs for this test were given values of rough areas of the GUI, like left corner, center, or right corner.