Lab 8 - Starter

Jinya Jiang

  1. Within a Github action that runs whenever code is pushed Reason is : Whenever the code is pushed, we choose tests to see if certain code functions well and does not have any errors like syntax error. Once it is uploaded, we make sure everything works fine and does not cause any collisions or error. Additionally, if there is a problem, we can just change the code in the local machine.

  2. No, I would like to use a unit test to see the value returned. It is more like testing the function instead of the whole program. Therefore, we use unit test instead of E2E test.

  3. I would not use a unit test to test the “message” feature of a messaging application. Because it may require complex features and many other interactions from different methods.

  4. Yes, length is a simple method for a message object, we can simply call it and get the value of message length.

sum test unit test