nathanueda / Lab8_Starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lab 8 - Starter

Lab Partners

  1. Aung Kyaw
  2. Nathan Ueda

Questions

  1. Where would you fit your automated tests in your Recipe project development pipeline? Select one of the following and explain why.
    Option 1: Within a Github action that runs whenever code is pushed. Relying on manually running them locally is bad practice and not part of an efficient workflow. How can we be sure a person remembered to run them locally? Also, we want to make sure we are running tests very often and in an incremental fashion, which isn't done if we run them all after all development is completed. This leaveas the only viable option of running the tests within a github action. Others can see the tests that have been run and they will be done in an incremental fashion since they are ran with each github action.

  2. Would you use an end to end test to check if a function is returning the correct output? (yes/no)
    No. An end to end test is not used for individual functions and rather used for testing the larger parts of the overall application.

  3. Would you use a unit test to test the “message” feature of a messaging application? Why or why not? For this question, assume the “message” feature allows a user to write and send a message to another user.
    In this case, a a unit test would not be the best option. More fitting would be an end to end test. The reason a unit test may not be best in this situation is because is meant more for specific features (i.e. a specific function) and the breadth of testing for the "message" feature as mentioned would, in good practice, span more than one function making an end to end test more fitting.

  4. Would you use a unit test to test the “max message length” feature of a messaging application? Why or why not? For this question, assume the “max message length” feature prevents the user from typing more than 80 characters.
    Yes. This is precisely the use case of a unit test, to test the functionality of an small, individual unit (in this case a unit of the overall "message" feature) of a much larger part of the application. This "max length" feature is simple and likely to be encapsulated within its own unit.

About


Languages

Language:JavaScript 84.3%Language:CSS 9.1%Language:HTML 6.6%