Author: Charles Bonoan

    Project Testing



  1. Automated Test:
  2. The source code shown above runs a test where it will open 10 different browsers that will log into our application with different users. For example, the picture shown below the source code was the result of 10 different users logging into the same room. The reason why we had to use selenium (python web scraping extension), was because each browser that is created does not have cookies that will override the current in the same room. For example, if two tabs were open in the same window and both logged into our application, the most recent login will override the other user and cause an error on our server.

    The results of our test are shown above. As you can see, all the tests passed, and the way we determine a pass or fail is if the user was able to login. The code is created to check to see if a user has successfully logged in by seeing if the chatroom page has loaded. We can even see that our members list was updating and all users were able to communicate with one another.

    Another test we ran was putting multiple same named users into the same room. Although this did not cause an error, we want to implement a way to 1) make it so no two users have the same name in the same room and 2) have each messager have their own distinct color so that each user can easily see who sent which message.



  3. Cause a failure:
  4. A failure we found is that when a user disables their cookies in their browser, it causes an error because their session name is not saved as well as the session room they want to join. At first we wanted to implement a way to where we give the user a default name such as "Guest", but we found out that even when we did that, the session room was not being saved meaning the user had somehow logged into a room that does not exist. Our solution is to implement a way to have the user enable their cookies before using our application.


    Another failure we found was concerning users with their cookies enabled. Our application fails to logout a user when they close their browser, leaving that user in the members list and technically still in the room. AS with the picture above, "user" should have given a message that they were leaving the room. We count this as a failure because our members list is not updating correctly and also we do not know if the sockets are closing correctly which can cause problems.