Skip to content

Latest commit

 

History

History
85 lines (41 loc) · 4.01 KB

lab-report-2-week-4.md

File metadata and controls

85 lines (41 loc) · 4.01 KB

Lab report 2

https://github.com/a3alani/markdown-parser/blob/main/MarkdownParse.java

Notes)

The following screenshot includes the failure indcuing tests inputs followed by screenshots of the test file and terminal output


Screen Shot 2022-05-02 at 11 36 55 PM


  1. First failure inducing test:

https://github.com/a3alani/markdown-parser/blob/main/test2.md

I added double brackets at the end of the link url This caused MarkdownParse.java to go in an infinite loop when running.

Screen Shot 2022-05-02 at 7 32 45 PM

Screen Shot 2022-05-02 at 6 46 11 PM


  1. Second failure inducing test:

https://github.com/a3alani/markdown-parser/blob/main/test3.md

I added curly brackets around the link url instead of parathesis. This caused MarkdownParse.java to throw an indexoutofbound exception.

Screen Shot 2022-05-02 at 7 31 43 PM

Screen Shot 2022-05-02 at 7 06 08 PM


  1. Third failure inducing test:

https://github.com/a3alani/markdown-parser/blob/main/test4.md

I did not add a parathesis before the link url and only after which caused the output of the wrong output.

Screen Shot 2022-05-02 at 7 35 23 PM

Screen Shot 2022-05-02 at 7 07 20 PM


  1. Another failure inducing test: (trying to cover other cases and replace incase any of my main 3 are not valid)

I added a new empty line after the link which caused the program to go into an infinite loop

Screen Shot 2022-05-02 at 7 34 41 PM

Screen Shot 2022-05-02 at 7 14 00 PM

I did not add a parenthesis at the end of the url link

Screen Shot 2022-05-02 at 7 04 52 PM


General Definition:

A bug is a flaw in the computer system that may have zero or many symptoms. While a symptom is a faulty program behavior. As for the failure inducing input it causes the bug to excute and symptoms to appear.

  • For the first test, the failure inducing input was adding the second parathesis at the end of the url link. That caused the bug to execute and the symptom to appear as the program went into an infnite loop.

  • For the second test, the failure inducing input of replacing the paraenthesis with curly brackets caused the program bug to execute because the parathesis was not detected as expected. That caused the symptom to appear and throw and indexOutOfBound exception in the terminal

  • For the third test, the failure inducing input of not adding a parathesis before the url link did not cause a bug but instead resulted in a wrong output than expected

  • For the fourth test, the failure inducing input of adding an empty line after the url caused a bug and resulted the program to go into an infinite loop.

  • As for the last test, failure inducing input of not having a closing parenthesis also caused a bug that resulted in a symptom of an infinite loop.