QuestionQuestion

Whitebox Testing
Examine the snippet of code (process.php)
Write a series of explicit tests to test the small application using one or more of the white box methods
• The three main White box testing Techniques are:
1. Statement Coverage
2. Branch Coverage
3. Path Coverage
The spreadsheet/Word document should contain the following columns:
–Line of code being tested
–Input (specific)
–Expected output (specific)
–Testing technique

process.php
<?php

if(isset($_POST['finish']))
{

$name=$_POST['name'];

$grade1=$_POST['grade1'];
$grade2=$_POST['grade2'];
$grade3=$_POST['grade3'];
$grade4=$_POST['grade4'];
$grade5=$_POST['grade5'];


$lettergrade = $grade1 + $grade2 + $grade3 + $grade4 + $grade5;
$finalg = $lettergrade / 5;

if($finalg >= 91)
{
$finalletter = "A";
}
else if($finalg >= 81)
{
$finalletter = "B";
}
else if($finalg >= 71)
{
$finalletter = "C";
}
else
{
$finalletter = "F";
}

?>
<html>
<head>
<title>Online Report Card</title>
</head>
<body>
<p>Welcome to your Personal GPA Calculator <?php echo $name ?>
You have GPA of <?php echo $finalg ?>.</P>
</body>
</html>

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

    By purchasing this solution you'll be able to access the following files:
    Solution.docx.

    $50.00
    for this solution

    or FREE if you
    register a new account!

    PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

    Find A Tutor

    View available Software Testing and Analysis Tutors

    Get College Homework Help.

    Are you sure you don't want to upload any files?

    Fast tutor response requires as much info as possible.

    Decision:
    Upload a file
    Continue without uploading

    SUBMIT YOUR HOMEWORK
    We couldn't find that subject.
    Please select the best match from the list below.

    We'll send you an email right away. If it's not in your inbox, check your spam folder.

    • 1
    • 2
    • 3
    Live Chats