## Assignment 5

## Question 1 (60 Points)

Create an automated test script for a web application of your choice using Selenium. You must submit a video presentation of your test script, the execution of the script, and the evaluation of the test result.

## Question 2 (60 Points)

Given the following code fragment, create a control flow graph and then answer the questions below:

- Which edges in the control flow graph were executed?
- What is the branch coverage (metric C01)?
- What is the statement coverage (metric C10)?
- Does running test 02 improve branch coverage? --
- What additional test cases do you need to improve branch coverage? --
- Which cases would you need to achieve 100% branch coverage?

**double calc_price (**

double baseprice, double specialprice,

double extraprice, int extras, double discount)

{

double addon_discount;

double result;

if (extras >= 3) addon_discount = 10;

else if (extras >= 5) addon_discount = 15;

else addon_discount = 0;

if (discount > addon_discount)

addon_discount = discount;

result = baseprice / 100.0 * (100 – discount)

+ special_price

+ extraprice / 100.0 * (100 – addon_discount)

return (result)

}

double baseprice, double specialprice,

double extraprice, int extras, double discount)

{

double addon_discount;

double result;

if (extras >= 3) addon_discount = 10;

else if (extras >= 5) addon_discount = 15;

else addon_discount = 0;

if (discount > addon_discount)

addon_discount = discount;

result = baseprice / 100.0 * (100 – discount)

+ special_price

+ extraprice / 100.0 * (100 – addon_discount)

return (result)

}

## Question 3 (Graduate Students ONLY; Undergraduate Students may complete this question for extra credit)

Write 200-300 word reviews of the

**two**following research papers. For each paper, state its intent, contribution, and possible weaknesses.

Resources Required

*Total Number of Earnable Points*: 120 Points

*Approximate Time to Complete*: 6-8 Hours

*Due Date*: see Syllabus or Blackboard