Worksheet: J1
Worksheets are self-guided activities that reinforce lectures. They are due Thursdays the week they are assigned.
Please submit your answers to the questions as comments in a J1.md
markdown file you’ll be writing in this lab. To render your file, create a github repo and upload your file there – it can be viewed in your web browser.
Grading rubric and submission
When you are done, submit your J1.md
file as well as your tests.txt
file to BB.
You will be graded on the following:
Item | Points |
markdown is correctly used as descrived above (5 pts each) | 30 |
Answers are completed (for content above) | 20 |
our tests.txt file that shows all the test cases you wrote in lab (25 pts for any tests, another 25 pts for finding the bug) | 50 |
Questions
-
What is fault localization? Provide your answer using at least one bolded phrase using markdown.
-
What are three benefits of Test Driven Development (TDD)? Provide your answer using an unordered list in markdown.
-
Given the example of requirements for generating a password:
- It must have at least one number.
- It must have at least one uppercase letter.
- It must have at least one lowercase letter.
- It must not contain the website gmail anywhere. (For example if we were generating a password for gmail accounts)
- It can only be made up of letters, numbers, and the underscore.
What are the input domain paritions for this exercise? Provide your answer using an unordered nested lists in markdown.
-
Complete the truth table below to show what inputs we need to achieve active clause coverage for the following conditional:
if ( ( (a > b) or G ) and (x < y) )
a > b G x < y predicate outcome clause responsible Google how to make a table in markdown, and use a table to represent your results, like we did in class.
-
Consider the control flow graph below. What are all the paths (using node numbers) that would achieve full path coverage as a test criteria? Is this a finite set?
When listing all the paths, style your answer so that it appears like code (a code-like font with a gray background).
-
What benefit does mutation testing offer over other testing methods discussed in class? Use a link in markdown to link to the definition of mutation testing we have in our lecture notes from today.
-
Finish the in-class exercise for finding the fault in the
checkCode
method.